Sound only from headphone jack: Panasonic Let's Note CF-S10 laptop

Hello! I've been trying for a while to get audio from the internal speaker of this Panasonic Let's Note CF-S10 laptop that I recently installed FreeBSD 14.1. I have attempted to add hints:

/boot/loader.conf
Code:
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
cuse_load="YES"
acpi_panasonic_load="YES"

set hint.hdac.0.cad0.nid20.config="as=1 seq=0 device=Speaker"
set hint.hdac.0.cad0.nid33.config="as=1 seq=15 device=Headphones"
set hint.hdac.0.cad0.nid24.config="as=2 seq=0 device=Mic"
set hint.hdac.1.nid6.config="as=2 seq=0 device=Digital-out"

And here is the pin dump before I added hints to loader.conf:

dmesg
Code:
hdaa0: Dumping AFG pins:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 18 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN                 
hdaa0: 20 99130110 1  0  Speaker       Fixed ATAPI   Onboard    Unknown 1
hdaa0:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 23 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT             
hdaa0: 24 02a11820 2  0  Mic           Jack  1/8     Front      Black   8
hdaa0:     Caps: IN OUT         VREF Sense: 0x00000000 (disconnected)
hdaa0: 25 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN OUT HP           Sense: 0x00000000 (disconnected)
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN OUT              Sense: 0x00000000 (disconnected)
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa0: 33 0221101f 1  15 Headphones    Jack  1/8     Front      Black   0
hdaa0:     Caps:    OUT HP           Sense: 0x00000000 (disconnected)
hdaa0: NumGPIO=2 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
hdaa1: Dumping AFG pins:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 58560010 1  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1:  6 18560020 2  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1:  7 58560030 3  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0

dmesg | grep pcm
Code:
pcm0: <Realtek ALC269 (Front Analog)> at nid 33 and 24 on hdaa0
pcm1: <Realtek ALC269 (Onboard Analog Speaker)> at nid 20 on hdaa0
pcm2: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,33 and 24 on hdaa0
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,33 and 24 on hdaa0
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,33 and 24 on hdaa0
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1

It looks like the HDMI output is somehow conflicting with the onboard speaker? I get sound from the headphone jack but not the onboard speaker. I have also checked that the volumes are turned up in alsamixer

/etc/sysctl.conf
I have tried both
Code:
 hw.snd.default_unit=1
and
Code:
 hw.snd.default_unit=0
but I am still not getting sound from the onboard speaker.

Any help would be much appreciated. Thank you!
 
I have exactly the same problem after installing 14.1-RELEASE on Panasonic Toughbook CF-MX4. Sound was working fine before on 13.

I have read snd_hda manual played with all sorts of config nid/as/seq but nothing helps.

What is more there is no sound anymore on other OS (tried USB boot). And the BIOS diagnostics fails to beep the speaker.

I have disassembled the laptop just to make sure that speaker is operational, disconnected the speaker, attached to a signal generator and it works fine!

Is it possible that new driver changed / broke something on the audio chipset or changed its default values???
 
ro588 can you verify if built-in speaker works on other OS / BIOS diagnostics?

You can run diagnostics with F2 on boot / last tab on the right / diagnostics.. there you can stop running tests and deselect others just leave speaker test enabled to save time.. for me it does not beep at all.. on another CF-MX4 with no BSD it works fine.
 
I have exactly the same problem after installing 14.1-RELEASE on Panasonic Toughbook CF-MX4. Sound was working fine before on 13.

I have read snd_hda manual played with all sorts of config nid/as/seq but nothing helps.

What is more there is no sound anymore on other OS (tried USB boot). And the BIOS diagnostics fails to beep the speaker.

I have disassembled the laptop just to make sure that speaker is operational, disconnected the speaker, attached to a signal generator and it works fine!

Is it possible that new driver changed / broke something on the audio chipset or changed its default values???
Thank you for your reply. I know the sound can work properly, I booted into Puppy Linux and the sound came out of the onboard speaker just fine. I also thought about taking it apart to see if something was disconnected but I`m glad I tried another method to test first lol
 
Okay so I have tested on another CF-MX4 laptop.. the sound is there on FBSD 13 and 14 and Linux. This may indicate hardware failure on my main BSD laptop. Strange coincidence as it was working for several years with no problem until 14.1 install.

On another CF-MX4 on FBSD 14.1 I also have nid=20 as the main speaker which has EAPD (output amplifier) and is detected as disconnected but the sound plays fine.

Please try on CF-S10:
1. `ls -al /dev/dsp*` this will give you list of available dsp devices, the speaker in my case is at /dev/dsp1, and this one is set as default.
2. `mixer` and make sure that `vol` and `pcm` are not `0`, if so set them to 1 with `mixer pcm=1`. Note `mixer`utility changed its syntax in 14 release.
3. `cat /dev/random > /dev/dsp` and see if that produces noise on the speaker (stop with Ctrl+C). If yes then problem solved.
4. If still does not work then lets try all `/dev/dspN` where `N=0..2` up to the number revealed with step 1. Make sure mixer is okay (`mixer -f /dev/mixerN`) then try buzz the speaker (`cat /dev/random > /dev/dspN`). You may want to connect HDMI and headphones just to make sure all audio output channels works as expected.

If none of above works then we have a probable problem with drivers on Panasonic Toughbook series.

I have also played with gpio but they does not seem to control the amplifier (I tried all set,clear,input,keep,disable) values and reloaded driver after each attempt.

One additional question - do you hear "click" on the speaker during FBSD boot? Once the snd_hda driver is loaded on the other CF-MX4 I can hear the click on driver load.. on the broken one there is no audible click.
 
Hello again,

Thank you for your reply. I followed your instructions above and it is still not working. I have dsp0 and dsp1. The sound for dsp0 only comes out of the headphones and dsp1 comes out of the HDMI port.

At boot, the internal speaker does not make a click, however with the headphones attached there is a click during boot from the headphones.

It seems the driver may not work on this Panasonic. Thank you again for your help with this, I appreciate it!
 
Wait.. there is something wrong with the auto-detect here.. do not give up :)

You wrote:

pcm0: <Realtek ALC269 (Front Analog)> at nid 33 and 24 on hdaa0
pcm1: <Realtek ALC269 (Onboard Analog Speaker)> at nid 20 on hdaa0
pcm2: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,33 and 24 on hdaa0
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,33 and 24 on hdaa0
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,33 and 24 on hdaa0
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> at nid 6 on hdaa1


What is wrong here:
1. pcm devices are detected several times with different configuration (i.e. pcm0 at first is "Front Analog" with nid 33 and 24 then it is "Analog 2.0+HP/2.0").
2. At first pcm[0,1,2] is detected. Then pcm 0 and 1 seems to be merged into pcm 0, also pcm2 (HDMI) seems to become pcm1.

Do you change any of those pcm configurations by hand of hints?

You say that dsp0 are the headphones and dsp1 is the HDMI.

It seems that audio system merges all onboard analog audio to pcm0/dsp0 and HDMI becomes pcm1/dsp1.

I think the jack connection detection does not work as expected. Audio should be routed by default to the internal onboard analog speaker and then when jack headphones are plugged in output should be redirected there.

On my Toughbook I have dsp0 for HDMI, dsp1 builtin speaker, dsp2 for jack in/out. So this is a bit different setup.

What I would recommend is to print out the snd_hda man page [1], read it carefully, play with syctl dev.hdac.1 and dev.hdac.1 until success. On my laptop the analog output seems broken for some reason because even BIOS Diagnostics does not play anything over the speaker (it works on another CF-MX4 laptop).

Some hints:
* HDA codec chip uses reconfigurable analog multiplexer so you can reconfigure the audio hardware connections on the fly - those wires are called "pins".
* sysctl dev.hdac.1.pindump=1; dmesg | tail -30 will show you current hda codec pin configuration. Use that with dis/connected headphones and see if mic/headphone plug is detected correctly.
* sysctl dev.hdaa.1.reconfig=1 will restart the audio driver with new configuration you need to do this after each configuration change.
* sysctl dev.hdaa.1.init_clear will tell what pin configuration to use. When 0 then system uses BIOS provided config. Setting 1 here clears out the config so you can use your own.
* dev.hdaa.0.nidN_original keeps the original config in case you want to revert changes.
* dev.hdaa.0.nid3_config is the place you want to modify to change pin config.
* you gorup several NID with AS parameter and then use SEQ to number the signals in AS group.
* cat /dev/random > /dev/dspN will produce test noise on the given output.

What happens if you:
1. set CTYPE=Analog for NID20? Right now you have ATAPI set.
2. set CONN=Both for NID20? Both means Fixed and Jack (may enable autoswitch?).
3. set CONN=Both for NID33 in connection with CONN=Both for NID20?
4. set NID33 SEQ=0 and NID20 SEQ=15?
5. set AS=15 for NID20? This should set this pin independent.
...

Play with those values maybe you find the solution :) Unfortunately there is no GUI application for this. Remember to sysctl dev.hdaa.1.reconfig=1 after each change to take effect.

Have fun :)

[1] https://man.freebsd.org/cgi/man.cgi?snd_hda
 
Hello,

Thank you again for your reply! I will give these a try and re-read the man page. I am relatively new to FreeBSD so it will take me some time to learn this.

Thanks again :)
 
Back
Top