nVidia HDMI Audio
by TB0ne from LinuxQuestions.org on (#5K12R)
Using openSUSE Tumbleweed, although this may apply to other distros as well. Relevant hardware information is an nVidia video card with an HDMI connection to a monitor with integrated speakers. This addresses HDMI audio, so the device it's plugged in to shouldn't matter (providing it supports HDMI audio), and it doesn't NECESSARILY have to involved an nVidia card, either.
Using the nVidia repositories for Tumblweed, drivers and all up to date. Audio worked when booting to Windows, and I could easily select between the motherboard analog audio and HDMI audio. Linux, though, only saw the analog audio. First step was making sure the device was seen as an audio device by running through the steps in this other (old) thread:
https://www.linuxquestions.org/quest...nd-4175463313/
Running through the "aplay -l" list, I found this device:
Code:card 1: PCH [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0..and verified it worked by using the aplay command
Code:aplay -D plughw:PCH,7 /usr/share/sounds/alsa/test.wavI ran down the list as I did in my other thread to identify the correct device. Since the sound worked, it was a matter of device enumeration.
**NOTE**
This solution is not very flexible! While it works and lives through reboots, I don't yet know if future updates will render it useless. Your mileage may vary.
Edit the /etc/pulse/default.pa file. Find this section:
Code:### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
(comment out the next two lines)
# load-module module-alsa-sink
# load-module module-alsa-source device=hw:0,7
(add this line)
load-module module-alsa-sink device=hw:1,7In what I posted from the aplay -l output, I bolded the numbers for the card and device. This is where the 1,7 comes from. Also, you need to comment out this section of the default.pa:
Code:### Automatically load driver modules depending on the hardware available
# .ifexists module-udev-detect.so
# load-module module-udev-detect
# .else
### Use the static hardware detection module (for systems that lack udev support)
# load-module module-detect
# .endif...and that's it. You can try things manually by running "pulseaudio -k" and "pulseaudio --start", to see if things work without rebooting.
Using the nVidia repositories for Tumblweed, drivers and all up to date. Audio worked when booting to Windows, and I could easily select between the motherboard analog audio and HDMI audio. Linux, though, only saw the analog audio. First step was making sure the device was seen as an audio device by running through the steps in this other (old) thread:
https://www.linuxquestions.org/quest...nd-4175463313/
Running through the "aplay -l" list, I found this device:
Code:card 1: PCH [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0..and verified it worked by using the aplay command
Code:aplay -D plughw:PCH,7 /usr/share/sounds/alsa/test.wavI ran down the list as I did in my other thread to identify the correct device. Since the sound worked, it was a matter of device enumeration.
**NOTE**
This solution is not very flexible! While it works and lives through reboots, I don't yet know if future updates will render it useless. Your mileage may vary.
Edit the /etc/pulse/default.pa file. Find this section:
Code:### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
(comment out the next two lines)
# load-module module-alsa-sink
# load-module module-alsa-source device=hw:0,7
(add this line)
load-module module-alsa-sink device=hw:1,7In what I posted from the aplay -l output, I bolded the numbers for the card and device. This is where the 1,7 comes from. Also, you need to comment out this section of the default.pa:
Code:### Automatically load driver modules depending on the hardware available
# .ifexists module-udev-detect.so
# load-module module-udev-detect
# .else
### Use the static hardware detection module (for systems that lack udev support)
# load-module module-detect
# .endif...and that's it. You can try things manually by running "pulseaudio -k" and "pulseaudio --start", to see if things work without rebooting.