No sound from Realtek ALC257 in Legion Y7000P IAH7

I'm using KDE5 and there is no sound from my internal speaker.
Output from cat /dev/sndstat
Code:
Installed devices:
pcm0: <NVIDIA (0x00a0) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x00a0) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x00a0) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC257 (Analog)> (play/rec) default
pcm4: <Realtek ALC257 (Right Analog Mic)> (rec)
No devices installed from userspace.
Output from sysctl dev.hdaa
Code:
dev.hdaa.1.init_clear: 0
dev.hdaa.1.reconfig: 0
dev.hdaa.1.gpo_config:
dev.hdaa.1.gpo_state:
dev.hdaa.1.gpio_config: 0=keep 1=keep 2=keep
dev.hdaa.1.gpio_state: 0=disabled 1=disabled 2=disabled
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid36: audio selector
     Widget cap: 0x00300101 STEREO
    Association: 2 (0x0001)
            OSS: monitor
    Connections: 2
          + <- nid=18 [pin: Mic (Fixed)] (selected)
          + [DISABLED] <- nid=19 [pin: Line-out (None)] [DISABLED]

dev.hdaa.1.nid35: audio mixer
     Widget cap: 0x0020010b STEREO
    Association: 3 (0x0001)
            OSS: speaker, mic
      Input amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 6
          + [DISABLED] <- nid=24 [pin: Speaker (None)] [DISABLED]
          + <- nid=25 [pin: Mic (Black Jack)]
          + [DISABLED] <- nid=26 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=27 [pin: Speaker (None)] [DISABLED]
          + <- nid=29 [beep widget]
          + [DISABLED] <- nid=18 [pin: Mic (Fixed)]

dev.hdaa.1.nid34: audio mixer [DISABLED]
     Widget cap: 0x0020010b STEREO
      Input amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 6
          + [DISABLED] <- nid=24 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=25 [pin: Mic (Black Jack)]
          + [DISABLED] <- nid=26 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=27 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=29 [beep widget]
          + [DISABLED] <- nid=19 [pin: Line-out (None)] [DISABLED]

dev.hdaa.1.nid33_original: 0x04211010 as=1 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid33_config: 0x04211010 as=1 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid33: pin: Headphones (Black Jack)
     Widget cap: 0x0040058d PWR UNSOL STEREO
    Association: 0 (0x0001)
        Pin cap: 0x0001001c PDC HP OUT EAPD
     Pin config: 0x04211010 as=1 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
    Pin control: 0x000000c0 HP OUT
           EAPD: 0x00000002 EAPD
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 2
          + <- nid=2 [audio output] (selected)
          + [DISABLED] <- nid=3 [audio output] [DISABLED]

dev.hdaa.1.nid32: vendor widget [DISABLED]
     Widget cap: 0x00f00040 PROC

dev.hdaa.1.nid31: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid30_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid30_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid30: pin: Speaker (None) [DISABLED]
     Widget cap: 0x00400781 PWR DIGITAL UNSOL STEREO
        Pin cap: 0x00000014 PDC OUT
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000040 OUT
    Connections: 1
          + <- nid=6 [audio output] [DISABLED]

dev.hdaa.1.nid29_original: 0x4066b905 as=0 seq=5 device=Modem-line conn=None ctype=Digital loc=0x00 color=Res.B misc=9
dev.hdaa.1.nid29_config: 0x4066b905 as=0 seq=5 device=Modem-line conn=None ctype=Digital loc=0x00 color=Res.B misc=9
dev.hdaa.1.nid29: beep widget
     Widget cap: 0x00700400 PWR
    Association: -2 (0x0000)
            OSS: speaker (speaker)
        Pin cap: 0x00000020 IN
     Pin config: 0x4066b905 as=0 seq=5 device=Modem-line conn=None ctype=Digital loc=0x00 color=Res.B misc=9
    Pin control: 0x00000020 IN

dev.hdaa.1.nid28: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid27_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid27_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid27: pin: Speaker (None) [DISABLED]
     Widget cap: 0x0040058f PWR UNSOL STEREO
        Pin cap: 0x00013734 PDC OUT IN VREF[ 50 80 100 GROUND HIZ ] EAPD
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000020 IN
           EAPD: 0x00000002 EAPD
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)
    Connections: 2
          + [DISABLED] <- nid=2 [audio output] (selected)
          + <- nid=3 [audio output] [DISABLED]

dev.hdaa.1.nid26_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26: pin: Speaker (None) [DISABLED]
     Widget cap: 0x0040048b PWR UNSOL STEREO
        Pin cap: 0x00003724 PDC IN VREF[ 50 80 100 GROUND HIZ ]
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000000
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid25_original: 0x04a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid25_config: 0x04a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid25: pin: Mic (Black Jack)
     Widget cap: 0x0040048b PWR UNSOL STEREO
    Association: 3 (0x0001)
            OSS: mic (mic)
        Pin cap: 0x00003724 PDC IN VREF[ 50 80 100 GROUND HIZ ]
     Pin config: 0x04a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
    Pin control: 0x00000025 IN VREFs
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid24_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid24_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid24: pin: Speaker (None) [DISABLED]
     Widget cap: 0x0040048b PWR UNSOL STEREO
        Pin cap: 0x00003724 PDC IN VREF[ 50 80 100 GROUND HIZ ]
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000020 IN
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid23: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid22: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid21: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid20_original: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20_config: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20: pin: Speaker (Fixed) [DISABLED]
     Widget cap: 0x0040058d PWR UNSOL STEREO
        Pin cap: 0x00010014 PDC OUT EAPD
     Pin config: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
    Pin control: 0x00000000
           EAPD: 0x00000002 EAPD
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 1
          + [DISABLED] <- nid=2 [audio output]

dev.hdaa.1.nid19_original: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid19_config: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid19: pin: Line-out (None) [DISABLED]
     Widget cap: 0x0040040b PWR STEREO
        Pin cap: 0x00000020 IN
     Pin config: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
    Pin control: 0x00000000
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid18_original: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.1.nid18_config: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.1.nid18: pin: Mic (Fixed)
     Widget cap: 0x0040040b PWR STEREO
    Association: 2 (0x0001)
            OSS: monitor (monitor)
        Pin cap: 0x00000020 IN
     Pin config: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
    Pin control: 0x00000020 IN
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid17: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid16: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid15: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid14: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid13: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid12: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid11: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid10: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid9: audio input [DISABLED]
     Widget cap: 0x0010051b PWR STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
      Input amp: 0x80023f17 mute=1 step=63 size=2 offset=23 (-17/30dB)
    Connections: 1
          + [DISABLED] <- nid=34 [audio mixer] [DISABLED]

dev.hdaa.1.nid8: audio input
     Widget cap: 0x0010051b PWR STEREO
    Association: 3 (0x0001)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
      Input amp: 0x80023f17 mute=1 step=63 size=2 offset=23 (-17/30dB)
    Connections: 1
          + <- nid=35 [audio mixer]

dev.hdaa.1.nid7: audio input
     Widget cap: 0x0010051b PWR STEREO
    Association: 2 (0x0001)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
      Input amp: 0x80023f17 mute=1 step=63 size=2 offset=23 (-17/30dB)
    Connections: 1
          + <- nid=36 [audio selector]

dev.hdaa.1.nid6: audio output [DISABLED]
     Widget cap: 0x00000611 PWR DIGITAL STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e05e0 16 20 24 bits, 44 48 88 96 192 KHz

dev.hdaa.1.nid5: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid4: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid3: audio output [DISABLED]
     Widget cap: 0x0000041d PWR STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0060 16 20 24 bits, 44 48 KHz
     Output amp: 0x00025757 mute=0 step=87 size=2 offset=87 (-65/0dB)

dev.hdaa.1.nid2: audio output
     Widget cap: 0x0000041d PWR STEREO
    Association: 0 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0060 16 20 24 bits, 44 48 KHz
     Output amp: 0x00025757 mute=0 step=87 size=2 offset=87 (-65/0dB)

dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x17aa3961
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Realtek ALC257 Audio Function Group
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.nid11: audio output [DISABLED]
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid10: audio output
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
    Association: 2 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid9: audio output
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
    Association: 1 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid8: audio output
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
    Association: 0 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid7_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7: pin: Digital-out (Jack)
     Widget cap: 0x00407381 DIGITAL UNSOL 8CH
    Association: 2 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
    Connections: 4
          + [DISABLED] <- nid=8 [audio output]
          + [DISABLED] <- nid=9 [audio output]
          + <- nid=10 [audio output] (selected)
          + [DISABLED] <- nid=11 [audio output] [DISABLED]

dev.hdaa.0.nid6_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6: pin: Digital-out (Jack)
     Widget cap: 0x00407381 DIGITAL UNSOL 8CH
    Association: 1 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
    Connections: 4
          + [DISABLED] <- nid=8 [audio output]
          + <- nid=9 [audio output] (selected)
          + [DISABLED] <- nid=10 [audio output]
          + [DISABLED] <- nid=11 [audio output] [DISABLED]

dev.hdaa.0.nid5: audio output [DISABLED]
     Widget cap: 0x00000000

dev.hdaa.0.nid4_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4: pin: Digital-out (Jack)
     Widget cap: 0x00407381 DIGITAL UNSOL 8CH
    Association: 0 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
    Connections: 4
          + <- nid=8 [audio output] (selected)
          + [DISABLED] <- nid=9 [audio output]
          + [DISABLED] <- nid=10 [audio output]
          + [DISABLED] <- nid=11 [audio output] [DISABLED]

dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0xffffffff
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: NVIDIA (0x00a0) Audio Function Group
dev.hdaa.%parent:
There are similar posts but I don't know what I should do.
I don't have a USB speaker right now, so I can't test it yet.
 
Similar:

Code:
% cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC280 (Analog 2.0+HP/2.0)> (play/rec) default
pcm4: <Realtek ALC280 (Internal Analog Mic)> (rec)
pcm5: <USB audio> (rec)
No devices installed from userspace.
% uname -KU
1500008 1500008
%

If you plug an external loudspeaker into the jack socket, is sound audible and balanced (left/right)?
 
honestly, I just fought with sound on my fresh 14.0 install only to discover SOMEHOW my speakers' input had been changed. So, my advice is to check all components to make sure they are in a known functional state.
 

I forgot to mention, beyond the obvious problem (nothing audible):
  • YouTube content will not play.
So, for example, I can't watch and read subtitles.

It's easier, less frustrating, for me to use an iPad. Sorry.
 

Attachments

  • 1705116187456.png
    1705116187456.png
    87.2 KB · Views: 51
What's the output of dmesg | grep pcm?
Code:
root@freebsd:~ # dmesg | grep pcm
pcm0: <NVIDIA (0x00a0) (HDMI/DP 8ch)> at nid 4 on hdaa0
pcm1: <NVIDIA (0x00a0) (HDMI/DP 8ch)> at nid 6 on hdaa0
pcm2: <NVIDIA (0x00a0) (HDMI/DP 8ch)> at nid 7 on hdaa0
pcm3: <Realtek ALC257 (Analog)> at nid 33 and 18 on hdaa1
pcm4: <Realtek ALC257 (Right Analog Mic)> at nid 25 on hdaa1
 
It looks like it's picking it up correctly, but for some reason, the pins that refer to the speakers are disabled and muted.

Maybe try sticking the following into /etc/sysctl.conf
Code:
dev.hdaa.1.gpio_config="0=set 1=set"
hw.snd.default_unit=1
dev.hdaa.1.nid33_config="as=4 seq=15"

After that. run this to take effect


service sysctl restart
service sndiod restart


After that, run sysctl dev.hdaa again and see if it makes a difference to the lines regarding the speakers
 
Code:
% sysctl hw.snd.default_unit
hw.snd.default_unit: 1
% cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play) default
pcm2: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC280 (Analog 2.0+HP/2.0)> (play/rec)
pcm4: <Realtek ALC280 (Internal Analog Mic)> (rec)
pcm5: <USB audio> (rec)
No devices installed from userspace.
% sysctl dev.hdaa.1.%desc
dev.hdaa.1.%desc: Realtek ALC280 Audio Function Group
% su -
Password:
root@mowa219-gjp4-zbook-freebsd:~ # sysctl hw.snd.default_unit=3
hw.snd.default_unit: 1 -> 3
root@mowa219-gjp4-zbook-freebsd:~ # cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC280 (Analog 2.0+HP/2.0)> (play/rec) default
pcm4: <Realtek ALC280 (Internal Analog Mic)> (rec)
pcm5: <USB audio> (rec)
No devices installed from userspace.
root@mowa219-gjp4-zbook-freebsd:~ #
  • pcm1 (NVIDIA) was the default
  • I change hw.snd.default_unit from 1, to 3
  • pcm3 (Realtek) becomes the default.
 
Code:
% sysctl hw.snd.default_unit
hw.snd.default_unit: 1
% cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play) default
pcm2: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC280 (Analog 2.0+HP/2.0)> (play/rec)
pcm4: <Realtek ALC280 (Internal Analog Mic)> (rec)
pcm5: <USB audio> (rec)
No devices installed from userspace.
% sysctl dev.hdaa.1.%desc
dev.hdaa.1.%desc: Realtek ALC280 Audio Function Group
% su -
Password:
root@mowa219-gjp4-zbook-freebsd:~ # sysctl hw.snd.default_unit=3
hw.snd.default_unit: 1 -> 3
root@mowa219-gjp4-zbook-freebsd:~ # cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC280 (Analog 2.0+HP/2.0)> (play/rec) default
pcm4: <Realtek ALC280 (Internal Analog Mic)> (rec)
pcm5: <USB audio> (rec)
No devices installed from userspace.
root@mowa219-gjp4-zbook-freebsd:~ #
  • pcm1 (NVIDIA) was the default
  • I change hw.snd.default_unit from 1, to 3
  • pcm3 (Realtek) becomes the default.
Sorry, yes, I messed up reading my own how-to guide.
 
It looks like it's picking it up correctly, but for some reason, the pins that refer to the speakers are disabled and muted.

Maybe try sticking the following into /etc/sysctl.conf
Code:
dev.hdaa.1.gpio_config="0=set 1=set"
hw.snd.default_unit=1
dev.hdaa.1.nid33_config="as=4 seq=15"

After that. run this to take effect


service sysctl restart
service sndiod restart


After that, run sysctl dev.hdaa again and see if it makes a difference to the lines regarding the speakers
It worked! Now there is sound from my headphone. Thank you very much!
Can I do the same with my speaker? It seemed that all speakers are marked as "[DISABLED]".
And is there a way to make headphones and speaker auto detect my device(sound form speaker if I don't plug in my headphones and form headphones if I do)?
Here is the output of sysctl dev.hdaa now
Code:
$ sysctl dev.hdaa.1
dev.hdaa.1.init_clear: 0
dev.hdaa.1.reconfig: 0
dev.hdaa.1.gpo_config:
dev.hdaa.1.gpo_state:
dev.hdaa.1.gpio_config: 0=set 1=set 2=keep
dev.hdaa.1.gpio_state: 0=output(1) 1=output(1) 2=disabled
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid36: audio selector
     Widget cap: 0x00300101 STEREO
    Association: 2 (0x0001)
            OSS: monitor
    Connections: 2
          + <- nid=18 [pin: Mic (Fixed)] (selected)
          + [DISABLED] <- nid=19 [pin: Line-out (None)] [DISABLED]

dev.hdaa.1.nid35: audio mixer
     Widget cap: 0x0020010b STEREO
    Association: 3 (0x0001)
            OSS: speaker, mic
      Input amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 6
          + [DISABLED] <- nid=24 [pin: Speaker (None)] [DISABLED]
          + <- nid=25 [pin: Mic (Black Jack)]
          + [DISABLED] <- nid=26 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=27 [pin: Speaker (None)] [DISABLED]
          + <- nid=29 [beep widget]
          + [DISABLED] <- nid=18 [pin: Mic (Fixed)]

dev.hdaa.1.nid34: audio mixer [DISABLED]
     Widget cap: 0x0020010b STEREO
      Input amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 6
          + [DISABLED] <- nid=24 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=25 [pin: Mic (Black Jack)]
          + [DISABLED] <- nid=26 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=27 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=29 [beep widget]
          + [DISABLED] <- nid=19 [pin: Line-out (None)] [DISABLED]

dev.hdaa.1.nid33_original: 0x04211010 as=1 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid33_config: 0x0421104f as=4 seq=15 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid33: pin: Headphones (Black Jack)
     Widget cap: 0x0040058d PWR UNSOL STEREO
    Association: 0 (0x0001)
        Pin cap: 0x0001001c PDC HP OUT EAPD
     Pin config: 0x04211010 as=1 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
    Pin control: 0x000000c0 HP OUT
           EAPD: 0x00000002 EAPD
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 2
          + <- nid=2 [audio output] (selected)
          + [DISABLED] <- nid=3 [audio output] [DISABLED]

dev.hdaa.1.nid32: vendor widget [DISABLED]
     Widget cap: 0x00f00040 PROC

dev.hdaa.1.nid31: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid30_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid30_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid30: pin: Speaker (None) [DISABLED]
     Widget cap: 0x00400781 PWR DIGITAL UNSOL STEREO
        Pin cap: 0x00000014 PDC OUT
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000040 OUT
    Connections: 1
          + <- nid=6 [audio output] [DISABLED]

dev.hdaa.1.nid29_original: 0x4066b905 as=0 seq=5 device=Modem-line conn=None ctype=Digital loc=0x00 color=Res.B misc=9
dev.hdaa.1.nid29_config: 0x4066b905 as=0 seq=5 device=Modem-line conn=None ctype=Digital loc=0x00 color=Res.B misc=9
dev.hdaa.1.nid29: beep widget
     Widget cap: 0x00700400 PWR
    Association: -2 (0x0000)
            OSS: speaker (speaker)
        Pin cap: 0x00000020 IN
     Pin config: 0x4066b905 as=0 seq=5 device=Modem-line conn=None ctype=Digital loc=0x00 color=Res.B misc=9
    Pin control: 0x00000020 IN

dev.hdaa.1.nid28: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid27_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid27_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid27: pin: Speaker (None) [DISABLED]
     Widget cap: 0x0040058f PWR UNSOL STEREO
        Pin cap: 0x00013734 PDC OUT IN VREF[ 50 80 100 GROUND HIZ ] EAPD
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000020 IN
           EAPD: 0x00000002 EAPD
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)
    Connections: 2
          + [DISABLED] <- nid=2 [audio output] (selected)
          + <- nid=3 [audio output] [DISABLED]

dev.hdaa.1.nid26_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26: pin: Speaker (None) [DISABLED]
     Widget cap: 0x0040048b PWR UNSOL STEREO
        Pin cap: 0x00003724 PDC IN VREF[ 50 80 100 GROUND HIZ ]
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000000
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid25_original: 0x04a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid25_config: 0x04a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.1.nid25: pin: Mic (Black Jack)
     Widget cap: 0x0040048b PWR UNSOL STEREO
    Association: 3 (0x0001)
            OSS: mic (mic)
        Pin cap: 0x00003724 PDC IN VREF[ 50 80 100 GROUND HIZ ]
     Pin config: 0x04a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Right color=Black misc=0
    Pin control: 0x00000025 IN VREFs
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid24_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid24_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid24: pin: Speaker (None) [DISABLED]
     Widget cap: 0x0040048b PWR UNSOL STEREO
        Pin cap: 0x00003724 PDC IN VREF[ 50 80 100 GROUND HIZ ]
     Pin config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
    Pin control: 0x00000020 IN
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid23: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid22: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid21: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid20_original: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20_config: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid20: pin: Speaker (Fixed) [DISABLED]
     Widget cap: 0x0040058d PWR UNSOL STEREO
        Pin cap: 0x00010014 PDC OUT EAPD
     Pin config: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
    Pin control: 0x00000000
           EAPD: 0x00000002 EAPD
     Output amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 1
          + [DISABLED] <- nid=2 [audio output]

dev.hdaa.1.nid19_original: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid19_config: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid19: pin: Line-out (None) [DISABLED]
     Widget cap: 0x0040040b PWR STEREO
        Pin cap: 0x00000020 IN
     Pin config: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
    Pin control: 0x00000000
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid18_original: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.1.nid18_config: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.1.nid18: pin: Mic (Fixed)
     Widget cap: 0x0040040b PWR STEREO
    Association: 2 (0x0001)
            OSS: monitor (monitor)
        Pin cap: 0x00000020 IN
     Pin config: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
    Pin control: 0x00000020 IN
      Input amp: 0x00270300 mute=0 step=3 size=39 offset=0 (0/30dB)

dev.hdaa.1.nid17: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid16: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid15: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid14: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid13: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid12: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid11: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid10: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid9: audio input [DISABLED]
     Widget cap: 0x0010051b PWR STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
      Input amp: 0x80023f17 mute=1 step=63 size=2 offset=23 (-17/30dB)
    Connections: 1
          + [DISABLED] <- nid=34 [audio mixer] [DISABLED]

dev.hdaa.1.nid8: audio input
     Widget cap: 0x0010051b PWR STEREO
    Association: 3 (0x0001)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
      Input amp: 0x80023f17 mute=1 step=63 size=2 offset=23 (-17/30dB)
    Connections: 1
          + <- nid=35 [audio mixer]

dev.hdaa.1.nid7: audio input
     Widget cap: 0x0010051b PWR STEREO
    Association: 2 (0x0001)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
      Input amp: 0x80023f17 mute=1 step=63 size=2 offset=23 (-17/30dB)
    Connections: 1
          + <- nid=36 [audio selector]

dev.hdaa.1.nid6: audio output [DISABLED]
     Widget cap: 0x00000611 PWR DIGITAL STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e05e0 16 20 24 bits, 44 48 88 96 192 KHz

dev.hdaa.1.nid5: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid4: vendor widget [DISABLED]
     Widget cap: 0x00f00000

dev.hdaa.1.nid3: audio output [DISABLED]
     Widget cap: 0x0000041d PWR STEREO
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0060 16 20 24 bits, 44 48 KHz
     Output amp: 0x00025757 mute=0 step=87 size=2 offset=87 (-65/0dB)

dev.hdaa.1.nid2: audio output
     Widget cap: 0x0000041d PWR STEREO
    Association: 0 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000001 PCM
        PCM cap: 0x000e0060 16 20 24 bits, 44 48 KHz
     Output amp: 0x00025757 mute=0 step=87 size=2 offset=87 (-65/0dB)

dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x17aa3961
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Realtek ALC257 Audio Function Group
 
Back
Top