Sound over HDMI

I've googled this and can't figure out where to begin. I have an nVidia GeForce 210 video card and I'd like to get sound working over HDMI.

The HDMI audio is seen by the system

Code:
# lspci | grep -i nvidia
01:00.0 VGA compatible controller: nVidia Corporation GT200 [GeForce 210] (rev a2)
01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)

but it doesn't appear in sndstat

Code:
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play)
pcm1: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play)
pcm2: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play)
pcm3: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play)
pcm4: <HDA Realtek ALC892 PCM #0 Analog> (play/rec) default
pcm5: <HDA Realtek ALC892 PCM #1 Analog> (play/rec)
pcm6: <HDA Realtek ALC892 PCM #2 Digital> (play)

Where do I begin to get this working?
 
Thanks! I've added that and also made sure to add snd_driver_load="YES" to make sure the correct driver was loaded and I'm still coming up with no sound.
 
Code:
> cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play)
pcm1: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play) default
pcm2: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play)
pcm3: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> (play)
pcm4: <HDA Realtek ALC892 PCM #0 Analog> (play/rec)
pcm5: <HDA Realtek ALC892 PCM #1 Analog> (play/rec)
pcm6: <HDA Realtek ALC892 PCM #2 Digital> (play)
 
Here's what I'm getting on 0-3

Code:
pcm0: chn_write(): pcm0:virtual:dsp0.vp1: play interrupt timeout, channel dead
pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
 
Looks like it should be
Code:
hw.snd.default_unit="0"

However, the "channel dead" error says that something else is missing. Whether that's in snd_hda(4) or elsewhere, I don't know. It may only work when X is running and the driver for that card is loaded.
 
I've already set it to 0 just for testing and couldn't get anything out of it. I'll try to load snd_hda when I get home tonight. Is there any benifit to compiling it vs loading it in /boot/loader.conf ? I would have thought that snd_driver_load="YES" would have loaded this for me, no?
 
Code:
> sudo kldload snd_hda
kldload: can't load snd_hda: File exists

Yep, looks like it's already loaded.
 
Which driver are you using for the graphics card? I have sound over hdmi working on my nvidia card, but this required that x11/nvidia-drivers was installed.

I have in /boot/loader.conf
Code:
snd_hda_load="YES"
nvidia_load="YES"
hw.snd.default_unit="1"
and in /etc/X11/xorg.conf

Code:
Section "Device"
     Identifier     "Card0"
     Driver         "nvidia"
     VendorName     "nVidia Corporation"
     BoardName      "GT520 [GeForce GT520]"
EndSection

When I was using a radeon card I needed to enable sound over HDMI in the Xorg-config, but this is not necessary with the nvidia cards.

For sake of completion:
Code:
cat /dev/sndstat
...
Installed devices:
pcm0: <HDA NVidia (Unknown) PCM #0 DisplayPort> (play)
pcm1: <HDA NVidia (Unknown) PCM #1 DisplayPort> (play) default
...

If you have the possibility to check, try another target system. I have had problems with HDMI-synching. For example my PS3 would not sync with the TV until I performed a firmware update for the TV, if nothing else works this might be an avenue to explore.
 
I'm defiantly not using x11/nvidia-driver, I'm using whatever FreeBSD picked at install and when I look for it in pkg_info it doesn't show up. I'll compile those and see if it makes a difference. I don't think the TV needs a firmware upgrade because I've been able to output audio to it over HDMI from other devices.
 
kr651129,

Does this sound card makes sound output at all? Did you check with any other OS? The HDMI ports themselves maybe faulty.

Just had a team members PC replaced. She wanted a new headset , but problem was narrowed down to the dead audio out sockets.
 
To make HDMI audio work with NVIDIA cards you must use binary x11/nvidia-drivers driver. There is no HDMI audio support in default Xorg drivers!

Also in FreeBSD 9.0 with GT2xx card you should set hint.hdac.%d.msi=0 tunable to workaround chip bug with MSI interrupts routing that caused timeouts mentioned above. Along with many other HDMI improvements this is enabled automatically in FreeBSD 9.1.
 
Back
Top