Solved Sound/Recording configuration

Hello,
I've difficulties in sound card configurations so both sound output and recorder are working.
On my HP Laptop is FreeBSD 11.0 installed.
/boot/loader.conf contains snd_hda_load="YES"
The driver is properly loaded, hardware is detected.
Without any changes hw.snd.default_unit=0 sound output works well. But sound recording doesn't.
By setting hw.snd.default_unit=1 sound recording works and there is no sound.
Unfortunately all the changes in /boot/device.hints and reboots were unsuccessful.

Here some system information in hopes of help.

cat /dev/sndstat
Code:
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <IDT 92HD91BXX (Analog 2.0+HP/2.0)> on hdaa0  (1p:1v/1r:1v) default
pcm1: <IDT 92HD91BXX (Analog)> on hdaa0  (1p:1v/1r:1v)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> on hdaa1  (1p:1v/0r:0v)
pcm3: <Intel Panther Point (HDMI/DP 8ch)> on hdaa1  (1p:1v/0r:0v)

ls /dev/dsp*
Code:
crw-rw-rw-  1 root  wheel  0xb9  2 Mai 21:50 /dev/dsp0.0
crw-rw-rw-  1 root  wheel  0xb8  2 Mai 21:50 /dev/dsp1.0
crw-rw-rw-  1 root  wheel  0xb7  2 Mai 21:47 /dev/dsp2.0
crw-rw-rw-  1 root  wheel  0xb6  2 Mai 21:47 /dev/dsp3.0

dmesg output if system is booted in verbose mode
Code:
hdac0: <Intel Panther Point HDA Controller> mem 0xd0730000-0xd0733fff irq 22 at device 27.0 on pci0
hdac0: PCI card vendor: 0x103c, device: 0x18df
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
msi: routing MSI IRQ 266 to local APIC 0 vector 62
hdac0: using IRQ 266 for MSI
hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256

hdacc0: <IDT 92HD91BXX HDA CODEC> at cad 0 on hdac0
hdaa0: <IDT 92HD91BXX Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x103c18df
hdaa0: NumGPIO=5 NumGPO=0 NumGPI=0 GPIWake=1 GPIUnsol=1
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
hdaa0:  GPIO2: disabled
hdaa0:  GPIO3: disabled
hdaa0:  GPIO4: disabled
hdaa0: Original pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 10 21011030 3  0  Line-out      Jack  1/8     Ext-Rear   Black   0
hdaa0: 11 0321101f 1  15 Headphones    Jack  1/8     Left       Black   0
hdaa0: 12 03a11020 2  0  Mic           Jack  1/8     Left       Black   0
hdaa0: 13 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0: 14 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0
hdaa0: 15 2181102e 2  14 Line-in       Jack  1/8     Ext-Rear   Black   0
hdaa0: 16 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0
hdaa0: 17 d5a30140 4  0  Mic           Both  ATAPI   0x15       Unknown 1
hdaa0: 31 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0
hdaa0: 32 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0
hdaa0: Patched pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 10 21011030 3  0  Line-out      Jack  1/8     Ext-Rear   Black   0
hdaa0: 11 0321101f 1  15 Headphones    Jack  1/8     Left       Black   0
hdaa0: 12 03a11020 2  0  Mic           Jack  1/8     Left       Black   0
hdaa0: 13 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0: 14 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0: 15 2181102e 2  14 Line-in       Jack  1/8     Ext-Rear   Black   0
hdaa0: 16 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0: 17 d5a30140 4  0  Mic           Both  ATAPI   0x15       Unknown 1
hdaa0: 31 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0: 32 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA

mixer
Code:
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to 100:100
Mixer mic      is currently set to 100:100
Mixer mix      is currently set to  35:35
Mixer rec      is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: mic

For any help many thanks in advance.

Regards,
palik
 
Sound can be challenging in FreeBSD. In FreeBSD 10.1, snd_hda is statically compiled into the kernel. I do not know if the 11.0 developers changed it back to a module but if it is in the 11.0 kernel you would have it statically and as a module. It would be easy to check by removing the entry in /boot/loader.conf and then checking your dmesg.

It may also help to post your laptop model and more of your dmesg. snd_hda is used by many different chip manufacturers and it may be that someone has sorted this out on your model or a similar HP laptop.

Do your headphones work and do they mute the onboard speakers? Do you have a system bell(beep)?
 
Last edited:
Thank you for your response,

Sound can be challenging in FreeBSD. In FreeBSD 10.1, snd_hda is statically compiled into the kernel. I do not know if the 11.0 developers changed it back to a module but if it is in the 11.0 kernel you would be have it statically and as a module. It would be easy to check by removing the entry in /boot/loader.conf and then checking your dmesg.

It seems snd_hda is a part of kernel. snd_hda_load="YES" is removed from /boot/loader.conf and kldstat -v shows snd_hda.
Code:
1   66 0xffffffff80200000 19f4ae8  kernel (/boot/kernel/kernel)
        Contains modules:
                Id Name
                271 hdac/snd_hda
                122 et/miibus
                270 pci/snd_hda
                121 pci/et
                269 hdaa/snd_hda_pcm
                268 hdacc/snd_hda
                78 pci/ata_cyrix
                267 pci/snd_via8233
                266 pci/snd_ich
                265 pci/snd_es137x
                264 emu10kx/snd_emu10kx_midi
                263 emu10kx/snd_emu10kx_pcm
                262 pci/snd_emu10kx
                261 csa/snd_csapcm
                260 pci/snd_csa
                259 pci/snd_cmi


It may also help to post your laptop model and more of your dmesg.
HP EliteBook Folio 9470m. Complete dmesg output is here http://pastebin.com/cvXcqx9s

Do your headphones work and do they mute the onboard speakers?
Yes, but only if hw.snd.default_unit: 0 is.
Do you have a system bell(beep)?
No, but I haven't realized yet that my laptop never beeps.
 
Using snd_hda(4) and your pastebin output it appears that association 1 (as=1) is correct and pins 11 and 13 should be left alone.

Code:
hdaa0: 11 0321101f   as=1    seq=15      Headphones         Jack  1/8     Left       Black   0
hdaa0: 13 90170110   as=1    seq=0       Speaker            Fixed Analog  Internal   Unknown

Association 2 shows two pin groups and two jacks: Left/Ext-Rear

Code:
hdaa0: 12 03a11020  as=2    seq=0        Mic                 Jack 1/8           Left             Black   0
hdaa0: 15 2181102e  as=2    seq=14       Line-in             Jack 1/8           Ext-Rear         Black   0

If this is your physical configuration, can you record from Ext-Rear? It looks like you need to re-assign the gpio pins as described in snd_hda(4)
 
Last edited:
Hi,
thank you again.

If this is your physical configuration, can you record from Ext-Rear?
How can it be done? Are you mean by using suitable hint.hdaa.0.gpio_config setting?

It looks like you need to re-assign the gpio pins as described in snd_hda()

There are fife GPIO pins on hdaa0 and consequently 120 possible mutations. Unfortunately I can't use kldunload(8)/kldload(8) and have to reboot for possibility. But my first fourteen attempts neither success nor change something. I'll report after the remains are done.

Maybe it could be helpful for another one:
Putting dev.hdac.0.pindump=1 into /etc/sysctl.conf seems to make snd_hda() more talkatively.

dmesg
Code:
hdaa0: Dumping AFG pins:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 10 21011030 3  0  Line-out      Jack  1/8     Ext-Rear   Black   0
hdaa0:     Caps: IN OUT HP EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 11 0321101f 1  15 Headphones    Jack  1/8     Left       Black   0
hdaa0:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 12 03a11020 2  0  Mic           Jack  1/8     Left       Black   0
hdaa0:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 13 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0:     Caps:    OUT    EAPD  
hdaa0: 14 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 15 2181102e 2  14 Line-in       Jack  1/8     Ext-Rear   Black   0
hdaa0:     Caps: IN OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 16 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps:    OUT          
hdaa0: 17 d5a30140 4  0  Mic           Both  ATAPI   0x15       Unknown 1
hdaa0:     Caps: IN                  Sense: 0x00000000 (disconnected)
hdaa0: 31 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa0: 32 40f000f0 15 0  Other         None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN OUT              Sense: 0x00000000 (disconnected)
hdaa0: NumGPIO=5 NumGPO=0 NumGPI=0 GPIWake=1 GPIUnsol=1
hdaa0:  GPIO0: input state=0
hdaa0:  GPIO1: disabled
hdaa0:  GPIO2: disabled
hdaa0:  GPIO3: disabled
hdaa0:  GPIO4: disabled
 
I looked up the HP EliteBook Folio 9470m on HP web site. The physical configuration is something I have not seen before. The audio out(headphone jack)/audio in (microphone jack) are physically the same. Page 21 in the manual I downloaded. The manual specifies that you must use a 4 conductor connector that supports both headphones and microphones. Older headphones were 3 conductor (right/left/common). There is also a built-in mic adjacent to the web camera. When you try to record are you using a 4 conductor jack into the left side of the machine or the built-in mic? Your mixer output shows you are recording from only one source.
How can it be done? Are you mean by using suitable hint.hdaa.0.gpio_config setting?
Once you determine what your mic source will be (left jack vs built in mic) this would be how you would alter the configuration.

Edit: It also may help to compare the pindumps with default sound unit = 0 and default sound unit = 1
 
Last edited:
I looked up the HP EliteBook Folio 9470m on HP web site.
I really appreciate for your time and effort.

There is also a built-in mic adjacent to the web camera. When you try to record are you using a 4 connector jack into the left side of the machine or the built-in mic? Your /dev/sndstat only shows you are recording from one source.
I've tried both of them. But only if hw.snd.default_unit=1 sound recording works properly.

Once you determine what your mic source will be (left jack vs built in mic) this would be how you would alter the configuration.
It's definitely build in mic. In this case hw.snd.default_unit=1
cat /dev/sndstat
Code:
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <IDT 92HD91BXX (Analog 2.0+HP/2.0)> on hdaa0  (1p:1v/1r:1v)
pcm1: <IDT 92HD91BXX (Analog)> on hdaa0  (1p:2v/1r:1v) default
pcm2: <Intel Panther Point (HDMI/DP 8ch)> on hdaa1  (1p:1v/0r:0v)
pcm3: <Intel Panther Point (HDMI/DP 8ch)> on hdaa1  (1p:1v/0r:0v)
mixer
Code:
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer rec      is currently set to  35:35
Mixer ogain    is currently set to 100:100
Mixer monitor  is currently set to 100:100
Recording source: monitor

It also may help to compare the pindumps with default sound unit = 0 and default sound unit = 1
The only difference I could see is hdaa0: GPIO0: input state=0 in hw.snd.default_unit=0 because hint.hdaa.0.gpio_config entry in /boot/device.hints, which was removed before
hw.snd.default_unit=1 boot
 
It looks like the recording source is "mic" when using "hw.snd.default_unit=0". With "hw.snd.default_unit=1" the recording source is "monitor" and that with the default snd unit at 1 you are able to record with the monitor's built in mic.

If you look at the pindump with the default snd unit=1, I would wonder if pin 15 is "monitor" with an as=2 and seq=0?
I would try swapping out the seq values for pins 12 and 15 with default snd unit=0. I would also play with the seq setting for nid12. If seq=15, it is supposed to mix the sound from the two sources, while seq=14 is to multiplex the sources.

/boot/device.hints
Code:
hint.hdac.0.cad0.nid12.config="as=2 seq=14 device=mic"
hint.hdac.0.cad0.nid15.config="as=2 seq=0 device=monitor"
 
Many thanks for your help.
/boot/device.hints
Code:
hint.hdac.0.cad0.nid12.config="as=2 seq=14 device=mic"
hint.hdac.0.cad0.nid15.config="as=2 seq=0 device=monitor"
Now sound recording works properly without hw.snd.default_unit switching.
Best regards,
palik
 
Back
Top