How to auto-mute when there are 2 sound devices

Everything about X, Gnome, KDE, ... and everything running on it

How to auto-mute when there are 2 sound devices

Postby nononsense » 2019-11-21 04:50

I have a setup with an an onboard sound card and a built-in speaker on my monitor screen connected via HDMI. Plugging in headphone jack doesn't automatically switch between the 2 devices i.e. mute the speaker and outputs audio through headphone and vice versa. Instead, I have to manually choose which device outputs audio with pavucontrol. I have auto-mute enabled on the onboard sound card but still, manual intervention is needed for the switch. Kindly share your opinion on how I may achieve this. Thanks.
nononsense
 
Posts: 12
Joined: 2019-08-27 13:10

Re: How to auto-mute when there are 2 sound devices

Postby CwF » 2019-11-23 13:50

disable the hdmi audio...?
I believe default situation is onboard OR hdmi. If your hdmi is additional and manually enabled without disabling the onboard, the disable of the hdmi needs to be manually done also.
The possibility is there are multiple sink endpoints on a single installation and why would you want all outputs disabled when you plug in headphones? The automagic is to only disable primary audio with headphone insertion, not any others. You would need to write that rule to disable all, somewhere in some mysterious or absent udev rule...?
CwF
 
Posts: 511
Joined: 2018-06-20 15:16

Re: How to auto-mute when there are 2 sound devices

Postby nononsense » 2019-11-24 12:46

CwF wrote:disable the hdmi audio...?
I believe default situation is onboard OR hdmi. If your hdmi is additional and manually enabled without disabling the onboard, the disable of the hdmi needs to be manually done also.
The possibility is there are multiple sink endpoints on a single installation and why would you want all outputs disabled when you plug in headphones? The automagic is to only disable primary audio with headphone insertion, not any others. You would need to write that rule to disable all, somewhere in some mysterious or absent udev rule...?


Let me put it as plain as possible. I want my display monitor built-in audio attached via HDMI to auto mute whenever I plug in my headphone jack. As simple as that. I don't want to manually switch between the sinks via pavucontrol/pactl. I've been looking for ways to get this done for some time now.

I can set the onboard sound card as default sink (or "fallback" as in pavucontrol) when the headphone jack's not connected and it will later become the default sink after I plug it in but this is not persistent. If I have to constantly do this, I might as well just choose them manually.

By the way, thanks for the response.
nononsense
 
Posts: 12
Joined: 2019-08-27 13:10


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable