You are not logged in.

#1 2021-02-17 13:17:38

sorsarre
Member
Registered: 2021-02-17
Posts: 1

Auto-switch to headphones on another playback device, pulseaudio

Hi folks!

I have an audio switching conundrum that's been annoying me for some time already.

The setup is as follows: the speakers are built-ins on a monitor working through HDMI output, and the headphones are being connected through the front panel (the monitor's rear sockets won't work for some reason, but that's another story altogether).
Now, out of the box, auto-switch works alrighty as long as we're talking about switching outputs on the same audio device. But that, unfortunately, is not my case.
What I would like to achieve is switching the whole primary playback device (i.e. HDMI -> built-in/headphones and vice versa) when headphones get (un)plugged.

I've spent quite a boatload of time trying to google up anything useful on the matter, but all I've managed to find so far are the advice on single-device output switch.
So I wonder if anyone had dealt with this kind of setup in the past. Any pointers would be much appreciated!

Offline

#2 2021-02-17 13:31:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,237

Re: Auto-switch to headphones on another playback device, pulseaudio

Is module-switch-on-connect enabled? It isn't by default and it is the module for full per device switches though I'm not sure how well it reacts to a port switch and whether it does consider that in it's logic.

You can likely script something by listening to the ACPI jack event regardless and then moving devices appropriately  see the acpid wiki and this earlier thread with an example script for how that could look like: https://bbs.archlinux.org/viewtopic.php … 4#p1646244

Offline

Board footer

Powered by FluxBB