From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
dnb@redhat.com, dlaor@redhat.com, kraxel@redhat.com
Subject: [Qemu-devel] [PATCH v4 11/11] audio/rfc: remove PLIVE and PERIOD options
Date: Tue, 13 Mar 2012 16:20:59 +0100 [thread overview]
Message-ID: <1331652059-10090-12-git-send-email-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <1331652059-10090-1-git-send-email-marcandre.lureau@redhat.com>
- period seems to be unused now
- plive is very obscure and should either be documented or perhaps removed
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
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
next prev parent reply other threads:[~2012-03-13 15:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 15:20 [Qemu-devel] [PATCH v4 00/11] apply volume on client side Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 01/11] audio: add VOICE_VOLUME ctl Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 03/11] hw/ac97: remove USE_MIXER code Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 04/11] hw/ac97: the volume mask is not only 0x1f Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 05/11] hw/ac97: add support for volume control Marc-André Lureau
2012-03-13 15:37 ` malc
2012-03-13 16:04 ` Marc-André Lureau
2012-03-13 16:07 ` malc
2012-03-13 16:23 ` Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 06/11] audio/spice: " Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 07/11] Do not use pa_simple PulseAudio API Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 08/11] configure: pa_simple is not needed anymore Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 09/11] Allow controlling volume with PulseAudio backend Marc-André Lureau
2012-03-13 15:20 ` [Qemu-devel] [PATCH v4 10/11] Enable mixemu by default, add runtime option Marc-André Lureau
2012-03-13 15:20 ` Marc-André Lureau [this message]
2012-03-13 15:47 ` [Qemu-devel] [PATCH v4 11/11] audio/rfc: remove PLIVE and PERIOD options malc
2012-03-14 9:22 ` Gerd Hoffmann
2012-03-14 11:20 ` Marc-André Lureau
2012-03-14 11:49 ` Gerd Hoffmann
2012-03-14 12:13 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331652059-10090-12-git-send-email-marcandre.lureau@redhat.com \
--to=marcandre.lureau@gmail.com \
--cc=dlaor@redhat.com \
--cc=dnb@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).