Activate audio device (pulseaudio profile) when it becomes available again
In certain circumstance, audio is played from internal speakers, while I expect it to be played via another Pulseaudio profile (in this case via Display Port).
My setup consists of:
- F31 Silverblue
- Thinkpad X230 docked to docking station
- Monitor attached via Display Port to docking station
- Speakers plugged into monitor
Pulseaudio detects one audio device with several profiles, see pactl-list.txt for details. The two of interest for me are:
output:analog-stereo(the crappy internal speakers)
Steps to reproduce
- Boot the machine with monitor turned on beforehand – Settings will show DP audio as the only device. PA has the corresponding profile activated.
- Undock the machine – Settings will show internal speakers as the only device. PA switches to the corresponding profile.
- Dock the machine again – Settings will show two devices, DP audio and internal speakers. PA does not switch a profile.
Music should play enchantingly from DP audio.
Music plays menacingly from crappy speakers :-)
There could be an automatic switch. Similar to a headphone that is plugged in, DP audio profile would be activated when it becomes available. This is based on the presumption that internal speakers are always bad. Alternatively I can imagine config options in Settings app, where user picks a device as preferred. I'm unsure how that would fit in the current design, where DP audio vanishes from the dropdown.