[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


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:

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:

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

Thanks to David and Clemens for help tracking this down.



Colin Guthrie

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