Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"pulseaudio" forces switching sources on the go.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sat Jan 02, 2021 1:17 pm    Post subject: "pulseaudio" forces switching sources on the go. Reply with quote

hi

i am running my media box with my tv on one displaylink (hdmi3) and my vr HMD on one hdmi (hdmi4) .ATM i have created a sink:

Code:

set-default-sink combined


the problem i am having is that the HMD is not always on and both are connected to the same card . when the HMD starts pulseaudio still defaults to hdmi3
and i like to make puleaudio to switch to hdmi4 when it is ON.

i have tried this to :

Code:

load-module module-alsa-sink device="hw:3,9" sink_name=hdmi3 sink_properties="device.description='Marantz' device.icon_name='display-link'"

load-module module-alsa-sink device="hw:3,10" sink_name=hdmi4 sink_properties="device.description='HMD' device.icon_name='hdmi'"

load-module module-combine-sink sink_name=combined_output slaves=hdmi3,hdmi4 sink_properties="device.description='Combined Marantz + HMD' device.icon_name='audio-card-symbolic'"
set-default-sink Combined Marantz + HMD


with no go

regards
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1658

PostPosted: Sat Jan 02, 2021 7:05 pm    Post subject: Reply with quote

I have always had allot of luck using Udev rules for stuff like this. I'd try something like this:
See https://stackoverflow.com/questions/5469828/how-to-create-a-callback-for-monitor-plugged-on-an-intel-graphics
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sun Jan 03, 2021 6:52 am    Post subject: Reply with quote

turtles wrote:
I have always had allot of luck using Udev rules for stuff like this. I'd try something like this:
See https://stackoverflow.com/questions/5469828/how-to-create-a-callback-for-monitor-plugged-on-an-intel-graphics



turtles

thank you for the link . ATM i am trying an other way by using my hdmi from the motherboard and hoping to use that one with prime .
in that way i dont have anything connected to my DGPU until the HMD gets active . but ATM the HMD is black as the intel driver
is unloaded because it does not have a screen when X starts up.
Back to top
View user's profile Send private message
garrison
Apprentice
Apprentice


Joined: 18 Mar 2003
Posts: 250

PostPosted: Fri Jan 15, 2021 2:19 pm    Post subject: Reply with quote

hedmo wrote:
turtles wrote:
I have always had allot of luck using Udev rules for stuff like this. I'd try something like this:
See https://stackoverflow.com/questions/5469828/how-to-create-a-callback-for-monitor-plugged-on-an-intel-graphics



turtles

thank you for the link . ATM i am trying an other way by using my hdmi from the motherboard and hoping to use that one with prime .
in that way i dont have anything connected to my DGPU until the HMD gets active . but ATM the HMD is black as the intel driver
is unloaded because it does not have a screen when X starts up.


This probably needs a feature request filed to pulseaudio tracker, so load* commands can be executed conditionally after cards appear. HDMI is quite a big of an issue on it's own since frequently hdmi audio *cards* just disappear if you turn off display or put it to sleep.. when you turn display back on with pulseaudio-13.0 module-switch-on-port-available does it's things and re-routes audio to just connected hdmi etc.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum