FreeBSD 13.2 not detecting speakers on laptop

I'm trying to test setting up FreeBSD to replace chromeos on an HP chrome-book (14a-nb0013dx). The sound card seems to be found:
pcm0: <Intel Gemini Lake (HDMI/DP 8ch)> (play) default
hdacc0: <Intel Gemini Lake HDA CODEC> at cad 2 on hdac0
but is only showing the HDMI out, not the speakers or headphone jack. USB audio works as expected, as does everything else on the install. For the installation I have drm-kmod with "kldlist+="i915kms" for graphics, but not finding anything further on dmesg that I can figure out to help.

Sysctl list of settings related to hdac0:
Code:
hdaa0: <Intel Gemini Lake Audio Function Group> at nid 1 on hdacc0
pcm0: <Intel Gemini Lake (HDMI/DP 8ch)> at nid 3 on hdaa0
dev.pcm.0.%parent: hdaa0
dev.hdaa.0.init_clear: 0
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config:
dev.hdaa.0.gpio_state:
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid3_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3: pin: Digital-out (Jack)
dev.hdaa.0.nid2: audio output
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x80860101
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: Intel Gemini Lake Audio Function Group
dev.hdaa.%parent:


Is there anything I can do to try to force it to find the audio outputs for the speakers? So far this seems to tax the CPU/battery a ton less but I use the speakers a lot!
 
Try adding the following lines to /etc/sysctl.conf
Code:
dev.hdaa.0.gpio_config="0=set 1=set"
hw.snd.default_unit=0
dev.hdaa.0.nid2_config="as=4 seq=15"

Save the changes to this file.

Ensure you have sndiod installed: sudo pkg install sndio

Modify /etc/rc.conf to add the line
Code:
sndiod_enable="YES"

Then run the commands
service sysctl restart
service sndiod start

Failing that, try a reboot and see if it works after that.
 
Try adding the following lines to /etc/sysctl.conf
Code:
dev.hdaa.0.gpio_config="0=set 1=set"
hw.snd.default_unit=0
dev.hdaa.0.nid2_config="as=4 seq=15"

Save the changes to this file.

Ensure you have sndiod installed: sudo pkg install sndio

Modify /etc/rc.conf to add the line
Code:
sndiod_enable="YES"

Then run the commands
service sysctl restart
service sndiod start

Failing that, try a reboot and see if it works after that.
Unfortunately no change, still only showing hdmi out both in dmesg and in pulseaudio-control.
 
Try adding the following lines to /etc/sysctl.conf
Code:
dev.hdaa.0.gpio_config="0=set 1=set"
hw.snd.default_unit=0
dev.hdaa.0.nid2_config="as=4 seq=15"

I don't know about this machine or sndio - and I'm running 12.4 trying to config speakers on 2 Thinkpads - but from what I've seen elsewhere, dev.hda*config lines should be added to /boot/device.hints rather than sysctl.conf unless that's different on 13?

Anyway, my suggestion would be to set verbose booting on (either while booting, or by adding boot_verbose="YES" to loader.conf for permanence) to see everything sound-related in /var/run/dmesg.boot especially the Original and Patched pins configurations and associations tracing etc, in great detail. Someone might spot something, like another device?
 
I don't know about this machine or sndio - and I'm running 12.4 trying to config speakers on 2 Thinkpads - but from what I've seen elsewhere, dev.hda*config lines should be added to /boot/device.hints rather than sysctl.conf unless that's different on 13?

Anyway, my suggestion would be to set verbose booting on (either while booting, or by adding boot_verbose="YES" to loader.conf for permanence) to see everything sound-related in /var/run/dmesg.boot especially the Original and Patched pins configurations and associations tracing etc, in great detail. Someone might spot something, like another device?
moving the lines to /boot/device.hints did not change things. The verbose boot I put on pastebin.
 
These lines are suspicious to me:

Code:
hdacc0: <Intel Gemini Lake HDA CODEC>system power profile changed to 'economy'
at cad 2 on hdac0
hdaa0: <Intel Gemini Lake Audio Function Group>acpi_acad0: Off Line

Is there some power saving mode which prevents the device from being detected or initialized? Don't know.
 
moving the lines to /boot/device.hints did not change things. The verbose boot I put on pastebin.

Line 10:
Setting sysctl hw.snd.default_unit failed: 22

That line does belong in sysctl.conf, but is probably the default anyway.

Strange gadget, no mic or record facility (?) and only digital output but nid 2 looks internal maybe.

Lines 688, 691 indicate 'mute'. Is that from switches, via gpios?

Otherwise no idea; maybe taiwan740 can explain?
 
These lines are suspicious to me:

Code:
hdacc0: <Intel Gemini Lake HDA CODEC>system power profile changed to 'economy'
at cad 2 on hdac0
hdaa0: <Intel Gemini Lake Audio Function Group>acpi_acad0: Off Line

Is there some power saving mode which prevents the device from being detected or initialized? Don't know.

Good catch, but it's just battery initialisation with some out-of-order lines due to parallel tasks running.

See it continue after the last 'battery0:' line. Apparently booted running on battery, though battery stats seem poorly detected.
 
Wild shot: it seems the analog audio is not detected. Maybe sof firmware is required (arch wiki).
This looks to be the case. googling around with linux seems to have a lot of hits regarding sof firmware, specifically: sof-audio-pci-intel-apl and glk_rt5682_max98357. Looking around it doesn't look like the sof-firmware is on freebsd right now unfortunately.

What devices are shown by cat /dev/sndstat?
"cat /dev/sndstat":
Installed devices:
pcm0: <Intel Gemini Lake (HDMI/DP 8ch)> (play) default
No devices installed from userspace.
 
Quick update in case someone finds this in the future. On Arch Linux this required sof-firmware and a script to install/enable the correct pieces found here. It appears that FreeBSD doesn't have sof-firmware right now so no audio without a seperate dongle or by using linux instead.
 
Back
Top