You are not logged in.

#1 2017-11-29 14:25:11

filoran
Member
Registered: 2017-11-29
Posts: 1

Configuring pulseaudio profiles and their priority

Hi all,

I'm trying to achieve a setting where audio gets routed automatically to a certain source depending on its availability. My laptop has a single audio card (Intel Sunrise Point-LP HD Audio) with a plethora of pulse profiles for different combination of analog/digital audio. The ones I am interested in are HDMI, internal speakers and headphones (all stereo, combined with internal input which is not an issue right now). The objective would be to have sound going to headphones, if that is unavailable fall back to HDMI, if that is unavailable too fall back to speakers.

The current/default with pamodules module-switch-on-connect and module-device-manager (DE is KDE Plasma) works decently:

  • Connecting headphones: always switches to headphones

  • Connecting HDMI with headphones disconnected: switches to HDMI

  • DISconnecting HDMI with headphones disconnected: switches to speakers

  • DISconnecting HDMI with headphones connected: stays on headphones

Some other cases seem to work less flawlessly:

  • Connecting HDMI with headphones connected: switches to HDMI (expected: stay on headphones)

  • DISconnecting headphones with HDMI connected: switches to speakers (expected: switch to HDMI)

My understanding is that this behaviour is determined by the following rules:

  1. Always switch to a newly available profile; surprisingly this seems to be unrelated to module-switch-on-connect, as unloading the module shows no change in behaviour

  2. When a profile becomes unavailable, switch to the available profile with highest priority

  3. When an output within a profile becomes unavailable, switch to the available output with highest priority within the same profile

The additional caveat is that headphones and speakers are considered two outputs of the same profile (internal audio), so when headphones get unplugged pulse chooses speakers over HDMI to avoid changing profile.

My understanding is that the "correct" solution would be to separate speakers and headphones into two different profiles and manage to assign priorities accordingly. Unfortunately I haven't been able to find documentations on how to do that, nor ideas on a better solution. Has anybody faced something similar and managed to solve the conundrum?

Last edited by filoran (2017-11-29 14:26:30)

Offline

Board footer

Powered by FluxBB