Routing HDMI audio to specific port (Quadro P2000, CentOS 7)

I have a system with a Quadro P2000 card. External devices: There is an A/V receiver and a touchscreen capable of HDMI-sound connected via HDMI cables to DisplayPort adapters at the video card. The problem is, the HDMI sound is being routed to the touchscreen when I want it going to the receiver.

One interesting thing I noticed is, this wasn’t happening when the touchscreen’s USB was unplugged. As soon as I plugged in the USB cable for the touch, the sound instantly started playing from the touchscreen speakers, and that’s where I am now. I have attached the results of nvidia-bug-report.sh.

nvidia-bug-report.log.gz (1.2 MB)

After each reboot, there is a chance that the audio will go through one device or another (usually the touchscreen).

I found this article to be interesting.

I’m not sure if this is significant, but I noticed when the sound is going to the receiver, the contents of the file /proc/asound/card1/codec#0 will be different than when the sound is playing from the touchscreen.

$ cat /proc/asound/card1/codec#0 > working
[... after the sound goes back to the touchscreen ...]
$ cat /proc/asound/card1/codec#0 > not_working
$ diff working not_working
45c45
<      0x0a 0x0b* 0x0c 0x0d
---
>      0x0a* 0x0b 0x0c 0x0d
59c59
<      0x0a 0x0b* 0x0c 0x0d
---
>      0x0a* 0x0b 0x0c 0x0d
104c104
<   Converter: stream=6, channel=0
---
>   Converter: stream=0, channel=0

All other contents of the files in /proc/asound/card*/* are identical before and after. However, sometimes the ELD data will report that the monitor is not connected. (This is when the sound works as I want – it goes to the receiver’s speakers not touchscreen). I see this sometimes after a reboot (without changing any of the physical cabling or any sound settings in the OS):

$ cd /proc/asound/card1
$ cat eld#0.0
monitor_present      0
eld_valid            0
$ cat eld#0.1
monitor_present      0
eld_valid            0
$ cat eld#0.2
monitor_present      0
eld_valid            0
$ cat eld#0.3
monitor_present      0
eld_valid            0

And after a reboot it just displays all the correct data again there. According to the article cited above, the ELD data should always be displayed in those files, or else there’s some hardware problem. Am I correct?

My question is, is it possible to force the sound to go through a specific DisplayPort port through some manual configuration?