After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767698 - alsasink: does not implement "volume" property
alsasink: does not implement "volume" property
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.6.3
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-15 14:57 UTC by Andrey
Modified: 2016-06-20 17:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrey 2016-06-15 14:57:41 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.
Comment 1 Sebastian Dröge (slomo) 2016-06-17 08:39:54 UTC
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?
Comment 2 Andrey 2016-06-17 11:18:24 UTC
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
$
Comment 3 Tim-Philipp Müller 2016-06-17 11:32:37 UTC
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)?
Comment 4 Sebastian Dröge (slomo) 2016-06-17 11:42:05 UTC
(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.
Comment 5 Victor Toso 2016-06-20 13:09:49 UTC
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.
Comment 6 Sebastian Dröge (slomo) 2016-06-20 15:52:21 UTC
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
Comment 7 Nicolas Dufresne (ndufresne) 2016-06-20 17:38:48 UTC
Please continue this discussion over the mailing list, or IRC if needed.