[alsa-devel] Bug in alsa-lib or alsamixer and amixer

Raymond Yau superquad.vortex2 at gmail.com
Sat Jun 19 02:39:35 CEST 2010

2010/6/17 James Courtier-Dutton <james.dutton at gmail.com>

> On 17 June 2010 00:34, Raymond Yau <superquad.vortex2 at gmail.com> wrote:
> > 2010/6/17 Colin Guthrie <gmane at colin.guthr.ie>
> >
> >
> >>> But this sucks as
> >>> the percentage shown in alsa is not the same as the percentage shown in
> >>> other GUIs.
> >
> > alsamixer and amixer 's percentage were not designed as your purpose
> >
> > Have you studied the source code of alsamixer and amixer
> >
> > the alsa developers have already posted a lot of time in the mailist list
> ,
> > they prefer to use dB scale instead of percentage
> >
> That is exactly why percentages are bad. One cannot relate one control
> to another if one used percentages.
> Say that an  audio card had two controls that adjust the gain of the
> audio one after the other.
> If I set to to 5% above base_volume and the second 5% below
> base_volume, would the output be base_volume???
> the first 5% might be +5dB, and the second might be -4dB, one does not
> know.
> Whereas, in dB, if one was set to -5dB, and the other set to +5dB, we
> would be sure that the accumulative output would have a gain of 0dB.
> Percentages are not nor real units at all, dB are.
> Kind Regards
> James

It is because alsamixer and amixer only need to display the "Master" volume
control of one card at a time while pavucontrol and the new version of gnome
volume control have to handle the "Master" volume control when PA switch
sound cards

Different sound cards have different dB rangle for Playback and Capture.

If PA really use decibel range defined in those codec/DAC specification , it
has to resize the slider of the Master Volume control or rescaling the

To simpify the implementation of the slider ,  a new "PA dB scale" is used
by shift those +12dB(base volume) to 0dB and insist that every sound card 's
minimum_dB is -inf dB ,

This mean that all sound cards will now have same "PA  dB range" , the
volume slider does not need resize or rescaling any more. This is why they
prefer to use percentage to make you believe their calculation of dB is

More information about the Alsa-devel mailing list