[pulseaudio-discuss] [Packagers] alsa-lib patch to fix "mute @ 16%" problems (or at least some of them!)

Colin Guthrie gmane at colin.guthr.ie
Sat Oct 9 06:46:23 PDT 2010


Hi,

As with David's campaign to fix up some volume issues, I was able to
hijack a thread of his on alsa-devel to discuss issues relating to my
own volume quirks.

For a long time, if my volume went below 16% (ish, technically @ -46.5dB
and below) it was effectively muted.

As it turns out my h/w is misbehaving. The HDA specs (apparently) state
that a slider should not mute things when set to 0, and rather use a
separate mute switch. For my hardware, this was fixed by the following
kernel patch:
http://permalink.gmane.org/gmane.linux.alsa.devel/77644

This TLV fix does not actually solve the issue, but it does report it
correctly. Sadly this didn't seem to make any difference by itself, so I
dug a little deeper.

PA uses snd_mixer_selem_set_playback_dB() to set the volume. It uses a
dir argument of +1 to request to alsa "please don't go lower than I
request" (i.e. round up). Sadly the function in alsa-lib that deals with
this did not check for the "min is mute" TLV flag and thus happily set
the volume to min (and thus mute) when we wanted a volume less than -46.5dB.

So the following patch to alsa-lib fixes this problem:
http://permalink.gmane.org/gmane.linux.alsa.devel/77693


So I now have a properly working volume range \o/ I expect that any
other hardware that makes use of this quirk will also suffer from the
same problem and thus I would encourage distros to include the alsa-lib
patch.


Thanks to David and Clemens for help tracking this down.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list