From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [4321] First cut at WM8750 volume control (Jan Kiszka).
Date: Sun, 04 May 2008 12:47:42 +0200 [thread overview]
Message-ID: <481D944E.7090703@web.de> (raw)
In-Reply-To: <E1JsbL7-0001en-7L@cvs.savannah.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2554 bytes --]
Andrzej Zaborowski wrote:
> Modified: trunk/hw/wm8750.c
> ===================================================================
> --- 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)
...
> @@ -125,6 +133,32 @@
> { 192, 88200, 192, 88200 }, /* SR: 11111 */
> };
>
> +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;
...
> @@ -437,19 +457,21 @@
> break;
>
> case WM8750_LOUT1V: /* LOUT1 Volume */
> - s->outvol[2] = value & 0x7f; /* LOUT2VOL */
> + s->outvol[2] = value & 0x7f; /* LOUT1VOL */
You probably want to add wm8750_vol_update here (and to the other
channels that are now included in volume control).
Great! This just leaves up with
Index: qemu/audio/mixeng.c
===================================================================
--- qemu.orig/audio/mixeng.c
+++ qemu/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
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2008-05-04 10:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 10:21 [Qemu-devel] [4321] First cut at WM8750 volume control (Jan Kiszka) Andrzej Zaborowski
2008-05-04 10:47 ` Jan Kiszka [this message]
2008-05-04 12:31 ` andrzej zaborowski
2008-05-04 15:49 ` andrzej zaborowski
2008-05-04 17:31 ` Jan Kiszka
2008-05-04 17:31 ` Jan Kiszka
2008-05-04 23:59 ` andrzej zaborowski
2008-05-05 18:43 ` [Qemu-devel] [PATCH] Enable volume control globally (was: First cut at WM8750 volume control) Jan Kiszka
2008-05-04 21:33 ` [Qemu-devel] [PATCH] musicpal: doc fragment Jan Kiszka
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=481D944E.7090703@web.de \
--to=jan.kiszka@web.de \
--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).