[alsa-devel] wrong decibel data?

Raymond Yau superquad.vortex2 at gmail.com
Fri Apr 16 15:48:35 CEST 2010

2010/4/3 Colin Guthrie <gmane at colin.guthr.ie>

> 'Twas brillig, and Nicolo' Chieffo at 02/04/10 21:25 did gyre and gimble:
> > I just had a discussion with pulseaudio developers in which they told
> > me that if the speakers don't emit any audio when the ALSA volume is
> > 0%, then the correct gain value should be -inf dB (a value lower than
> > -200 for pulseaudio means mute). Unfortunately my card has -48 dB.
> >
> > They also said that if with -47.25 dB (which is what I get with ALSA
> > volume set to 2%) I can hear audio even if it's very very low, at -48
> > dB I should still be able to hear something (the scale is
> > logarithmic).
> >
> > Their request is to change to -200 the gain reported from my card
> > driver when the ALSA volume is set to 0%.
> > Thanks
> FWIW, I've got the same/similar h/w with a cutoff at 14% in PA as you
> have. I've been meaning to get this fixed for a while, but I'm
> incredibly lazy with certain things that don't bother me practically, so
> haven't followed it up yet.
> Thanks for getting the ball rolling :)
> If any specific debug is needed here, feel free to ask.
> Col
I don't agree *Lennart Poettering say *"ALSA does not define any reference
point for the dB scale it exports in its mixer controls "

For most of the driver with dB scale,  the 0dB point is the reference point
,  the reason is PA developer choose a cubic mapping  "It's now cubic, which
is supposed to be feel more 'natural'."


>> Because PA exposes the same volume scale mapping on all hardware.

>> In 0.9.15 we mapped 0% on the volume scale to -90dB and 100% to 0dB,
in between the mapping between those percentages and the dB scale was
linear (i.e. to the effect that we had an overall logarithmic

>> This mapping is not particularly well chosen since it gives too much
control over the uninteresting parts below -20dB and too little
control over the 'interesting' parts above -20dB. That's why I modified
the mapping in PA git. It's now cubic, which is supposed to be feel
more 'natural'.

>> So, coming back to how PA maps those volumes to ALSA: alsamixer will expose
the exact discrete volume steps of the sound card and show dB
information just as little help at the side. PA however controls the
volume in dB and if the hw doesn't provide the requested volume step
we go to the next higher and then attenuate by the remaining factor in
software. That way we can provide the same volume range and granularity on all
hardware with the same mapping from the UI to the attenuation
factor. So basically, while tha mapping from those percentages to the
loudness is different in PA and alsamixer, the dB scaling is mostly
the same -- except when it is not...

More information about the Alsa-devel mailing list