linux icon indicating copy to clipboard operation
linux copied to clipboard

[BUG] Headset microphone no output on Intel Raptor Lake/Realtek ALC294

Open rwrv1 opened this issue 6 months ago • 15 comments

Describe the bug A clear and concise description of what the bug is. What have you tried to diagnose or workaround this issue? Please also read https://thesofproject.github.io/latest/contribute/process/bug-tracking.html for further information on submitting bugs. The headset microphone (connected via 3.5mm TRRS) is completely non functional. The "Raptor Lake-P/U/H cAVS Headphones Stereo Microphone" source appears in pavucontrol yet is completely silent. No other options for headset microphones appear available. Internal microphone works fine, just the headset mic is broken. To Reproduce Steps to reproduce the behavior: (e.g. list commands or actions used to reproduce the bug)

  • Get a device with the ALC294 audio codec and an Intel Raptor Lake CPU (this device specifically is an ASUS Zenbook 14 with i9-13900H)
  • Install Ubuntu 24.04 or Linux Mint 22.1
  • Plug in a headset with a microphone to the 3.5mm TRRS jack
  • Attempt to listen for sound - there will be none Reproduction Rate How often does the issue happen ? i.e. 1/10 (once in ten attempts), 1/1000 or all the time. Does the reproduction rate vary with any other configuration or user action, if so please describe and show the new reproduction rate. It always happens. Expected behavior A clear and concise description of what you expected to happen. A mono source to appear for the headset with sound from its mic, or the stereo source to contain the mono audio in both channels Impact What impact does this issue have on your progress (e.g., annoyance, showstopper)

Environment

Screenshots or console output If applicable, add a screenshot (drag-and-drop an image), or console logs (cut-and-paste text and put a code fence (```) before and after, to help explain the issue.

Please also include the relevant sections from the firmware log and kernel log in the report (and attach the full logs for complete reference). Kernel log is taken from dmesg and firmware log from sof-logger. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html

Relevant from dmesg:

[    4.622189] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[    4.626639] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    5.734647] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.742034] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[    5.770481] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
[    5.770489] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    5.770496] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[    5.773342] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware paths/files for ipc type 0:
[    5.773348] sof-audio-pci-intel-tgl 0000:00:1f.3:  Firmware file:     intel/sof/sof-rpl.ri
[    5.773350] sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:     intel/sof-tplg/sof-hda-generic-2ch.tplg
[    5.774011] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.774016] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1
[    5.774022] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    5.888623] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.888633] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1
[    5.899912] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:1
[    6.726304] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input32
[    6.726357] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input33
[    6.726401] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input34
[    6.726445] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input35

Apologies if I am missing anything, I just want to get sound working. Same issue both on the Ubuntu 24.04 LTS version of SOF and the latest sof-bin download

rwrv1 avatar Jul 18 '25 19:07 rwrv1

The line declaring an input "Headphone" may be relevant. I cannot find any inputs or outputs with ID 32 in ALSA's device list or in PipeWire

rwrv1 avatar Jul 18 '25 19:07 rwrv1

Adding in @shumingfan for ALC294, could be mic is muted ? @rwrv1 can you capture a short WAV file from the mic, is it all 0s or do you see the LSBs in the PCM data.

lgirdwood avatar Jul 21 '25 13:07 lgirdwood

Adding in @shumingfan for ALC294, could be mic is muted ? @rwrv1 can you capture a short WAV file from the mic, is it all 0s or do you see the LSBs in the PCM data.

I'm unsure which input to use. The internal mic of the laptop works just fine (and as such doesn't need testing), and I'm unsure about whether "Headphones Stereo Microphone" (since mic over TRRS is inherently mono).

rwrv1 avatar Jul 21 '25 15:07 rwrv1

Adding in @shumingfan for ALC294, could be mic is muted ? @rwrv1 can you capture a short WAV file from the mic, is it all 0s or do you see the LSBs in the PCM data.

I'm unsure which input to use. The internal mic of the laptop works just fine (and as such doesn't need testing), and I'm unsure about whether "Headphones Stereo Microphone" (since mic over TRRS is inherently mono).

@rwrv1 maybe try to capture all of them and label them accordingly when uploading

lyakh avatar Jul 22 '25 07:07 lyakh

@KailangYang Could you take a look at this?

@rwrv1 Please share the alsa-info.

shumingfan avatar Jul 22 '25 08:07 shumingfan

alsa-info: http://alsa-project.org/db/?f=aa62856c497f549ebbbfb69b44a5fcd8d6330eb3

audio files: audio.zip

hope this helps

rwrv1 avatar Jul 28 '25 14:07 rwrv1

Moving to kernel as this seems to be a codec driver issue.

kv2019i avatar Jul 29 '25 07:07 kv2019i

How do I use this patch file?

rwrv1 avatar Jul 31 '25 13:07 rwrv1

Hi! Not sure if you still need help with the patching, but if you want to apply the patch, I think you'd need to do the following:

  • Download the kernel sources of the version you want to use (most likely from their git repository)
  • Unpack the kernel source archive.
  • Navigate to "sound/pci/hda" in the source directory. patch_realtek.c should be in there.
  • Edit the file and find the line:
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
               	{0x19, 0x40000000}),
  • Then, add the following line underneath
SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
               	{0x19, 0x40000000}),
  • After you're done inserting the line above, compile the kernel with the patch by running:
make -jN

Where N is the number of threads your CPU has.

  • Lastly, install the kernel and its modules:
make modules_install
make install

Then, remember to update GRUB, then you should be able to boot into the kernel. If anyone sees a mistake in this process, let me know!

sinkfever avatar Aug 16 '25 02:08 sinkfever

Hi! Not sure if you still need help with the patching, but if you want to apply the patch, I think you'd need to do the following:

* Download the kernel sources of the version you want to use (most likely from their git repository)

* Unpack the kernel source archive.

* Navigate to "sound/pci/hda" in the source directory. patch_realtek.c should be in there.

* Edit the file and find the line:
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
               	{0x19, 0x40000000}),
* Then, add the following line underneath
SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC,
               	{0x19, 0x40000000}),
* After you're done inserting the line above, compile the kernel with the patch by running:
make -jN

Where N is the number of threads your CPU has.

* Lastly, install the kernel and its modules:
make modules_install
make install

Then, remember to update GRUB, then you should be able to boot into the kernel. If anyone sees a mistake in this process, let me know!

You seem to have missed the configure step, which I don't understand how to do properly. Ideally I'd copy config from my current kernel

rwrv1 avatar Aug 17 '25 10:08 rwrv1

Ah, my bad, I did forget that step.

Before running the make -jN part, find the generic config file that came with the kernel in the /boot directory, and copy it to the working source directory of the kernel that you downloaded, naming it .config

Then run the following to update the old config file to match the settings of the new kernel:

make oldconfig

Alternatively, run the following if you want to automatically select the default option for every new option you have to choose.

make olddefconfig

Then, run the compile command and continue as usual.

sinkfever avatar Aug 17 '25 16:08 sinkfever

I have applied the patch, but it doesn't work

rwrv1 avatar Sep 01 '25 20:09 rwrv1

Maybe the patch wasn't enough, this will probably need a specific workaround, which is out of my scope, sorry! I do hope you can find a fix for this eventually, though.

sinkfever avatar Sep 04 '25 12:09 sinkfever

0000-alc294-asus-hsmic-090525.patch

AMP vendor was assigned wrong model with SSID of your machine. Please try attach patch.

KailangYang avatar Sep 05 '25 05:09 KailangYang