[alsa-devel] Issues and/or possible bugs in alsa
Alexander E. Patrakov
patrakov at gmail.com
Wed Feb 25 09:14:30 CET 2015
25.02.2015 03:46, Yomi Ogunwumi wrote:
> Third. This is just a question. Is this :
> https://bugs.freedesktop.org/show_bug.cgi?id=86676 actually a pulseaudio
> bug, or is it an issue with alsa?
> I'm only asking since Raymond linked something that seemed to belong to the
> alsa project.
>
This is a bug both in ALSA and in PulseAudio.
The ALSA part (from the user viewpoint) is that the softvol plugin does
not reprocess the already-submitted but buffered samples when the volume
changes. But it can't, because that would require an additional thread
for monitoring the software volume changes, and such thread does not exist.
The PulseAudio part of the bug is that it does not deactivate softvols,
even though it can apply volume in software itself. In October 2014, in
Dusseldorf, a general agreement has been reached on the following arguments:
* ALSA has no API to definitely distinguish softvols from other controls.
* ALSA has the snd_ctl_elem_info_is_user() API function that tells
whether this is a userspace control.
* All softvols are userspace controls.
* There are other kinds of userspace controls, but they are rare.
* If a control is named PCM Playback Volume and is a userspace
control, then it's likely a softvol. Not bulletproof, but a good-enough
heuristic.
* On finding a softvol, PulseAudio should set it to 100% (so that it
doesn't eat CPU) and don't touch from that point on.
But nobody has implemented this so far.
The relevant code can be placed in the src/modules/alsa/alsa-mixer.c
file in PulseAudio source tree. I guess that element_probe() is a good
place. If you know C programming, a contribution would be welcome.||
--
Alexander E. Patrakov
More information about the Alsa-devel
mailing list