[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/11] hw/ac97: add support for volume control
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH 06/11] hw/ac97: add support for volume control |
Date: |
Mon, 12 Mar 2012 23:42:14 +0400 (MSK) |
User-agent: |
Alpine 2.00 (LNX 1167 2008-08-23) |
On Mon, 12 Mar 2012, Marc-Andr? Lureau wrote:
> Combine output volume with Master and PCM registers values.
> Use default values in mixer_reset ().
> Set volume on post-load to update backend values.
> ---
> hw/ac97.c | 79
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 79 insertions(+), 0 deletions(-)
>
> diff --git a/hw/ac97.c b/hw/ac97.c
> index f7866ed..227233c 100644
> --- a/hw/ac97.c
> +++ b/hw/ac97.c
> @@ -436,6 +436,63 @@ static void reset_voices (AC97LinkState *s, uint8_t
> active[LAST_INDEX])
> AUD_set_active_in (s->voice_mc, active[MC_INDEX]);
> }
>
> +static void get_volume (uint16_t vol, uint16_t mask, int inverse,
> + int *mute, uint8_t *lvol, uint8_t *rvol)
> +{
> + *mute = (vol >> MUTE_SHIFT) & 1;
> + *rvol = (255 * (vol & mask)) / mask;
> + *lvol = (255 * ((vol >> 8) & mask)) / mask;
> + if (inverse) {
> + *rvol = 255 - *rvol;
> + *lvol = 255 - *lvol;
> + }
> +}
Indentation is off here.
[..snip..]
--
mailto:address@hidden
- [Qemu-devel] [PATCH 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP, (continued)
[Qemu-devel] [PATCH 05/11] hw/ac97: the volume mask is not only 0x1f, Marc-André Lureau, 2012/03/12
[Qemu-devel] [PATCH 04/11] hw/ac97: remove USE_MIXER code, Marc-André Lureau, 2012/03/12
[Qemu-devel] [PATCH 06/11] hw/ac97: add support for volume control, Marc-André Lureau, 2012/03/12
- Re: [Qemu-devel] [PATCH 06/11] hw/ac97: add support for volume control,
malc <=
[Qemu-devel] [PATCH 07/11] audio/spice: add support for volume control, Marc-André Lureau, 2012/03/12
[Qemu-devel] [PATCH 11/11] Make mixemu mandatory, Marc-André Lureau, 2012/03/12
[Qemu-devel] [PATCH 08/11] Do not use pa_simple PulseAudio API, Marc-André Lureau, 2012/03/12
[Qemu-devel] [PATCH 09/11] configure: pa_simple is not needed anymore, Marc-André Lureau, 2012/03/12
[Qemu-devel] [PATCH 10/11] Allow controlling volume with PulseAudio backend, Marc-André Lureau, 2012/03/12
Re: [Qemu-devel] [PATCH 00/11] apply volume on client side (v3), malc, 2012/03/12