All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: andrzej zaborowski <balrogg@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] Introduce AUD_set_volume
Date: Fri, 02 May 2008 09:41:48 +0200	[thread overview]
Message-ID: <481AC5BC.9000402@web.de> (raw)
In-Reply-To: <fb249edb0805011908m17957e1eh29933bc0bf08b7d0@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]

andrzej zaborowski wrote:
> I'd like to merge the following instead, I see no point in removing
> per voice volume control if we're still doing scaling in software.  On
> top of that I would apply your wm8750 patch - I have it running now
> and volume setting in MusicPal UI works nicely.

No fundamental concerns.

> 
> The user still needs to disable NOVOL if they really want volume control.

What is the "user" here? wm8750? musicpal? I just hope it is not the
real user... :)

[ QEMU audio setup is already weird enough: I recently tried to get ALSA
running to overcome outdated OSS - well, tricky. Needs fixing. ]

> diff --git a/audio/audio.c b/audio/audio.c
> index 9e7fe80..1231ec5 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -1955,3 +1955,21 @@ void AUD_del_capture (CaptureVoiceOut *cap,
> void *cb_opaque)
>          }
>      }
>  }
> +
> +void AUD_set_volume_out (SWVoiceOut *sw, int mute, uint8_t lvol, uint8_t rvol)
> +{
> +    if (sw) {
> +        sw->vol.mute = mute;
> +        sw->vol.l = nominal_volume.l * lvol / 255;
> +        sw->vol.r = nominal_volume.r * rvol / 255;

As this scaling looks fairly different from my version, I have to test
and think about it first. But my current feeling is that you do not get
the same range. But the API is fine.

> +    }
> +}
> +
> +void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
> +{
> +    if (sw) {
> +        sw->vol.mute = mute;
> +        sw->vol.l = nominal_volume.l * lvol / 255;
> +        sw->vol.r = nominal_volume.r * rvol / 255;
> +    }
> +}
> diff --git a/audio/audio.h b/audio/audio.h
> index ec9eee4..ae29b8a 100644
> --- a/audio/audio.h
> +++ b/audio/audio.h
> @@ -124,6 +124,9 @@ int  AUD_is_active_out (SWVoiceOut *sw);
>  void     AUD_init_time_stamp_out (SWVoiceOut *sw, QEMUAudioTimeStamp *ts);
>  uint64_t AUD_get_elapsed_usec_out (SWVoiceOut *sw, QEMUAudioTimeStamp *ts);
> 
> +void AUD_set_volume_out (SWVoiceOut *sw, int mute, uint8_t lvol, uint8_t rvol);
> +void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol);
> +
>  SWVoiceIn *AUD_open_in (
>      QEMUSoundCard *card,
>      SWVoiceIn *sw,

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

  reply	other threads:[~2008-05-02  8:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 11:26 [Qemu-devel] [PATCH 1/2] Introduce AUD_set_volume Jan Kiszka
2008-04-27 18:35 ` malc
2008-05-02  2:08   ` andrzej zaborowski
2008-05-02  7:41     ` Jan Kiszka [this message]
2008-05-02 10:12       ` andrzej zaborowski
2008-05-02 10:55         ` 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=481AC5BC.9000402@web.de \
    --to=jan.kiszka@web.de \
    --cc=balrogg@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.