No sound on FreeBSD

Hello I have
pcm0: <NVIDIA (0x00a0) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm1: <NVIDIA (0x00a0) (HDMI/DP 8ch)> at nid 7 on hdaa0
pcm2: <Realtek ALC256 (Right Analog)> at nid 33 and 25 on hdaa1
pcm3: <Realtek ALC256 (Lid-In Analog Mic)> at nid 18 on hdaa1
pcm4: <Intel Tiger Lake (HDMI/DP 8ch)> at nid 4 on hdaa2
devices I tried to use pcm2 and I did everything https://docs.freebsd.org/en/books/handbook/multimedia/ and there is still no sound
 
Right Analog usually means headphone jack.
Are you sure you plugged a headphone to it?

And what hardware? Notebook? Rack mount / desktop?
If you're connecting HDMI monitor with speakers, which port?

Just a wild prediction, if your computer is notebook, you're impossible to disable iGPU (means, nvidia dGPU works only as Optimus) and your display panel is internally connected via HDMI port of the chipset, it could be worth trying pcm4. But this would be unlikely, as usually internal display is connected via display port (DP) or LVDS (old notebooks).
 
Hello mate.Sorry for responding late.

I didn't plugged a headphone.

It is a notebook.I am using my computer's own speakers. No external speakers are connected.
I tried to use pcm4 but it is not working.
 
Hello mate.Sorry for responding late.

I didn't plugged a headphone.

It is a notebook.I am using my computer's own speakers. No external speakers are connected.
I tried to use pcm4 but it is not working.
Can you hear sounds when you specify pcm2 with plugging a headphone?
As there's no device shown up as speaker, (pcm3 seems to be input only [lid-in Analog Mic]) remaining possibility is that the speakers are connected through pcm0 or 1. Or worse, via some hardware that FreeBSD cannot support (at least, recognize automatically).

Most unlikely, if pcm3 is NOT just a microphone but with speaker (both input and output), pcm3 could work.

FYI: In my case, speaker is shown as below (most verbose output).
Code:
pcm4: <Realtek ALC285 (Internal Analog Speaker)> on hdaa1 (1p:2v/0r:0v)
        snddev flags=0x2e3<SIMPLEX,AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
        [pcm4:play:dsp4.p0]: spd 192000/48000, fmt 0x00210000/0x00201000, flags 0x00002100, 0x0000000e
        interrupts 0, underruns 0, feed 0, ready 0 [b:65536/32768/2|bs:131064/65532/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {userland} -> feeder_mixer(0x00210000) -> feeder_format(0x00210000 -> 0x00201000) -> feeder_rate(0x00201000 q:4 192000 -> 48000) -> {hardware}
        pcm4:play:dsp4.p0[pcm4:virtual_play:dsp4.vp0]: spd 384000/48000, fmt 0x08801000/0x00200010, flags 0x10000000, 0x0000006b
        interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:131072/65536/2]
        channel flags=0x10000000<VIRTUAL>
        {userland} -> feeder_root(0x08801000) -> feeder_format(0x08801000 -> 0x08800010) -> feeder_matrix(7.1 -> 2.0) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:4 384000 -> 48000) -> {pcm4:play:dsp4.p0}
        pcm4:play:dsp4.p0[pcm4:virtual_play:dsp4.vp1]: spd 384000/48000, fmt 0x00210000/0x00200010, flags 0x10000000, 0x0000002b
        interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:131064/65532/2]
        channel flags=0x10000000<VIRTUAL>
        {userland} -> feeder_root(0x00210000) -> feeder_format(0x00210000 -> 0x00200010) -> feeder_rate(0x00200010 q:4 384000 -> 48000) -> feeder_volume(0x00200010) -> {pcm4:play:dsp4.p0}
 
I tried what you said and I think my sound hardware is not supported because when I tried pcm5

pcm5 on uaudio0

I can hear the sound but used others and I can't
 
Please post the output from (as root):
Code:
# sysctl dev.hdac.1.pindump=1
# dmesg | fgrep hdaa1
This shows your pin configuration. We had a thread recently (Thread 95155), where the speaker didn't get picked up by the system without explicitly configurating it.
 
When I write sysctl dev.hdac.1.pindump=1 it shows:
Code:
dev.hdac.1.pindump: 0 -> 0

and when I write dmesg | fgrep hdaa1 it shows:
Code:
hdaa1: <Realtek ALC256 Audio Function Group> at nid 1 on hdacc1
pcm2: <Realtek ALC256 (Right Analog)> at nid 33 and 25 on hdaa1
pcm3: <Realtek ALC256 (Lid-In Analog Mic)> at nid 18 on hdaa1
hdaa1: Dumping AFG pins:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1: 18 b7a60140 4  0  Mic           Fixed Digital Lid-In     Unknown 1
hdaa1:     Caps: IN                 
hdaa1: 19 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa1:     Caps: IN                 
hdaa1: 20 90170120 2  0  Speaker       Fixed Analog  Internal   Unknown 1 DISA
hdaa1:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa1: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 25 04a11030 3  0  Mic           Jack  1/8     Right      Black   0
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
hdaa1: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1: 33 04211010 1  0  Headphones    Jack  1/8     Right      Black   0
hdaa1:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa1:  GPIO0: disabled
hdaa1:  GPIO1: disabled
hdaa1:  GPIO2: disabled
hdaa1: Dumping AFG pins:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1: 18 b7a60140 4  0  Mic           Fixed Digital Lid-In     Unknown 1
hdaa1:     Caps: IN                 
hdaa1: 19 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa1:     Caps: IN                 
hdaa1: 20 90170120 2  0  Speaker       Fixed Analog  Internal   Unknown 1 DISA
hdaa1:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa1: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 25 04a11030 3  0  Mic           Jack  1/8     Right      Black   0
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
hdaa1: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1: 33 04211010 1  0  Headphones    Jack  1/8     Right      Black   0
hdaa1:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa1:  GPIO0: disabled
hdaa1:  GPIO1: disabled
hdaa1:  GPIO2: disabled
 
hdaa1: 20 90170120 2 0 Speaker Fixed Analog Internal Unknown 1 DISA
hdaa1: Caps: OUT EAPD Sense: 0x00000000 (disconnected)

Thanks. It looks a lot like in the other thread. Somehow nid20 isn't picked up by the system, maybe a driver bug in snd_hda(4)?

Please execute as root:
Code:
# sysctl dev.hdaa.1.nid20_config="as=1 seq=0"
# sysctl dev.hdaa.1.nid33_config="as=1 seq=15"
# sysctl dev.hdaa.1.reconfig=1
Then test sound with beep(1): $ beep -d /dev/dsp2 (I think the speakers will be associated with pcm2 -> /dev/dsp2, you might also test different /dev/dspX).
 
Back
Top