Bug#674936: pulseaudio: disable flat volumes

Jonathan Joseph Chiarella jonathan.chiarella at gmail.com
Fri Apr 22 02:10:21 UTC 2016


Hello,

Another user chiming in. I would like to see Flat-volumes disabled by
default, system-wide in the /etc configuration file. This was the older
pulseaudio behavior and now we have downstream Ubuntu (and all of its
derivatives) as well as Arch and now even Fedora (whose parent, RedHat,
is home to PulseAudio founders and current key developers) have made the
switch.

I have written to the downstream TAILS distribution asking them to
switch for practical and because the surreptitious raising of the master
volume is especially worrisome for TAILS users who are especially likely
to use headphones.

I exchanged some emails on the mailing list a few months back.
Unfortunately, a tentative solution offered was to tweak each individual
app that comes with TAILS to make sure it doesn't raise the master
volume. Below are some excerpts.

(Thank you for making a rock solid Linux distribution!)

******

Flat-volumes are disadvantageous for the user experience.

1. Flat volumes effectively render the master volume pointless.
   (A) Moving the slider down only lowers the volume of streams that
were set at the same level that the master volume was.
   (B) If any stream moves above the master volume, the master volume
moves up, but this is just cosmetic, since the master volume does not
set any limits. The only effect is that moving streams altogether will
now be changed and all streams move in tandem in different ways
   (C) If any new streams open at 100%, the master volume is set at
100% while old streams remain low, destroying any proportionality you
would want to keep by just moving the master volume slider.
   (D) The master volume is not truly a master volume. Each individual
audio output stream is actually an independent stream that controls
the audio card directly and is irrelevant to whatever level the master
volume is set.

2. Flat volumes do not behave like physical mixers, which are the
source for the concept of and the source for the visual representation
of a "master volume".
   (A) In a real mixer, or with flat volumes disabled, the master
volume controls the audio card. Each stream remains always a
proportional equal to or less than the volume. So if some programme
outputs at 100%, it will be 100% of the master volume.
   (B) Moving the master volume will not ever affect the volumes of
audio streams relative to one another.
   (C) The addition of new inputs will not affect the max output level
set by the audio card. No unauthorized raising of master volume.

3. Accessibility and safety
   (A) If flat volumes are used, then any new stream (like System
sounds, one that comes and goes) could open at 100%, raising the
master volume, but more importantly it would output at max volume
allowed by sound card. Since Tails is used often discreetly, the usage
of headphones is to be expected. The shock of sudden jumps in volume
is dangerous.
   (B) Since those who care or know about this and those who have it
explained prefer non-flat volumes in the majority and since Tails is
strict about its persistence, the flat-volumes default will
inconvenience most users and they will not be able to configure it a
persistent way (not even per-user through ~/.pulse)

4. User expectations and general preferences
   (A) The argument of "That's how Windows does it and Windows is
widely used" is not an argument for a good user experience.
   (B) The previous argument is not true. Before Vista, Windows did
not have flat volumes. It also lacked the integration of
in-application volume sliders and stream volumes like many poorly
integrated ALSA or Pulseaudio audio players on *nix.
   (C) Even post-Vista, Windows flat volumes do not behave like Pulse
in flat volume mode. It is more like a hybird of the two. So it is
inappropriate to hold up Windows since it does not behave like
Pulseaudio does.
   (D) The volume slider on some pairs of headsets behaves exactly
like the true/traditional master volume concept.
   (E) Downstream of Debian is Ubuntu and its re-spins and
derivatives. These overwhelmingly form the majority of desktop Linux
installations and are the first experience most have with *nix on the
desktop.

There is a long discussion at reddit at
<www.reddit.com/r/linux/comments/2rjiaa/horrible_decisions_flat_volumes_in_pulseaudio_a>

The very problem described in the reddit original post was experienced
often, I believe, by Chris Fisher of Jupiter Broadcasting (Linux
Action Show etc) this month. He blamed KDE for not preventing it. I do
not know what caused him to have his volume spikes, but I switched to
non-flat years ago for because of this problem and I know that Chris
Fisher's usual distro is Arch, which uses flat volumes. So I am
guessing he takes flat volumes for granted or is unaware/forgot that
non-flat volumes are a thing on desktops and is suffering from the
same problem.

Flat Volume PROS: default (but Tails changes defaults all the time) as
advocated by Poettering and is somewhat similar to Windows Vista and
post-Vista

Flat Volume CONS: Reasons mentioned above.

Using flat-volumes when users do not want them, in the worst case
scenario, blows out their ears, causing damage.

Using non-flat/normal volumes when users do not want them, in the
worst case scenario, makes you unable to instantly make a given stream
play at the absolute maximum volume of your sound card. If stream AV
player is 50% and Master Volume is 83%, then, in order to get AV player
to play at the absolute maximum of the sound card, you have to raise the
Master volume on the panel or through media keys and also move up the
slider in the AV player window.

****

One of the arguments for Flat Volumes is that it avoids clipping in the
following scenario: Poorly designed media player has volume set low, to
be a proportion of the master volume which is high. Though the sound
card and the final audio output sent to ALSA are both well within
limits, the media player has already compressed the audio and already
applied clipping. This edge case is not relevant for Tails since no one
is using poorly designed media players yet also demanding high fidelity
in the output.

As said before, the likely scenario is someone using Tails in a cafe
with headphones. In this case, we should strive to avoid having system
sounds or new streams get created and jack up the master volume. A user
would set the master/sound card volume to the tolerable limit of the
headphones. If the loudest sound on my computer on my headphones is
tolerable at 80%, then I set my master volume in PulseAudio at 80% and
configure all applications to be a fraction of the master volume. In
other words, no app or stream, even at relative 100%, could possibly
make sound card output higher than 80% of its physical capacity.

Under flat volumes, the master volume loses this capacity to set a
maximum volume. At best, it sets a recommended starting volume for any
new output streams that appear.

As it is, Tails changes many default settings and this would just be one
more.

My recommendation applies to most installations of PulseAudio (except
for some possible DJ/mixing scenarios - but then you would be using JACK
and not PulseAudio), but it is especially relevant for the Tails user,
who may be using Tails in public to listen to important content and
probably using headphones. The unintentional broadcasting of content by
suddenly high volumes, the attention drawn, and the damage done to ears
with the headphones are things that we must avoid.

*****



<bugzilla.redhat.com/show_bug.cgi?id=1265267>

Good discussion on possible changes to defaults in Fedora...remote hope
for PulseAudio itself.

One note: user Alexander E. Patrokov says "clipping" when he means
limiting, as in non-flat master volume control being the only way to
prevent large sudden spikes in sound levels. Forget about audio
distortion "clipping" (square shape sound waves).(1)

Flat volumes only has a surface resemblance to Windows - it is not
"easier" for Windows converts. Commentator brings up questions by new
users confused by flat volumes. I will add that Windows forums are as
filled with confusion over the Vista and post-Vista volumes. Integration
of application volume sliders with Audio mixer panel streams was never
widespread.

To summarize, one master volume and various application volumes is
easiest. Pulseaudio, in the early days, had great addition, which was
visualization of application streams in panel and synchronization with
the respective in-app volume sliders.

(1) If anything, the direct control of the physical sound card/DAC
(digital to analog converter) helps in reducing distortion, but
PulseAudio applies mixing and must resample if various simultaneous
streams have differing sampling frequencies. In other words, the
marginal gains in flat volumes are countered by several other points in
the chain. The choice of words here is imperfect since "clipping" can
mean putting a cap on levels or on distortion caused by low bit depth,
over amplification upstream, poor speakers, etc.

A specific issue is Gnome system alerts. They only appear for a second
and disappear - no time to adjust volume slider. In any case it would be
after the fact. Alert sounds could play at 100% of the sound card level.

Tails places importance on accessibility. My suggestions prioritize user
experience and safety over misguided and failed attempts to mimic
Windows Vista and concerns for direct sound output - and, again,
professionals use JACK in the use cases where one would specifically
want flat volumes. Or the app hijacks all Pulseaudio sound.



More information about the pkg-pulseaudio-devel mailing list