[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 11/11] audio/rfc: remove PLIVE and PERIOD options
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v4 11/11] audio/rfc: remove PLIVE and PERIOD options |
Date: |
Tue, 13 Mar 2012 16:20:59 +0100 |
- period seems to be unused now
- plive is very obscure and should either be documented or perhaps removed
Signed-off-by: Marc-André Lureau <address@hidden>
---
audio/audio.c | 35 -----------------------------------
audio/audio_template.h | 26 --------------------------
2 files changed, 0 insertions(+), 61 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index bb94133..c2e6e15 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -30,7 +30,6 @@
#define AUDIO_CAP "audio"
#include "audio_int.h"
-/* #define DEBUG_PLIVE */
/* #define DEBUG_LIVE */
/* #define DEBUG_OUT */
/* #define DEBUG_CAPTURE */
@@ -62,11 +61,6 @@ struct fixed_settings {
static struct {
struct fixed_settings fixed_out;
struct fixed_settings fixed_in;
- union {
- int hertz;
- int64_t ticks;
- } period;
- int plive;
int log_to_monitor;
int try_poll_in;
int try_poll_out;
@@ -96,8 +90,6 @@ static struct {
}
},
- .period = { .hertz = 250 },
- .plive = 0,
.log_to_monitor = 0,
.try_poll_in = 1,
.try_poll_out = 1,
@@ -1453,9 +1445,6 @@ static void audio_run_out (AudioState *s)
while (sw) {
sw1 = sw->entries.le_next;
if (!sw->active && !sw->callback.fn) {
-#ifdef DEBUG_PLIVE
- dolog ("Finishing with old voice\n");
-#endif
audio_close_out (sw);
}
sw = sw1;
@@ -1642,18 +1631,6 @@ static struct audio_option audio_options[] = {
},
/* Misc */
{
- .name = "TIMER_PERIOD",
- .tag = AUD_OPT_INT,
- .valp = &conf.period.hertz,
- .descr = "Timer period in HZ (0 - use lowest possible)"
- },
- {
- .name = "PLIVE",
- .tag = AUD_OPT_BOOL,
- .valp = &conf.plive,
- .descr = "(undocumented)"
- },
- {
.name = "LOG_TO_MONITOR",
.tag = AUD_OPT_BOOL,
.valp = &conf.log_to_monitor,
@@ -1898,18 +1875,6 @@ static void audio_init (void)
}
}
- if (conf.period.hertz <= 0) {
- if (conf.period.hertz < 0) {
- dolog ("warning: Timer period is negative - %d "
- "treating as zero\n",
- conf.period.hertz);
- }
- conf.period.ticks = 1;
- } else {
- conf.period.ticks =
- muldiv64 (1, get_ticks_per_sec (), conf.period.hertz);
- }
-
e = qemu_add_vm_change_state_handler (audio_vm_change_state_handler, s);
if (!e) {
dolog ("warning: Could not register change state handler\n"
diff --git a/audio/audio_template.h b/audio/audio_template.h
index 519432a..4120afb 100644
--- a/audio/audio_template.h
+++ b/audio/audio_template.h
@@ -433,29 +433,6 @@ SW *glue (AUD_open_, TYPE) (
return sw;
}
-#ifdef DAC
- if (conf.plive && sw && (!sw->active && !sw->empty)) {
- live = sw->total_hw_samples_mixed;
-
-#ifdef DEBUG_PLIVE
- dolog ("Replacing voice %s with %d live samples\n", SW_NAME (sw),
live);
- dolog ("Old %s freq %d, bits %d, channels %d\n",
- SW_NAME (sw), sw->info.freq, sw->info.bits, sw->info.nchannels);
- dolog ("New %s freq %d, bits %d, channels %d\n",
- name,
- as->freq,
- (as->fmt == AUD_FMT_S16 || as->fmt == AUD_FMT_U16) ? 16 : 8,
- as->nchannels);
-#endif
-
- if (live) {
- old_sw = sw;
- old_sw->callback.fn = NULL;
- sw = NULL;
- }
- }
-#endif
-
if (!glue (conf.fixed_, TYPE).enabled && sw) {
glue (AUD_close_, TYPE) (card, sw);
sw = NULL;
@@ -495,9 +472,6 @@ SW *glue (AUD_open_, TYPE) (
* old_sw->info.bytes_per_second
/ sw->info.bytes_per_second;
-#ifdef DEBUG_PLIVE
- dolog ("Silence will be mixed %d\n", mixed);
-#endif
sw->total_hw_samples_mixed += mixed;
}
#endif
--
1.7.7.6
- [Qemu-devel] [PATCH v4 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP, (continued)
[Qemu-devel] [PATCH v4 09/11] Allow controlling volume with PulseAudio backend, Marc-André Lureau, 2012/03/13
[Qemu-devel] [PATCH v4 10/11] Enable mixemu by default, add runtime option, Marc-André Lureau, 2012/03/13
[Qemu-devel] [PATCH v4 07/11] Do not use pa_simple PulseAudio API, Marc-André Lureau, 2012/03/13
[Qemu-devel] [PATCH v4 11/11] audio/rfc: remove PLIVE and PERIOD options,
Marc-André Lureau <=
[Qemu-devel] [PATCH v4 08/11] configure: pa_simple is not needed anymore, Marc-André Lureau, 2012/03/13
[Qemu-devel] [PATCH v4 06/11] audio/spice: add support for volume control, Marc-André Lureau, 2012/03/13