[pulseaudio-discuss] [PATCH 0/5] volume: Decrease PA_VOLUME_MAX to be < 2^31

Colin Guthrie gmane at colin.guthr.ie
Sun Oct 10 02:46:46 PDT 2010

'Twas brillig, and David Henningsson at 10/10/10 09:19 did gyre and gimble:
> On 2010-10-09 20:27, Arun Raghavan wrote:
>> and this would make that
>> considerably simpler (and more fruitful, since we'd have to jump
>> through hoops
>> to deal with volumes>= 2^31 while doing signed multiplication). If we
>> choose
>> to retain the old hand-optimised assembly, that should also benefit
>> from this
>> change.
> I'm not exactly sure where and for what PA_VOLUME_MAX is used, but does
> it correspond to 0 dB in any way? Thinking assembly, could it be that we
> have some e g fixed-point arithmetic that we must compensate?

No, PA_VOLUME_NORM represents 0dB (or rather *our* 0dB as the alsa 0dB
point is represented by Base Volume (which varies from h/w to h/w). I
can't really think of any implementation that genuinely uses
PA_VOLUME_MAX, so I think considering this value to be internal is safe
enough even if it is technically exposed via public headers (in other
words it *shouldn't* be changed, but for all practical uses, it can be).

I'd also like to expose a new constant in the headers called
PA_VOLUME_OVERDRIVE (or similarly named) that represents +11dB and
should be our generally recommended "overdrive" (aka software
amplification > 100%) amount for volume control UIs.

Currently gnome-volume-control allows up to PA_VOLUME_NORM*1.5 which is
~= +11dB via current mappings, which is one reason why we previously
decided on +11dB as our overdrive amount. That said, other volume
control UIs (pavucontrol, kmix and, surprisingly,
gnome-volume-control-applet) only allow volumes up to PA_VOLUME_NORM, so
the idea would be to allow them to go right up to PA_VOLUME_OVERDRIVE,
and hopefully implement an appropriate use of colours and markers etc.
to make it clear to the user that they may not want to go >100% or risk




Colin Guthrie

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

More information about the pulseaudio-discuss mailing list