Can I choose which audio device my graphics card sends audio to?

I’m running a Radeon R9 390. Plugged into it are two monitors using Displayport and my TV using HDMI. Each display has built in speakers. My video card seemingly only has one sound card in it since lspci and pulseaudio are only showing one device from the card when all three are plugged in. If I unplug the monitor that sound is coming through sound switches to the other monitor and the label in pulseaudio gets a 2 at the end of it.

The problem is that it prioritizes the displayport devices when choosing where to send audio. Meaning if I want sound to come out of my TV I need to turn off both of my monitors. It looks like there’s no way to disable the audio in the menu for these monitors (ASUS PB258Q)

My question is, is there a way to tell the graphics card which device I want sound to go out of?

You could try using pactl to find and set the audio device of your card with the set-card-profile option.

pactl set-card-profile alsa_card.pci-0000_0e_00.1 output:hdmi-stereo-extra1

if you tab complete after you’ve selected the card it should show you a list of options to set the audio device. on my card output:hdmi-stereo is Digital Stereo (HDMI) Output on HDMI and output:hdmi-stereo-extra1 is Digital Stereo (HDMI 2) on DisplayPort.

$ pactl set-card-profile alsa_card.pci-0000_0e_00.1
input:analog-stereo                            output:analog-surround-51
input:iec958-stereo                            output:analog-surround-51+input:analog-stereo
off                                            output:hdmi-stereo
output:analog-stereo                           output:hdmi-stereo-extra1
output:analog-stereo+input:analog-stereo       output:hdmi-stereo-extra2
output:analog-stereo+input:iec958-stereo       output:hdmi-stereo-extra3
output:analog-surround-21                      output:hdmi-surround71-extra2
output:analog-surround-21+input:analog-stereo  output:hdmi-surround71-extra3
output:analog-surround-40                      output:hdmi-surround-extra2
output:analog-surround-40+input:analog-stereo  output:hdmi-surround-extra3
output:analog-surround-41                      output:iec958-stereo
output:analog-surround-41+input:analog-stereo  output:iec958-stereo+input:analog-stereo
output:analog-surround-50                      output:iec958-stereo+input:iec958-stereo
output:analog-surround-50+input:analog-stereo
1 Like

Okay there’s progress.
So when using this method I select output:hdmi-stereo-extra2 (the TV) and the sound is very choppy. Pulse shows that HDMI 3 is what’s playing the audio out of and that’s the same that shows if I just turn off the monitors and let everything decide on it’s own

These are my options for devices
$ pactl set-card-profile
0 2 alsa_card.pci-0000_01_00.1
1 alsa_card.pci-0000_00_1b.0 alsa_card.usb-SteelSeries_SteelSeries_Siberia_800-00

The only two devices that have the hdmi entit are 0 and alsa_card.pci-0000_01_00.1. Any ideas why there’s choppyness when I select it manually but it’s fine if it decides to use that on it’s own?

Get list of sink names - pactl list short sinks

Add correct sink name to this - pacmd set-default-sink [name]

Check default sink saved for Pulseaudio - cat ~/.config/pulse/*default-sink

Install pavucontrol (PulseAudio Volume Control) in the software manager or through terminal.

Go to Configuration tab and select the hd-audio device (hdmi port).
Go to Playback tab and choose the playback device.