I installed FreeBSD 11 on a Dell Latiutde laptop. Sound plays well from the speaker. But when plugging in headphones, sound still plays from the speaker and no sound from the headphones.
I read the man page of SND_HDA(4)() and believe I have understood the relevant part. I enabled verbose booting, and added the following to /boot/device.hints:
the resulting dmesg is:
Before my /boot/device.hints tweak the relevant part was:
So after my tweak, when plugging headphones into the jack, the speaker does stop playing. And for split of second I do hear clear music through the headphones, which quickly stopped. I slowly pushed and pulled the headphones many times, turned out, only when the headphones is about 1/10 inch away from fully inserted I can hear the music from the headphones, but it will always only last split second, ie there is nowhere the music can stably play through the speakers.
It's not a hardware problem since everything works well when running from a Linux Mint live CD. More information:
Did I make anything wrong? I suspect it has to do with the color thing but I do use a standard iphone headphones and it plays with no problem through that Linux Mint live CD and many other devices, and this laptop only has one black hole labeled as headphone.
And I don't even know how to define microphone from the headphones since there is no nid entry for that.
I read the man page of SND_HDA(4)() and believe I have understood the relevant part. I enabled verbose booting, and added the following to /boot/device.hints:
Code:
hint.hdac.0.cad0.nid20.config="as=1 seq=0"
hint.hdac.0.cad0.nid33.config="as=1 seq=15 device=Headphones"
Code:
hdac0: <Intel (0x9d71) HDA Controller> mem 0xef248000-0xef24bfff,0xef220000-0xef22ffff irq 17 at device 31.3 on pci0
hdac0: PCI card vendor: 0x1028, device: 0x07a0
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
hdac0: using IRQ 266 for MSI
hdac0: Caps: OSS 9, ISS 7, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
random: harvesting attach, 8 bytes (4 bits) from hdac0
hdacc0: <Realtek (0x0256) HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek (0x0256) Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x102807a0
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: GPIO2: disabled
hdaa0: Original pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 90a60140 4 0 Mic Fixed Digital Internal Unknown 1
hdaa0: 19 40000000 0 0 Line-out None Unknown 0x00 Unknown 0
hdaa0: 20 90170110 1 0 Speaker Fixed Analog Internal Unknown 1
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 25 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 29 40700001 0 1 Modem-handset None Unknown 0x00 Unknown 0
hdaa0: 30 421212f2 15 2 Speaker None 1/4 Front Black 2
hdaa0: 33 02211020 2 0 Headphones Jack 1/8 Front Black 0
hdaa0: Patching widget caps nid=29 0x00400400 -> 0x00700400
hdaa0: Patching pin config nid=33 0x02211020 -> 0x0221101f
hdaa0: Patched pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 90a60140 4 0 Mic Fixed Digital Internal Unknown 1
hdaa0: 19 40000000 0 0 Line-out None Unknown 0x00 Unknown 0 DISA
hdaa0: 20 90170110 1 0 Speaker Fixed Analog Internal Unknown 1
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 25 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 30 421212f2 15 2 Speaker None 1/4 Front Black 2 DISA
hdaa0: 33 0221101f 1 15 Headphones Jack 1/8 Front Black 0
hdaa0: 2 associations found:
hdaa0: Association 0 (1) out:
hdaa0: Pin nid=20 seq=0
hdaa0: Pin nid=33 seq=15
hdaa0: Association 1 (4) in:
hdaa0: Pin nid=18 seq=0
hdaa0: Tracing association 0 (1)
hdaa0: Pin 20 traced to DAC 2
hdaa0: Pin 33 traced to DAC 2 and hpredir 0
hdaa0: Association 0 (1) trace succeeded
hdaa0: Tracing association 1 (4)
hdaa0: Pin 18 traced to ADC 7
hdaa0: Association 1 (4) trace succeeded
hdaa0: Looking for additional DAC for association 0 (1)
hdaa0: Looking for additional ADC for association 1 (4)
hdaa0: Tracing input monitor
hdaa0: Tracing other input monitors
hdaa0: Tracing nid 18 to out
hdaa0: Tracing beeper
hdaa0: Headphones redirection for association 0 nid=33 using unsolicited responses.
hdaa0: Redirect output to: main
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <Realtek (0x0256) (Analog 2.0+HP/2.0)> at nid 20,33 and 18 on hdaa0
random: harvesting attach, 8 bytes (4 bits) from hdaa0
random: harvesting attach, 8 bytes (4 bits) from hdacc0
hdacc1: <Intel (0x280b) HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel (0x280b) Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80860101
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid 0x as seq device conn jack loc color misc
hdaa1: 3 18560010 1 0 Digital-out Jack Digital 0x18 Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid 0x as seq device conn jack loc color misc
hdaa1: 3 18560010 1 0 Digital-out Jack Digital 0x18 Unknown 0
hdaa1: 1 associations found:
hdaa1: Association 0 (1) out:
hdaa1: Pin nid=3 seq=0
hdaa1: Tracing association 0 (1)
hdaa1: Pin 3 traced to DAC 2
hdaa1: Association 0 (1) trace succeeded
hdaa1: Looking for additional DAC for association 0 (1)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm1: <Intel (0x280b) (HDMI/DP 8ch)> at nid 3 on hdaa1
random: harvesting attach, 8 bytes (4 bits) from hdaa1
random: harvesting attach, 8 bytes (4 bits) from hdacc1
Code:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 90a60140 4 0 Mic Fixed Digital Internal Unknown 1
hdaa0: 19 40000000 0 0 Line-out None Unknown 0x00 Unknown 0 DISA
hdaa0: 20 90170110 1 0 Speaker Fixed Analog Internal Unknown 1
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 25 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 30 421212f2 15 2 Speaker None 1/4 Front Black 2 DISA
hdaa0: 33 02211020 2 0 Headphones Jack 1/8 Front Black 0
So after my tweak, when plugging headphones into the jack, the speaker does stop playing. And for split of second I do hear clear music through the headphones, which quickly stopped. I slowly pushed and pulled the headphones many times, turned out, only when the headphones is about 1/10 inch away from fully inserted I can hear the music from the headphones, but it will always only last split second, ie there is nowhere the music can stably play through the speakers.
It's not a hardware problem since everything works well when running from a Linux Mint live CD. More information:
Code:
# cat /dev/sndstat
Installed devices:
pcm0: <Realtek (0x0256) (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Intel (0x280b) (HDMI/DP 8ch)> (play)
And I don't even know how to define microphone from the headphones since there is no nid entry for that.