Re: Mixer volume/decibel mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Raymond Yau wrote:
> I have doubt about DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
> 
> since the datasheet mention that dB range is only -48dB to 0dB
> 
> ATT = 20 log10 (ATT_DATA / 255) [dB]
> 
> How can AK4396 has scale of -inf DB to 0dB in the driver code  ?

When ATT_DATA = 0, there is no output, which is an attenuation of -inf.
The next value, ATT_DATA = 1, results in ATT = -48 dB.

> BTW , if ymf7xx (DSP) only accept 16 bit digital PCM data and output to
> 18-20 bit AC97 codec ,

The DSP uses more precise values internally.

> how can the per stream volume control has a scale -inf dB to 0dB ?

multiplication factor 0:  dB = 20 log10(0) = -inf
multiplication factor 1:  dB = 20 log10(1) = 0

This is true regardless of the precision of the multiplier.  Even a one-
bit factor behaves like this; in fact, this would describe a mute switch.


HTH
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux