Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] no sof-lnl-cs42l43-l0-2ch.tplg found #9682

Open
pma1 opened this issue Nov 26, 2024 · 24 comments
Open

[BUG] no sof-lnl-cs42l43-l0-2ch.tplg found #9682

pma1 opened this issue Nov 26, 2024 · 24 comments
Assignees
Labels
bug Something isn't working as expected

Comments

@pma1
Copy link

pma1 commented Nov 26, 2024

Describe the bug
No sound cards are initialized.

Reproduction Rate
1/1

Expected behavior
The right tplg is loaded.

Impact
no audio

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: 6.12+ 9f16d5e6f2206 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
    • SOF: db771bf v2.11.x: add new 2.11.2 topology2 production binaries
  2. Name of the topology file
    • Topology: intel/sof-ipc4-tplg/sof-lnl-cs42l43-l0-2ch.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: CPU0: Intel(R) Core(TM) Ultra 7 258V

Screenshots or console output
aladdin-1-6.12-dmesg-nosoundcards.txt

@pma1 pma1 added the bug Something isn't working as expected label Nov 26, 2024
@lgirdwood
Copy link
Member

@charleskeepax I guess this topology is now upstream but not in the current release ?

@charleskeepax
Copy link
Contributor

Alas a bunch of these SKUs ended up looking slightly different to what we expected. This needs some updates, we have a 4-channel topology, but not a 2-channel one. This will also need some quirk updates for the kernel side.

@rfvirgil
Copy link
Contributor

rfvirgil commented Nov 27, 2024

Can you try it with these two patches?

Kernel: thesofproject/linux@f6f710b
Topology: CirrusLogic@bfd4c7b

@rfvirgil rfvirgil self-assigned this Nov 27, 2024
@pma1
Copy link
Author

pma1 commented Nov 28, 2024

@rfvirgil ,
Thanks for the quick change.

Would you mind share a sof-bin? Sorry I am not familiar with sof building.

@rfvirgil
Copy link
Contributor

rfvirgil commented Nov 28, 2024

tplg file attached
sof-lnl-cs42l43-l0-2ch.tplg.gz

ungzip it and copy the .tplg to /lib/firmware/intel/sof-ipc4-tplg/

@pma1
Copy link
Author

pma1 commented Nov 28, 2024

@rfvirgil ,

Thanks.

After copied the tplg, sof show error:
error: can't connect DAI alh-copier.Playback-SmartAmp.0

Full dmesg:
Aladdin-sof-load-fail-dmesg.txt

@lgirdwood
Copy link
Member

@ujfalusi @bardliao pls see above copier error and dmesg. Missing kernel patch or topology ?

@rfvirgil
Copy link
Contributor

@pma1 Did you apply the kernel patch? thesofproject/linux@f6f710b

@pma1
Copy link
Author

pma1 commented Nov 29, 2024

@rfvirgil

Sorry for my mistake.

After applied patch, with new tplg, still show:
sof-audio-pci-intel-lnl 0000:00:1f.3: no hda codecs found!

Aladdin-sof-tplg-kernel-6.12-patch-load-fail-dmesg.txt

@bardliao
Copy link
Collaborator

The main issue is:

[    4.014846] sof_sdw sof_sdw: ASoC: physical link dmic01 (id 4) not exist
[    4.015984] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
[    4.017044] sof-audio-pci-intel-lnl 0000:00:1f.3: error: tplg component load failed -22
[    4.017758] sof-audio-pci-intel-lnl 0000:00:1f.3: error: failed to load DSP topology -22
[    4.018707] sof-audio-pci-intel-lnl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[    4.019675] sof_sdw sof_sdw: ASoC: failed to instantiate card -22

Please rename sof-dyndbg.conf.txt to sof-dyndbg.conf and put it in the /etc/modprobe.d/ folder and share the dmesg again. Thanks.

@pma1
Copy link
Author

pma1 commented Nov 29, 2024

@bardliao
Copy link
Collaborator

	Line 3681: [    3.675201] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Playback-SimpleJack, id 0
	Line 3682: [    3.675862] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Capture-SimpleJack, id 1
	Line 3683: [    3.676936] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Playback-SmartAmp, id 2
	Line 3684: [    3.677793] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link dmic01, id 3
	Line 3685: [    3.678640] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link dmic16k, id 4
	Line 3686: [    3.679337] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link iDisp1, id 5
	Line 3687: [    3.679976] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link iDisp2, id 6
	Line 3688: [    3.680805] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link iDisp3, id 7

The dmic01 id is 3.
@pma1 Can you try sof-lnl-cs42l43-l0-2ch.zip?

@pma1
Copy link
Author

pma1 commented Nov 29, 2024

Aladdin-sof-tplg-kernel-6.12-patch-audio-show-no-input-nomic-dmesg.txt

With the new tplg, the audio is shown:
$ cat /proc/asound/cards
0 [sofsoundwire ]: sof-soundwire - sof-soundwire
LENOVO-21Q6SIT019-ThinkPadAladdin

But still no sound output, no mic.

@bardliao
Copy link
Collaborator

[    3.065555] calling  xe_init+0x0/0x100 [xe] @ 275
[    3.065616] initcall xe_init+0x0/0x100 [xe] returned -19 after 0 usecs

Also some

sof-audio-pci-intel-lnl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp1 Pin: -22

are shown.
@kv2019i Do you know if display audio work on 6.12.0+?

@pma1 Can you test with aplay/arecord first?

@pma1
Copy link
Author

pma1 commented Nov 29, 2024

There is no sound from aplay or arecord.

xe is disabled because of some issues.

After enabled xe, the sound can not output or input too.
Aladdin-sof-tplg-kernel-6.12-patch-xe-audio-show-no-input-nomic-dmesg.txt

@kv2019i
Copy link
Collaborator

kv2019i commented Nov 29, 2024

@pma1 wrote:

After enabled xe, the sound can not output or input too. Aladdin-sof-tplg-kernel-6.12-patch-xe-audio-show-no-input-nomic-dmesg.txt

ACk to @bardliao , display audio should work and this log at least looks good for driver probes. Xe driver for display is up, SOF and codec drivers are probed without errors. I wonder if some alsamixer settings are wrong now. Output from "alsa-info.sh" would be useful (when playing back to one device with aplay). It will show the state of all codec settings.

@rfvirgil
Copy link
Contributor

Speakers will not work because you don't have firmware for the CS35L56. We would need permission from Lenovo to publish the firmware.

Did you buy this laptop from a shop, or is this a pre-production device?

@pma1
Copy link
Author

pma1 commented Nov 29, 2024

alsa-info:
aladdin-alsa-info.txt

This is a pre-production device.

Does it need a kernel patch to match the CS35L56?

@rfvirgil
Copy link
Contributor

rfvirgil commented Dec 2, 2024

Does it need a kernel patch to match the CS35L56?

The patch I linked that changes the DMI matches should be the only kernel patch you need.

@rfvirgil
Copy link
Contributor

rfvirgil commented Dec 5, 2024

@bardliao what was the source change you made to create your fixed tplg?

@bardliao
Copy link
Collaborator

bardliao commented Dec 6, 2024

@rfvirgil

"cavs-sdw\;sof-lnl-cs42l43-l0-2ch\;PLATFORM=lnl,NUM_SDW_AMP_LINKS=1,NUM_DMICS=2,\
PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC0_ID=3,DMIC1_ID=4,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-lnl-cs42l43-l0-2ch.bin,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,\
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
HDMI1_ID=5,HDMI2_ID=6,HDMI3_ID=7,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"

The point is DMIC0_ID=3,DMIC1_ID=4. They are 4 and 5 by default. But from

	Line 3684: [    3.677793] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link dmic01, id 3
	Line 3685: [    3.678640] snd_soc_sdw_utils:asoc_sdw_init_dai_link: sof_sdw sof_sdw: create dai link dmic16k, id 4

They should be 3 and 4.

@RyanJiao
Copy link

RyanJiao commented Dec 8, 2024

fig
Hi, I'm using kernel 6.12 on my Intel Ultra 258V and the sof driver was not initialized properly resulting in no audio.

But I can't even find a sof-lnl.** file in this repo's release zip. How can I load my audio card driver properly? It would be so grateful if anyone can give any instruction.

@bardliao
Copy link
Collaborator

bardliao commented Dec 9, 2024

@RyanJiao You could find the sof-lnl.ri from https://github.com/thesofproject/sof-bin/tree/main/v2.11.x/sof-ipc4-v2.11.1/lnl/intel-signed

@RyanJiao
Copy link

RyanJiao commented Dec 9, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

7 participants