# I can´ t install HDMI audio on FreeBSD 12.2



## herbertpfp (Dec 18, 2020)

I am new on FreeBSD, and very satisfied with my new system FreeBSD 12.2, but I can't install HDMI audio and every log on I see the message "hdac0: Command 0x00470d00 timeout on address 0".

It's possible to solve?

Thanks


----------



## SirDice (Dec 18, 2020)

What graphics card do you have? And please post the output from `cat /dev/sndstat`.


----------



## herbertpfp (Dec 18, 2020)

```
cat /dev/sndstat

Installed devices:
pcm0: <Intel Broadwell (HDMI/DP 8ch)> (play)
pcm1: <Intel Broadwell (HDMI/DP 8ch)> (play)
pcm2: <Intel Broadwell (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC255 (Internal Analog)> (play/rec) default
pcm4: <Realtek ALC255 (Front Analog Headphones)> (play)
No devices installed from userspace.
```


----------



## SirDice (Dec 18, 2020)

That tells me you're using the built-in Intel graphics. 

`sysctl hw.snd.default_unit=0` or 1 or 2. It depends on which connector your monitor is connected to. You'll have to try which one's the correct one to use for your situation. If you find the correct one you can set it permanently by adding it to /etc/sysctl.conf:

```
hw.snd.default_unit=0
```
(or 1 or 2)


----------



## herbertpfp (Dec 18, 2020)

I tried the  sysctl hw.snd.default_unit=0 or 1 or 2, but when I put dmesg command or reboot my system, the problem still. After, I tried to edit the /etc/sysctl.conf with variables 0, 1, 2 and 3 and reboot, but the problem still. The problem happens after install the drm-kmod, and another problem that I noticed was the alsa-mixer test every time fail when I install the pulseaudio.


----------



## SirDice (Dec 18, 2020)

herbertpfp said:


> I tried the sysctl hw.snd.default_unit=0 or 1 or 2, but when I put dmesg command or reboot my system, the problem still.


It's not persistent. Switch the default unit and test the audio, don't reboot. 


herbertpfp said:


> After, I tried to edit the /etc/sysctl.conf with variables 0, 1, 2 and 3 and reboot, but the problem still.


It's not going to make the message go away. That's not the point of this setting. It's to enable to correct audio output so you can actually hear something over HDMI audio.


herbertpfp said:


> another problem that I noticed was the alsa-mixer test every time fail when I install the pulseaudio.


Forget about pulseaudio for now. You don't need it. Most applications use FreeBSD's own OSS audio, and are typically configured not to have pulseaudio support.


----------



## herbertpfp (Dec 18, 2020)

I tried again with an HDMI TV, I changed the variable, and nothing. I think the problem is not select the correct channel, but the problem is the message "hdac0: Command 0x00370600 timeout on address 0" repeated dozens of times every time when I boot.


----------



## herbertpfp (Dec 18, 2020)

I will try to install FreeBSD 13, maybe the drm-kmod works better, thank you very much.


----------



## SirDice (Dec 18, 2020)

You're going to need to set that `hw.snd.default_unit` in any case. Because the default audio is switched to your audio card (Realtek ALC255), not the HDMI outputs.


----------



## Minbari (Dec 18, 2020)

Eg from my tv player:
`cat /dev/sndstat`

```
pcm0: <Realtek ALC887 (Rear Analog)> (play/rec)
pcm1: <Realtek ALC887 (Rear Digital)> (play)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> (play)
*pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play) default*
No devices installed from userspace.
```

/etc/sysctl.conf ->

```
*hw.snd.default_unit=3*
hw.snd.feeder_rate_quality=1
hw.snd.vpc_0db=45
hw.snd.vpc_mixer_bypass=1
hw.snd.vpc_autoreset=0
hw.snd.latency=5
hw.snd.maxautovchans=16
```

`uname -a`

```
FreeBSD amy_tvb 12.2-RELEASE-p2 FreeBSD 12.2-RELEASE-p2 r368483 GENERIC  amd64
```


----------



## herbertpfp (Feb 4, 2021)

Finally I listened the HDMI audio on TV, I installed FreeBSD13 alpha2 (synth works, a piece of art). Now I have a different problem: the HDMI audio is slow. If I watch video on youtube accelerating the video (x1.75) the speed became normal, but the frequency of the audio doesn't match (the voice gets thicker).


----------

