Audio through HDMI not working with "Intel HD Graphics 530"

Intro:
Yesterday, I've installed FreeBSD with GNOME and I setup most of the drivers... everything seems to work pretty fine so far (4k video, programs, etc.), except from one thing: Audio through HDMI.

Issue:

Audio through HDMI does not seem to work.

Details:
I have already installed x11-drivers/xf86-video-intel, x11-drivers/xf86-video-scfb and graphics/drm-kmod
Code:
CPU: 8-core Intel Core i7-6700 (-MCP-) speed: 3400 MHz
OS: FreeBSD 13.1-RELEASE amd64 Up: 58m Mem: 6145.6/8021.9 MiB (76.6)
Storage: 664.55 GiB (1.3% used) Procs: 148 Shell: sh inxi: 3.3.11
Code:
$ cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC887 (Rear Analog)> (play/rec) default
pcm1: <Realtek ALC887 (Front Analog)> (play/rec)
pcm2: <Realtek ALC887 (Internal Digital)> (play)
No devices installed from userspace.
Code:
$ cat /etc/rc.conf
clear_tmp_enable="YES"
hostname="freebsd"
keymap="gr.101.acc.kbd"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
dumpdev="AUTO"
zfs_enable="YES"
ifconfig_em0="DHCP"
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
gnome_enable="YES"
dbus_enable="YES"
hald_enable="YES"
gdm_enable="YES"
defaultrouter="192.168.2.1"
Code:
$ cat /boot/loader.conf
aesni_load="YES"
geom_eli_load="YES"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
kern.vty=vt
if_rtwn_pci_load="YES"
if_rtwn_usb_load="YES"
legal.realtek.license_ack=1
snd_driver_load="YES"

Outro:
Although I've tried many things, couldn't figure it out, any Idea?

PS. Please have in mind, that I'm a noob and way too new to FreeBSD. | (found this too)
Thanks in Advance.
 
In /boots/devices.hints I added
Code:
hint.hdaa.1.nid3.config="conn=Fixed"
hint.hdaa.1.nid1.config="conn=jack"
And now it shows the device(?), but no sound yet:
Code:
cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC887 (Rear Analog)> (play/rec)
pcm1: <Realtek ALC887 (Front Analog)> (play/rec)
pcm2: <Realtek ALC887 (Internal Digital)> (play)
pcm3: <Intel Skylake (HDMI/DP 8ch)> (play) default
No devices installed from userspace.
 
I have already installed ... graphics/drm-kmod
$ cat /etc/rc.conf

I don't see in your /etc/rc.conf the Intel kernel driver enabled. The driver is needed to get HDMI sound (and accelerated video).

Enable i915kms in /etc/rc.conf and put the user in the "video" group (as root pw groupmod video -m <user>, reboot system.

pkg info -D drm-510-kmod
Rich (BB code):
On install:
The drm-510-kmod port can be enabled for amdgpu (for AMD
GPUs starting with the HD7000 series / Tahiti) or i915kms (for Intel
APUs starting with HD3000 / Sandy Bridge) through kld_list in
/etc/rc.conf. radeonkms for older AMD GPUs can be loaded and there are
some positive reports if EFI boot is NOT enabled (similar to amdgpu).

For amdgpu: kld_list="amdgpu"
For Intel: kld_list="i915kms"
For radeonkms: kld_list="radeonkms"

Please ensure that all users requiring graphics are members of the
"video" group.
 
Code:
$ id xou
uid=1001(xou) gid=1001(xou) groups=1001(xou),44(video)
Code:
$ cat /etc/sysctl.conf
...
kern.randompid=1
vfs.zfs.min_auto_ashift=12
hw.snd.default_unit=3
Code:
$ cat /etc/rc.conf
...
kld_list="i915kms"

Still, audio through HDMI doesn't seem to work :confused:
 
Code:
$ mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
I did also try, what was mentioned here, but still nothing (Which I don't really know if that makes any sense at all but yeah...):
In the BIOS setting, there is a "SDIF out type" parameter which can be set either at "SPDIF" or "HDMI". In both cases, there is no change.
BTW, Audio jack works but has a constant weird white-noise
 
It looks like the problem is related to the Intel High Definition Audio (Controller) driver ( /usr/src/sys/dev/sound/pci/hda/hdac.c ).

There is a patch to try:

Also note the comment after the patch comment.
 
It looks like the problem is related to the Intel High Definition Audio (Controller) driver ( /usr/src/sys/dev/sound/pci/hda/hdac.c ).

There is a patch to try:

Also note the comment after the patch comment.
I'm guessing the same too, I've patched the source code under "/usr/src/sys/dev/sound/pci/hda/hdac.c", but now I don't know how to build it and install the new drivers... Should i CD to "/usr/src/sys/" and run "make install CSDOPEDIRS= dev" or am i missing something? I'm pretty noob at those stuff but i'm willing to try
 
Something I'd like to repeat is that, while the audio-jack works, it has a constant weird white-noise for some reason (something that it is not present in other OSs)

(Update: just found out what the noise was, i accidentally had the input loop to the output )
 
I've patched the source code under "/usr/src/sys/dev/sound/pci/hda/hdac.c", but now I don't know how to build it and install the new drivers...
Build and install a new kernel.

The patched hdac.c (HDA bus controller) driver is included in the snd_hda(4) driver, which is compiled into the GENERIC kernel.

snd_hda(4)
Rich (BB code):
DESCRIPTION
     ...
     The snd_hda driver includes HDA bus controller driver (hdac), HDA codec
     driver (hdacc) and HDA codecs audio functions bridge driver (hdaa) that
     allows the generic audio driver, sound(4), to be used with this hardware.
     Only audio functions are supported by snd_hda. ...

/usr/src/sys/amd64/conf/GENERIC
Code:
# Sound support
...
device          snd_hda                 # Intel High Definition Audio

In case you are unfamiliar building/installing a kernel see handbook, chapter 25.6. Updating FreeBSD from Source.
 
Found an old sound-system that works through audio jack (and has way better audio than TV's ones), So I might come back to the issue some other time... as of now I'm cool with it. PS. Thank you all for you help so far <3
 
I noticed in your 1st post in this thread that you loaded all the sound drivers
snd_driver_load="YES"
snd_hda is now statically complied into the default kernel.
 
Is there a solution, or suggestions? I have a pair of Lenovo ThinkCentre systems with inbuilt Intel HD 530 also with no audio on their HDMI channel.
 
I noticed in your 1st post in this thread that you loaded all the sound drivers
snd_driver_load="YES"
snd_hda is now statically complied into the default kernel.
Yes but the problem is the snd_hda doesn't work, it recognises the audio-function and creates a pcm but the pcm doesn't work. e.g.
pcm2: <Intel Skylake (HDMI/DP 8ch)> at nid 3 on hdaa1
completely useless, nil audio.
 
Back
Top