From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Krempa <pkrempa@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 1/5] audio: pa: Set volume of recording stream instead of recording device
Date: Mon, 6 Jun 2016 09:02:55 +0200 [thread overview]
Message-ID: <1465196579-26804-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1465196579-26804-1-git-send-email-kraxel@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Since pulseaudio 1.0 it's possible to set the individual stream volume
rather than setting the device volume. With this, setting hardware mixer
of a emulated sound card doesn't mess up the volume configuration of the
host.
A side effect is that this limits compatible pulseaudio version to 1.0
which was released on 2011-09-27.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 78853815be2069971b89b3a2e3181837064dd8f3.1462962512.git.pkrempa@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/paaudio.c | 11 +++++------
configure | 4 ++--
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/audio/paaudio.c b/audio/paaudio.c
index 57678e7..65beb6f 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -781,23 +781,22 @@ static int qpa_ctl_in (HWVoiceIn *hw, int cmd, ...)
pa_threaded_mainloop_lock (g->mainloop);
- /* FIXME: use the upcoming "set_source_output_{volume,mute}" */
- op = pa_context_set_source_volume_by_index (g->context,
- pa_stream_get_device_index (pa->stream),
+ op = pa_context_set_source_output_volume (g->context,
+ pa_stream_get_index (pa->stream),
&v, NULL, NULL);
if (!op) {
qpa_logerr (pa_context_errno (g->context),
- "set_source_volume() failed\n");
+ "set_source_output_volume() failed\n");
} else {
pa_operation_unref(op);
}
- op = pa_context_set_source_mute_by_index (g->context,
+ op = pa_context_set_source_output_mute (g->context,
pa_stream_get_index (pa->stream),
sw->vol.mute, NULL, NULL);
if (!op) {
qpa_logerr (pa_context_errno (g->context),
- "set_source_mute() failed\n");
+ "set_source_output_mute() failed\n");
} else {
pa_operation_unref (op);
}
diff --git a/configure b/configure
index b5aab72..6d01d96 100755
--- a/configure
+++ b/configure
@@ -2813,8 +2813,8 @@ for drv in $audio_drv_list; do
;;
pa)
- audio_drv_probe $drv pulse/mainloop.h "-lpulse" \
- "pa_mainloop *m = 0; pa_mainloop_free (m); return 0;"
+ audio_drv_probe $drv pulse/pulseaudio.h "-lpulse" \
+ "pa_context_set_source_output_volume(NULL, 0, NULL, NULL, NULL); return 0;"
libs_softmmu="-lpulse $libs_softmmu"
audio_pt_int="yes"
;;
--
1.8.3.1
next prev parent reply other threads:[~2016-06-06 7:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 7:02 [Qemu-devel] [PULL 0/5] audio patch queue Gerd Hoffmann
2016-06-06 7:02 ` Gerd Hoffmann [this message]
2016-06-06 7:02 ` [Qemu-devel] [PULL 2/5] hw/audio: QOM'ify cs4231.c Gerd Hoffmann
2016-06-06 7:02 ` [Qemu-devel] [PULL 3/5] hw/audio: QOM cleanup for intel-hda Gerd Hoffmann
2016-06-06 7:02 ` [Qemu-devel] [PULL 4/5] hw/audio: QOM'ify intel-hda Gerd Hoffmann
2016-06-06 7:02 ` [Qemu-devel] [PULL 5/5] hw/audio: QOM'ify milkymist-ac97.c Gerd Hoffmann
2016-06-06 12:21 ` [Qemu-devel] [PULL 0/5] audio patch queue Peter Maydell
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=1465196579-26804-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=pkrempa@redhat.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 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).