All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/11] RFC: apply volume on client stream
@ 2011-09-21 16:10 Marc-André Lureau
  2011-09-21 16:10 ` [Qemu-devel] [PATCH 01/11] audio: add VOICE_VOLUME ctl Marc-André Lureau
                   ` (24 more replies)
  0 siblings, 25 replies; 40+ messages in thread
From: Marc-André Lureau @ 2011-09-21 16:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau

Hi,

The qemu volume control experience could be improved. Without mixemu,
the volume control has no effect. A volume applet will just feel
broken (except in some cases where software volume is applied on guest
side, with HDA/Windows7 for example). 

And a few other problems:

 - the guest should have a full-range hw volume control over actual
   audio device.
   See https://bugzilla.redhat.com/show_bug.cgi?id=482089

 - one volume should rule them all (no need to control guest,
   stream and client volumes separately)

 - the client volume should be set to match the guest on connection,
   ex: volume and mute should be restored

 - backend should hopefully be better at applying volume effect
   (PulseAudio rely on HW as much as possible, and then optimized
   routines)

  - ideally, we would sync both ways guest <-> client, that would
    probably require guest agent helper to be notified on update

The flat-volume logic of PulseAudio (and Windows) ensures a stream get
a full-range volume control. Thus, the "guest volume" can rely on its
"client stream volume" to have control over the full volume range.

I propose an audio backend claiming VOICE_VOLUME_CAP should handle
VOICE_VOLUME messages and apply the volume/mute received. In this
case mixeng_clear / mixeng_volume aren't applied.

I modified the PA backend as a proof of concept (I had to drop the
pa_simple API, as I can't see how to modify a stream volume
otherwise).

Spice and spice-gtk client have already been supporting volume control
for a while, but qemu part is the missing bit.

Marc-André Lureau (11):
  audio: add VOICE_VOLUME ctl
  audio: don't apply volume effect if backend has VOICE_VOLUME_CAP
  audio: use a nominal volume of 1^32-1
  hw/ac97: remove USE_MIXER code
  hw/ac97: the volume mask was not always 0x1f
  hw/ac97: new support for volume control
  audio/spice: add support for volume control
  RFC: use full PulseAudio API, largely adapted from pa_simple*
  RFC: configure: pa_simple is not needed anymore
  RFC: allow controlling volume with PulseAudio backend
  RFC: make mixemu mandatory

 audio/audio.c          |   25 +++-
 audio/audio_int.h      |    6 +
 audio/audio_template.h |    2 +
 audio/mixeng.c         |    6 -
 audio/paaudio.c        |  452 +++++++++++++++++++++++++++++++++++++++++++-----
 audio/spiceaudio.c     |   43 +++++
 configure              |   14 +--
 hw/ac97.c              |  141 ++++++----------
 hw/hda-audio.c         |    4 -
 9 files changed, 533 insertions(+), 160 deletions(-)

-- 
1.7.6.2

^ permalink raw reply	[flat|nested] 40+ messages in thread
* [Qemu-devel] [PATCH 00/11] apply volume on client side (v3)
@ 2012-03-12 18:50 Marc-André Lureau
  2012-03-12 18:50 ` [Qemu-devel] [PATCH 09/11] configure: pa_simple is not needed anymore Marc-André Lureau
  0 siblings, 1 reply; 40+ messages in thread
From: Marc-André Lureau @ 2012-03-12 18:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, dnb, dlaor, kraxel

Hello,

This patch series implements client-side audio volume support. This reduces confusion of guest users when volume control is not effective (because mixemu is disabled or because client-side is muted and can't be unmuted by the guest..)

Instead, the backend is responsible for applying volume giving the guest control over the full range of the client, and avoiding multiple level of volume/mute effects.

Although I was mainly interested in having the Spice audio backend support, I also added PulseAudio backend support (which unfortunately requires full-blown API, even after quick discussion with upstream).

Marc-André Lureau (11):
  audio: add VOICE_VOLUME ctl
  audio: don't apply volume effect if backend has VOICE_VOLUME_CAP
  audio: use a nominal volume of UINT_MAX
  hw/ac97: remove USE_MIXER code
  hw/ac97: the volume mask is not only 0x1f
  hw/ac97: add support for volume control
  audio/spice: add support for volume control
  Do not use pa_simple PulseAudio API
  configure: pa_simple is not needed anymore
  Allow controlling volume with PulseAudio backend
  Make mixemu mandatory

 audio/audio.c          |   25 +++-
 audio/audio_int.h      |    6 +
 audio/audio_template.h |    2 +
 audio/mixeng.c         |    6 -
 audio/paaudio.c        |  452 +++++++++++++++++++++++++++++++++++++++++++-----
 audio/spiceaudio.c     |   41 +++++
 configure              |   14 +--
 hw/ac97.c              |  141 ++++++----------
 hw/hda-audio.c         |    4 -
 9 files changed, 531 insertions(+), 160 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2012-03-12 18:51 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-21 16:10 [Qemu-devel] [PATCH 00/11] RFC: apply volume on client stream Marc-André Lureau
2011-09-21 16:10 ` [Qemu-devel] [PATCH 01/11] audio: add VOICE_VOLUME ctl Marc-André Lureau
2011-09-21 16:10 ` [Qemu-devel] [PATCH 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 03/11] audio: use a nominal volume of 1^32-1 Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 04/11] hw/ac97: remove USE_MIXER code Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 05/11] hw/ac97: the volume mask was not always 0x1f Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 06/11] hw/ac97: new support for volume control Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 07/11] audio/spice: add " Marc-André Lureau
2011-10-11  8:49   ` Gerd Hoffmann
2011-10-13 12:06     ` Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 08/11] RFC: use full PulseAudio API, largely adapted from pa_simple* Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 09/11] RFC: configure: pa_simple is not needed anymore Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 10/11] RFC: allow controlling volume with PulseAudio backend Marc-André Lureau
2011-09-21 16:11 ` [Qemu-devel] [PATCH 11/11] RFC: make mixemu mandatory Marc-André Lureau
2011-10-11  8:54 ` [Qemu-devel] [PATCH 00/11] RFC: apply volume on client stream Gerd Hoffmann
2011-10-13 12:26 ` [Qemu-devel] [PATCH 01/11] audio: add VOICE_VOLUME ctl Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 03/11] audio: use a nominal volume of 1^32-1 Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 04/11] hw/ac97: remove USE_MIXER code Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 05/11] hw/ac97: the volume mask was not always 0x1f Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 06/11] hw/ac97: new support for volume control Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 07/11] audio/spice: add " Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 08/11] audio: use full PulseAudio API, largely adapted from pa_simple* Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 09/11] configure: pa_simple is not needed anymore Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 10/11] audio: allow controlling volume with PulseAudio backend Marc-André Lureau
2011-10-13 12:26   ` [Qemu-devel] [PATCH 11/11] audio: make mixemu mandatory Marc-André Lureau
2012-03-01 14:27 ` [Qemu-devel] [PATCH 00/11] apply volume on client side Marc-André Lureau
2012-03-01 14:27 ` [Qemu-devel] [PATCH 01/11] audio: add VOICE_VOLUME ctl Marc-André Lureau
2012-03-01 14:27 ` [Qemu-devel] [PATCH 02/11] audio: don't apply volume effect if backend has VOICE_VOLUME_CAP Marc-André Lureau
2012-03-01 14:27 ` [Qemu-devel] [PATCH 03/11] audio: use a nominal volume of 1^32-1 Marc-André Lureau
2012-03-01 15:16   ` Eric Blake
2012-03-01 14:28 ` [Qemu-devel] [PATCH 04/11] hw/ac97: remove USE_MIXER code Marc-André Lureau
2012-03-01 14:28 ` [Qemu-devel] [PATCH 05/11] hw/ac97: the volume mask was not always 0x1f Marc-André Lureau
2012-03-01 14:28 ` [Qemu-devel] [PATCH 06/11] hw/ac97: new support for volume control Marc-André Lureau
2012-03-01 14:28 ` [Qemu-devel] [PATCH 07/11] audio/spice: add " Marc-André Lureau
2012-03-01 14:28 ` [Qemu-devel] [PATCH 08/11] Do not use pa_simple PulseAudio API Marc-André Lureau
2012-03-01 14:28 ` [Qemu-devel] [PATCH 09/11] configure: pa_simple is not needed anymore Marc-André Lureau
2012-03-01 14:28 ` [Qemu-devel] [PATCH 10/11] Allow controlling volume with PulseAudio backend Marc-André Lureau
2012-03-01 14:28 ` [Qemu-devel] [PATCH 11/11] Make mixemu mandatory Marc-André Lureau
2012-03-12 18:50 [Qemu-devel] [PATCH 00/11] apply volume on client side (v3) Marc-André Lureau
2012-03-12 18:50 ` [Qemu-devel] [PATCH 09/11] configure: pa_simple is not needed anymore Marc-André Lureau

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.