Skip to content

[ADL-P] Missing topology for ES8336 Alder Lake P device (i5-1240P Huawei Matebook 14 2022) #4111

Closed

Description

@Jay-716

Sorry for this seemingly duplicate issue.

Problem

tplg request firmware intel/sof-tplg/sof-adl-es83x6-dmic4ch-ssp0.tplg failed err: -2 at every boot.
Due to the missing tplg file, my speaker never work.

My Environment

OS: Arch Linux
Machine: Huawei Matebook 14 2022 (KLVF-XX M1010)
Kernel: 6.0.12-arch1-1
CPU: 12th Gen Intel i5-1240P (16) @ 4.400GHz
Soundcard: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)
sof-firmware version: 2.2.3

Check Support for ES8336 on My Machine

I have read the github wiki and sof docs as well as github issues related to the es8336 issues.
I check the kernel(the archlinux official kernel) that I am currently using, and the commits which are related to es8336 and mentioned by the wiki are actually in there.
And the compiling configs mentioned in the wiki are the same as mentioned in the wiki.
alsa-info.sh also detects my audio device as /sys/bus/acpi/devices/ESSX8336:00
lsmod also shows that es8336 related modules are loaded.

Logs

alsa-info.txt
lspci.txt
kernel_log.txt

Here is the tplg loading section in the kernel log:

Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: quirk mask 0x20
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: quirk SSP0
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: quirk DMIC enabled
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: Direct firmware load for intel/sof-tplg/sof-adl-es83x6-dmic4ch-ssp0.tplg failed with error -2
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg request firmware intel/sof-tplg/sof-adl-es83x6-dmic4ch-ssp0.tplg failed err: -2
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: you may need to download the firmware from https://github.com/thesofproject/sof-bin/
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -2
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -2
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -2
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: snd_soc_register_card failed: -2
Dec 21 14:55:31 arch kernel: sof-essx8336: probe of sof-essx8336 failed with error -2

Cannot Find the tplg Required

And I check the files under /usr/lib/firmware/intel/sof-tplg-v2.2.3/ , and there is NOT a file named sof-adl-es83x6-dmic4ch-ssp0.tplg, only to find the similar tplg for apl.
In the tplgs file([es8336_topologies_main.tar.gz] provided in the wiki page, I cannot find this tplg too.

PS. I don't know exactly if this issue should be submit to thesofproject/sof or thesofproject/linux, so I submit it here.
And I owe this problem to the missing tplg file, which may be inappropriate or inaccurate because it is just my guess.
If further information is needed, please let me know. I will post them below.
Thanks for your viewing. :)

Activity

  1. plbossart commented on Dec 21, 2022

    @plbossart
    Member

    Thanks for reporting this issue, which is actually a problem on both SOF and linux sides. Gah.

    You can try a temporary fix by backup up your files in intel/sof-tplg/ and then
    cp sof-tgl-es8336-dmic4ch-ssp0.tplg sof-adl-es83x6-dmic4ch-ssp0.tplg

    I'll submit a rename and add the missing topologies.

  2. Jay-716 commented on Dec 22, 2022

    @Jay-716
    Author

    Thanks for your timely reply.
    I then cp sof-tgl-es8336-dmic4ch-ssp0.tplg sof-adl-es83x6-dmic4ch-ssp0.tplg, and the sound work! But the volume is extremely tiny, though I set all the volume settings to 100%(and even higher).
    I don't know if it's related to the sound server. I am currently using pipewire, wireplumber, pipewire-alsa now.
    I try to change the volume in amixer, alsamixer, pavucontrol, wpctl, and the sound are still tiny.
    I follow the instruction to enable the dynamic debug, and here is the full dmesg log.
    dmesg.txt
    Here is the related section:

    [    5.478734] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
    [    5.478819] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
    [    5.478970] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
    [    5.479032] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
    [    5.485846] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
    [    5.594033] sof-audio-pci-intel-tgl 0000:00:1f.3: NHLT_DEVICE_I2S detected, ssp_mask 0x1
    [    5.594038] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
    [    5.596341] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
    [    5.596346] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
    [    5.596356] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
    [    5.689982] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
    [    5.689986] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
    [   12.131755] sof-essx8336 sof-essx8336: quirk mask 0x20
    [   12.131758] sof-essx8336 sof-essx8336: quirk SSP0
    [   12.131759] sof-essx8336 sof-essx8336: quirk DMIC enabled
    [   12.132925] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
    [   12.133035] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
    [   12.303767] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
    [   12.330530] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input12
    [   12.350352] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input13
    [   12.350425] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input14
    [   12.350520] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
    

    If I sould modify the quirk? or if I sould use sof-logger to get the DSP traces? or if I should try pulseaudio?
    My distro kernel seems does not have the trace support, so it may be a little bit inconvinent to do that because I have never tried to build a custom kernel, but I will have a try if the DSP traces are needed.
    Sorry. :)

  3. plbossart commented on Dec 22, 2022

    @plbossart
    Member

    @yangxiaohua2009 can you comment on the 'low sound' issue reported by multiple people?

  4. yangxiaohua2009 commented on Dec 23, 2022

    @yangxiaohua2009

    @Jay-716 Can you provide alsainfo/amixer when playing music? Thanks

  5. Jay-716 commented on Dec 23, 2022

    @Jay-716
    Author

    Here is the output when playing video with mpv:
    alsa-info.txt
    amixer.txt
    wpctl.txt

    PS. I suddenly got infected with COVID-19, so my reply may not be timely. Sorry.

  6. Jay-716 commented on Dec 25, 2022

    @Jay-716
    Author

    @yangxiaohua2009 Additional information is here:
    pactl_list_sinks.txt
    pactl_list_sink_inputs.txt

    I think it may probably be a pipewire issue, but I cannot make sure.

  7. yangxiaohua2009 commented on Dec 25, 2022

    @yangxiaohua2009

    Your Headphone is -48dB and your DAC is -60% vol, which makes your sound extremely low.
    Set them back to 0dB and you can hear load sound.

    Simple mixer control 'Headphone',0
      Capabilities: pvolume pswitch pswitch-joined
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 3
      Mono:
      Front Left: Playback 0 [0%] [-48.00dB] [off]
      Front Right: Playback 0 [0%] [-48.00dB] [off]
    
    Simple mixer control 'DAC',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 192
      Mono:
      Front Left: Playback 115 [60%] [-38.50dB]
      Front Right: Playback 115 [60%] [-38.50dB]
    
  8. yangxiaohua2009 commented on Dec 25, 2022

    @yangxiaohua2009

    I actually have a script help you doing that
    4.zip

  9. Jay-716 commented on Dec 25, 2022

    @Jay-716
    Author

    OMG, The sound works perfectly now!!!
    This problem has confused me for a long time, so I am very grateful to you guys for your timely and enthusiastic help!
    Given that the pr thesofproject/sof#6878 will solve the original missing topology issue, I shall close this issue after that pr is successfully merged.
    Thanks. :)

  10. ToutouDogo commented on Jan 11, 2023

    @ToutouDogo

    I actually have a script help you doing that 4.zip

    Hello, I'm a beginner with linux. How do we run this please ? Thanks, it might help me for solving #4093

    [EDIT] just had to add
    bash ./
    Sorry for newbie question.

    Not sufficient to solve issue #4093. Please let me now if this comment is irrelevant.

  11. yangxiaohua2009 commented on Jan 12, 2023

    @yangxiaohua2009

    I saw your alsa info. One control is off so you cannot hear sound.

    Simple mixer control 'Right Headphone Mixer Right DAC',0
      Capabilities: pswitch pswitch-joined
      Playback channels: Mono
      Mono: Playback [off]
    

    Does the playback device in your sound settings change when you insert a headset/headphone? If so you should have sound after running the shell script which changes the mixer controls

    You may run alsainfo again or run amixer -c 0 to see if the 'Right Headphone Mixer Right DAC' mix is now on

  12. yangxiaohua2009 commented on Jan 12, 2023

    @yangxiaohua2009

    @ToutouDogo Also I cannot see your dmesg. Since your HUAWEI device have 2 gpios, one for speaker and one for headphone, your need to set quirk (to enable 2 gpios).
    First dmesg | grep tplg and you can see which ssp you're using (0, 1 or 2)
    Then overwrite the origin quirk.
    If you are using ssp 0, try options snd_soc_sof_es8336 quirk=0x80
    If you are using ssp 1, try options snd_soc_sof_es8336 quirk=0x81
    If you are using ssp 2, try options snd_soc_sof_es8336 quirk=0x82

  13. 36 remaining items

  14. Jay-716 commented on Feb 13, 2023

    @Jay-716
    Author

    @yangxiaohua2009 Sorry for disturbing you again. This is just a late inform, and my issues are almost finished. No need to reply if you don't want to. Thanks. :)
    My speaker and mic work relatively fine now. I applied the dmic ucm you provided wrongly so they are not correctly loaded. And now I figure it out and they loaded correctly.
    I find that only when I select the "Pro Audio" profile in pavucontrol, the mic starts to work.

    Here are my tests:

    • default quirk 0x20, default ucm:
      Have "Stereo Input and Stereo Output", "Stereo Input", "Stereo Output", "Pro Audio", "Off" profiles.
      "Stereo Input and Stereo Output": speaker works, mic not capturing sound.
      "Pro Audio": both speaker and mic work.
      alsa-info_default_quirk_default_ucm.txt

    • quirk 0xe0, default ucm:
      the same as above

    • default quirk 0x20, dmic ucm:
      Have "Pro Audio", "Off" profiles.
      "Pro Audio" both speaker and mic works fine as above.

    • quirk 0xe0, dmic ucm:
      the same as above
      alsa-info_quirk_ucm.txt

    Remaining small problems:

    • To make both speaker and mic work, I need to switch to "Pro Audio" profile instead of the default "Stereo Input and Stereo Output" profile.
    • Loud pop when start or stop playing sound. If there is any "power_save" options?

    These problems are relatively tolerable. At least the mic works.
    Thank you very very much for your patience and enthusiasm.
    Best regards.

  15. yangxiaohua2009 commented on Feb 14, 2023

    @yangxiaohua2009

    @Jay-716 You may want to follow this link to disable suspend on idle so that there is no pop noise, at the cost that you may not have sound after system suspend and resume. Or you may open sound settings to keep the codec always on at the cost of more power consumption.

  16. yangxiaohua2009 commented on Feb 14, 2023

    @yangxiaohua2009

    @sstavridis Can you make sound loader with typing cset name='Headphone Playback Volume' 3,3 in terminal?

  17. Jay-716 commented on Feb 14, 2023

    @Jay-716
    Author

    It works. I should have searched for it myself. In the beginning, I expected it as some kind of a module parameter instead of a sound server side solution. But it works fine too.
    Thank you very much for your long term help. Your long-lasting enthusiasm and patience are highly appreciated. :)

  18. sstavridis commented on Feb 15, 2023

    @sstavridis

    @yangxiaohua2009 I tried it and the terminal returns amixer: Cannot find the given element from control default.
    Furthermore, I open Volume Control by typing pavucontrol and set Profile to Pro Audio in the Configuration tab.
    After that the microphone works, but the sound doesn't.
    Any ideas? I've tried everything I'm so frustrated...

    Thank you very much for your help!

  19. yangxiaohua2009 commented on Feb 16, 2023

    @yangxiaohua2009

    Please provide your amixer contents information or alsainfo so I can know which amixer control went wrong. You may want to try
    amixer -c 0 cset name='Headphone Playback Volume' 3,3 and amixer -c 0 cset name='Headphone Volume' 192,192 @sstavridis

  20. sstavridis commented on Feb 17, 2023

    @sstavridis

    @yangxiaohua2009
    Hello here is my alsainfo and the amixer contents file.

    amixer_contents.txt

    Also i tried amixer -c 0 cset name='Headphone Playback Volume' 3,3 and it seems to work but after a reboot it doesn't even though I run sudo alsactl store.
    For amixer -c 0 cset name='Headphone Volume' 192,192 the terminal gives me amixer: Cannot find the given element from control sysdefault:0

  21. yangxiaohua2009 commented on Feb 20, 2023

    @yangxiaohua2009

    @sstavridis Try adding (sleep 6; amixer -c 0 cset name='Headphone Playback Volume' 3,3) & at the end of your ~/.profile file.
    This makes sure the command is executed everytime you reboot.

  22. sstavridis commented on Feb 28, 2023

    @sstavridis

    @yangxiaohua2009
    Sorry for the delay, still no fix. I'm so frustrated...
    The sound is too low, the microphone is not working and when I plug in headphones the sound works from the speaker and headphones simultaneously.

  23. ToutouDogo commented on Mar 25, 2023

    @ToutouDogo

    Hey it's been a while, I still haven't found a way to fix my speaker and mic, even though headphones are functionning. Do you have any comment about my last post on this issue? Thank you #4111 (comment)

  24. yangxiaohua2009 commented on Mar 27, 2023

    @yangxiaohua2009

    @ToutouDogo You may want to open the mic controls by

    amixer cset name='ADC PGA Gain Volume' 10
    amixer cset name='ADC Capture Volume' 150
    amixer cset name='Headset Mic Switch' on
    amixer cset name='Digital Mic Mux' 'dmic disable'
    amixer cset name='Internal Mic Switch' on
    amixer cset name='Differential Mux' 'lin1-rin1'
    
  25. ToutouDogo commented on May 13, 2023

    @ToutouDogo

    Sorry @yangxiaohua2009 , this is did not solve the issue. I see there were commits pushed by @mengdonglin and @kv2019i
    . I would be pleased to try stuffs, I only need the instructions to implement it. Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions