Received: from eggs.gnu.org ([2001:4830:134:3::10]:49200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4TV1-0006no-Ji for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:28:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4TUz-000646-0i for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:28:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4TUy-00062x-Oc for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:28:20 -0400 From: Gerd Hoffmann Date: Mon, 15 Jun 2015 14:28:07 +0200 Message-Id: <1434371291-6994-17-git-send-email-kraxel@redhat.com> In-Reply-To: <1434371291-6994-1-git-send-email-kraxel@redhat.com> References: <1434371291-6994-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 16/20] audio: remove plive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= From: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n It was useless even 3 years ago, so it can probably safely go away: https://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg02427.html Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n Signed-off-by: Gerd Hoffmann --- audio/audio.c | 12 ------------ audio/audio_template.h | 41 ----------------------------------------- 2 files changed, 53 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index cb1cba9..5be4b15 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -30,7 +30,6 @@ #define AUDIO_CAP "audio" #include "audio_int.h" =20 -/* #define DEBUG_PLIVE */ /* #define DEBUG_LIVE */ /* #define DEBUG_OUT */ /* #define DEBUG_CAPTURE */ @@ -66,7 +65,6 @@ static struct { int hertz; int64_t ticks; } period; - int plive; int try_poll_in; int try_poll_out; } conf =3D { @@ -95,7 +93,6 @@ static struct { }, =20 .period =3D { .hertz =3D 100 }, - .plive =3D 0, .try_poll_in =3D 1, .try_poll_out =3D 1, }; @@ -1443,9 +1440,6 @@ static void audio_run_out (AudioState *s) while (sw) { sw1 =3D 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 =3D sw1; @@ -1637,12 +1631,6 @@ static struct audio_option audio_options[] =3D { .valp =3D &conf.period.hertz, .descr =3D "Timer period in HZ (0 - use lowest possible)" }, - { - .name =3D "PLIVE", - .tag =3D AUD_OPT_BOOL, - .valp =3D &conf.plive, - .descr =3D "(undocumented)" - }, { /* End of list */ } }; =20 diff --git a/audio/audio_template.h b/audio/audio_template.h index f716d97..99b27b2 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -398,10 +398,6 @@ SW *glue (AUD_open_, TYPE) ( ) { AudioState *s =3D &glob_audio_state; -#ifdef DAC - int live =3D 0; - SW *old_sw =3D NULL; -#endif =20 if (audio_bug (AUDIO_FUNC, !card || !name || !callback_fn || !as)) { dolog ("card=3D%p name=3D%p callback_fn=3D%p as=3D%p\n", @@ -426,29 +422,6 @@ SW *glue (AUD_open_, TYPE) ( return sw; } =20 -#ifdef DAC - if (conf.plive && sw && (!sw->active && !sw->empty)) { - live =3D 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.ncha= nnels); - dolog ("New %s freq %d, bits %d, channels %d\n", - name, - as->freq, - (as->fmt =3D=3D AUD_FMT_S16 || as->fmt =3D=3D AUD_FMT_U16= ) ? 16 : 8, - as->nchannels); -#endif - - if (live) { - old_sw =3D sw; - old_sw->callback.fn =3D NULL; - sw =3D NULL; - } - } -#endif - if (!glue (conf.fixed_, TYPE).enabled && sw) { glue (AUD_close_, TYPE) (card, sw); sw =3D NULL; @@ -481,20 +454,6 @@ SW *glue (AUD_open_, TYPE) ( sw->callback.fn =3D callback_fn; sw->callback.opaque =3D callback_opaque; =20 -#ifdef DAC - if (live) { - int mixed =3D - (live << old_sw->info.shift) - * 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 +=3D mixed; - } -#endif - #ifdef DEBUG_AUDIO dolog ("%s\n", name); audio_pcm_print_info ("hw", &sw->hw->info); --=20 1.8.3.1