deferred volume burst sink volume and mess up balance
Submitted by Tom Yan
Assigned to pul..@..op.org
Description
So basically I have experienced two weird issue with "enable-deferred-volume" (w/ or w/o flat-volume, the same).
My card is ASUS Xonar Essence STX. Before I did the test cases I made sure nothing else touches the state/volume of my card (e.g. masked alsa-utils services and udev rule).
The following is the pairs for sink in tdbdump ~/.config/pulse/*-device-volumes.tdb
in a fresh set of ~/.config/pulse:
{ key(47) = "sink:alsa_output.pci-0000_07_04.0.analog-stereo" data(4) = "B\010N" } { key(76) = "sink:alsa_output.pci-0000_07_04.0.analog-stereo:analog-output;output-speaker" data(16) = "B\010m\00v\0000B\01fB\01PN" }
And after I pacmd set-sink-mute 0 no
, the second pair changes to:
{ key(76) = "sink:alsa_output.pci-0000_07_04.0.analog-stereo:analog-output;output-speaker" data(16) = "B\010m\00v\0010B\01fB\01PN" }
Up til now the volume is -60.00dB.
Then I reboot, the second pair changes again:
{ key(76) = "sink:alsa_output.pci-0000_07_04.0.analog-stereo:analog-output;output-speaker" data(26) = "B\011m\02\01\02v\02\00\01\00\00\00\01\00\0010B\01fB\01PN" }
Now the volume is 0dB. FWIW, the volume will not go up automatically until I unmute AND reboot.
Then I turn it down to -60.00dB again (but still unmuted) in alsamixer, the second pair changes to:
{ key(76) = "sink:alsa_output.pci-0000_07_04.0.analog-stereo:analog-output;output-speaker" data(26) = "B\011m\02\01\02v\02\00\00\19\9A\00\00\19\9A10B\01fB\01PN" }
Then if I reboot now, it won't go up to 0dB again.
Another problem is, with deferred volume enabled (again, w/ or w/o flat-volume), in some random reboot the balance would be messed up.
Assuming the volume was set to 0dB, it will always be the left channel being lowered to either 1%:
{ key(76) = "sink:alsa_output.pci-0000_07_04.0.analog-stereo:analog-output;output-speaker" data(26) = "B\011m\02\01\02v\02\00\00\01\FF\00\01\00\0010B\01fB\01PN" }
or 10% (-60.00dB):
{ key(76) = "sink:alsa_output.pci-0000_07_04.0.analog-stereo:analog-output;output-speaker" data(26) = "B\011m\02\01\02v\02\00\00\19\9A\00\01\00\0010B\01fB\01PN" }
It seems that with deferred volume disabled, both issue would be gone.
P.S. Is it useful under any circumstances to enable deferred volume but not flat volume? Since now Arch Linux already disable flat volume by default, I figure I should propose to disable deferred volume as well.