# Realtek ALC294 Mic, Internal no sound. Could some help me with snd_hda setup in /boot/device.hints



## claudfernandes (Sep 14, 2020)

Some background. I am new using FreeBSD, this audio issue I had before with Manjaro and was also reported occuring in other linux distros, but later Kernel was patched.

No sound comes from the internal speaker, I can only hear sound if I connect headphones via port USB C and add this on

`cat /etc/sysctl.conf`

```
# because of the bug on ALC294 not working on normal speaker, make usb default for sound
hw.snd.default_unit=3
```

My assumption based on what I read on the manual FreeBSD snd_hda, I can rewrite the pins configuration. I am trying to rewrite using some info of those patches but without success, because of my knowledge how snd_hda works and also how to update the HDA_VERBS.

Could someone advice me how to convert those values of those patches to insert into
`/boot/device.hints`?

Thanks in advance 

Claudio

-----------------------------------------------------
I also try this, but no success, I must been making a mistake here:

```
hint.hdaa.0.nid13.config="0x90a60160"
hint.hdaa.0.nid19.config="0x04a11120"
hint.hdaa.0.nid25.config="0x01a1103c"
hint.hdaa.0.nid33.config="as=1 seq=15"
```

Laptop Asus UX391UA


			https://bsd-hardware.ifo/?probe=d7d299f9fc
		


Reference of the issue happening in linux, kernel was patched




__





						Bug #1784485 “[ZenBook S UX391UA, Realtek ALC294, Mic, Internal]...” : Bugs : linux package : Ubuntu
					

Internal speaker - not sound at all Cable Headphonse - realy quiet disorted sound Bluetooth headphones - sound works fine  On Windows 10 everything works fine.  ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: alsa-base 1.0.25+dfsg-0ubuntu5 ProcVersionSignature: Ubuntu 4.15.0-29.31-generic...




					bugs.launchpad.net
				




- Patched done on Linux and references to those line (audio is working on Linux now):




__





						ALSA: hda/realtek: Enable audio jacks of ASUS UX391UA with, ALC294 - Patchwork
					





					patchwork.kernel.org
				






			https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c#L7686
		



			https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c#L8321
		



			https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c#L7170
		



			https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c#L7161
		



```
SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
        {0x12, 0x90a60130},
        {0x17, 0x90170110},
        {0x21, 0x03211020}),
```


```
[ALC294_FIXUP_ASUS_SPK] = {
        .type = HDA_FIXUP_VERBS,
        .v.verbs = (const struct hda_verb[]) {
            /* Set EAPD high */
            { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
            { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
            { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
            { 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
            { }
        },
        .chained = true,
        .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
    },
```



```
[ALC294_FIXUP_ASUS_HEADSET_MIC] = {
        .type = HDA_FIXUP_PINS,
        .v.pins = (const struct hda_pintbl[]) {
            { 0x19, 0x01a1103c }, /* use as headset mic */
            { }
        },
        .chained = true,
        .chain_id = ALC269_FIXUP_HEADSET_MIC
    },
```


```
SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
```

`cat /dev/sndstat`

```
root@zen:/home/claudio # cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC294 (Internal Analog)> (play/rec)
pcm1: <Realtek ALC294 (Left Analog Headphones)> (play)
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> (play)
pcm3: <USB audio> (play/rec) default
No devices installed from userspace.
```

`sysctl -a | grep hda`

```
device  snd_hda
irq270: hdac0:275 @cpu0(domain0): 38
dev.pcm.2.%parent: hdaa1
dev.pcm.1.%parent: hdaa0
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:
dev.hdaa.1.gpio_state:
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid3_original: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid3_config: 0x18560010 as=1 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.1.nid3: pin: Digital-out (Jack)
dev.hdaa.1.nid2: 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 Kaby Lake Audio Function Group
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config: 0=keep 1=keep 2=keep 3=keep
dev.hdaa.0.gpio_state: 0=disabled 1=disabled 2=disabled 3=disabled
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid37: vendor widget [DISABLED]
dev.hdaa.0.nid36: audio selector
dev.hdaa.0.nid35: audio selector [DISABLED]
dev.hdaa.0.nid34: audio selector [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)
dev.hdaa.0.nid32: vendor widget [DISABLED]
dev.hdaa.0.nid31_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid31_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid31: pin: Speaker (None) [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: 0x40679a2d as=2 seq=13 device=Modem-line conn=None ctype=Analog loc=0x00 color=Pink misc=10
dev.hdaa.0.nid29_config: 0x40679a2d as=2 seq=13 device=Modem-line conn=None ctype=Analog loc=0x00 color=Pink 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: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid25_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid25: pin: Speaker (None) [DISABLED]
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: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid23_config: 0x90170110 as=1 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid23: pin: Speaker (Fixed)
dev.hdaa.0.nid22_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid22_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid22: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid21_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid21_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid21: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid20_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid20_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid20: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid19_original: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid19_config: 0x40000000 as=0 seq=0 device=Line-out conn=None ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid19: pin: Line-out (None) [DISABLED]
dev.hdaa.0.nid18_original: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid18_config: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid18: pin: Mic (Fixed)
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 [DISABLED]
dev.hdaa.0.nid7: audio input
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=0x104310a1
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: Realtek ALC294 Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac0
dev.hdacc.1.%pnpinfo: vendor=0x8086 device=0x280b revision=0x00 stepping=0x00
dev.hdacc.1.%location: cad=2
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: Intel Kaby Lake HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x10ec device=0x0294 revision=0x00 stepping=0x04
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: Realtek ALC294 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=0x9d71 subvendor=0x1043 subdevice=0x10a1 class=0x040380
dev.hdac.0.%location: slot=31 function=3 dbsf=pci0:0:31:3 handle=\_SB_.PCI0.HDAS
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: Intel Kaby Lake-LP HDA Controller
dev.hdac.%parent:
```


----------

