Intel Tiger Lake-H HD(ALC3306/ALC287) Audio Success.

Device:
Thinkpad P1 Gen4
Audio Chip: High Definition (HD) Audio, Realtek® ALC3306 codec

% uname -r
14.0-RELEASE-p6

% pciconf -lv | grep -B3 audio
vendor = 'Intel Corporation'
device = 'Tiger Lake-H HD Audio Controller'
class = multimedia
subclass = audio

% dmesg | grep Audio
hdaa0: <NVIDIA (0x00a0) Audio Function Group> at nid 1 on hdacc0
hdaa1: <Realtek (0x0287) Audio Function Group> at nid 1 on hdacc1

% cat /dev/sndstat

FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <NVIDIA (0x00a0) (HDMI/DP 8ch)> 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 1049, underruns 0, feed 1049, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:2048/1024/2]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
pcm1: <NVIDIA (0x00a0) (HDMI/DP 8ch)> on hdaa0 (1p:1v/0r:0v)
snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
[pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
interrupts 1026, underruns 0, feed 1026, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:2048/1024/2]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
pcm2: <NVIDIA (0x00a0) (HDMI/DP 8ch)> on hdaa0 (1p:1v/0r:0v)
snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
[pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
interrupts 1003, underruns 0, feed 1003, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:2048/1024/2]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
pcm3: <Realtek (0x0287) (Analog)> on hdaa1 (1p:1v/1r:1v) default
snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm3:play:dsp3.p0]: spd 48000, fmt 0x00200010, flags 0x00002108, 0x00000004
interrupts 127139, underruns 0, feed 127139, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x2108<TRIGGERED,BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm3:play:dsp3.p0[pcm3:virtual:dsp3.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x100011c8, 0x00000029, pid 54550 (pulseaudio)
interrupts 0, underruns 0, feed 134412, ready 15444 [b:0/0/0|bs:16384/4096/4]
channel flags=0x100011c8<TRIGGERED,NBIO,MMAP,BUSY,HAS_SIZE,VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
[pcm3:record:dsp3.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
interrupts 7397, overruns 0, feed 14725, hfree 256, sfree 256 [b:256/128/2|bs:256/128/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
pcm3:record:dsp3.r0[pcm3:virtual:dsp3.vr0]: spd 44100/48000, fmt 0x00200010, flags 0x100011d0, 0x00000029, pid 54550 (pulseaudio)
interrupts 0, overruns 0, feed 0, hfree 0, sfree 16384 [b:0/0/0|bs:16384/4096/4]
channel flags=0x100011d0<NOTRIGGER,NBIO,MMAP,BUSY,HAS_SIZE,VIRTUAL>
{hardware} -> feeder_root(0x00200010) -> feeder_rate(0x00200010 q:1 48000 -> 44100) -> feeder_volume(0x00200010) -> {userland}
pcm4: <Realtek (0x0287) (Left Analog Headphones)> on hdaa1 (1p:1v/0r:0v)
snddev flags=0x2e3<SIMPLEX,AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm4:play:dsp4.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
interrupts 959, underruns 0, feed 959, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm4:play:dsp4.p0[pcm4:virtual:dsp4.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:2048/1024/2]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
No devices installed from userspace.

% sysctl -a|grep hda
hdac0: <NVIDIA (0x2291) HDA Controller> mem 0xac000000-0xac003fff at device 0.1 on pci1
hdac1: <Intel Tiger Lake-H HDA Controller> mem 0x414c1c0000-0x414c1c3fff,0x414c000000-0x414c0fffff at device 31.3 on pci0
hdacc0: <NVIDIA (0x00a0) HDA CODEC> at cad 0 on hdac0
hdaa0: <NVIDIA (0x00a0) Audio Function Group> at nid 1 on hdacc0
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
hdac1: Command 0x200f0000 timeout on address 2
hdac1: Command 0x200f0002 timeout on address 2
hdac1: CODEC at address 2 not responding!
hdacc1: <Realtek (0x0287) HDA CODEC> at cad 0 on hdac1
hdaa1: <Realtek (0x0287) Audio Function Group> at nid 1 on hdacc1
pcm3: <Realtek (0x0287) (Analog)> at nid 23 and 25 on hdaa1
pcm4: <Realtek (0x0287) (Left Analog Headphones)> at nid 33 on hdaa1

device snd_hda
irq128: hdac0:263 @cpu0(domain0): 6308
irq151: hdac1:309 @cpu0(domain0): 432768
dev.pcm.4.%parent: hdaa1
dev.pcm.3.%parent: hdaa1
dev.pcm.2.%parent: hdaa0
dev.pcm.1.%parent: hdaa0
dev.pcm.0.%parent: hdaa0
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 3=keep 4=keep
dev.hdaa.1.gpio_state: 0=disabled 1=disabled 2=disabled 3=disabled 4=disabled
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid37: audio selector [DISABLED]
dev.hdaa.1.nid36: audio selector [DISABLED]
dev.hdaa.1.nid35: audio mixer
dev.hdaa.1.nid34: audio mixer [DISABLED]
dev.hdaa.1.nid33_original: 0x03211020 as=2 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.1.nid33_config: 0x03211020 as=2 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.1.nid33: pin: Headphones (Black Jack)
dev.hdaa.1.nid32: vendor widget [DISABLED]
dev.hdaa.1.nid31: vendor widget [DISABLED]
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]
dev.hdaa.1.nid29_original: 0x40471a6d as=6 seq=13 device=SPDIF-out conn=None ctype=Analog loc=0x00 color=Black misc=10
dev.hdaa.1.nid29_config: 0x40471a6d as=6 seq=13 device=SPDIF-out conn=None ctype=Analog loc=0x00 color=Black misc=10
dev.hdaa.1.nid29: beep widget
dev.hdaa.1.nid28: vendor widget [DISABLED]
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]
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]
dev.hdaa.1.nid25_original: 0x03a11030 as=3 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.1.nid25_config: 0x03a11030 as=3 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.1.nid25: pin: Mic (Black Jack)
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]
dev.hdaa.1.nid23_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid23_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.1.nid23: pin: Speaker (Fixed)
dev.hdaa.1.nid22: vendor widget [DISABLED]
dev.hdaa.1.nid21: vendor widget [DISABLED]
dev.hdaa.1.nid20_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid20_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid20: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid19_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid19_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid19: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid18_original: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.1.nid18_config: 0x40000000 as=0 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: vendor widget [DISABLED]
dev.hdaa.1.nid15: vendor widget [DISABLED]
dev.hdaa.1.nid14: vendor widget [DISABLED]
dev.hdaa.1.nid13: vendor widget [DISABLED]
dev.hdaa.1.nid12: vendor widget [DISABLED]
dev.hdaa.1.nid11: vendor widget [DISABLED]
dev.hdaa.1.nid10: audio input [DISABLED]
dev.hdaa.1.nid9: audio input [DISABLED]
dev.hdaa.1.nid8: audio input
dev.hdaa.1.nid7: audio input [DISABLED]
dev.hdaa.1.nid6: audio output [DISABLED]
dev.hdaa.1.nid5: vendor widget [DISABLED]
dev.hdaa.1.nid4: vendor widget [DISABLED]
dev.hdaa.1.nid3: audio output
dev.hdaa.1.nid2: audio output
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x17aa22e4
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Realtek (0x0287) 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]
dev.hdaa.0.nid10: audio output
dev.hdaa.0.nid9: audio output
dev.hdaa.0.nid8: audio output
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)
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)
dev.hdaa.0.nid5: audio output [DISABLED]
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)
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x17aa22e4
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: NVIDIA (0x00a0) Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac1
dev.hdacc.1.%pnpinfo: vendor=0x10ec device=0x0287 revision=0x00 stepping=0x02
dev.hdacc.1.%location: cad=0
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: Realtek (0x0287) HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x10de device=0x00a0 revision=0x01 stepping=0x00
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: NVIDIA (0x00a0) 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=0x43c8 subvendor=0x17aa subdevice=0x22e4 class=0x040100
dev.hdac.1.%location: slot=31 function=3 dbsf=pci0:0:31:3 handle=\_SB_.PC00.HDAS
dev.hdac.1.%driver: hdac
dev.hdac.1.%desc: Intel Tiger Lake-H HDA Controller
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.%parent: pci1
dev.hdac.0.%pnpinfo: vendor=0x10de device=0x2291 subvendor=0x17aa subdevice=0x22e4 class=0x040300
dev.hdac.0.%location: slot=0 function=1 dbsf=pci0:1:0:1 handle=\_SB_.PC00.PEG1.PEGA
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: NVIDIA (0x2291) HDA Controller
dev.hdac.%parent:

Articles I referenced:
https://kernel.org/doc/html/latest/sound/hd-audio/models.html (ALC22x/23x/25x/269/27x/28x/29x (and vendor-specific ALC3xxx models) )

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272682 ()

What did I do:
1. patch source
/usr/src/sys/dev/sound/pci/hda/hdac.c

.........
{ HDA_INTEL_TGLK, "Intel Tiger Lake", 0, 0 },
{ HDA_INTEL_TGLKH, "Intel Tiger Lake-H", 0, 0 }, -------> Add this line
/usr/src/sys/dev/sound/pci/hda/hdac.h
.........
#define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8)
#define HDA_INTEL_TGLKH HDA_MODEL_CONSTRUCT(INTEL, 0x43c8) -------> Add this line
........
#define HDA_CODEC_INTELTGLK HDA_CODEC_CONSTRUCT(INTEL, 0x2812)
#define HDA_CODEC_INTELTGLKH HDA_CODEC_CONSTRUCT(INTEL, 0x2814) -------> Add this line [ I can't find out the meaning of "0x2814", just guess and try. ]
/usr/src/sys/dev/sound/pci/hda/hdacc.c
.........
{ HDA_CODEC_INTELTGLK, 0, "Intel Tiger Lake" },
{ HDA_CODEC_INTELTGLKH, 0, "Intel Tiger Lake-H"}, -------> Add this line

2. make kernel
1) cd /usr/src/
2) make buildkernel
3) make installkernel
4) reboot


Enjoy your FreeBSD !
 
Enjoy your FreeBSD !

Welcome to The FreeBSD Forums :)

Gentle hint: through the Help link at the foot of the page, you'll find guidance on how to format things such as code blocks.

1715459902318.png
 
Back
Top