Solved sound volume is quite low/not clear.

The sound works in Linux. The vol is so low and voice is not clear.

# uname -a
FreeBSD x1 13.0-STABLE FreeBSD 13.0-STABLE #0 stb13-n248280-0706dc9e904: Tue Nov 30 22:23:48 +08 2021 /usr/obj/usr/src/amd64.amd64/sys/generic amd64

# tail -n1 /boot/load.conf.local
snd_hda_load="YES"

# cat /dev/sndstat
Installed devices:
pcm0: <Realtek (0x0287) (Analog 3.1/2.0)> (play/rec) default
pcm1: <Intel Tiger Lake (HDMI/DP 8ch)> (play)
No devices installed from userspace.

# sysctl hw.snd.verbose=2 && cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <Realtek (0x0287) (Analog 3.1/2.0)> on hdaa0 (1p:1v/1r:1v) default
snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
interrupts 794, underruns 0, feed 794, ready 0 [b:2048/1024/2|bs:2048/1024/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 48000, fmt 0x00200010, flags 0x10000000, 0x00000021
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:8192/1024/8]
channel flags=0x10000000<VIRTUAL>
{userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> {hardware}
[pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
interrupts 3176, overruns 0, feed 6352, 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 48000, fmt 0x00200010, flags 0x10000000, 0x00000021
interrupts 0, overruns 0, feed 0, hfree 0, sfree 32768 [b:0/0/0|bs:32768/256/128]
channel flags=0x10000000<VIRTUAL>
{hardware} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> {userland}
pcm1: <Intel Tiger Lake (HDMI/DP 8ch)> on hdaa1 (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 0, underruns 0, feed 0, 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 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}
No devices installed from userspace.

# mixer
Mixer vol is currently set to 100:100
Mixer pcm is currently set to 100:100
Mixer speaker is currently set to 100:100
Mixer mic is currently set to 100:100
Mixer rec is currently set to 100:100
Mixer ogain is currently set to 100:100
Recording source: mic
Tried append the following config but it did not work.
# tailed -n1 /boot/device.hints
hint.hdaa.0.gpio_config="0=set 1=set 2=set 3=set 4=set"


Tried change default unit to the second one, there would be no sound at all.
# sysctl hw.snd.default_unit=1


# kldload snd_hda
kldload: can't load snd_hda: module already loaded or in kernel
# kldstat | grep hda || echo $?
# kldstat
Id Refs Address Size Name
1 123 0xffffffff80200000 1f1d510 kernel
2 1 0xffffffff8211e000 a180 cryptodev.ko
3 1 0xffffffff82129000 5bb878 zfs.ko
4 1 0xffffffff826e5000 9690 u3g.ko
5 2 0xffffffff826ef000 a730 ucom.ko
6 1 0xffffffff826fb000 9f70 ng_ubt.ko
7 3 0xffffffff82705000 12c20 ng_hci.ko
8 4 0xffffffff82718000 4250 ng_bluetooth.ko
9 7 0xffffffff8271d000 16b78 netgraph.ko
10 1 0xffffffff831da000 158458 i915kms.ko
11 1 0xffffffff83333000 7f548 drm.ko
12 2 0xffffffff833b3000 cbc8 linuxkpi_gplv2.ko
13 2 0xffffffff833c0000 2328 lindebugfs.ko
14 1 0xffffffff833c3000 3378 acpi_wmi.ko
15 1 0xffffffff833c7000 3250 ichsmb.ko
16 1 0xffffffff833cb000 2180 smbus.ko
17 1 0xffffffff833ce000 6c9c ig4.ko
18 2 0xffffffff833d5000 433c iicbus.ko
19 1 0xffffffff833da000 3240 iichid.ko
20 5 0xffffffff833de000 31f8 hidbus.ko
21 1 0xffffffff833e2000 e250 ng_l2cap.ko
22 1 0xffffffff833f1000 1bee8 ng_btsocket.ko
23 1 0xffffffff8340d000 39c0 ng_socket.ko
24 1 0xffffffff83411000 21e8 hms.ko
25 1 0xffffffff83414000 30a8 hidmap.ko
26 1 0xffffffff83418000 3328 hmt.ko
27 1 0xffffffff8341c000 22b0 hconf.ko
28 1 0xffffffff8341f000 388a8 linux.ko
29 4 0xffffffff83458000 dbb0 linux_common.ko
30 1 0xffffffff83466000 30a48 linux64.ko
31 1 0xffffffff83497000 2260 pty.ko
32 1 0xffffffff8349a000 639c linprocfs.ko
33 1 0xffffffff834a1000 3284 linsysfs.ko
34 1 0xffffffff834a5000 3530 fdescfs.ko
# kldload snd_driver
# kldstat |grep snd
35 1 0xffffffff834a9000 25d8 snd_driver.ko
36 1 0xffffffff834ac000 42d8 snd_ad1816.ko
37 1 0xffffffff834b1000 3240 snd_als4000.ko
38 1 0xffffffff834b5000 4228 snd_atiixp.ko
39 1 0xffffffff834ba000 4230 snd_cs4281.ko
40 1 0xffffffff834bf000 a3e0 snd_ds1.ko
41 1 0xffffffff834ca000 64c0 snd_envy24.ko
42 3 0xffffffff834d1000 2100 snd_spicds.ko
43 1 0xffffffff834d4000 56a0 snd_envy24ht.ko
44 1 0xffffffff834da000 4488 snd_ess.ko
45 4 0xffffffff834df000 33f8 snd_sbc.ko
46 1 0xffffffff834e3000 2270 snd_fm801.ko
47 2 0xffffffff834e6000 8c50 snd_mss.ko
48 1 0xffffffff834ef000 6428 snd_maestro.ko
49 1 0xffffffff834f6000 7d20 snd_maestro3.ko
50 1 0xffffffff834fe000 f210 snd_neomagic.ko
51 1 0xffffffff8350e000 3288 snd_sb16.ko
52 1 0xffffffff83512000 32e0 snd_sb8.ko
53 1 0xffffffff83516000 4270 snd_solo.ko
54 1 0xffffffff8351b000 3290 snd_t4dwave.ko
55 1 0xffffffff8351f000 3230 snd_via82c686.ko
56 1 0xffffffff83523000 3240 snd_vibes.ko


# dmesg |grep hda

hdac0: <Intel Tiger Lake HDA Controller> mem 0x603d1d8000-0x603d1dbfff,0x603d000000-0x603d0fffff at device 31.3 on pci0
hdac0: PCI card vendor: 0x17aa, device: 0x22d5
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
hdac0: using IRQ 137 for MSI
hdac0: Caps: OSS 9, ISS 7, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
hdacc0: <Realtek (0x0287) HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek (0x0287) Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x17aa22d5
hdaa0: NumGPIO=5 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: GPIO2: disabled
hdaa0: GPIO3: disabled
hdaa0: GPIO4: disabled
hdaa0: Original pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 40000000 0 0 Line-out None Unknown 0x00 Unknown 0
hdaa0: 19 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 20 90170110 1 0 Speaker Fixed Analog Internal Unknown 1
hdaa0: 23 90170111 1 1 Speaker Fixed Analog Internal Unknown 1
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 25 03a11030 3 0 Mic Jack 1/8 Left Black 0
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 29 40471a6d 6 13 SPDIF-out None Analog 0x00 Black 10
hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 33 03211020 2 0 Headphones Jack 1/8 Left Black 0
hdaa0: Patching widget caps nid=29 0x00400400 -> 0x00700400
hdaa0: Patched pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 40000000 0 0 Line-out None Unknown 0x00 Unknown 0 DISA
hdaa0: 19 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 20 90170110 1 0 Speaker Fixed Analog Internal Unknown 1
hdaa0: 23 90170111 1 1 Speaker Fixed Analog Internal Unknown 1
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 25 03a11030 3 0 Mic Jack 1/8 Left Black 0
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 33 03211020 2 0 Headphones Jack 1/8 Left Black 0
hdaa0: 3 associations found:
hdaa0: Association 0 (1) out:
hdaa0: Pin nid=20 seq=0
hdaa0: Pin nid=23 seq=1
hdaa0: Association 1 (2) out:
hdaa0: Pin nid=33 seq=0
hdaa0: Association 2 (3) in:
hdaa0: Pin nid=25 seq=0
hdaa0: Tracing association 0 (1)
hdaa0: Pin 20 traced to DAC 2
hdaa0: Pin 23 traced to DAC 3
hdaa0: Association 0 (1) trace succeeded
hdaa0: Tracing association 1 (2)
hdaa0: Unable to trace pin 33 seq 0 with min nid 0
hdaa0: Association 1 (2) trace failed
hdaa0: Tracing association 2 (3)
hdaa0: Unable to trace pin 25 to ADC 7, undo traces
hdaa0: Pin 25 traced to ADC 8
hdaa0: Association 2 (3) trace succeeded
hdaa0: Looking for additional DAC for association 0 (1)
hdaa0: Looking for additional ADC for association 2 (3)
hdaa0: Tracing input monitor
hdaa0: Tracing nid 35 to out
hdaa0: Tracing other input monitors
hdaa0: Tracing nid 25 to out
hdaa0: Tracing beeper
hdaa0: GPIO commit
hdaa0: GPIO0: output state=1
hdaa0: GPIO1: output state=1
hdaa0: GPIO2: output state=1
hdaa0: GPIO3: output state=1
hdaa0: GPIO4: output state=1
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <Realtek (0x0287) (Analog 3.1/2.0)> at nid 20,23 and 25 on hdaa0
hdacc1: <Intel Tiger Lake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Tiger Lake Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80860101
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid 0x as seq device conn jack loc color misc
hdaa1: 4 18560010 1 0 Digital-out Jack Digital 0x18 Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid 0x as seq device conn jack loc color misc
hdaa1: 4 18560010 1 0 Digital-out Jack Digital 0x18 Unknown 0
hdaa1: 1 associations found:
hdaa1: Association 0 (1) out:
hdaa1: Pin nid=4 seq=0
hdaa1: Tracing association 0 (1)
hdaa1: Pin 4 traced to DAC 3
hdaa1: Association 0 (1) trace succeeded
hdaa1: Looking for additional DAC for association 0 (1)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm1: <Intel Tiger Lake (HDMI/DP 8ch)> at nid 4 on hdaa1

# sysctl -a hw.snd
hw.snd.maxautovchans: 8
hw.snd.default_unit: 0
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0
hw.snd.verbose: 2
hw.snd.vpc_mixer_bypass: 1
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.basename_clone: 1
hw.snd.compat_linux_mmap: 0
hw.snd.syncdelay: -1
hw.snd.usefrags: 0
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.timeout: 5
hw.snd.latency_profile: 1
hw.snd.latency: 2
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1

# sysctl -a |grep hda
device snd_hda
irq137: hdac0:281 @cpu0(domain0): 33709
dev.pcm.1.%parent: hdaa1
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:
dev.hdaa.1.gpio_state:
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid4_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid4_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid4: pin: Digital-out (Jack)
dev.hdaa.1.nid3: audio output
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x80860101
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Intel Tiger Lake 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: 0=set 1=set 2=set 3=set 4=set
dev.hdaa.0.gpio_state: 0=output(1) 1=output(1) 2=output(1) 3=output(1) 4=output(1)
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid37: audio selector [DISABLED]
dev.hdaa.0.nid36: audio selector [DISABLED]
dev.hdaa.0.nid35: audio mixer
dev.hdaa.0.nid34: audio mixer [DISABLED]
dev.hdaa.0.nid33_original: 0x03211020 as=2 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid33_config: 0x03211020 as=2 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid33: pin: Headphones (Black Jack) [DISABLED]
dev.hdaa.0.nid32: vendor widget [DISABLED]
dev.hdaa.0.nid31: vendor widget [DISABLED]
dev.hdaa.0.nid30_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid30_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid30: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid29_original: 0x40471a6d as=6 seq=13 device=SPDIF-out conn=None ctype=Analog loc=0x00 color=Black misc=10
dev.hdaa.0.nid29_config: 0x40471a6d as=6 seq=13 device=SPDIF-out conn=None ctype=Analog loc=0x00 color=Black misc=10
dev.hdaa.0.nid29: beep widget
dev.hdaa.0.nid28: vendor widget [DISABLED]
dev.hdaa.0.nid27_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid27_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid27: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid26_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid26_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid26: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid25_original: 0x03a11030 as=3 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid25_config: 0x03a11030 as=3 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid25: pin: Mic (Black Jack)
dev.hdaa.0.nid24_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid24_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid24: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid23_original: 0x90170111 as=1 seq=1 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid23_config: 0x90170111 as=1 seq=1 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid23: pin: Speaker (Fixed)
dev.hdaa.0.nid22: vendor widget [DISABLED]
dev.hdaa.0.nid21: vendor widget [DISABLED]
dev.hdaa.0.nid20_original: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid20_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid20: pin: Speaker (Fixed)
dev.hdaa.0.nid19_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid19_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid19: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid18_original: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid18_config: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid18: pin: Line-out (None) [DISABLED]
dev.hdaa.0.nid17: vendor widget [DISABLED]
dev.hdaa.0.nid16: vendor widget [DISABLED]
dev.hdaa.0.nid15: vendor widget [DISABLED]
dev.hdaa.0.nid14: vendor widget [DISABLED]
dev.hdaa.0.nid13: vendor widget [DISABLED]
dev.hdaa.0.nid12: vendor widget [DISABLED]
dev.hdaa.0.nid11: vendor widget [DISABLED]
dev.hdaa.0.nid10: audio input [DISABLED]
dev.hdaa.0.nid9: audio input [DISABLED]
dev.hdaa.0.nid8: audio input
dev.hdaa.0.nid7: audio input [DISABLED]
dev.hdaa.0.nid6: audio output [DISABLED]
dev.hdaa.0.nid5: vendor widget [DISABLED]
dev.hdaa.0.nid4: vendor widget [DISABLED]
dev.hdaa.0.nid3: audio output
dev.hdaa.0.nid2: audio output
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x17aa22d5
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: Realtek (0x0287) Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac0
dev.hdacc.1.%pnpinfo: vendor=0x8086 device=0x2812 revision=0x00 stepping=0x00
dev.hdacc.1.%location: cad=2
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: Intel Tiger Lake HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x10ec device=0x0287 revision=0x00 stepping=0x02
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: Realtek (0x0287) HDA CODEC
dev.hdacc.%parent:
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.wake: 0
dev.hdac.0.%parent: pci0
dev.hdac.0.%pnpinfo: vendor=0x8086 device=0xa0c8 subvendor=0x17aa subdevice=0x22d5 class=0x040380
dev.hdac.0.%location: slot=31 function=3 dbsf=pci0:0:31:3 handle=\_SB_.PC00.HDAS
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: Intel Tiger Lake HDA Controller
dev.hdac.%parent:
Tried change polling to 1, not working.

How to make the sound system working normally ? What device.hints should i configure ? Thanks in advance.
 
I had a quirk between multibooting Windows 7 and FreeBSD 11/12 with integrated snd_hda. The volume would be extremely low if restarts were used between OSes. Only full shutdown made the card's level nominal.
 
I had a quirk between multibooting Windows 7 and FreeBSD 11/12 with integrated snd_hda. The volume would be extremely low if restarts were used between OSes. Only full shutdown made the card's level nominal.
I have deleted all the other OSes, only have FreeBSD installed and ZFS on the whole disk.
 
I reinstalled the os with Release/13 and Linux with kernel 5.10. I will see if the Linux side works(the Linux kernel might need upgrading).
 
grahamperrin
The sound is working on linux Debian Bookworm.
I found this issue after searching "Realtek ALC 3306 codec" which this model is using.

https://bugzilla.kernel.org/show_bug.cgi?id=208555#c36 and https://github.com/alsa-project/alsa-lib/issues/76

The last posts suggests that "amplifier chips for the integrated speakers" might be in use here which need to potentially initialized. That could explain why 3.5mm and bluetooth audio work: They don't need any such initialization.

From the bugzilla i know some "verbs" are needed for linux to fix. Are there similar concepts exist for FreeBSD sound system? Can the method applied to freebsd ?

I have upgraded the BIOS to the recent version, I have already switch to "Linux S3" and not working for FreeBSD.
 
Last edited:
Following up on this, I just received a thinkpad x1 gen 9 and I am facing the same issue.
The sound is muffled and low on FBSD13.1-RELEASE-p6 but works on other OS' (Windows10, Kubuntu)

Similarly this is my
cat /dev/sndstat
Code:
Installed devices:
pcm0: <Realtek (0x0287) (Analog 3.1/2.0)> (play/rec) default
pcm1: <Intel Tiger Lake (HDMI/DP 8ch)> (play)
No devices installed from userspace.

My mixer vol is at 100 and have already loaded snd_hda
 
I was able to get laptop speakers, and external mic+headphones working with the following `device.hints`

```
hint.hdaa.0.nid23.config="as=1 seq=0"
hint.hdaa.0.nid20.config="as=1 seq=1 "
hint.hdaa.0.nid33.config="as=1 seq=15"
```

Unfortunately built-in microphone (digital microphone array, DMIC) is not going to be supported because at the moment FreeBSD lacks Sound Open Firmware (SOF) (1) driver support. SOF is the only way to work with Intel's Smart Sound Technology (SST)(2), and unfortunately TigerLake laptops are equipped with SST.


1. https://thesofproject.github.io/lat...uction.html#pci-devices-introduced-after-2016

2. https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf
 
Hi guys, I have encountered similar issue, and luckily I find this post with help of a kind guy here. But I have problem just adding
Code:
hint.hdaa.0.nid20.config="as=1 seq=0"
hint.hdaa.0.nid23.config="as=1 seq=1"
hint.hdaa.0.nid33.config="as=1 seq=15"
in my /boot/loader.conf

so I used
Code:
devinfo -rv
and find relevent info:
Code:
        hdac0 pnpinfo vendor=0x8086 device=0xa0c8 subvendor=0x17aa subdevice=0x22d5 class=0x040380
 at slot=31 function=3 dbsf=pci0:0:31:3 handle=\_SB_.PC00.HDAS
            Interrupt request lines:
                0x89
            I/O memory addresses:
                0x603d000000-0x603d0fffff
                0x603d1c8000-0x603d1cbfff
          hdacc0 pnpinfo vendor=0x10ec device=0x0287 revision=0x00 stepping=0x02 at cad=0
            hdaa0 pnpinfo type=0x01 subsystem=0x17aa22d5 at nid=1
              pcm0 at nid=20,23,25
          hdacc1 pnpinfo vendor=0x8086 device=0x2812 revision=0x00 stepping=0x00 at cad=2
            hdaa1 pnpinfo type=0x01 subsystem=0x80860101 at nid=1
              pcm1 at nid=4
        ichsmb0 pnpinfo vendor=0x8086 device=0xa0a3 subvendor=0x17aa subdevice=0x22d5 class=0x0c0500 at slot=31 function=4 dbsf=pci0:0:31:4 handle=\_SB_.PC00.SBUS
            Interrupt request lines:
                0x10
            I/O ports:
                0xefa0-0xefbf
            I/O memory addresses:
                0x603d1d4000-0x603d1d40ff
          smbus0

this is what i get seems to have things to do with nid. So i guess i should change nid into
Code:
hint.hdaa.0.nid20.config="as=1 seq=0"
hint.hdaa.0.nid23.config="as=1 seq=1"
hint.hdaa.0.nid25.config="as=1 seq=15"
but what about as and seq number? should i change that?

if helpful, my device is Thinkpad carbon X1 gen 9 with i5-1135g7 and my /dev/sndstat is
Code:
Installed devices:
pcm0:  (play/rec) default
pcm1:  (play)
No devices installed from userspace.
 
Back
Top