Skip to content

[FEATURE] Support for ES8336 on Intel Comet Lake #3248

Closed

Description

@playXE

Moved from thesofproject/sof

Is your feature request related to a problem? Please describe.
Huawei laptops ship with an Everest ES8336 sound card that is not supported by sofproject.
Describe the solution you'd like
Adding support for it would be really awesome
Describe alternatives you've considered
I already tried this repo which seems to contain a kernel built with support for it but the audio clearly does not work: https://github.com/himozzza/essx8336
Additional context
Booting Linux and trying lsmod or dmsg shows only one valid HDMI sound output on the laptop and nothing more. Here's what I get from Device Manager on Windows:

ACPI\VEN_ESSX&DEV_8336&SUBSYS_152D1262
ACPI\ESSX8336
*ESSX8336

Activity

  1. simas-b commented on Oct 29, 2021

    @simas-b

    I just bought Huawei Matebook d15 i3-10110U and can confirm the sound does not work (Dummy output shown as Output device).

    OS: Ubuntu 22.04 (development branch)
    Kernel 5.15.0-051500rc7-generic

    Also tried the same kernel as @playXE linked https://github.com/himozzza/essx8336. After booting with it It displayed "Intel Corporation Comet Lake PCH-LP cAVS" as Output device and it correctly prompted me to select between "Headset" and "Headphones" when I plugged in headpone jack, but there was no sound neither on builtin speaker or headpones.
    I could not hear any sound with speaker-test utility.

    This is my alsa-info: http://alsa-project.org/db/?f=95f73cdf9497ae38f36b4e12646d74826fbecdba

    Bluetooth audio works great.

    Thank you

  2. changed the title [-][FEATURE] Support for ES8336 on Huawei Matebook D14-15-16 with i5-10210u[/-] [+][FEATURE] Support for ES8336 on Intel Comet Lake[/+] on Oct 31, 2021
  3. plbossart commented on Nov 3, 2021

    @plbossart
    Member

    Thanks for reporting this @Simonboot and @playXE . We are indeed missing quirks for this CML device.

    Can you retry with the branch https://github.com/plbossart/sound/tree/fix/es8336-codec

    You should boot the DSP and reach the point where a topology file is missing.

    You will have to try each of the files in this zip
    cml.tar.gz

    Please try with sof-cml-es8336-0.tplg copied as /lib/firmware/intel/sof-tplg/sof-cml-es8336.tplg, then 1 and 2. We need this trial-and-error method to figure out where the codec is attached to (I2S/SSP interface 0 1 or 2).

  4. added
    codecCodec HW or driver restriction
    CMLApplies to Comet Lake platform
    Communityend-user or distro-reported issues
    on Nov 3, 2021
  5. plbossart commented on Nov 4, 2021

    @plbossart
    Member

    forgot to add @hli25 on this one, not sure if you can help with the SSP connection - which SSP should be used on CML-based devices?

  6. playXE commented on Nov 5, 2021

    @playXE
    Author

    atm I am running Windows on my laptop, is there any way to load this kernel with USB drive? Maybe compile kernel on WSL and then move it to bootable USB?

  7. playXE commented on Nov 5, 2021

    @playXE
    Author

    @plbossart I am trying to build kernel in WSL and it fails:

    ➜  sound git:(fix/es8336-codec) make -j6
      CHK     include/config/kernel.release
      CHK     include/generated/uapi/linux/version.h
      CHK     include/generated/utsrelease.h
      HOSTCC  scripts/conmakehash
      HOSTCC  scripts/sortextable
      CHK     scripts/mod/devicetable-offsets.h
      HOSTCC  scripts/selinux/genheaders/genheaders
      HOSTCC  scripts/selinux/mdp/mdp
    In file included from scripts/selinux/mdp/mdp.c:49:
    ./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please update secclass_map.
      245 | #error New address family defined, please update secclass_map.
          |  ^~~~~
    make[3]: *** [scripts/Makefile.host:102: scripts/selinux/mdp/mdp] Error 1
    In file included from scripts/selinux/genheaders/genheaders.c:19:
    ./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please update secclass_map.
      245 | #error New address family defined, please update secclass_map.
          |  ^~~~~
    make[2]: *** [scripts/Makefile.build:573: scripts/selinux/mdp] Error 2
    make[2]: *** Waiting for unfinished jobs....
    make[3]: *** [scripts/Makefile.host:102: scripts/selinux/genheaders/genheaders] Error 1
    make[2]: *** [scripts/Makefile.build:573: scripts/selinux/genheaders] Error 2
    make[1]: *** [scripts/Makefile.build:573: scripts/selinux] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make: *** [Makefile:562: scripts] Error 2
    

    Looks like the problem is a slightly newer version of GLibc?

  8. plbossart commented on Nov 5, 2021

    @plbossart
    Member

    atm I am running Windows on my laptop, is there any way to load this kernel with USB drive? Maybe compile kernel on WSL and then move it to bootable USB?

    I don't have a Windows device so can't help with WSL.

    It's possible to take an existing USB drive with e.g. Ubuntu and add a different kernel. I did it a couple of years ago with the help of @linuxium, see https://github.com/plbossart/UbuntuLiveUSB. No idea if this still works or not. You might have more luck with Cubic.

  9. playXE commented on Nov 6, 2021

    @playXE
    Author

    I'll probably buy a larger SSD and will install Linux near Windows because it seems to be quite hard to build linux kernel in WSL...

  10. 308 remaining items

  11. merura commented on Feb 6, 2023

    @merura

    @dattiluca try to run these commands. Maybe your speaker is turned off. Consider testing with alsa, not pipewire

    amixer cset name='Headphone Switch' on
    amixer cset name='Speaker Switch' on
    amixer cset name='Headphone Playback Volume' 10,10
    amixer cset name='Right Headphone Mixer Right DAC Switch' on
    amixer cset name='Left Headphone Mixer Left DAC Switch' on
    amixer cset name='DAC Playback Volume' 999,999
    amixer cset name='Headphone Mixer Volume' 999,999
  12. Mornongsmokie commented on Dec 12, 2023

    @Mornongsmokie

    On kernel 6.5.0 headphones work, but speakers not.

  13. ochi12 commented on Apr 9, 2024

    @ochi12

    Microphone not Working on Huawei D15 2020

  14. katyo commented on Apr 9, 2024

    @katyo

    Still doesn't work both speakers and headphones on Teclast F5.
    Seems hardware detected correctly but it still does not work as expected.
    When I try to playback something (using audacious or chromium) it cannot start. Looks like synchronization does not work at all.
    Seems digital microphone works just after boot (a level indicator shows some activity then I talk) but stop working after try to playback sound.

    kernel: 6.8.4
    dmesg:

    [    5.436535] snd_hda_intel 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
    [    6.802611] snd_soc_skl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
    [    6.864934] snd_soc_avs 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
    [    7.475064] sof-audio-pci-intel-apl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
    [    7.475453] sof-audio-pci-intel-apl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if 0x040100
    [    7.475616] sof-audio-pci-intel-apl 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
    [    7.516249] sof-audio-pci-intel-apl 0000:00:0e.0: use msi interrupt mode
    [    7.637675] sof-audio-pci-intel-apl 0000:00:0e.0: NHLT_DEVICE_I2S detected, ssp_mask 0x5
    [    7.637690] sof-audio-pci-intel-apl 0000:00:0e.0: Overriding topology with MCLK mask 0x2 from NHLT
    [    7.637695] sof-audio-pci-intel-apl 0000:00:0e.0: hda codecs found, mask 4
    [    7.690666] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware paths/files for ipc type 0:
    [    7.690680] sof-audio-pci-intel-apl 0000:00:0e.0:  Firmware file:     intel/sof/sof-glk.ri
    [    7.690684] sof-audio-pci-intel-apl 0000:00:0e.0:  Topology file:     intel/sof-tplg/sof-glk-es8336-ssp2.tplg
    [    7.721379] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware info: version 2:2:0-57864
    [    7.721391] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
    [    7.721411] sof-audio-pci-intel-apl 0000:00:0e.0: unknown sof_ext_man header type 3 size 0x30
    [    7.772716] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware info: version 2:2:0-57864
    [    7.772729] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
    [    7.957263] sof-essx8336 sof-essx8336: quirk mask 0x2
    [    7.957276] sof-essx8336 sof-essx8336: quirk SSP2
    [    7.958342] sof-audio-pci-intel-apl 0000:00:0e.0: Topology: ABI 3:22:1 Kernel ABI 3:23:0
    [    7.958667] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
    [    8.166233] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:0e.0/sof-essx8336/sound/card0/input12
    [    8.166362] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:0e.0/sof-essx8336/sound/card0/input13
    [    8.166509] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:0e.0/sof-essx8336/sound/card0/input14
    [    8.166677] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:0e.0/sof-essx8336/sound/card0/input15
    
  15. merura commented on Apr 9, 2024

    @merura

    Everything works fine out of the box on huawei d14 (HUAWEI NBD-WXX9-PCB-B4) & latest kernel & latest alsa-ucm-conf
    But I had to add this script at system startup:

    #!/nix/store/r9h133c9m8f6jnlsqzwf89zg9w0w78s8-bash-5.2-p15/bin/bash
    set -e
    #!/usr/bin/env sh
    # For "Pro Audio" profile
    # amixer cset name='Headphone Switch' on
    # amixer cset name='Speaker Switch' on
    # amixer cset name='Headphone Playback Volume' 10,10
    # amixer cset name='Right Headphone Mixer Right DAC Switch' on
    # amixer cset name='Left Headphone Mixer Left DAC Switch' on
    # amixer cset name='DAC Playback Volume' 999,999
    # amixer cset name='Headphone Mixer Volume' 999,999
    #
    # amixer sset "Dmic0" 70
    # amixer sset "Dmic1 2nd" 70
    
    # For "Play and record HiFI quality Music" profile
    # Enables Right and Left speakers
    amixer cset name='Right Headphone Mixer Right DAC Switch' on
    amixer cset name='Left Headphone Mixer Left DAC Switch' on

    You can change your sound profile in pavucontrol

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CMLApplies to Comet Lake platformCommunityend-user or distro-reported issuescodecCodec HW or driver restrictioncodec ES8336enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions