[alsa-devel] Mixer volume/decibel mapping

Raymond Yau superquad.vortex2 at gmail.com
Thu May 20 10:53:14 CEST 2010

2010/5/20 James Courtier-Dutton <james.dutton at gmail.com>

> On 19 May 2010 17:34, Sebastian H. <vand2 at gmx.de> wrote:
> >
> > Hello everyone
> >
> > I'm working on an ALSA-Mixer application for C++/Qt4 and stumbled over
> > volume and decibel mapping for sliders.
> > My question: Is there always an 1 to 1 mapping from volume to decibel and
> vice
> > versa or can there be decibel values in between two volume steps?
> >
> There should be a one to one mapping.
> If the hardware has 200 steps on the volume scale, and those 200 steps
> are published to the user.
> With the dB scale, there will still be the same 200 steps in the dB scale.
> The dB information simply helps the user interface convert each step
> into a dB value.

a stepping function is not continuous and this is why
snd_mixer_selem_set_playback_dB() cannot set decibel values in between two
volume steps

More information about the Alsa-devel mailing list