No audio via HDMI

Hi,

In the past I had connected the FreeBSD machine (version 12.1) to USB external speakers. That used to work.

Recently, I bought a new monitor with built-in speakers. Unfortunately, the HDMI direct audio into the monitor does not work.
I tried several things from various forums, including the official FreeBSD docs. None of it works. Can you please help.

Here are my settings:

sysctl.conf
Code:
hw.snd.default_unit=2
Code:
pcm0: <Realtek ALC1150 (Rear Analog 7.1/2.0)> at nid 20,22,21,23 and 24,26 on hdaa0
pcm1: <Realtek ALC1150 (Front Analog)> at nid 27 and 25 on hdaa0
pcm2: <Intel Skylake (HDMI/DP 8ch)> at nid 3 on hdaa1
 
Last edited by a moderator:
Although I see your settings… you might check this basic stuff:

sysctl dev.pcm | grep desc

Is it really pcm.2, or do you have f.e. more than one HDMI sound interface? To set up the correct device, f.e. pcm.2:

sysctl hw.snd.default_unit=2

Check that the mixer is not set to zero or muted; You can get and set its settings f.e. this way:

Code:
jo@freya ~>  mixer
Mixer vol      is currently set to  20:20
Mixer pcm      is currently set to   0:0
jo@freya ~>  mixer vol 100:100 pcm 100:100
Setting the mixer vol from 20:20 to 100:100.
Setting the mixer pcm from 0:0 to 100:100.

Next check that the volume of your monitor is up, too (and maybe you've got to choose there too, which input has to be used). And before every single audio test close your testing application and start it again (changing the sound device doesn't change it for already running applications)… So in this case a shell command is perfect:

play path/to/an/audiofile

"play" is part of the "audio/sox" package. And test it as root, so you can recognize permission problems.
 
Last edited by a moderator:
Unfortunately, no luck. I have done all these things several times- including changing HDMI cables, rebooted a dozen times with all the different sysctl hw.snd.default_unit=#.
Code:
 $ sysctl dev.pcm | grep desc

dev.pcm.2.%desc: Intel Skylake (HDMI/DP 8ch)
dev.pcm.1.%desc: Realtek ALC1150 (Front Analog)
dev.pcm.0.%desc: Realtek ALC1150 (Rear Analog 7.1/2.0)

$ mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100

Everything seems to be correct. The built-in speakers are not recognized by Freebsd. How do I set up ?
 
Last edited by a moderator:
Post the output from cat /dev/sndstat

If the monitor has builtin speakers check the volume control on the monitor itself too.
 
SirDice

Thanks. Yes, the monitor volume is fine. And as I mentioned, I tried connecting the same monitor to different computer-- works fine.

Here is the sndstat.
Code:
Installed devices:
pcm0: <Realtek ALC1150 (Rear Analog 7.1/2.0)> (play/rec)
pcm1: <Realtek ALC1150 (Front Analog)> (play/rec)
pcm2: <Intel Skylake (HDMI/DP 8ch)> (play) default
I think this is a a bug within FreeBSD- HDMI audio does not work?

Anyhow, not a big deal. I added external USB speakers, and they work fine.

Cheers.
 
Just to clarify, this is my current setup after defaulting to USB.
Code:
$sysctl hw.snd.default_unit=3
 $ cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC1150 (Rear Analog 7.1/2.0)> (play/rec)
pcm1: <Realtek ALC1150 (Front Analog)> (play/rec)
pcm2: <Intel Skylake (HDMI/DP 8ch)> (play)
pcm3: <USB audio> (play) default
No devices installed from userspace.
 
Back
Top