policy-device-routes: change default volume to 0.4 on cubic scale

It's safer to have the default volume value at significant attenuation,
to mitigate situations where the output is at high gain.

Use linear scale 0.4^3 (-24 dB), which puts Pulseaudio volume sliders at
40%, as a better starting value than 0.4 (-8 dB / 74%).  E.g. for many
Bluetooth headphones, the volume at 74% is still uncomfortably high, and
a lower value is better.
This commit is contained in:
Pauli Virtanen 2022-07-07 14:52:39 +03:00 committed by George Kiagiadakis
parent c16e637c32
commit affdf36a29
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ device_defaults.properties = {
["use-persistent-storage"] = true,
-- the default volume to apply to ACP device nodes, in the linear scale
--["default-volume"] = 0.4,
--["default-volume"] = 0.064,
-- Whether to auto-switch to echo cancel sink and source nodes or not
["auto-echo-cancel"] = true,

View file

@ -14,7 +14,7 @@ local config = ... or {}
use_persistent_storage = config["use-persistent-storage"] or false
-- the default volume to apply
default_volume = tonumber(config["default-volume"] or 0.4)
default_volume = tonumber(config["default-volume"] or 0.4^3)
-- table of device info
dev_infos = {}