From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jsbl1-0003ow-Aw for qemu-devel@nongnu.org; Sun, 04 May 2008 06:47:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jsbkz-0003oa-Nl for qemu-devel@nongnu.org; Sun, 04 May 2008 06:47:51 -0400 Received: from [199.232.76.173] (port=49111 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jsbkz-0003oW-EG for qemu-devel@nongnu.org; Sun, 04 May 2008 06:47:49 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jsbky-0008UE-Or for qemu-devel@nongnu.org; Sun, 04 May 2008 06:47:49 -0400 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate02.web.de (Postfix) with ESMTP id 7E1A6DB2A75B for ; Sun, 4 May 2008 12:47:47 +0200 (CEST) Received: from [88.64.12.179] (helo=[192.168.1.198]) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1Jsbkx-0003hV-00 for qemu-devel@nongnu.org; Sun, 04 May 2008 12:47:47 +0200 Message-ID: <481D944E.7090703@web.de> Date: Sun, 04 May 2008 12:47:42 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] [4321] First cut at WM8750 volume control (Jan Kiszka). References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0F54D09A0E2A4280D45F1BA9" Sender: jan.kiszka@web.de 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0F54D09A0E2A4280D45F1BA9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Andrzej Zaborowski wrote: > Modified: trunk/hw/wm8750.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- trunk/hw/wm8750.c 2008-05-04 08:16:10 UTC (rev 4320) > +++ trunk/hw/wm8750.c 2008-05-04 10:21:03 UTC (rev 4321) =2E.. > @@ -125,6 +133,32 @@ > { 192, 88200, 192, 88200 }, /* SR: 11111 */ > }; > =20 > +static void wm8750_vol_update(struct wm8750_s *s) > +{ > + /* FIXME: multiply all volumes by s->invol[2], s->invol[3] */ > + > + AUD_set_volume_in(*s->in[0], s->mute, > + s->inmute[0] ? 0 : 0xff, > + s->inmute[1] ? 0 : 0xff); > + > + /* FIXME: multiply all volumes by s->outvol[0], s->outvol[1] */ > + > + /* Speaker: LOUT2VOL ROUT2VOL */ > + AUD_set_volume_out(s->dac_voice[0], s->mute, > + s->outmute[0] ? 0 : WM8750_VOL_TRANSFORM(s->outvol= [4]), > + s->outmute[1] ? 0 : WM8750_VOL_TRANSFORM(s->outvol= [5])); > + > + /* Headphone: LOUT2VOL ROUT2VOL */ LOUT1VOL / ROUT1VOL > + AUD_set_volume_out(s->dac_voice[1], s->mute, > + s->outmute[0] ? 0 : WM8750_VOL_TRANSFORM(s->outvol= [2]), > + s->outmute[1] ? 0 : WM8750_VOL_TRANSFORM(s->outvol= [3])); > + > + /* MONOOUT: MONOVOL MONOVOL */ > + AUD_set_volume_out(s->dac_voice[2], s->mute, > + s->outmute[0] ? 0 : WM8750_VOL_TRANSFORM(s->outvol= [6]), > + s->outmute[1] ? 0 : WM8750_VOL_TRANSFORM(s->outvol= [6])); > +} > + > static void wm8750_set_format(struct wm8750_s *s) > { > int i; =2E.. > @@ -437,19 +457,21 @@ > break; > =20 > case WM8750_LOUT1V: /* LOUT1 Volume */ > - s->outvol[2] =3D value & 0x7f; /* LOUT2VOL */ > + s->outvol[2] =3D value & 0x7f; /* LOUT1VOL */ You probably want to add wm8750_vol_update here (and to the other channels that are now included in volume control).=20 Great! This just leaves up with Index: qemu/audio/mixeng.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- qemu.orig/audio/mixeng.c +++ qemu/audio/mixeng.c @@ -28,7 +28,7 @@ #define AUDIO_CAP "mixeng" #include "audio_int.h" =20 -#define NOVOL +//#define NOVOL =20 /* 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). Could you comment on the remaining issuing of non-NOVOL and a roadmap to finally overcome that switch? Jan --------------enig0F54D09A0E2A4280D45F1BA9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIHZRSniDOoMHTA+kRAiJcAJ49fcQ3YTwGIbmFGlHXUinEuFU/JgCeNrW6 uFY3C6rvAHBInpsd2MXLURw= =6Pd0 -----END PGP SIGNATURE----- --------------enig0F54D09A0E2A4280D45F1BA9--