yangxiaohua2009 / custom-kernel

21 stars 5 forks source link

n5100 jsplaker with e8336 codec does not work #8

Open ganghe opened 2 years ago

ganghe commented 2 years ago

my notebook is https://item.jd.com/10030069635694.html, I can load tplg file, but not sound. [ 2.792282] sof-audio-pci 0000:00:1f.3: Firmware info: version 2:1:1-3964a [ 2.792285] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:17:0 [ 2.792286] sof-audio-pci 0000:00:1f.3: warn: FW ABI is more recent than kernel [ 2.796637] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: discard [ 2.798092] input: SYNA3602:00 093A:1336 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-11/i2c-SYNA3602:00/0018:093A:1336.0001/input/input10 [ 2.798189] input: SYNA3602:00 093A:1336 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-11/i2c-SYNA3602:00/0018:093A:1336.0001/input/input11 [ 2.798268] hid-multitouch 0018:093A:1336.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA3602:00 093A:1336] on i2c-SYNA3602:00 [ 2.802396] sof-essx8336 sof-essx8336: quirk SSP2 [ 2.809540] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:21:0 Kernel ABI 3:17:0 [ 2.809543] sof-audio-pci 0000:00:1f.3: warn: topology ABI is more recent than kernel [ 2.819816] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred [ 2.822091] es8316 i2c-ESSX8336:00: assuming static mclk

yangxiaohua2009 commented 2 years ago

Please run the script to install ucm. Then give me your alsainfo if you still cannot hear anything from the headphone ucm.zip

ganghe commented 2 years ago

Hi Xiaohua,

Thank for your response. I run the script ucm.sh within ucm.zip tar-ball, the output is 8336 ucm latest The alsa-info output is pasted at here More information, I installed OS kernel v5.19-rc2, with sof-jsl-es8336-ssp1.tplg file, the sound is OK. But my current kernel is v5.10 with some patches, e.g. 0001-ASoC-Intel-add-machine-driver-for-SOF-ES8336.patch
0002-ALSA-intel-dsp-config-add-quirk-for-APL-GLK-TGL-devi.patch
0003-ASoC-Intel-soc-acpi-apl-glk-tgl-add-entry-for-device.patch
0004-ASoC-Intel-soc-acpi-add-entry-for-ESSX8336-on-JSL.patch 0005-es8336-support.patch 0006-ALSA-hda-intel-dsp-config-add-JasperLake-support.patch 0007-ASoC-es8316-add-support-for-ESSX8336-ACPI-_HID.patch

it does not work. I create a soft-link tplg file sof-jsl-es8336.tplg for pointing to sof-jsl-es8336-ssp2.tplg or sof-jsl-es8336-ssp1.tplg(it can work on v5.19-rc2). when point to sof-jsl-es8336-ssp2.tplg, the tplg file can be loaded, but no sound when point to sof-jsl-es8336-ssp1.tplg, the tplg file cannot be loaded with some error. [ 2.583341] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:17:0 [ 2.583345] sof-audio-pci 0000:00:1f.3: warn: topology ABI is more recent than kernel [ 2.584350] sof-audio-pci 0000:00:1f.3: error: can't connect DAI SSP1.OUT stream SSP1-Codec [ 2.585699] sof-audio-pci 0000:00:1f.3: error: can't connect DAI SSP1.IN stream SSP1-Codec [ 2.593244] sof-audio-pci 0000:00:1f.3: ASoC: physical link SSP1-Codec (id 0) not exist [ 2.593250] sof-audio-pci 0000:00:1f.3: ASoC: topology: could not load header: -22 [ 2.593398] sof-audio-pci 0000:00:1f.3: error: tplg component load failed -22 [ 2.593406] sof-audio-pci 0000:00:1f.3: error: failed to load DSP topology -22 [ 2.593409] sof-audio-pci 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22 [ 2.593410] sof-audio-pci 0000:00:1f.3: ASoC: failed to probe component -22 [ 2.593438] sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -22

ganghe commented 2 years ago

Hello Xiaohua,

If possible, could you share your mail to me (gang1.he@intel.com)? I want to fix this problem under kernel v5.10.x. it is possible related to the correct tplg file under JasperLake platform.

yangxiaohua2009 commented 2 years ago

Please run the following command:

cd /lib/firmware/sof/intel-tplg

sudo cp sof-glk-es8336-ssp2.tplg sof-jsl-es8336.tplg or soft link sof-glk-es8336-ssp2.tplg to sof-jsl-es8336.tplg

This sould solve your problem. sof-glk-es8336-ssp2.zip

ganghe commented 2 years ago

Hello Xiaohua, the sof-glk-es8336-ssp2.zip includes three files, sof-glk-es8336-ssp2-mclk0.tplg sof-glk-es8336-ssp2-mclk1.tplg sof-glk-es8336-ssp2-mclk2.tplg

I need to copy sof-glk-es8336-ssp2-mclk2.tplg to sof-jsl-es8336.tplg, right?

yangxiaohua2009 commented 2 years ago

already sent you an email. Please use sof-glk-es8336-ssp2-mclk1.tplg

rocket049 commented 2 years ago

My laptop has the same haredware. I tried to use files sof-glk-es8336-ssp2.zip. But still can not work. And I get follow kernel log messages:

Jun 23 21:33:16 localhost kernel: [  218.183368] sof-audio-pci-intel-icl 0000:00:1f.3: ipc tx succeeded: 0x30030000
Jun 24 10:46:52 localhost kernel: [    4.921398] sof-audio-pci-intel-icl 0000:00:1f.3: created machine sof-essx8336
Jun 24 10:46:52 localhost kernel: [    4.927150] sof-essx8336 sof-essx8336: quirk mask 0x2
Jun 24 10:46:52 localhost kernel: [    4.927156] sof-essx8336 sof-essx8336: quirk SSP2
Jun 24 10:46:52 localhost kernel: [    4.927963] sof-audio-pci-intel-icl 0000:00:1f.3: loading topology:intel/sof-tplg/sof-jsl-es8336.tplg
Jun 24 10:46:52 localhost kernel: [    4.929239] sof-audio-pci-intel-icl 0000:00:1f.3: tplg: load pcm ES8336 0
Jun 24 10:46:52 localhost kernel: [    4.929377] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
Jun 24 10:46:52 localhost kernel: [    4.940848] es8316 i2c-ESSX8336:00: assuming static mclk
Jun 24 10:46:52 localhost kernel: [    5.006903] sof-audio-pci-intel-icl 0000:00:1f.3: creating new PCM ES8336
Jun 24 10:46:52 localhost kernel: [    5.006992] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
Jun 24 10:46:52 localhost kernel: [    5.006994] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
Jun 24 10:46:52 localhost kernel: [    5.021533] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
Jun 24 10:46:52 localhost kernel: [    5.021710] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input16
Jun 24 10:46:52 localhost kernel: [    5.021828] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input17
Jun 24 10:46:52 localhost kernel: [    5.021952] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input18

errors:

Jun 24 10:46:52 localhost kernel: [    4.929377] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
Jun 24 10:46:52 localhost kernel: [    4.940848] es8316 i2c-ESSX8336:00: assuming static mclk
Jun 24 10:46:52 localhost kernel: [    5.006903] sof-audio-pci-intel-icl 0000:00:1f.3: creating new PCM ES8336
Jun 24 10:46:52 localhost kernel: [    5.006992] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
Jun 24 10:46:52 localhost kernel: [    5.006994] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
yangxiaohua2009 commented 2 years ago

@ganghe The ucm you need ucm.zip

yangxiaohua2009 commented 2 years ago

@rocket049 Please ask ganghe for the patch you need. Basically you need to try quirk ssp1 and tplg ssp1? sof-jsl-es8336-ssp1.zip

rocket049 commented 2 years ago

I am trying.

rocket049 commented 2 years ago

I does follow things , but still can't work. Otherwise, my kernel is offical kernel in ubuntu22.04 ,5.17.0-1011-oem :

cd ucm2_latest
sudo sh make.sh
cd /path/to/sof-jsl-es8336-ssp1
sudo cp sof-jsl-es8336-ssp1.tplg /lib/firmware/intel/sof-tplg/
reboot
rocket049 commented 2 years ago

Before I did those things, I add kernel modules in /etc/modules-load.d/modules.conf:

snd-soc-sst-dsp
snd-soc-sst-ipc
snd-soc-sst-byt-cht-es8316
yangxiaohua2009 commented 2 years ago

I does follow things , but still can't work. Otherwise, my kernel is offical kernel in ubuntu22.04 ,5.17.0-1011-oem :

cd ucm2_latest
sudo sh make.sh
cd /path/to/sof-jsl-es8336-ssp1
sudo cp sof-jsl-es8336-ssp1.tplg /lib/firmware/intel/sof-tplg/
reboot

Please first back up and remove the whole /lib/firmware/intel/sof-tplg/ folder, then reboot and you can see which tplg you are using from dmesg. Then you can use one of the two tplgs, copy it to /lib/firmware/intel/sof-tplg/ and rename it to sof-jsl-es8336-ssp2.tplg. sof-jsl-es8336-ssp2.tplg is the name of the tplg your kernel is using.

These two tplgs hava different mclk id, one of it should give you sound. At least you can see headphone detection works well. If you still can't have sound, please provide you alsainfo. sof-glk-es8336-ssp2.zip

rocket049 commented 2 years ago

It still does not work, still report errors:

[    4.962811] sof-audio-pci-intel-icl 0000:00:1f.3: created machine sof-essx8336
[    4.968425] sof-essx8336 sof-essx8336: quirk mask 0x2
[    4.968431] sof-essx8336 sof-essx8336: quirk SSP2
[    4.969287] sof-audio-pci-intel-icl 0000:00:1f.3: loading topology:intel/sof-tplg/sof-jsl-es8336.tplg
[    4.970847] sof-audio-pci-intel-icl 0000:00:1f.3: tplg: load pcm ES8336 0
[    4.970998] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
[    4.982267] es8316 i2c-ESSX8336:00: assuming static mclk
[    5.038636] es8316 i2c-ESSX8336:00: gpio flags 0x24
[    5.039438] sof-audio-pci-intel-icl 0000:00:1f.3: creating new PCM ES8336
[    5.039521] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[    5.039524] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
[    5.053699] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
[    5.053816] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input16
[    5.053878] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input17
[    5.053987] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input18

There is 3 errors as before:

ASoC: Parent card not yet available, widget card binding deferred
hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
rocket049 commented 2 years ago

Otherwise, the kernel load file: sof-jsl-es8336.tplg.

rocket049 commented 2 years ago

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

yangxiaohua2009 commented 2 years ago

Can you move to kernel version 5.19?In 5.19 the tplg issue is fixed.

yangxiaohua2009 commented 2 years ago

Otherwise you need to change to quirk number in the /sound/soc/intel/boards/sof_es8336.c in the source code. image Now you are using quirk number 2. I think you should use one.

rocket049 commented 2 years ago

It works when I upgrade the kernel to v5.18.6. And in this version, the tplg file loaded is sof-jsl-es8336-ssp1.tplg.

rocket049 commented 2 years ago

Unfortunately, some kernel modules cannot be compiled because the kernel version is too high.

yangxiaohua2009 commented 2 years ago

Change the number to 2 here, and cp sof-jsl-es8336-ssp1.tplg sof-jsl-es8336.tplg should give you sound.

image See codec here

Or you can add options snd_soc_sof_es8336 quirk=0x10 in /etc/modprobe.d/alsa-base.conf

rocket049 commented 2 years ago

That's work! Thank you very much! I copy sof-jsl-es8336-ssp1.tplg to sof-jsl-es8336.tplg. But add options snd_soc_sof_es8336 quirk=0x01 in alsa-base.conf. Using quirk number 1, not 2.

yangxiaohua2009 commented 1 year ago

Please run the following command:

cd /lib/firmware/sof/intel-tplg

sudo cp sof-glk-es8336-ssp2.tplg sof-jsl-es8336.tplg or soft link sof-glk-es8336-ssp2.tplg to sof-jsl-es8336.tplg

This sould solve your problem.

朱凝/Zhu Ning FAE 13032111276 苏州顺芯半导体有限公司/Everest Semi Co.,Ltd 上海市徐汇区中山西路2368号华鼎大厦30楼C座 021-54252792

From: Gang He Date: 2022-06-21 14:40 To: yangxiaohua2009/custom-kernel CC: yangxiaohua2009; Comment Subject: Re: [yangxiaohua2009/custom-kernel] n5100 jsplaker with e8336 codec does not work (Issue #8) Hi Xiaohua, Thank for your response. I run the script ucm.sh within ucm.zip tar-ball, the output is 8336 ucm latest The alsa-info output is pasted at here More information, I installed OS kernel v5.19-rc2, with sof-jsl-es8336-ssp1.tplg file, the sound is OK. But my current kernel is v5.10 with some patches, e.g. 0001-ASoC-Intel-add-machine-driver-for-SOF-ES8336.patch 0002-ALSA-intel-dsp-config-add-quirk-for-APL-GLK-TGL-devi.patch 0003-ASoC-Intel-soc-acpi-apl-glk-tgl-add-entry-for-device.patch 0004-ASoC-Intel-soc-acpi-add-entry-for-ESSX8336-on-JSL.patch 0005-es8336-support.patch 0006-ALSA-hda-intel-dsp-config-add-JasperLake-support.patch 0007-ASoC-es8316-add-support-for-ESSX8336-ACPI-_HID.patch it does not work. I create a soft-link tplg file sof-jsl-es8336.tplg for pointing to sof-jsl-es8336-ssp2.tplg or sof-jsl-es8336-ssp1.tplg(it can work on v5.19-rc2). when point to sof-jsl-es8336-ssp2.tplg, the tplg file can be loaded, but no sound when point to sof-jsl-es8336-ssp1.tplg, the tplg file cannot be loaded with some error. [ 2.583341] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:17:0 [ 2.583345] sof-audio-pci 0000:00:1f.3: warn: topology ABI is more recent than kernel [ 2.584350] sof-audio-pci 0000:00:1f.3: error: can't connect DAI SSP1.OUT stream SSP1-Codec [ 2.585699] sof-audio-pci 0000:00:1f.3: error: can't connect DAI SSP1.IN stream SSP1-Codec [ 2.593244] sof-audio-pci 0000:00:1f.3: ASoC: physical link SSP1-Codec (id 0) not exist [ 2.593250] sof-audio-pci 0000:00:1f.3: ASoC: topology: could not load header: -22 [ 2.593398] sof-audio-pci 0000:00:1f.3: error: tplg component load failed -22 [ 2.593406] sof-audio-pci 0000:00:1f.3: error: failed to load DSP topology -22 [ 2.593409] sof-audio-pci 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22 [ 2.593410] sof-audio-pci 0000:00:1f.3: ASoC: failed to probe component -22 [ 2.593438] sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -22 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>