From patchwork Tue Mar 13 15:20:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 146432 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 87699B6EEC for ; Wed, 14 Mar 2012 02:23:20 +1100 (EST) Received: from localhost ([::1]:43199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7TZG-0004cq-C2 for incoming@patchwork.ozlabs.org; Tue, 13 Mar 2012 11:23:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7TY4-0002RV-FU for qemu-devel@nongnu.org; Tue, 13 Mar 2012 11:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7TXx-0003JU-OY for qemu-devel@nongnu.org; Tue, 13 Mar 2012 11:22:03 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:37138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7TXx-00038q-Fz for qemu-devel@nongnu.org; Tue, 13 Mar 2012 11:21:57 -0400 Received: by mail-ey0-f173.google.com with SMTP id f11so352200eaa.4 for ; Tue, 13 Mar 2012 08:21:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=qqYdOOX+3VugF/fNH9fzDFWCSJwbyK8pIX5Lu5pmEd4=; b=lq1tdJh/9d+6qg+V86jIYxdHMC99e50WDE92s6ddZAYdCxiFtHU2iexTjI5wv+js5a 0aSu2R76vlxM7cZ/yvbrkysw84873SxOQma+SlFt+bJ6ihhg2yQFvX+QbgnCGziWer0B pynwMHEK2qMgfIC0xA/zyzRgy7WzoWft/YBChATpj7oDePqR5GKTE619Ua/+B43EDVA3 2J6UD0OfqKJnkIz289BKAZrfUqpsIMghVmpmZ0GqEYb63pVN4G57OgtidoigNlk7AKJR pyA8Mvt52FoX97HHgDIHrzAVTVmwu1eskbmP/F5NK9MnpYqzynDsNP3I5P0at+ebu7nZ oU3A== Received: by 10.213.20.135 with SMTP id f7mr649162ebb.90.1331652116586; Tue, 13 Mar 2012 08:21:56 -0700 (PDT) Received: from localhost (254.pool85-58-48.dynamic.orange.es. [85.58.48.254]) by mx.google.com with ESMTPS id n55sm2964766eef.6.2012.03.13.08.21.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Mar 2012 08:21:56 -0700 (PDT) From: "=?UTF-8?q?Marc-Andr=C3=A9=20Lureau?=" To: qemu-devel@nongnu.org Date: Tue, 13 Mar 2012 16:20:59 +0100 Message-Id: <1331652059-10090-12-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1331652059-10090-1-git-send-email-marcandre.lureau@redhat.com> References: <1331652059-10090-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.173 Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , dnb@redhat.com, dlaor@redhat.com, kraxel@redhat.com Subject: [Qemu-devel] [PATCH v4 11/11] audio/rfc: remove PLIVE and PERIOD options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org - period seems to be unused now - plive is very obscure and should either be documented or perhaps removed Signed-off-by: Marc-André Lureau --- 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