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

Lennart Poettering mznyfn at 0pointer.de
Sat Apr 12 15:35:36 CEST 2008

On Sat, 12.04.08 12:15, James Courtier-Dutton (James at superbug.co.uk) wrote:

> > I somehow expected that the magic "0dB" setting in ALSA would refer to
> > some sane default, where the final output would have a sensible
> > volume. In this case this is not so. I am thus wondering how ALSA
> > actually defines 0dB? Is this a bug in the hardware that should be
> > worked around in ALSA? Is this an ALSA bug?

> The 0dB is a gain value.
> So 0dB means that the input to the mixer element exactly equals the 
> output from the mixer element.
> So 0dB ensures no distortion will occur.
> It is fine to set the 0dB for all output mixer controls except one.
> The problem comes with the "Master" control, where 0dB generally means 
> the maximum possible volume.

In the case of the USB speakers there is no Master, only PCM. And it
is that PCM volume that is the offender.

My I thus assume that we can say that for all but the last element in
the series 0db means avg input power equals avg output power, and for
the last one 0db means max? That would fit on what you are saying but
also match my usb speakers, not depending on the existance of a

> The correct setting of this is therefore very dependent on the type of 
> amplification that is being done after the sound card master output.
> Everyone's setup will vary. But, on my system a value between -40dB and 
> -30dB seems about ok.
> The user will hear sound, but it will not be too loud.
> I suppose we will need to canvas people on the best value to use.

With all hw I tested this scheme actually seems to work fine. (-40dB,
Intel HDA, those Logitech speakers, Terratech Aureon 5.1.)

> Your report about anything over -41dB is way too loud does present a 
> problem. Obviously, the controls for some sound cards are still 
> calibrated wrong. Unfortunately, the calibration of USB sound cards is 
> not left to ALSA, but in fact the sound card manufacturer sets up the 
> calibration tables for us, so for your Logitech speakers, ALSA would 
> have to add a specific quirk.

Actually, it is fine with -40dB, not just -41dB. But then it gets
rapidly too loud.

> Finally, does anyone else think -40dB for the Master, and 0dB for all 
> other controls is too loud for the default or not?

Works fine with my hardware at least ;-)

My scheme in PA will thus now be:

1) Initialize Master to -40dB
2) If there is no master, initialize PCM to -40dB
3) If there is a master, initialize PCM to 0dB

Does that sound reasonable?


Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

More information about the Alsa-devel mailing list