Bug 92717 - deferred volume burst sink volume and mess up balance
Summary: deferred volume burst sink volume and mess up balance
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: alsa (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-29 00:00 UTC by Tom Yan
Modified: 2018-07-30 10:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
card-database tdb (44.00 KB, application/octet-stream)
2015-10-29 00:03 UTC, Tom Yan
Details
stream-volumes tdb (696 bytes, application/octet-stream)
2015-10-29 00:04 UTC, Tom Yan
Details
initial device-volume tdb (12.00 KB, application/octet-stream)
2015-10-29 00:08 UTC, Tom Yan
Details
device-volumes tdb after setting mute to no (12.00 KB, application/octet-stream)
2015-10-29 00:09 UTC, Tom Yan
Details
device-volumes tdb after reboot and volume is set to 0dB automatically (12.00 KB, application/octet-stream)
2015-10-29 00:11 UTC, Tom Yan
Details
device-volumes tdb after turning volume down to -60.00dB in alsamixer again (12.00 KB, application/octet-stream)
2015-10-29 00:12 UTC, Tom Yan
Details
device-volumes tdb when left channel is lowered to 1% (12.00 KB, application/octet-stream)
2015-10-29 00:14 UTC, Tom Yan
Details
device-volumes tdb when left channel is lowered to 10% (12.00 KB, application/octet-stream)
2015-10-29 00:14 UTC, Tom Yan
Details

Description Tom Yan 2015-10-29 00:00:05 UTC
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.
Comment 1 Tom Yan 2015-10-29 00:03:26 UTC
Created attachment 119267 [details]
card-database tdb

sha512sum'd that it's the same in all mentioned cases
Comment 2 Tom Yan 2015-10-29 00:04:59 UTC
Created attachment 119268 [details]
stream-volumes tdb

sha512sum'd that it's the same in all mentioned cases
Comment 3 Tom Yan 2015-10-29 00:08:26 UTC
Created attachment 119269 [details]
initial device-volume tdb

create from a fresh set of ~/.config/pulse create after a power cycle; last set is rm -R'd after making sure pulse is killed and will not be autospawned through anyway; nothing elses touches the card's states
Comment 4 Tom Yan 2015-10-29 00:09:27 UTC
Created attachment 119270 [details]
device-volumes tdb after setting mute to no
Comment 5 Tom Yan 2015-10-29 00:11:55 UTC
Created attachment 119272 [details]
device-volumes tdb after reboot and volume is set to 0dB automatically

nothing different from one of setting volume to 0x10000 through pacmd with deferred volume disabled
Comment 6 Tom Yan 2015-10-29 00:12:50 UTC
Created attachment 119273 [details]
device-volumes tdb after turning volume down to -60.00dB in alsamixer again
Comment 7 Tom Yan 2015-10-29 00:14:04 UTC
Created attachment 119274 [details]
device-volumes tdb when left channel is lowered to 1%
Comment 8 Tom Yan 2015-10-29 00:14:30 UTC
Created attachment 119275 [details]
device-volumes tdb when left channel is lowered to 10%
Comment 9 Raymond 2015-10-29 15:22:41 UTC
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa?id=fcbbe34e001b9bee3e73a663e9bf9ddc11c0a1d5

do you mean the workaround does not work as expected ?
Comment 10 Tom Yan 2015-10-29 18:00:13 UTC
(In reply to Raymond from comment #9)
> http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/
> alsa?id=fcbbe34e001b9bee3e73a663e9bf9ddc11c0a1d5
> 
> do you mean the workaround does not work as expected ?

Not sure I follow here. How is this patch related to my issue? I am not using my STX with any surround daughter card.
Comment 11 GitLab Migration User 2018-07-30 10:38:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/543.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.