[pulseaudio-tickets] [Bug 100451] module-switch-on-port-available will only select unavailable ports when a new sink or source appears
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Mar 29 16:47:14 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=100451
--- Comment #2 from Vivek Dasmohapatra <vivek at collabora.co.uk> ---
I don't think your analysis of what this function does matches what happens
here.
Here is some logging I added with the logic corrected per my analysis
(MSOPA lines are logging added by me):
MSOPA: no port mapping, iterating:
MSOPA: current : (null) / 0
MSOPA: candidate: analog-output / 9900
MSOPA: no port mapping, iterating:
MSOPA: current : analog-output / 9900
MSOPA: candidate: analog-output-speaker / 10000
MSOPA: no port mapping, iterating:
MSOPA: current : analog-output-speaker / 10000
MSOPA: candidate: analog-output-headphones / 9000
MSOPA: availability (0) is UNKNOWN, would return NULL // this is where we would
have returned
MSOPA: picking port analog-output-speaker on (null)
MSOPA: Change initial port for sink alsa_output.pci-0000_00_1f.3.analog-stereo?
(0xc1bd50)
Switching initial port for sink 'alsa_output.pci-0000_00_1f.3.analog-stereo' to
'analog-output-speaker'
MSOPA: no port mapping, iterating:
MSOPA: current : (null) / 0
MSOPA: candidate: analog-output / 9900
MSOPA: no port mapping, iterating:
MSOPA: current : analog-output / 9900
MSOPA: candidate: analog-output-speaker / 10000
MSOPA: no port mapping, iterating:
MSOPA: current : analog-output-speaker / 10000
MSOPA: candidate: analog-output-headphones / 9000
MSOPA: availability (0) is UNKNOWN, returning NULL (original logic)
MSOPA: Change initial port for sink alsa_output.pci-0000_00_1f.3.analog-stereo?
((nil))
MSOPA: Leaving initial port for alsa_output.pci-0000_00_1f.3.analog-stereo
alone
Shortly thereafter , with the original logic, PA says this
[pulseaudio] module-device-restore.c: Database contains invalid data for key:
sink:alsa_output.pci-0000_00_1f.3.analog-stereo:null
Whereas with the fixed logic:
[pulseaudio] module-device-restore.c: Restoring volume for sink
alsa_output.pci-0000_00_1f.3.analog-stereo: front-left: 49145 / 75%,
front-right: 49145 / 75%
[pulseaudio] module-device-restore.c: Restoring mute state for sink
alsa_output.pci-0000_00_1f.3.analog-stereo.
Net result: with the inverted logic volume and mute state are restored on
reboot on this laptop, with the original logic they are not.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20170329/b26721be/attachment.html>
More information about the pulseaudio-bugs
mailing list