linux icon indicating copy to clipboard operation
linux copied to clipboard

[BUG] No sound output from built-in speakers on an Intel Tiger Lake-LP system with an ESSX8336 audio codec

Open andycandy opened this issue 9 months ago • 15 comments

Describe the bug No sound output from built-in speakers or wired headphone jack on an Intel Tiger Lake-LP system with an ESSX8336 audio codec. The sound card is detected by the system (ALSA/PipeWire), but the SOF kernel driver fails to initialize the hardware streams during boot, resulting in no audio playback from the built-in audio device. Bluetooth audio works correctly.

What have you tried to diagnose or workaround this issue?

  • Checked volume levels and output device selection in GNOME Settings (Correct device "Speakers - Tiger Lake-LP Smart Sound Technology Audio Controller" is shown and selected, volume is up, not muted in GUI).
  • Checked alsamixer for the sof-essx8336 card (Speaker and Headphone channels are visible and unmuted - OO).
  • Tested wired headphones (No sound).
  • Tested Bluetooth earbuds (Sound works correctly).
  • Restarted PipeWire services (systemctl --user restart pipewire pipewire-pulse wireplumber).
  • Reinstalled sof-firmware, alsa-sof-firmware, linux-firmware, and alsa-ucm-conf packages using dnf.
  • Tried adding the kernel parameter snd_intel_dspcfg.dsp_driver=2 to GRUB_CMDLINE_LINUX (This stopped the -5 errors in dmesg but caused the system to load the incorrect snd_soc_avs driver, resulting in only "Dummy Output". This parameter was removed).
  • Checked lspci to verify the loaded kernel driver.
  • Checked dmesg for errors related to sof, essx, snd, audio.

Please also read https://thesofproject.github.io/latest/contribute/process/bug-tracking.html for further information on submitting bugs. [Acknowledged]

To Reproduce Steps to reproduce the behavior: (e.g. list commands or actions used to reproduce the bug)

  1. Boot the system with the specified kernel and configuration.
  2. Attempt to play audio through the built-in speakers or wired headphone jack (e.g., using the sound test in GNOME Settings, playing a video in a browser).

Reproduction Rate

How often does the issue happen ? i.e. 1/10 (once in ten attempts), 1/1000 or all the time.

All the time. The issue occurs on every boot with the default kernel parameters (without snd_intel_dspcfg.dsp_driver=2).

Does the reproduction rate vary with any other configuration or user action, if so please describe and show the new reproduction rate.

  • Using snd_intel_dspcfg.dsp_driver=2 stops the -5 EIO errors, but the audio device still doesn't work (only "Dummy Output" is available as the wrong driver is loaded).
  • Using Bluetooth audio works reliably.

Expected sound output from the built-in speakers and wired headphone jack when selected as the output device.

Impact Showstopper for using the built-in audio hardware. Requires using Bluetooth audio or external devices for sound. Significant annoyance.

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel:
      • Kernel Package: kernel.x86_64 6.14.0-63.fc42
      • Kernel Package (also tested): kernel.x86_64 6.14.2-300.fc42
    • SOF:
      • SOF Firmware Package: sof-firmware (latest)
      • ALSA SOF Firmware Package: alsa-sof-firmware 2025.01-1.fc42
  2. Name of the topology file
    • Topology: Cannot determine exact filename. The codec is ESSX8336 on Intel SOF.
  3. Name of the platform(s) on which the bug is observed.
    • Platform: Intel Tiger Lake-LP (TGL-LP)
      • PCI ID: 8086:a0c8
      • Subsystem ID: 2782:1a32 (Emdoor Digital Technology Co., Ltd Device)
      • Codec: ESSX8336 (sof-essx8336)
      • Laptop Model: Infinix INBook X2 Inbook i3 1115G4

Output of lspci -knn | grep -iA3 audio:

00:1f.3 Multimedia audio controller [0401]: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8] (rev 30)
	DeviceName: Onboard - Sound
	Subsystem: Emdoor Digital Technology Co., Ltd Device [2782:1a32]
	Kernel driver in use: sof-audio-pci-intel-tgl
	Kernel modules: snd_hda_intel, snd_soc_avs, snd_sof_pci_intel_tgl
00:1f.4 SMBus [0c05]: Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3] (rev 30)
	DeviceName: Onboard - Other

Output of sudo dmesg | grep -i 'sof\|essx' | grep -i 'error\|fail':

[   XX.XXXXXX] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx error for 0x60010000 (msg/reply size: 108/20): -5
[   XX.XXXXXX] sof-audio-pci-intel-tgl 0000:00:1f.3: HW params ipc failed for stream 1
[   XX.XXXXXX] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -5
... (Many repetitions of these errors) ...

Output of cat /proc/asound/card*/codec* | grep Codec:

Codec: ESSX8336

Output of uname -r:

6.14.0-63.fc42.x86_64

andycandy avatar Apr 20 '25 06:04 andycandy

@andycandy could you please share full dmesg and fw logs?

abonislawski avatar Apr 22 '25 07:04 abonislawski

@andycandy Can you provide output of alsa-info (ref https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html )?

kv2019i avatar Apr 22 '25 07:04 kv2019i

Thanks for the follow-up. I've made partial progress toward getting the internal audio working using a combination of custom files and kernel parameters. However, there is currently a trade-off: I can get stereo speaker output without a functional microphone, or mono speaker output with a working microphone—but not both at the same time.

Steps Taken & Results:

1. Custom Kernel Files + Quirk Parameter (Enables Stereo Output):

  • Cloned https://github.com/yangxiaohua2009/custom-kernel.git and executed the included make.sh to copy the necessary firmware, topology, and UCM files.

  • Added snd_soc_sof_es8336.quirk=128 to GRUB.

  • Result: After reboot:

    • Stereo speaker output works, but required manually boosting the DAC level in alsamixer to hear sound.

    • Microphone is not detected in GNOME Settings or applications.

    • dmesg still shows persistent -5 EIO errors (ipc tx error, HW params ipc failed).

2. Force DMIC Detection & ALSA Capture Test:

  • Created /etc/modprobe.d/alsa-dmic-fix.conf with options snd_sof_intel_hda_common dmic_num=2.

  • Rebooted (with quirk=128 still active).

  • Verified capture device via arecord -l:
    card 0: sofessx8336 [sof-essx8336], device 0: ES8336 (*) [].

  • Result: arecord -D hw:0,0 -c2 -r48000 -f S16_LE -d 10 test.wav successfully captured audio.
    This confirmed the mic hardware and low-level ALSA path are functional.

3. Editing UCM Profile (No App-Level Mic Detection):

  • Modified /usr/share/alsa/ucm2/sof-essx8336/HiFi.conf, particularly:

    • In SectionDevice."Mic", set:

      • CapturePCM "hw:0,0"

      • CaptureChannels "2"

    • Also tested by commenting out EnableSequence block.

  • Restarted PipeWire/WirePlumber.

  • Result:

    • GNOME and most applications still do not detect the microphone under the "Stereo Output + Stereo Input" profile.

    • pavucontrol showed a new "Headset Microphone (unplugged)" source, but it remained non-functional.

4. Switching to "Pro Audio" Profile (Mic Works, Stereo Lost):

  • In pavucontrol > Configuration tab, switched profile to "Pro Audio".

  • Result:

    • The microphone appears and works in GNOME Settings and applications.

    • However, speaker output becomes mono.

    • Reverting to "Stereo Output + Stereo Input" brings back stereo speakers but makes the mic unusable again.


Current State:

With quirk=128, dmic_num=2, and the custom UCM/firmware setup:

Profile Speakers Microphone
Stereo Output + Stereo Input ✅ Stereo ❌ Not detected
Pro Audio ⚠️ Mono only ✅ Working

It seems the "HiFi" UCM profile fails to expose the hw:0,0 capture device correctly, even after edits. Meanwhile, the "Pro Audio" profile bypasses UCM mic mapping issues, but doesn’t use stereo speaker output routing.

Persistent -5 EIO errors in dmesg may be connected to this incomplete profile/initialization state.


Diagnostics (Current State = Pro Audio Profile Active):

Mic works, speakers are mono, quirk=128 and dmic_num=2 active.
Alsa-info dump:
🔗 http://alsa-project.org/db/?f=33fb495347350021faa0a870501b1444e60c9440


Request for Guidance:

  • How can I modify the "HiFi.conf" UCM profile (used by the "Stereo Output + Stereo Input" profile) to correctly expose and route the hw:0,0 mic while preserving stereo speaker output?

  • Alternatively, is it possible to enable stereo output under "Pro Audio" or another profile that already has the mic working?

Happy to provide full dmesg and firmware logs if needed.

Thanks again!

andycandy avatar Apr 22 '25 09:04 andycandy

I also have the same laptop, I get audio from the speaker after installing the sof-firmware package but its so low at 100% volume that I can't hear it clearly even after sticking my ear into the speakers

(I do have audio on any externally connected device like wired earphones and bluetooth earphones)

For me though, switching to Pro audio profile stops the audio completely, the mic works with neither one

Abhinav5383 avatar Apr 29 '25 19:04 Abhinav5383

I can help you out, try figuring out which mic do you have working on lower level, trying running the code in terminal to get the hdd: those would be your mic ports and you'll have to manually add them to sof conf, its do-able

andycandy avatar Apr 29 '25 20:04 andycandy

@andycandy I tried the profile switching thing through pavucontrol again after reinstalling sof-firmware and turns out the mic does indeed work on Pro audio profile, the speaker volume is still lower than the sound of someone whispering from miles away

so seems like mine is now in the same condition as yours

  • Stereo Output + Stereo Input : Only speaker works, mic is not even listed
  • Pro audio : Mic works , so does the speaker

*I can't determine if the sound coming from the speaker is stereo or not because It's so low I can't hear both speakers simultaneously

One more thing I noticed is that even though the speaker is producing like 0.01% volume, the sound cracks so much that it seems like the volume's been scaled down from 100%(or probably more) to whatever it's producing

Abhinav5383 avatar Apr 30 '25 03:04 Abhinav5383

For lower audio you have to just increase it from alsamixer blud

andycandy avatar Apr 30 '25 03:04 andycandy

I don't use alsa, it's all pipewire

Edit: tried alsamixer, it correctly shows the sound card and sound server info But the master volume is already cranked upto 100 so I guess it's not a volume problem

Abhinav5383 avatar Apr 30 '25 05:04 Abhinav5383

@andycandy I followed the steps you took to fix your speaker (though I didn't use the bash script from the custom-kernel repo because the files it was copying are already there) and set snd_soc_sof_es8336.quirk=128 the sound was still low, so increased the DAC level to around 70 (sounds starts cracking beyond this) and I've got usable sound from the speakers now

Regarding the mic, idk what's happening pavucontrol shows Headset Microphone (unplugged) but captures the mic correctly any other application can't detect the mic

Switching to the Pro audio profile makes the mic detectable but speaker turns mono so basically same as you

thanks for the help btw :)

Abhinav5383 avatar Apr 30 '25 06:04 Abhinav5383

Yeah, I don't know how to fix that mono audio fam, but anyways. Glad to help!

andycandy avatar Apr 30 '25 06:04 andycandy

@andycandy looking at the alsa-info dump https://alsa-project.org/db/?f=33fb495347350021faa0a870501b1444e60c9440

> snd_sof_intel_hda_common: dmic_num=2
...
[    5.161327] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 0

There can be two types of solutions for the device microphone -- 1) it can be DMIC connected directly to the PCH (SOF dmic_num is non-zero) , or 2) the microphone is connected to the codec (codec driver handles the mic). In case of PCH-dmic, there's a separate ALSA PCM for the dmic.

The dump shows that BIOS reports no PCH-DMIC, and mixer output shows an internal mic:

Simple mixer control 'Internal Mic',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

The upstream UCM should pick this up and show "Analog Microphone" in the GUI. Note that if you have a headset connected, the headset mic will be used instead and UCM will not show the internal mic at all.

I don't have any ess8336 hardware, but based on upstream UCM file, there are both variant out there, so hard to say what the problem is in your case. If the BIOS description is wrong and you actually have a PCH-DMIC in this system, you could try to force dmics on.

What you have done in your experiment is that you have tried to force the PCH-DMIC to be detected, but the kernel option you used is not correct, so this doesn't quite work.

You can try forcing PCH-dmic to be probe with "options snd_sof_intel_hda_generic dmic_num=2". This should result in dmic be discovered, a new PCM device to be created and this should be shown in the GUI. If your device has an actual PCH-DMIC, then this should work.

In both cases, would be good to set alsamixer controls manuallyl first (the UCM has example recipes what mixer settings need to be set to enable different audio configurations), and testing with "arecord" that the mic works at driver level before debugging UCM issues.

kv2019i avatar May 05 '25 17:05 kv2019i

Let's move this to Linux driver component as the errors are more related to drivers than the FW. The hw_params errors are caused by Pipewire/pulsewire doing pararameter discovery at startup (trying all possible PCM formats to see which are supported).

kv2019i avatar May 06 '25 07:05 kv2019i

@kv2019i I tried changing the kernel option in /etc/modprobe.d/alsa-dmic-fix.conf to options snd_sof_intel_hda_generic dmic_num=2 as suggested and rebooted. This unfortunately resulted in the sound card no longer being detected correctly, and my system showed 'Dummy Output' in the sound settings, with no speaker or microphone functionality. I have reverted this change back to options snd_sof_intel_hda_common dmic_num=2 to restore speaker functionality (and low-level ALSA mic access via arecord).

andycandy avatar May 09 '25 18:05 andycandy

ALSA info dump: http://alsa-project.org/db/?f=21540a8d3c8386181b0e49385a23fd9ac4b956af

andycandy avatar May 09 '25 18:05 andycandy

@andycandy sorry for late response.

I guess the alsa dump is after you reverted? dmic_num parameter was not set correctly:

[ 5.320371] snd_sof_intel_hda_common: unknown parameter 'dmic_num' ignored [ 5.356719] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002) [ 5.356958] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100 [ 5.357033] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) [ 5.363560] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode [ 5.375221] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4 [ 5.375227] sof-audio-pci-intel-tgl 0000:00:1f.3: BT link detected in NHLT tables: 0x0 [ 5.375229] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 0

... based on logs, dmic is not found and without dmic, there is no matching UCM for this configuration and you end up missing some audio functionality.

But yeah, it could be your machien is really missing the dmic. Basicly this is a config not supported in upstream UCM and somebody with this particular machine should add the necessary bits to UCM file and upstream to alsa.

kv2019i avatar May 28 '25 11:05 kv2019i