[alsa-devel] Mixer volume/decibel mapping

Clemens Ladisch clemens at ladisch.de
Tue May 25 10:45:50 CEST 2010


Raymond Yau wrote:
> 2010/5/21 Clemens Ladisch <clemens at ladisch.de>
> > DB_LINEAR means that the mixer control value is a multiplier for the
> > PCM sample value, as James wrote.  A DB_LINEAR mapping has
> > 0 == -infinity dB, full scale == 0 dB, and the mapping between mixer
> > control values and corresponding dB values it _not_ linear.
> 
> pci/oxygen/oxygen.c:static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
> pci/oxygen/hifier.c:static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
> 
> Refer to AK4396 datasheet
> 
> Output Volume
> 
> The AK4396 includes channel independent digital output volumes (ATT) with
> 256 levels at linear step including MUTE.
> These volumes are in front of the DAC and can attenuate the input data from
> 0dB to –48dB and mute.
> 
> dB range is -48dB to 0dB only
> 
> ATT7-0: Attenuation Level
>         ATT = 20 log10 (ATT_DATA / 255) [dB]
>         FFH : 0dB (Default)
>         00H : Mute

This is the section of the datasheet on which the above declarations are
based.

Now if you have some remark or question, you should remember to include
it in your mail.


Regards,
Clemens


More information about the Alsa-devel mailing list