thesofproject / linux

Linux kernel source tree
Other
91 stars 131 forks source link

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

Closed playXE closed 2 years ago

playXE commented 3 years ago

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
ghost commented 2 years ago

Hi there, I have a Matebook D15 i5-10210u with the ES8336. I have tried some of your suggestions with kernel 5.17.9 under gentoo and that's my dmesg (I've used the /etc/modprobe.d's trick)

[    3.749716] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    3.749765] sof-audio-pci-intel-cnl 0000:00:1f.3: PCI DSP detected
[    3.749778] sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0000 -> 0002)
[    3.749905] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    3.753233] iwlwifi 0000:00:14.3: Detected RF JF, rfid=0x105110
--
[    3.824207] iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
[    3.849236] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops __SCT__tp_func_render_mmio [i915])
[    3.856159] sof-audio-pci-intel-cnl 0000:00:1f.3: checking for capabilities at offset 0xc00
[    3.856165] sof-audio-pci-intel-cnl 0000:00:1f.3: found ML capability at 0xc00
[    3.856166] sof-audio-pci-intel-cnl 0000:00:1f.3: checking for capabilities at offset 0x800
[    3.856169] sof-audio-pci-intel-cnl 0000:00:1f.3: found DSP capability at 0x800
[    3.856170] sof-audio-pci-intel-cnl 0000:00:1f.3: checking for capabilities at offset 0x500
[    3.856173] sof-audio-pci-intel-cnl 0000:00:1f.3: found GTS capability at 0x500
[    3.856174] sof-audio-pci-intel-cnl 0000:00:1f.3: checking for capabilities at offset 0x1f00
[    3.856177] sof-audio-pci-intel-cnl 0000:00:1f.3: found DRSM capability at 0x1f00
[    3.856177] sof-audio-pci-intel-cnl 0000:00:1f.3: checking for capabilities at offset 0x700
[    3.856181] sof-audio-pci-intel-cnl 0000:00:1f.3: found SPIB capability at 0x700
[    3.856207] sof-audio-pci-intel-cnl 0000:00:1f.3: hda global caps = 0x1009701
[    3.856208] sof-audio-pci-intel-cnl 0000:00:1f.3: detected 9 playback and 7 capture streams
[    3.856289] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
[    3.856291] sof-audio-pci-intel-cnl 0000:00:1f.3: using IPC IRQ 149
[    3.856550] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
[    3.856552] sof-audio-pci-intel-cnl 0000:00:1f.3: PP capability, will probe DSP later.
[    3.859721] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000040 at  00000048
[    3.859725] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
[    3.864396] sof-audio-pci-intel-cnl 0000:00:1f.3: codec_mask = 0x4
[    3.864407] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000000 at  00000048
[    3.864409] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000040 at  00000048
[    3.865978] sof-audio-pci-intel-cnl 0000:00:1f.3: skipping SoundWire, no links enabled
[    3.866159] sof-audio-pci-intel-cnl 0000:00:1f.3: HDA codec #2 probed OK: response: 8086280b
[    3.866942] hdaudio ehdaudio0D2: loading codec module: hdaudio:v8086280Br00100000a01

[    3.899245] sof-audio-pci-intel-cnl 0000:00:1f.3: fw_state change: 0 -> 1
[    3.899357] sof-audio-pci-intel-cnl 0000:00:1f.3: intel_nhlt_get_dmic_geo: found 2 format definitions
[    3.899358] sof-audio-pci-intel-cnl 0000:00:1f.3: intel_nhlt_get_dmic_geo: max channels found 2
[    3.899360] sof-audio-pci-intel-cnl 0000:00:1f.3: intel_nhlt_get_dmic_geo: Array with 2 dmics
[    3.899361] sof-audio-pci-intel-cnl 0000:00:1f.3: intel_nhlt_get_dmic_geo: dmic number 2 max_ch 2
[    3.899363] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 4
[    3.899372] sof-audio-pci-intel-cnl 0000:00:1f.3: loading firmware
[    3.899375] Loading firmware: intel/sof/sof-cml.ri
[    3.903488] sof-audio-pci-intel-cnl 0000:00:1f.3: request_firmware intel/sof/sof-cml.ri successful
[    3.903490] sof-audio-pci-intel-cnl 0000:00:1f.3: found sof_ext_man header type 1 size 0x1A0
[    3.903492] sof-audio-pci-intel-cnl 0000:00:1f.3: found sof_ext_man header type 6 size 0x20
[    3.903493] sof-audio-pci-intel-cnl 0000:00:1f.3: FW clock config: HPRO
[    3.903494] sof-audio-pci-intel-cnl 0000:00:1f.3: found sof_ext_man header type 0 size 0x50
[    3.903495] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[    3.903497] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:18:0
[    3.903499] sof-audio-pci-intel-cnl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[    3.903500] sof-audio-pci-intel-cnl 0000:00:1f.3: found sof_ext_man header type 2 size 0x70
[    3.903500] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: used compiler XCC 12:0:8 <RG-2017.8-linux> used optimization flags -O2
[    3.903504] sof-audio-pci-intel-cnl 0000:00:1f.3: found sof_ext_man header type 3 size 0x30
[    3.903505] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    3.903506] sof-audio-pci-intel-cnl 0000:00:1f.3: found sof_ext_man header type 4 size 0x20
[    3.903507] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: DBG_ABI 5:3:0
[    3.903508] sof-audio-pci-intel-cnl 0000:00:1f.3: found sof_ext_man header type 5 size 0x20
[    3.903509] sof-audio-pci-intel-cnl 0000:00:1f.3: ext_man_get_config_data can hold up to 3 config elements
[    3.903510] sof-audio-pci-intel-cnl 0000:00:1f.3: ext_man_get_config_data get index 0 token 1 val 384
[    3.903511] sof-audio-pci-intel-cnl 0000:00:1f.3: ext_man_get_config_data get index 1 token 2 val 1
[    3.903513] sof-audio-pci-intel-cnl 0000:00:1f.3: ext_man_get_config_data get index 2 token 0 val 0
[    3.903514] sof-audio-pci-intel-cnl 0000:00:1f.3: fw_state change: 1 -> 2
[    3.903518] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000002 at  00000048
[    3.903523] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
[    3.903529] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
[    3.903531] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000004 at  00000044
[    3.903532] sof-audio-pci-intel-cnl 0000:00:1f.3: booting DSP firmware
[    3.903556] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x160]=0x40000 successful
[    3.903566] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x160]=0x40000 successful
[    3.903567] sof-audio-pci-intel-cnl 0000:00:1f.3: hda_dsp_stream_setup_bdl: period_bytes:0x0
[    3.903569] sof-audio-pci-intel-cnl 0000:00:1f.3: hda_dsp_stream_setup_bdl: periods:1
[    3.903606] sof-audio-pci-intel-cnl 0000:00:1f.3: Attempting iteration 0 of Core En/ROM load...
[    3.903609] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP core(s) enabled? 0 : core_mask f
[    3.903613] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x4]=0xf0f0f0f successful
[    3.903620] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x4]=0xf0f0f00 successful
[    3.903624] sof-audio-pci-intel-cnl 0000:00:1f.3: unstall/run core: core_mask = f
[    3.903631] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP core(s) enabled? 1 : core_mask f
[    3.903642] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x4]=0xf0f0000 successful
[    3.903645] sof-audio-pci-intel-cnl 0000:00:1f.3: unstall/run core: core_mask = 1
[    3.903649] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP core(s) enabled? 1 : core_mask 1
[    3.904157] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0xd4]=0x80000000 successful
[    3.904167] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x4]=0xf0f0e0e successful
[    3.904677] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x4]=0x1010e0e successful
[    3.904680] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP core(s) enabled? 0 : core_mask e
[    3.969387] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x80000]=0x5000001 successful
[    3.988376] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x80000]=0x5 successful
[    3.988885] sof-audio-pci-intel-cnl 0000:00:1f.3: FW Poll Status: reg[0x160]=0x140000 successful
[    3.988888] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware download successful, booting...
[    4.002523] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc rx: 0x70000000
[    4.002525] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc: DSP is ready 0x70000000 offset 0x81000
[    4.002634] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[    4.002637] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:18:0
[    4.002638] sof-audio-pci-intel-cnl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[    4.002659] sof-audio-pci-intel-cnl 0000:00:1f.3:  mailbox upstream 0x81000 - size 0x1000
[    4.002660] sof-audio-pci-intel-cnl 0000:00:1f.3:  mailbox downstream 0xa0000 - size 0x2000
[    4.002661] sof-audio-pci-intel-cnl 0000:00:1f.3:  stream region 0xc1000 - size 0x1000
[    4.002662] sof-audio-pci-intel-cnl 0000:00:1f.3:  debug region 0xc0000 - size 0x800
[    4.002663] sof-audio-pci-intel-cnl 0000:00:1f.3: fw_state change: 2 -> 5
[    4.002665] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc rx done: 0x70000000
[    4.002678] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000000 at  00000048
[    4.002683] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000002 at  00000048
[    4.002689] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000004 at  00000044
[    4.002692] sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000000 at  00000044
[    4.002693] sof-audio-pci-intel-cnl 0000:00:1f.3: firmware boot complete
[    4.002694] sof-audio-pci-intel-cnl 0000:00:1f.3: fw_state change: 5 -> 6
[    4.002695] sof-audio-pci-intel-cnl 0000:00:1f.3: SOF firmware trace disabled
[    4.002735] sof-audio-pci-intel-cnl 0000:00:1f.3: created machine sof-essx8336
[    4.002736] sof-audio-pci-intel-cnl 0000:00:1f.3: Completing SOF PCI probe
[    4.039004] sof-essx8336 sof-essx8336: quirk mask 0x2
[    4.039008] sof-essx8336 sof-essx8336: quirk SSP2
[    4.039207] sof-audio-pci-intel-cnl 0000:00:1f.3: loading topology:intel/sof-tplg/sof-cml-es8336.tplg
[    4.039210] Loading firmware: intel/sof-tplg/sof-cml-es8336.tplg
[    4.039611] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:20:0 Kernel ABI 3:18:0
[    4.039614] sof-audio-pci-intel-cnl 0000:00:1f.3: warn: topology ABI is more recent than kernel
[    4.039616] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 0 pipe 1 type 23 name : PCM0P stream Passthrough Playback 0
[    4.039620] sof-audio-pci-intel-cnl 0000:00:1f.3: loaded host PCM0P
[    4.039621] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 2 src 0 fmt 0
[    4.039624] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load control type 1 name : 1 Master Playback Volume
[    4.039626] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load kcontrol index 1 chans 2
[    4.039628] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 1 pipe 1 type 6 name : PGA1.0 stream none
[    4.039630] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 2 src 2 fmt 2
[    4.039631] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 2 pipe 1 type 31 name : BUF1.0 stream none
[    4.039633] sof-audio-pci-intel-cnl 0000:00:1f.3: buffer BUF1.0: size 768 caps 0x71
[    4.039635] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 3 pipe 1 type 31 name : BUF1.1 stream none
[    4.039636] sof-audio-pci-intel-cnl 0000:00:1f.3: buffer BUF1.1: size 768 caps 0x71
[    4.039638] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 4 pipe 1 type 27 name : SSP2.OUT stream SSP2-Codec
[    4.039640] sof-audio-pci-intel-cnl 0000:00:1f.3: dai SSP2.OUT: type 1 index 2
[    4.039641] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 0 src 2 fmt 1
[    4.039642] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: connected widget SSP2.OUT -> DAI link SSP2-Codec
[    4.039644] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 5 pipe 1 type 32 name : PIPELINE.1.SSP2.OUT stream SSP2.OUT
[    4.039646] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: pipeline id 1 comp 5 scheduling comp id 4
[    4.039647] sof-audio-pci-intel-cnl 0000:00:1f.3: pipeline PIPELINE.1.SSP2.OUT: period 1000 pri 0 mips 5000 core 0 frames 0 dynamic 0
[    4.039649] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 6 pipe 2 type 24 name : PCM0C stream Low Latency Capture 0
[    4.039651] sof-audio-pci-intel-cnl 0000:00:1f.3: loaded host PCM0C
[    4.039651] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 0 src 2 fmt 0
[    4.039654] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load control type 1 name : 2 PCM 0 Capture Volume
[    4.039656] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load kcontrol index 7 chans 2
[    4.039658] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 7 pipe 2 type 6 name : PGA2.0 stream none
[    4.039659] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 2 src 2 fmt 2
[    4.039660] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 8 pipe 2 type 31 name : BUF2.0 stream none
[    4.039662] sof-audio-pci-intel-cnl 0000:00:1f.3: buffer BUF2.0: size 768 caps 0x71
[    4.039663] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 9 pipe 2 type 31 name : BUF2.1 stream none
[    4.039664] sof-audio-pci-intel-cnl 0000:00:1f.3: buffer BUF2.1: size 768 caps 0x71
[    4.039665] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 10 pipe 2 type 28 name : SSP2.IN stream SSP2-Codec
[    4.039667] sof-audio-pci-intel-cnl 0000:00:1f.3: dai SSP2.IN: type 1 index 2
[    4.039668] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 2 src 0 fmt 1
[    4.039669] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: connected widget SSP2.IN -> DAI link SSP2-Codec
[    4.039671] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 11 pipe 2 type 32 name : PIPELINE.2.SSP2.IN stream SSP2.IN
[    4.039672] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: pipeline id 2 comp 11 scheduling comp id 10
[    4.039673] sof-audio-pci-intel-cnl 0000:00:1f.3: pipeline PIPELINE.2.SSP2.IN: period 1000 pri 0 mips 5000 core 0 frames 0 dynamic 0
[    4.039675] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 12 pipe 3 type 24 name : PCM1C stream Highpass Capture 1
[    4.039677] sof-audio-pci-intel-cnl 0000:00:1f.3: loaded host PCM1C
[    4.039677] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 0 src 2 fmt 0
[    4.039679] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load control type 1 name : Capture Volume
[    4.039682] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load kcontrol index 13 chans 2
[    4.039683] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load control type 1 name : Capture Switch
[    4.039684] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load kcontrol index 13 chans 2
[    4.039686] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 13 pipe 3 type 6 name : Dmic0 stream none
[    4.039687] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 2 src 2 fmt 2
[    4.039688] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load control type 2 name : eqiir_coef_3
[    4.039689] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: load kcontrol index 14 chans 0
[    4.039691] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 14 pipe 3 type 33 name : EQIIR3.0 stream none
[    4.039693] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 2 src 2 fmt 2
[    4.039694] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 15 pipe 3 type 31 name : BUF3.0 stream none
[    4.039696] sof-audio-pci-intel-cnl 0000:00:1f.3: buffer BUF3.0: size 768 caps 0x71
[    4.039697] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 16 pipe 3 type 31 name : BUF3.1 stream none
[    4.039698] sof-audio-pci-intel-cnl 0000:00:1f.3: buffer BUF3.1: size 768 caps 0x71
[    4.039699] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 17 pipe 3 type 31 name : BUF3.2 stream none
[    4.039700] sof-audio-pci-intel-cnl 0000:00:1f.3: buffer BUF3.2: size 768 caps 0x71
[    4.039702] sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: ready widget id 18 pipe 3 type 28 name : DMIC0.IN stream dmic01
[    4.039703] sof-audio-pci-intel-cnl 0000:00:1f.3: dai DMIC0.IN: type 2 index 0
[    4.039704] sof-audio-pci-intel-cnl 0000:00:1f.3:  config: periods snk 2 src 0 fmt 2
[    4.039705] sof-audio-pci-intel-cnl 0000:00:1f.3: error: can't connect DAI DMIC0.IN stream dmic01
[    4.039707] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to add widget id 0 type 28 name : DMIC0.IN stream dmic01
[    4.039709] sof-essx8336 sof-essx8336: ASoC: failed to load widget DMIC0.IN
[    4.039710] sof-essx8336 sof-essx8336: ASoC: topology: could not load header: -22
[    4.039714] sof-audio-pci-intel-cnl 0000:00:1f.3: error: tplg component load failed -22
[    4.039716] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to load DSP topology -22
[    4.039718] sof-audio-pci-intel-cnl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[    4.039726] sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -22
[    4.039752] sof-essx8336 sof-essx8336: snd_soc_register_card failed: -22
[    4.039754] sof-essx8336: probe of sof-essx8336 failed with error -22
codesalatdev commented 2 years ago

I've tried a lot to be able to have audio on my Huawei Matebook D14 i3 device, so far, I haven't be able to fix it. If I put a monitor with speakers with HDMI, I can play sound on it, but the onboard soundcard seems to not be recognize. Has anyone can fix this already on their Huawei laptop?

Matebook D14 with i5 here. Yes, I got the speakers on the device working with the proper topology file provided by plbossart (not pinging them bc irrelevant to he convo) and weird adjustments in alsamixer (headphone volume changes speaker volume, etc.).

With the current state of the solution, I'd strongly advise against using this on a production system. Be prepared for the sound to crash anytime, freezing half your system in the process.

katyo commented 2 years ago

Integrated microphones does not work on mainline 5.17.y on Teclast F5. In same time it worked well with #3107.

ghost commented 2 years ago

I see there is a PR that refers to this bug, is this something that fixes the problem with our codec or not? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/sound/soc/intel/common/soc-acpi-intel-cml-match.c?h=v5.18&id=8a6cc0ded6d942e4a506c421c4d87a634bda6e75

SpaLox1 commented 2 years ago

Something went wrong or I'm too stupid...

I set my quirk to 0x100 within /etc/modprobe.d/sound.conf...

dmesg|grep "essx" [7.846452] sof-essx8336 sof-essx8336: quirk mask 0x0 ??? [7.846458] sof-essx8336 sof-essx8336: quirk SSP0 [7.849067] sof-essx8336 sof-essx8336: ASoC: parent card not yet available, widget card binding deferred ???

Kernel is 5.18.0-2.g2023975-default of openSUSE Tumbleweed.

Why are my quirk settings being ignored?

ghost commented 2 years ago

Seems something is starting to move on kernel 5.19.0 with latest fedora.

mag 27 06:25:00 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
mag 27 06:25:00 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0000 -> 0002)
mag 27 06:25:00 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
mag 27 06:25:00 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: NHLT_DEVICE_I2S detected, ssp_mask 0x1
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 4
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: warn: FW ABI is more recent than kernel
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: warn: FW ABI is more recent than kernel
mag 27 06:25:01 fedora kernel: sof-essx8336 sof-essx8336: quirk mask 0x1a0
mag 27 06:25:01 fedora kernel: sof-essx8336 sof-essx8336: quirk SSP0
mag 27 06:25:01 fedora kernel: sof-essx8336 sof-essx8336: quirk DMIC enabled
mag 27 06:25:01 fedora kernel: sof-essx8336 sof-essx8336: quirk headphone GPIO enabled
mag 27 06:25:01 fedora kernel: sof-essx8336 sof-essx8336: quirk headset at mic1 port enabled
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:21:0 Kernel ABI 3:19:1
mag 27 06:25:01 fedora kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: warn: topology ABI is more recent than kernel
mag 27 06:25:01 fedora kernel: sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
mag 27 06:25:01 fedora kernel: input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input14
mag 27 06:25:01 fedora kernel: input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
mag 27 06:25:01 fedora kernel: input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input16
mag 27 06:25:01 fedora kernel: input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input17
mag 27 06:25:01 fedora alsactl[883]: Found hardware: "sof-essx8336" "Intel Kabylake HDMI" "HDA:8086280b,80860101,00100000 cfg-dmics:2" "" ""
mag 27 06:25:09 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: value out of range 11 (0/10) at count 0
mag 27 06:25:09 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: access overflow
mag 27 06:25:09 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: value out of range 11 (0/10) at count 0
mag 27 06:25:09 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: access overflow
mag 27 06:25:16 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: value out of range 11 (0/10) at count 0
mag 27 06:25:16 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: access overflow
mag 27 06:25:16 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: value out of range 11 (0/10) at count 0
mag 27 06:25:16 fedora kernel: sof-essx8336 sof-essx8336: control 2:0:0:ALC Capture Target Volume:0: access overflow

Unfortunately integrated speakers refuse to work. I haven't tried headset and HDMI yet

ghost commented 2 years ago

immagine Also mic doesn't work yet

leurias commented 2 years ago

same problem with huawei matebook d15. sound is available on windows 10 but not on ubuntu 22 and 21. is three any solution for this problem?

fcsm1922 commented 2 years ago

Is there sound. but there is no microphone in the laptop (laptop model Huawei Matebook 14 on Intel kernel stable: 5.18.4

Neo-29 commented 2 years ago

Here still NOTHING on my teclast f15plus2 Up to date with latest kernel on archlinux AND the latest alsa-ucm.conf

A nightmare

ghost commented 2 years ago

Is there sound. but there is no microphone in the laptop (laptop model Huawei Matebook 14 on Intel kernel stable: 5.18.4

Which OS? Did you change anything?

ghost commented 2 years ago

same problem with huawei matebook d15. sound is available on windows 10 but not on ubuntu 22 and 21. is three any solution for this problem?

Ubuntu use always an old version of kernel (iirc 22 uses 5.15 while latest is 5.18). We have to wait for linux 5.18/19

Neo-29 commented 2 years ago

same problem with huawei matebook d15. sound is available on windows 10 but not on ubuntu 22 and 21. is three any solution for this problem?

Ubuntu use always an old version of kernel (iirc 22 uses 5.15 while latest is 5.18). We have to wait for linux 5.18/19

You're right.... But the kernel version is not the only explanation as with 5.18 it doesn't work more.

fcsm1922 commented 2 years ago

Is there sound. but there is no microphone in the laptop (laptop model Huawei Matebook 14 on Intel kernel stable: 5.18.4

Which OS? Did you change anything?

costs arch linux with kde first there was the mainline kernel and patches from alsa-ucm.conf. (there was sound, but no microphone) but after returning to the 5.18.4 kernel, the system cursed the files that were installed from alsa-ucm.conf, I deleted them and updated to the 5.18.4 kernel There is sound. The microphone does not see.

T-kilt commented 2 years ago

Hi fcsm,

thx for the update. I have also a Huawei Matebook 14 with Intel. Running Arch Linux with Manjaro as Distribution and tried 5.18.4 and also 5.19.1RC. With both soundcard is recogniced as a Dervice. When i play youtube via Browser (as an example) the level is indicated, but only a faint hissing and no sound is working. How did you get it working? Wich files did you delete?

Could you perhapse give us a small walktrough?

You help would realy be apriciated. Fighting with this for more than 6 Month now. ;-)

Regards André

T-kilt commented 2 years ago

same problem with huawei matebook d15. sound is available on windows 10 but not on ubuntu 22 and 21. is three any solution for this problem?

Ubuntu use always an old version of kernel (iirc 22 uses 5.15 while latest is 5.18). We have to wait for linux 5.18/19

Hi mscardovi,

tried fedora with a writeable USB Flash Drive also, and same result as on arch. Soundcard ist useable as output device but no Sound at all.

Regards André

Neo-29 commented 2 years ago

Yep! I would like a walk-through too. Stuck on my teclast

Besnn commented 2 years ago

Same here, Huawei D15, sound on Windows 10 but not on Fedora Workstation 35 or Ubuntu.

Merded commented 2 years ago

Same, Huawei D14, i5-10210U, Fedora 36

codesalatdev commented 2 years ago

@Merded I have working audio with Huawei Matebook D14, i5-10210U, Fedora 36.

As I've said before, you need the correct topology file. If you're on Kernel 5.19, it works with the toplogy installed (but quiet). Adjustments in alsamixer are necessary to get the volume up.

The same thing should apply for @T-kilt, since they have the same model number on their hands as me.

Edit: For topologies see plbossart's comment https://github.com/thesofproject/linux/pull/3338#issuecomment-1011574005

Merded commented 2 years ago

@Merded I have working audio with Huawei Matebook D14, i5-10210U, Fedora 36.

As I've said before, you need the correct topology file. If you're on Kernel 5.19, it works with the toplogy installed (but quiet). Adjustments in alsamixer are necessary to get the volume up.

The same thing should apply for @T-kilt, since they have the same model number on their hands as me.

Edit: For topologies see plbossart's comment #3338 (comment)

Soundcard recognizes, but no sound

Neo-29 commented 2 years ago

Same here.... Arch 5.19rc.... Teclast f15plus2

leoriohub commented 2 years ago

Matebook 14 (2021) with R5 5500U on Pop Os! 22.04 has the same problem

JulianBoetto commented 2 years ago

Same here, Matebook D15 with ubuntu 20.04 and Intel multimedia audio controller...

fcsm1922 commented 2 years ago

@Merded, @T-kilt if your sound card is recognized, but there is no sound, try adjusting the output of the audio channel in the alsamixer settings ... DUC Source Mux (at least my channels were mixed up, after installation, as in the screenshot, the sound appeared but quiet .... you need to try substitute another topology with handles) link to my post with screenshot https://github.com/alsa-project/alsa-ucm-conf/pull/144#issuecomment-1102452742

Neo-29 commented 2 years ago

@Merded, @T-kilt if your sound card is recognized, but there is no sound, try adjusting the output of the audio channel in the alsamixer settings ... DUC Source Mux (at least my channels were mixed up, after installation, as in the screenshot, the sound appeared but quiet .... you need to try substitute another topology with handles) link to my post with screenshot https://github.com/alsa-project/alsa-ucm-conf/pull/144#issuecomment-1102452742

This does not work at all

fcsm1922 commented 2 years ago

@Merded, @T-kilt if your sound card is recognized, but there is no sound, try adjusting the output of the audio channel in the alsamixer settings ... DUC Source Mux (at least my channels were mixed up, after installation, as in the screenshot, the sound appeared but quiet .... you need to try substitute another topology with handles) link to my post with screenshot alsa-project/alsa-ucm-conf#144 (comment)

This does not work at all

what does not work??

Neo-29 commented 2 years ago

@Merded, @T-kilt if your sound card is recognized, but there is no sound, try adjusting the output of the audio channel in the alsamixer settings ... DUC Source Mux (at least my channels were mixed up, after installation, as in the screenshot, the sound appeared but quiet .... you need to try substitute another topology with handles) link to my post with screenshot alsa-project/alsa-ucm-conf#144 (comment)

This does not work at all

what does not work??

Doing that....

I'm on the last kernel, last alsa-ucm.conf... Nothing

fcsm1922 commented 2 years ago

@Merded, @T-kilt if your sound card is recognized, but there is no sound, try adjusting the output of the audio channel in the alsamixer settings ... DUC Source Mux (at least my channels were mixed up, after installation, as in the screenshot, the sound appeared but quiet .... you need to try substitute another topology with handles) link to my post with screenshot alsa-project/alsa-ucm-conf#144 (comment)

This does not work at all

what does not work??

Doing that....

I'm on the last kernel, last alsa-ucm.conf... Nothing

You installed files from es8336-topologies-4.tar.gz

yangxiaohua2009 commented 2 years ago

When you plug in/out headphone while playing music, does the icon in the sound setting change? Normally it should change between speaker and headphone If not then you are facing a mclk issue. Please copy the file to /etc/modprobe.d/ using command sudo cp sof-dyndbg.conf.txt /etc/modprobe.d/sof-dyndbg.conf Then provide your alsainfo. sof-dyndbg.conf.zip @Neo-29

Neo-29 commented 2 years ago

When you plug in/out headphone while playing music, does the icon in the sound setting change? Normally it should change between speaker and headphone If not then you are facing a mclk issue. Please copy the file to /etc/modprobe.d/ using command sudo cp sof-dyndbg.conf.txt /etc/modprobe.d/sof-dyndbg.conf Then provide your alsainfo. sof-dyndbg.conf.zip @Neo-29

I'll try all that. Tks a lot

dattiluca commented 2 years ago

It seems we have a fix for speaker audio (sort of), but not microphone at this stage. So a long way to a "production ready" linux environment, am I right?

Thanks everyone for the incredible work you're doing.

RossoSimo commented 2 years ago

yesterday I read a post where it said that the problem on huawei d15 solved it by bringing it to assistance and in 2 minutes they solved the problem via hardware. The only possible option seems to me a cmos restart. tomorrow if I don't find any other solution, I'll try.

RossoSimo commented 2 years ago

When you plug in/out headphone while playing music, does the icon in the sound setting change? Normally it should change between speaker and headphone If not then you are facing a mclk issue. Please copy the file to /etc/modprobe.d/ using command sudo cp sof-dyndbg.conf.txt /etc/modprobe.d/sof-dyndbg.conf Then provide your alsainfo. sof-dyndbg.conf.zip @Neo-29

also tried this. http://alsa-project.org/db/?f=98a4e55b14ff8e5716a8fd9e81530d731cf9f94e

yangxiaohua2009 commented 2 years ago

You are using an HDA sound card now You may need to compile a kernel and select the option SND_SOC_INTEL_SOF_ES8336_MACH. @RossoSimo

RossoSimo commented 2 years ago

I compiled the kernel (latest 5.18.10 downloaded from kernel.com ) with that flag SND_SOC_INTEL_SOF_ES8336_MACH = m and also loaded it with modprobe but still nothing this is the alsainfo:

http://alsa-project.org/db/?f=9ae820265b9bd44fc533ebddc782d91e1969c0f0 @yangxiaohua2009

yangxiaohua2009 commented 2 years ago

You may need to change snd_intel_dsp_driver_probe in sound/hda/intel-dsp-config.c and let it always return SND_INTEL_DSP_DRIVER_SOF. Now it returns SND_INTEL_DSP_DRIVER_LEGACY (intel hda general).

int snd_intel_dsp_driver_probe(struct pci_dev *pci) { return SND_INTEL_DSP_DRIVER_SOF; }

Also, make sure that ssp is opened in BIOS (chipset->pchio->HD Audio)

3996d525f546f1d457ff7623a2dd98c

plbossart commented 2 years ago

You may need to change snd_intel_dsp_driver_probe in sound/hda/intel-dsp-config.c and let it always return SND_INTEL_DSP_DRIVER_SOF. Now it returns SND_INTEL_DSP_DRIVER_LEGACY (intel hda general).

No, that's bad advice. This code is supposed to handle auto-detection of the driver. If it doesn't work it needs to be fixed. Don't randomly edit stuff. Besides, if you want a work-around to force SOF to be used, there is already a kernel parameter that can be set in /etc/modprobe.d/alsa-base.conf

options snd-intel-dspcfg dsp_driver=3

noideahowtocode commented 2 years ago

yesterday I read a post where it said that the problem on huawei d15 solved it by bringing it to assistance and in 2 minutes they solved the problem via hardware. The only possible option seems to me a cmos restart. tomorrow if I don't find any other solution, I'll try.

are you talking about this? https://forums.linuxmint.com/viewtopic.php?t=358471 I'm running a Huawei Matebook D15 with Intel i7 Tiger Lake and I have the exact same issue you are describing here. There is no way I can get audio working.

NeveHanter commented 2 years ago

I would link my issue here, the same module snd-soc-sof_es8336 helped enabling both speakers and the mic array on Dell Precision 5770 with Alder Lake i7-12700H.

It only worked after specifying the proper module order in /etc/modules-load.d/99-audiofix.conf (created file):

snd_hda_intel
snd-soc-sof_es8336
snd_sof_pci_intel_tgl

The last one needs to be loaded after snd-soc-sof_es8336. You can test if this works on your end:

rmmod snd_sof_pci_intel_tgl
rmmod snd-soc-sof_es8336
rmmod snd_hda_intel
modprobe snd_hda_intel
modprobe snd-soc-sof_es8336
modprobe snd_sof_pci_intel_tgl
systemctl --user restart pulseaudio

Would be nice if all of that could be done automatically when the module is available or is compiled-in (didn't test that approach).

plbossart commented 2 years ago

@NeveHanter can you please share the results of 'alsa-info'? I don't think you need this module snd-soc-sof-es8336 at all.

NeveHanter commented 2 years ago

@plbossart thanks for the response and correcting me, yes, you are right, I don't need this specific module, I must've messed something along the way at some point.

The weird thing is now even after removing the modules-load.d file audio works fine. With one difference that with the file it's available immediately after logging and without it it sometimes takes a little until ALSA/pulseaudio initializes it.

Also, previously I was reliably getting after every reboot the snd_soc_register_card failed: -517 and had no sound card in ALSA/PA. It's possible that it fixed itself after I've disabled fastboot for a moment in UEFI while testing one other thing or with one of the updates I've run since writting previous comment.

Anyway, I'm attaching two alsa-info files as they're somewhat different, one with the modules-load.d file:

snd_hda_intel
snd_sof_pci_intel_tgl

and second one without that file: alsa-info-with-modules.txt alsa-info-without-modules.txt

I will submit proper issue if I hit the problem again, for now it seems it works fine.

NeveHanter commented 2 years ago

@plbossart it stopped working just after connecting the notebook to power adapter. Created separate issue #3751.

Tonyd4nc3 commented 2 years ago

Hi I have the same problem on my Huawei D15. There are some news? because I use ubuntu with no sound for 6 monts. I try to contact assistance but they told me that Huawei support only windows.

plbossart commented 2 years ago

it's so bad we even have documentation of what the issues are

https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#es8336-support

Neo-29 commented 2 years ago

Even with 5.19.. It doesn't work

Tonyd4nc3 commented 2 years ago

perfect. so I will continue with bluethoot headphones or speaker for a long time.

kyconny commented 2 years ago

Just bought a Huawei MateBook K14 (21), board id KLVD-WXX9-PCB-B4 Spent some time attempting to get this to work on latest RC linux Fresh install and I have sound! Though unfortunately it appears to be coming out of both the speakers, and the headphone jack at the same time. The speaker is marked as (unavailable) in pulse, and alsamixer doesn't let me adjust its volume. Funnily enough I have two distinct headphone controls, which appear to increase the volume of both the speaker and the headphones at the same time.

Seems there is some kind of pin mismatch.

plbossart commented 2 years ago

Added recommended information in https://github.com/thesofproject/linux/wiki/ES8336-support

closing for now, please re-open an issue if the recommended setup doesn't work for you.

ghost commented 1 year ago

EDIT for everyone. Tested on 6.0.9 and https://github.com/yangxiaohua2009/custom-kernel and I can confirm it works (I have gentoo but it works without problems).

EDIT: After reboot it stopped working 😢