Absent a pcm device for a rear socket on Realtek ALC897

Hello!

I have an issue with a Realtek sound card integrated into the motherboard: the system creates pcm device for a front socket, but not for a rear socket.
Yes, I do hear a sound from the front output. I have an Ubuntu installed on the same computer and it outputs sound into rear socket well.

Is there any way to fix this?

cat /dev/sndstat
Code:
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <Realtek ALC897 (Analog)> on hdaa0 (1p:1v/1r:1v) default
        snddev flags=0xee2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC,EQ,EQ_ENABLED>
        [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000014
        interrupts 0, underruns 0, feed 0, ready 0 [b:2048/1024/2|bs:2048/1024/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {userland} -> feeder_mixer(0x00200010) -> feeder_eq(0x00200010) -> {hardware}
        pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
        interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]
        channel flags=0x10000000<VIRTUAL>
        {userland} -> feeder_root(0x00000000) -> {hardware}
        [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
        interrupts 0, overruns 0, feed 0, hfree 512, sfree 512 [b:512/256/2|bs:512/256/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
        pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
        interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
        channel flags=0x10000000<VIRTUAL>
        {hardware} -> feeder_root(0x00000000) -> {userland}
No devices installed from userspace.

Using the recent stable release.
uname -a
Code:
FreeBSD taiyou 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64

Fragment of pciconf -lv
Code:
hdac0@pci0:5:0:6:       class=0x040300 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15e3 subvendor=0x1c6c subdevice=0x1220
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Family 17h/19h HD Audio Controller'
    class      = multimedia
    subclass   = HDA


Attaching a dmesg while hw.snd.verbose=4 option is active.
 

Attachments

From your dmesg output:

Code:
hdaa0: Patched pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
...
hdaa0: 20 01014020 2  0  Line-out      Jack  1/8     Rear       Green   0
...
Code:
hdaa0: Parsing pin associations...
hdaa0: 3 associations found:
...
hdaa0: Association 1 (2) out:
hdaa0:  Pin nid=20 seq=0
...
Code:
hdaa0: Building AFG tree...
...
hdaa0: Tracing association 1 (2)
hdaa0:  Tracing pin 20 with min nid 0
hdaa0:   tracing via nid 20
hdaa0:    tracing via nid 12
hdaa0:    nid 12 busy by association 0
hdaa0:   nid 20 returned 0
hdaa0:  Unable to trace pin 20 seq 0 with min nid 0
hdaa0: Association 1 (2) trace failed
...

I don't know what's exactly going on under the hood here, but your rear jack (nid20) couldn't be set up properly by the system. Some relevant nid12 is already busy by the association 0, which corresponds to your front jack, the headphones jack (nid27).

The only idea I have is to try the standard "headphone audio switching pin configuration hint" which associates nid20 and nid27 and hope that this fixes this issue. So please put the following lines into /boot/loader.conf/boot/device.hints, reboot and see if it changes anything:
Code:
hint.hdaa.0.nid20.config="as=1 seq=0"
hint.hdaa.0.nid27.config="as=1 seq=15"

EDIT: By default hints should go into /boot/device.hints instead of /boot/loader.conf. But /boot/loader.conf also works, both are treated as loader configuration files.
 
Back
Top