[alsa-devel] Mixer volume/decibel mapping

Sebastian H. vand2 at gmx.de
Thu May 20 11:41:28 CEST 2010


Am Donnerstag, 20. Mai 2010 10:53:14 schrieb Raymond Yau:
> 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

That's clear.
I imagined that maybe the dB scale could be the "real thing" and the volume 
steps would be a convenient but possibly coarse mapping into a denser 
stepped dB space provided by the hardware/driver.
This was unlikely but I wanted to ask anyway ;-).



More information about the Alsa-devel mailing list