[alsa-devel] What does 0dB refer to? (Logitech USB Speakers)

James Courtier-Dutton James at superbug.co.uk
Mon Apr 14 23:07:22 CEST 2008

Lennart Poettering wrote:
> Yes, but what I am asking for is to define the dB values of the master
> control relative to the some ref level on this line-out. What happens
> after the line-out doesn't matter at all.
> Lennart

The aim of the dB values in the ALSA mixer is this.

For Playback:
Set all the mixer controls to 0dB.
Send a sample digital signal from the CPU to the sound card.
The measured analog signal on the line-out should be the same for ALL 
sound cards.

For Capture:
Set all the mixer controls to 0dB.
Send a sample analog signal to the line-in of the sound card.
The captured digital signal at the CPU should be the same for ALL sound 

The reason for using 0dB is that it should mean no gain and no 
attenuation to the signal and so minimize distortions.

Now, we have tried to get this right by looking at datasheets of sound 
cards, but it might not be right for all sound cards yet. It is at least 
a task we may be able to actually achieve.
When the datasheets are wrong, the only available method to get it right 
is actually to measure the analog signals. Can anyone provide a simple 
reliable test for this? E.g. Using this sample .wav file and a cheapo 
digital volt meter, this is the output you should get. I am not even 
sure that a simple digital volt meter can do the task as a volt meter is 
only expecting 50-60Hz, and not all sound cards work at all well at that 

The problem comes with the speakers, that will have varying level of 
amplification/attenuation before them. This is outside of the control of 
ALSA as they are not part of the sound card. This is essentially why 
setting the default MASTER control to anything other than MUTED is 
really the best we can do.

The one exception to this is laptops, where, on an individual basis, we 
could potentially have a constant value indicating the affect that the 
internal speaker amp has on the sound card output to the internal 
speakers. For these, we could probably use ALSA to recommend to userland 
what a sensible default value for the master mixer control should be.

If anyone thinks that there is anything more than this that can be done 
by ALSA, I will be amazed.


More information about the Alsa-devel mailing list