HDMI Audio in Scientific Linux 6

I had expected that this was going to be a long post with excruciating detail on what I had to do to get audio out of my new PVR's nVidia card HDMI output.  But like all correct solutions, the answer was simple.

This came about as I had set up SL6, but couldn't get audio out of the HDMI connector (1080p video worked a treat).  I finally managed to force the issue with MythTV and mplayer by telling them which ALSA hardware I needed (via the nVidia document below), but main system sound wouldn't work, and neither would desktop volume control.

I shan't go into the whys and wherefors of all the mistakes I made along the way (mostly when I first set the box up to test the hardware 6 months (!) ago) but jump straight to the solution.

The primary thing is to fully read the excellent nVidia HDMI resource “HDMI Audio on NVIDIA GPUs”.  This will lead you to the correct sequence o things to look at (like the status files under /proc/asound to identify what you have, and using speaker-test to prove you found the right one).

The only non-trivial piece of information is that there seems to be a bug, or a design issue, with the RHEL6/SL6 version of pulseaudio:  with HDMI audio, pulseaudio only uses the first advertised “codec” on an audio card.  My nVidia GPU (with a standard Intel audio chipset) has 4, although 2 or 3 aren't wired.  And, annoyingly, it turned out that the one to the HDMI socket was the 4th (#3).

In fact, that was how I temporarily fudged MythTV and mplayer to work, by pointing them at ALSA's hw:1,9 device (card #1, with my motherboard sound being #0, codec #9 [the outputs seem to be numbered 3,5,7,9]).

However, the fundamental gets-everything-working fix is to get the Intel audio driver to mask out the 3 I don't care about (or, at least, only advertise the one I do).  As I wanted the 4th. output, I used 0x8 (bit 3 representing output 4, with 0 for output 1, etc.).

The other critical thing to remember is that you need to specify this value for each audio card, comma-separated.  So I had to pass -1 (“leave alone”) and 0x8.

$ cat /etc/modprobe.d/snd-hda-intel.conf
options snd-hda-intel probe_mask=-1,0x8

And with that (well, after a reboot), everything “just worked”.  Sweet.


Advertisement


About fnx

PSN: the_phoenix

This entry was posted in Software, Tech and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*