From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jt5fs-0000Rc-KE for qemu-devel@nongnu.org; Mon, 05 May 2008 14:44:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jt5fr-0000Qt-LF for qemu-devel@nongnu.org; Mon, 05 May 2008 14:44:32 -0400 Received: from [199.232.76.173] (port=50495 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt5fr-0000Qp-I1 for qemu-devel@nongnu.org; Mon, 05 May 2008 14:44:31 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jt5fr-0008Rs-1d for qemu-devel@nongnu.org; Mon, 05 May 2008 14:44:31 -0400 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id A0EEED997F75 for ; Mon, 5 May 2008 20:43:20 +0200 (CEST) Received: from [88.65.243.112] (helo=[192.168.1.198]) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1Jt5eh-0000jE-00 for qemu-devel@nongnu.org; Mon, 05 May 2008 20:43:19 +0200 Message-ID: <481F5546.6070207@web.de> Date: Mon, 05 May 2008 20:43:18 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <481D944E.7090703@web.de> <481DF2EB.9070604@web.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] Enable volume control globally (was: First cut at WM8750 volume control) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org andrzej zaborowski wrote: > On 04/05/2008, Jan Kiszka wrote: >> andrzej zaborowski wrote: >> > On 04/05/2008, Jan Kiszka wrote: >> >> -#define NOVOL >> >> +//#define NOVOL >> >> >> >> /* 8 bit */ >> >> #define ENDIAN_CONVERSION natural >> >> >> >> to make the MusicPal work out-of-the-box (muting is now broken again, >> >> causing loud noise during channel switches and while in suspended mode). >> > >> > Right, as I said you need to disable NOVOL manually if you want volume >> > control. Changing this would affect users of all machines of all >> > architectures and until now everyone was fine with using the host >> > mixer instead of software mixing in qemu. >> >> >> Well, this is a weak argument. So far there was no alternative available. > > I'm sure there would be an alternative if anybody wanted it. > >> I don't let you go with this ;): How should we find out what needs to be >> fixed - given that hardly anyone is able to test on its own all the >> supported boards with appropriate sound scenarios? What regressions are >> you aware of when we switch NOVOL off? > > The regression is the overhead of two 32bit multiplications per sample > per channel even if the virtual sound card you use has no volume > control. For the wm8750 that's not easily noticeable but I'm > personally not making it a default and not globally. (But I won't > oppose if there's a wider agreement). Well, let's start like below, and if someone complains, think about a step-wise move towards out-of-the-box mixer support in QEMU. ---------- As we now have the possibility to set per-channel volume levels, thus to emulated sound hardware more realistically, we just need to enable the application of this values by disabling 'NOVOL'. Users can still disable this support if desired or required, but it should be the aim now to fix potential remaining issues of the soft-mixer. This patch also unbreaks the MusicPal emulation, which depends on the mute control so that users have to tweak the source code right now. Signed-off-by: Jan Kiszka --- audio/mixeng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/audio/mixeng.c =================================================================== --- a/audio/mixeng.c +++ b/audio/mixeng.c @@ -28,7 +28,7 @@ #define AUDIO_CAP "mixeng" #include "audio_int.h" -#define NOVOL +//#define NOVOL /* 8 bit */ #define ENDIAN_CONVERSION natural