HTPC: FreeBSD for your TV

Appendix A. HDMI sound hack.

by ross at 06:18:31 on November 8, 2012

So you are getting "play interrupt timeout, channel dead" errors with hda driver while trying to get HDMI sound working? There is a solution.

First, determine the correct hdac unit:

# dmesg | grep hdac
hdac0: <NVidia MCP61 High Definition Audio Controller> mem 0xfd000000-0xfd003fff irq 23 at device 5.0 on pci0
hdac1: <NVidia (Unknown) High Definition Audio Controller> mem 0xfa000000-0xfa003fff irq 16 at device 0.1 on pci2
hdac0: HDA Codec #0: Realtek ALC662
pcm0: <HDA Realtek ALC662 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC662 PCM #1 Digital> at cad 0 nid 1 on hdac0
hdac1: HDA Codec #0: NVidia GT21x HDMI
hdac1: HDA Codec #1: NVidia GT21x HDMI
hdac1: HDA Codec #2: NVidia GT21x HDMI
hdac1: HDA Codec #3: NVidia GT21x HDMI
pcm2: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> at cad 0 nid 1 on hdac1
pcm3: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> at cad 1 nid 1 on hdac1
pcm4: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> at cad 2 nid 1 on hdac1
pcm5: <HDA NVidia GT21x HDMI PCM #0 DisplayPort> at cad 3 nid 1 on hdac1

As you can see the HDMI hdac device is hdac1. Now add to /boot/device.hints:

hint.hdac.1.msi="1"

And to /etc/sysctl.conf:

dev.hdac.1.polling=1

Reboot and that's it. You can now try switching pcm channels and playing a test sound as described earlier.

 

Comments
Thanks for dev.hdac.1.polling=1.
Freebsd 10.1 on Asrock d1800m with ALC662. Sound was absent.
-- Mishin Alexander
Friday, December 19, 2014, 7:08:38