You are not logged in.

#1 2019-01-06 22:40:05

bladesonfire
Member
From: California, USA
Registered: 2007-05-23
Posts: 42
Website

PulseAudio: Managing External Display Speakers connected through USB-C

Hi all,

I have a Dell XPS 9775 laptop with 4 USB-C ports, which I can connect my monitors to (right now using USB-C to DP/HDMI cables). Using aplay -l, I can see these ports:

➜  ~ aplay -l                                  
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3271 Analog [ALC3271 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Headset [Logitech Wireless Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

So two questions:

1. How do I get PulseAudio to detect a monitor has been plugged in and automatically load it? Right now, I'm using load-module module-alsa-sink in default.pa to add the device. It'd be nice if I didn't have to update this file if I plug in my monitor into a different port or if I'm traveling and using a different monitor.

2. After manually adding these ports, the device is just named "Built-In Audio". I then use update-sink-proplist to update the name. Is it possible to update the name automatically based on the name of the monitor? This is the name of the monitor I see in "Display" settings.

Offline

#2 2019-01-11 12:01:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 6,235

Re: PulseAudio: Managing External Display Speakers connected through USB-C

Don't load it manually. Pulseaudio will have created profiles for your HDMI ports (granted you don't load it manually first, so remove the load-module line for now) (see pacmd list-cards and/or the 'Configuration' Tab in pavucontrol) where you can switch as needed. As for making the switch automatic, you could add load-module module-switch-on-connect before the if... udev-detect code block, which should enable automatic switchover on connect/disconnect events.

Offline

Board footer

Powered by FluxBB