Solved HP EliteBook 2530p, no sound with snd_hda

Hi everybody,

currently, I'm trying to set up FreeBSD 11.0 on my HP EliteBook 2530p. After updating the BIOS to the latest version, the system is running perfectly well. Only audio is something I just can't get configured correctly. Maybe someone has experience with the same device and is able to help?

Strange thing is: I hear a clicking noise when I change the volume of the "Speaker" slider. Other mixer channels do not lead to a "click", just the "Speaker" slider.


$ cat /dev/sndstat
Installed devices:
pcm0: <Analog Devices AD1984A (Analog 4ch/2.0)> (play/rec) default
pcm1: <Analog Devices AD1984A (Right Analog Mic)> (rec)
No devices installed from userspace.
$



$ ls /dev/dsp*
/dev/dsp0.0
$



hdaa0: Dumping AFG pins:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 17 04212040 4 0 Headphones Jack 1/8 Right Grey 0 DISA
hdaa0: Caps: OUT HP Sense: 0x00000140 (disconnected) delay 70us
hdaa0: 18 01014010 1 0 Line-out Jack 1/8 Rear Green 0
hdaa0: Caps: OUT HP EAPD Sense: 0x00002800 (disconnected) delay 50us
hdaa0: 19 413711f0 15 0 CD None Analog Rear Black 1 DISA
hdaa0: Caps: OUT EAPD
hdaa0: 20 04a12060 6 0 Mic Jack 1/8 Right Grey 0
hdaa0: Caps: IN VREF Sense: 0x00000005 (disconnected) delay 90us
hdaa0: 21 91a7112e 2 14 Mic Fixed Analog 0x11 Black 1
hdaa0: Caps: IN VREF Sense: 0x00000003 (disconnected) delay 90us
hdaa0: 22 9217411f 1 15 Speaker Fixed Analog 0x12 Green 1
hdaa0: Caps: IN OUT EAPD Sense: 0x00006300 (disconnected) delay 50us
hdaa0: 23 41a6e130 3 0 Mic None Digital Rear White 1 DISA
hdaa0: Caps: IN
hdaa0: 27 41561150 5 0 Digital-out None Digital Rear Black 1 DISA
hdaa0: Caps: OUT Sense: 0x00006300 (disconnected)
hdaa0: 28 01813021 2 1 Line-in Jack 1/8 Rear Blue 0
hdaa0: Caps: IN OUT VREF Sense: 0x00000880 (disconnected) delay 70us
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: GPIO2: disabled


I've tried changing the three GPIOs and the clicking noise when changing volume disappeared with this setting:

$ sudo sysctl dev.hdaa.0.gpio_config="0=disable 1=disable 2=set"

Other combinations I tried did not lead to anything noticable.
And apart of the "volume change clicking", I can't manage to get anything out of the speaker.

I'm really at loss about what to do next. I've also tried setting custom device hints, but I don't really understand what to configure there, because as far as I understand the snd_hda manpage, the defaults sound reasonable to me.

Sorry for bothering you with such a common topic, but I'd really like to get audio working on this laptop (and also I'd like to understand what I'm doing wrong, because this is really bugging me now...)

Best regards,
Tobias

P.S.: Audio has been working fine in Debian Linux, so it does not seem to be a hardware issue. It's probably just a configuration thing.
 
Finally, I got audio working on my HP 2530p!

TL;DR: For this specific model, the following lines have to be added to /boot/loader.conf:

hint.hdac.0.cad0.nid18.config="as=4 seq=0"
hint.hdac.0.cad0.nid17.config="as=1 seq=15"
hint.hdac.0.cad0.nid22.config="as=1 seq=0"


I'm trying to explain how I finally, after numerous failed attempts, found out the correct settings. And of course, in hindsight, quite obvious, but it took me quite some time to get my head around the snd_hda settings.

Originally, the settings for this laptop are:


root@fly:~ # sysctl dev.hdac.0.pindump=1
dev.hdac.0.pindump: 0 -> 0
root@fly:~ # dmesg | grep hdaa
hdaa0: Dumping AFG pins:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 17 04212040 4 0 Headphones Jack 1/8 Right Grey 0 DISA
hdaa0: Caps: OUT HP Sense: 0x00000140 (disconnected) delay 80us
hdaa0: 18 01014010 1 0 Line-out Jack 1/8 Rear Green 0
hdaa0: Caps: OUT HP EAPD Sense: 0x00002800 (disconnected) delay 50us
hdaa0: 19 413711f0 15 0 CD None Analog Rear Black 1 DISA
hdaa0: Caps: OUT EAPD
hdaa0: 20 04a12060 6 0 Mic Jack 1/8 Right Grey 0
hdaa0: Caps: IN VREF Sense: 0x00000005 (disconnected) delay 90us
hdaa0: 21 91a7112e 2 14 Mic Fixed Analog 0x11 Black 1
hdaa0: Caps: IN VREF Sense: 0x00000004 (disconnected) delay 90us
hdaa0: 22 9217411f 1 15 Speaker Fixed Analog 0x12 Green 1
hdaa0: Caps: IN OUT EAPD Sense: 0x00006300 (disconnected) delay 50us
hdaa0: 23 41a6e130 3 0 Mic None Digital Rear White 1 DISA
hdaa0: Caps: IN
hdaa0: 27 41561150 5 0 Digital-out None Digital Rear Black 1 DISA
hdaa0: Caps: OUT Sense: 0x00006300 (disconnected)
hdaa0: 28 01813021 2 1 Line-in Jack 1/8 Rear Blue 0
hdaa0: Caps: IN OUT VREF Sense: 0x00000a80 (disconnected) delay 70us
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: GPIO2: disabled


These settings don't work because Headphone, Speaker and Line-Out are confused. This configuration means:
  • Headphones are attached to a separate output channel (as=4), that is not even assigned a pcmX output on my system
  • Line-Out is attached to as=1 and will be assigned pcm0
  • Speaker is also attached to as=1, but with "seq=15" which should only be used for headphones. "seq=15" means, that the output disables another output on the same "as" when it is attached

In FreeBSD 11, you can change those settings on the fly, without rebooting, with:


root@fly:~ # sysctl dev.hdaa.0.nid17_config="as=1 seq=15"
root@fly:~ # sysctl dev.hdaa.0.nid18_config="as=4 seq=0"
root@fly:~ # sysctl dev.hdaa.0.nid22_config="as=1 seq=0"
root@fly:~ # sysctl dev.hdaa.0.reconfig=1
root@fly:~ # sysctl dev.hdac.0.pindump=1
dev.hdac.0.pindump: 0 -> 0
root@fly:~ # dmesg | grep hdaa


And after successful testing by persisting the changes as described at the beginning of this post.

Fixing all the issues from above, I now have sound from the internal speaker and when a headphone is attached, the internal speaker is disabled and audio is played through the headphone. Hooray!!!
 
I can confirm the working on a HP Elitebook 6930p, with little adaptation: I put the settings in /etc/sysctl.conf.

Code:
/etc/sysctl.conf

dev.hdaa.0.nid17_config="as=1 seq=15"
dev.hdaa.0.nid18_config="as=4 seq=0"
dev.hdaa.0.nid22_config="as=1 seq=0"
dev.hdaa.0.reconfig=1
dev.hdac.0.pindump=1

For some reason placing the hints in loader.conf didn't work.
 
Back
Top