[pulseaudio-discuss] [PATCH 2/3] alsa: Default to 30% in absence of sink hw volume

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Dec 1 06:18:25 PST 2014


On Mon, 2014-11-17 at 13:33 +0100, David Henningsson wrote:
> 
> On 2014-11-16 09:10, Tanu Kaskinen wrote:
> > If a sound card has no hardware volume that we could query when
> > creating a sink, 30% is a better default volume than 100%. 100% is
> > likely to be far too loud.
> 
> To reiterate Alexander's comment, this highly depends on the type of 
> output. Also, not sure percentage is the correct unit here.

What would be the correct unit? Decibels? What we are interested in is
that the absolute volume isn't too high by default, and decibels
wouldn't be any better, because they describe a relative volume, not the
absolute volume. We don't have any idea of what the absolute volume will
be at any given level, we have to just pick a value that is likely to be
not too loud but not silent either.

I think percentage is a good unit here, since it's easier to understand
than decibels. We are talking about software volume here, so the
percentage has defined mapping to decibels anyway, if that's needed for
something.

> For reference here's ALSA's init defaults (/usr/share/alsa/init/default):
> 
> # Basic rules are:
> #  - keep volumes at minimal level, but sound should be hearable
> #  - enable just main speakers for playback and main microphone for 
> recording
> #
> 
> ENV{ppercent}:="75%"
> ENV{cpercent}:="75%"
> ENV{pvolume}:="-20dB"
> ENV{cvolume}:="12dB"
> 
> (where p and c stands for "playback" and "capture").

So alsa defines both percentages and decibels in its default
configuration? That makes sense, since it's better to set the default
relative to 0dB than to maximum, but if the decibel information isn't
available, then alsa falls back to the percentage defaults.

30% in PulseAudio seems to map to -31.37dB, so my proposal is a fair bit
quieter than the default in alsa. On my hardware 30% seems like a good
level, though...

-- 
Tanu



More information about the pulseaudio-discuss mailing list