Solved Cirrus Logic

Hi!

New installation of FreeBSD 12.0-RELEASE (amd64) and sound (internal speakers) works, microphone (internal) works but when I connect headphones doesn't work - not sound in the headphones and doesn't "silent" speakers:

Code:
cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <ATI R6xx (HDMI)> on hdaa0  (1p:1v/0r:0v)
    snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
    [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
    interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
    channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
    {userland} -> feeder_mixer(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}
pcm1: <Cirrus Logic CS4206 (Internal Analog 4.0/2.0)> on hdaa1  (1p:2v/1r:1v) default
    snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
    [pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
    interrupts 4223, underruns 0, feed 4223, ready 0 [b:4096/2048/2|bs:4096/2048/2]
    channel flags=0x2100<BUSY,HAS_VCHAN>
    {userland} -> feeder_mixer(0x00200010) -> {hardware}
    pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 48000, fmt 0x00201000/0x00200010, flags 0x10000000, 0x00000023
    interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:131072/4096/32]
    channel flags=0x10000000<VIRTUAL>
    {userland} -> feeder_root(0x00201000) -> feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010) -> {hardware}
    pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp1]: spd 48000, fmt 0x00201000/0x00200010, flags 0x10000000, 0x00000023
    interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:131072/4096/32]
    channel flags=0x10000000<VIRTUAL>
    {userland} -> feeder_root(0x00201000) -> feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010) -> {hardware}
    [pcm1:record:dsp1.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
    interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
    channel flags=0x2100<BUSY,HAS_VCHAN>
    {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
    pcm1:record:dsp1.r0[pcm1:virtual:dsp1.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}
pcm2: <Cirrus Logic CS4206 (Rear Analog)> on hdaa1  (1p:1v/1r:1v)
    snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
    [pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
    interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
    channel flags=0x2100<BUSY,HAS_VCHAN>
    {userland} -> feeder_mixer(0x00200010) -> {hardware}
    pcm2:play:dsp2.p0[pcm2:virtual:dsp2.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}
    [pcm2:record:dsp2.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
    interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
    channel flags=0x2100<BUSY,HAS_VCHAN>
    {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
    pcm2:record:dsp2.r0[pcm2:virtual:dsp2.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}
pcm3: <Cirrus Logic CS4206 (Rear Digital)> on hdaa1  (1p:1v/1r:1v)
    snddev flags=0x2e6<AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
    [pcm3:play:dsp3.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
    interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
    channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
    {userland} -> feeder_mixer(0x00200010) -> {hardware}
    pcm3:play:dsp3.p0[pcm3:virtual:dsp3.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}
    [pcm3:record:dsp3.r0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000005
    interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
    channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
    {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
    pcm3:record:dsp3.r0[pcm3:virtual:dsp3.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.

File Versions:
$FreeBSD: releng/12.0/sys/dev/sound/isa/sndbuf_dma.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pci/cmi.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pci/csa.c 338200 2018-08-22 14:06:31Z avatar $
$FreeBSD: releng/12.0/sys/dev/sound/pci/csapcm.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pci/es137x.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pci/ich.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pci/via8233.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pci/hda/hdaa.c 337043 2018-08-01 14:50:41Z jhibbits $
$FreeBSD: releng/12.0/sys/dev/sound/pci/hda/hdaa_patches.c 332890 2018-04-23 16:38:27Z sbruno $
$FreeBSD: releng/12.0/sys/dev/sound/pci/hda/hdac.c 337043 2018-08-01 14:50:41Z jhibbits $
$FreeBSD: releng/12.0/sys/dev/sound/pci/hda/hdacc.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/ac97.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/ac97_patch.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/buffer.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/channel.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/dsp.c 336757 2018-07-27 10:40:48Z eadler $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder_chain.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder_eq.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder_format.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder_matrix.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder_mixer.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder_rate.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/feeder_volume.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/mixer.c 336632 2018-07-23 09:16:23Z hselasky $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/sndstat.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/sound.c 326255 2017-11-27 14:52:40Z pfg $
$FreeBSD: releng/12.0/sys/dev/sound/pcm/vchan.c 326255 2017-11-27 14:52:40Z pfg $

But I got on the conslole messages:
Code:
kernel: hdaa1: Unsolicited response 24000000
kernel: hdaa1: Pin sense: nid=9 sense=0x80000000 (connected)
kernel: pcm2: Playback channel set is: Front Left, Front Right,
kernel: pcm2: Playback channel matrix is: 2.0 (connected)
kernel: hdaa1: Unsolicited response 24000000
kernel: hdaa1: Pin sense: nid=9 sense=0x00000000 (disconnected)
I do not have any hints in /boot/device.hints related to the sound card.

Thank you.
 
Whats your sound default unit?
You could try to set the headphones to the same association group what your speakers use but to another sequence
Code:
# /boot/device.hints

hint.hdac.1.cad0.nid20.config="as=1 seq=0 device=Speaker"
hint.hdac.1.cad0.nid27.config="as=1 seq=15 device=Headphones"

Search your output for the correct nids.
 
Whats your sound default unit?
You could try to set the headphones to the same association group what your speakers use but to another sequence
Code:
# /boot/device.hints

hint.hdac.1.cad0.nid20.config="as=1 seq=0 device=Speaker"
hint.hdac.1.cad0.nid27.config="as=1 seq=15 device=Headphones"

Search your output for the correct nids.
Code:
sysctl -a | grep hda
device    snd_hda
irq264: hdac0:71 @cpu0(domain0): 4
irq265: hdac1:73 @cpu0(domain0): 45
dev.pcm.3.%parent: hdaa1
dev.pcm.2.%parent: hdaa1
dev.pcm.1.%parent: hdaa1
dev.pcm.0.%parent: hdaa0
dev.hdaa.1.reconfig: 0
dev.hdaa.1.gpo_config:
dev.hdaa.1.gpo_state:
dev.hdaa.1.gpio_config: 0=keep 1=set 2=keep 3=set
dev.hdaa.1.gpio_state: 0=disabled 1=output(1) 2=disabled 3=output(1)
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid21_original: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid21_config: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid21: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid20: audio output [DISABLED]
dev.hdaa.1.nid19: beep widget
dev.hdaa.1.nid18_original: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid18_config: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid18: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid17: vendor widget [DISABLED]
dev.hdaa.1.nid16_original: 0x014be060 as=6 seq=0 device=SPDIF-out conn=Jack ctype=Combo loc=Rear color=White misc=0
dev.hdaa.1.nid16_config: 0x014be060 as=6 seq=0 device=SPDIF-out conn=Jack ctype=Combo loc=Rear color=White misc=0
dev.hdaa.1.nid16: pin: SPDIF-out (White Jack)
dev.hdaa.1.nid15_original: 0x01cbe030 as=3 seq=0 device=SPDIF-in conn=Jack ctype=Combo loc=Rear color=White misc=0
dev.hdaa.1.nid15_config: 0x01cbe030 as=3 seq=0 device=SPDIF-in conn=Jack ctype=Combo loc=Rear color=White misc=0
dev.hdaa.1.nid15: pin: SPDIF-in (White Jack)
dev.hdaa.1.nid14_original: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid14_config: 0x400000f0 as=15 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid14: pin: Line-out (None) [DISABLED]
dev.hdaa.1.nid13_original: 0x90a00110 as=1 seq=0 device=Mic conn=Fixed ctype=Unknown loc=Internal color=Unknown misc=1
dev.hdaa.1.nid13_config: 0x90a00110 as=1 seq=0 device=Mic conn=Fixed ctype=Unknown loc=Internal color=Unknown misc=1
dev.hdaa.1.nid13: pin: Mic (Fixed)
dev.hdaa.1.nid12_original: 0x018b3020 as=2 seq=0 device=Line-in conn=Jack ctype=Combo loc=Rear color=Blue misc=0
dev.hdaa.1.nid12_config: 0x018b3020 as=2 seq=0 device=Line-in conn=Jack ctype=Combo loc=Rear color=Blue misc=0
dev.hdaa.1.nid12: pin: Line-in (Blue Jack)
dev.hdaa.1.nid11_original: 0x90100142 as=4 seq=2 device=Speaker conn=Fixed ctype=Unknown loc=Internal color=Unknown misc=1
dev.hdaa.1.nid11_config: 0x90100142 as=4 seq=2 device=Speaker conn=Fixed ctype=Unknown loc=Internal color=Unknown misc=1
dev.hdaa.1.nid11: pin: Speaker (Fixed)
dev.hdaa.1.nid10_original: 0x90100140 as=4 seq=0 device=Speaker conn=Fixed ctype=Unknown loc=Internal color=Unknown misc=1
dev.hdaa.1.nid10_config: 0x90100140 as=4 seq=0 device=Speaker conn=Fixed ctype=Unknown loc=Internal color=Unknown misc=1
dev.hdaa.1.nid10: pin: Speaker (Fixed)
dev.hdaa.1.nid9_original: 0x012b4050 as=5 seq=0 device=Headphones conn=Jack ctype=Combo loc=Rear color=Green misc=0
dev.hdaa.1.nid9_config: 0x012b4050 as=5 seq=0 device=Headphones conn=Jack ctype=Combo loc=Rear color=Green misc=0
dev.hdaa.1.nid9: pin: Headphones (Green Jack)
dev.hdaa.1.nid8: audio output
dev.hdaa.1.nid7: audio input
dev.hdaa.1.nid6: audio input
dev.hdaa.1.nid5: audio input
dev.hdaa.1.nid4: audio output
dev.hdaa.1.nid3: audio output
dev.hdaa.1.nid2: audio output
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x106b5100
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Cirrus Logic CS4206 Audio Function Group
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.nid3_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid3: pin: Digital-out (Jack)
dev.hdaa.0.nid2: audio output
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x00aa0100
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: ATI R6xx Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac1
dev.hdacc.1.%pnpinfo: vendor=0x1013 device=0x4206 revision=0x03 stepping=0x01
dev.hdacc.1.%location: cad=0
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: Cirrus Logic CS4206 HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x1002 device=0xaa01 revision=0x01 stepping=0x00
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: ATI R6xx HDA CODEC
dev.hdacc.%parent:
dev.hdac.1.polling: 0
dev.hdac.1.pindump: 0
dev.hdac.1.wake: 0
dev.hdac.1.%parent: pci0
dev.hdac.1.%pnpinfo: vendor=0x8086 device=0x3b56 subvendor=0x8086 subdevice=0x7270 class=0x040300
dev.hdac.1.%location: slot=27 function=0 dbsf=pci0:0:27:0 handle=\_SB_.PCI0.HDEF
dev.hdac.1.%driver: hdac
dev.hdac.1.%desc: Intel Ibex Peak HDA Controller
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.%parent: pci1
dev.hdac.0.%pnpinfo: vendor=0x1002 device=0xaa30 subvendor=0x106b subdevice=0xaa30 class=0x040300
dev.hdac.0.%location: slot=0 function=1 dbsf=pci0:1:0:1 handle=\_SB_.PCI0.P0P2.HDAU
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: ATI RV770 HDA Controller
dev.hdac.%parent:

When I connect headphone I do not hear in the headphones anything but the internal speaker is still on and I see messages:
Code:
kernel: hdaa1: Unsolicited response 24000000
kernel: hdaa1: Pin sense: nid=9 sense=0x80000000 (connected)
kernel: pcm2: Playback channel set is: Front Left, Front Right,
kernel: pcm2: Playback channel matrix is: 2.0 (connected)
kernel: hdaa1: Unsolicited response 24000000
kernel: hdaa1: Pin sense: nid=9 sense=0x00000000 (disconnected)
 
Since nid9 is pinned to your headphones it should have the same association assignment as the speakers. In your case try
Code:
hint.hdac.1.cad0.nid21.config="as=15 seq=0 device=Speaker"
hint.hdac.1.cad0.nid9.config="as=15 seq=15 device=Headphones"
in /boot/device.hints.
This should mute your speakers when your headphones are plugged in.
 
I did but it doesn't works. Just sound through internal speakers. When I connect headphones I got:
Code:
Dec 23 10:31:49 kernel: hdaa1: Unsolicited response 24000000
Dec 23 10:31:49 kernel: hdaa1: Pin sense: nid=9 sense=0x80000000 (connected)
Dec 23 10:31:49 kernel: pcm2: Playback channel matrix is: unknown, assuming 2.0 (connected)
Dec 23 10:32:41 kernel: hdaa1: Unsolicited response 24000000
Dec 23 10:32:41 kernel: hdaa1: Pin sense: nid=9 sense=0x00000000 (disconnected)
Dec 23 10:32:41 kernel: pcm2: Playback channel matrix is: unknown, assuming 2.0 (disconnected)
 
I did try again and JUST headphones works but not speakers. On the unit-1 just speakers on your last suggestions just headphones.
 
So you got it working?

No, it is the same as before.
Before I put new SSD drive and install FreeBSD 12.0 from scratch I had:
Code:
sysctl.conf

hw.snd.default_auto=0
hw.snd.default_unit=1
and in
Code:
device.hits

hint.hdaa.gpio_config="3=set"
hint.hdaa.1.nid9.config="as=4 seq=0 misc=1"
hint.hdaa.1.nid10.config="as=4 seq=2"
hint.hdaa.1.nid11.config="as=4 seq=4"

It worked just from the headphones and internal microphone worked too.
Why I had those settings I do not know :)) because I had the at least 10 years.
 
On the unit-1 just speakers on your last suggestions just headphones.
Oh no 😅. Maybe it has something to do with the driver you use..
Another suggestion is to add more virtual channels to your default unit (i think pcm1)
Code:
dev.pcm.1.play.vchans=4
in /etc/sysctl.conf
 
Thank you very much for your help and the time with my problem.
I put the old settings in /boot/device/hints, connect the speakers in the headphones place and it works as before. I could connect headphones on the speker :).

I have just one question: In /boot/device.hints I have:
Code:
hint.pcm.1eq="1"
which supposed to have bass and treble control but I do not see in mixer anyhing. Do you know anything about those settings, please?
 
Back
Top