GNOME Bugzilla – Bug 767698
alsasink: does not implement "volume" property
Last modified: 2016-06-20 17:38:48 UTC
It's related to https://bugs.freedesktop.org/show_bug.cgi?id=93544#c31 I have VM (qemu) with WindowsXP guest on it. I use Gstreamer and gst-plugins-good-1.6.3. And I don't use 'pulseaudio'. The sound volume control is not working. I can hear sound from guest OS either on maximum or no sound at all.
What exactly is the problem here? GStreamer has no API (in 1.x) for soundcard mixer controls, this is to be handled by the application by using whatever API is available on the platform (pulseaudio, alsa, ...). For the simple cases, playbin has a volume property and that should always work. Is your problem that this one does not work?
I am using alsasink. As Victor Toso mentioned (link above), it doesn't have volume implemented, while pulsesink does. checked with gst-inspect-1.0 ------ pulsesink element from pulseaudio ------- $ gst-inspect-1.0 pulsesink | grep -i volume GstStreamVolume volume : Linear volume of this stream, 1.0=100% ------ alsasink element from alsa ------ $ gst-inspect-1.0 alsasink | grep -i volume $
I don't think there's any API for that at the ALSA level (to change it for the stream/output only and not system-wide)?
(In reply to Andrey from comment #2) > I am using alsasink. As Victor Toso mentioned (link above), it doesn't have > volume implemented, while pulsesink does. playbin will then use the volume element instead, which should solve this too. If ALSA has no API for per-stream volumes, there's nothing we can do here. Someone would have to research the ALSA APIs.
Hi, (In reply to Andrey from comment #2) > I am using alsasink. As Victor Toso mentioned (link above), it doesn't have > volume implemented, while pulsesink does. Yes! I thought alsamixer would be able to set per-stream volume with something like [0] but I could be wrong. I implemented something using this API but for system-wide, seting the master volume to avoid disparity between remote-machine and client-machine [1]. [0] http://www.alsa-project.org/alsa-doc/alsa-lib/group___simple_mixer.html#gad9b0c9a6d7956f95132aa42857d962cb [1] https://cgit.freedesktop.org/spice/linux/vd_agent/commit/?id=010dc21f35fb3997ade6717e10c6a3b52a1737ba (In reply to Sebastian Dröge (slomo) from comment #4) > If ALSA has no API for per-stream volumes, there's nothing we can do here. > Someone would have to research the ALSA APIs. Indeed.
That's exactly the problem: the mixer is global and not per stream. Global volume settings are out of scope for GStreamer currently, until someone cones up with an API and it is considered useful
Please continue this discussion over the mailing list, or IRC if needed.