Repository navigation
[BUG] Lenovo Yoga Slim 7 15 - SOF topology file not found #9663
Copy link
Copy link
Closed
Labels
P2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't working as expectedSomething isn't working as expected
Description
Describe the bug
The SOF topology file is not detected (topology doesn't exist) on a LNL Lenovo Yoga Slim 7 15 laptop.
To Reproduce
Install Ubuntu 24.10 on the laptop, build & install 6.12.0-rc7+ kernel, then boot the laptop.
Errors will be present in dmesg logs.
Reproduction Rate
All the time
Expected behavior
The topology file should exist and be detected.
Impact
Showstopper
At best, results in no audio (dummy output). At worst, sometimes results in a failed boot.
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: 6.12.0-rc7+ (drm-tip)
- SOF: sof-bin-2024.09.1 (release)
- Name of the topology file
- Topology: intel/sof-ipc4-tplg/sof-lnl-cs42l43-l0-4ch.tplg
- Name of the platform(s) on which the bug is observed.
- Platform: Lenovo Yoga Slim 7 15
Screenshots or console output
[ 5.459112] sof-audio-pci-intel-lnl 0000:00:1f.3: hda codecs found, mask 4
[ 5.459115] sof-audio-pci-intel-lnl 0000:00:1f.3: NHLT device BT(0) detected, ssp_mask 0x4
[ 5.459116] sof-audio-pci-intel-lnl 0000:00:1f.3: BT link detected in NHLT tables: 0x4
[ 5.459117] sof-audio-pci-intel-lnl 0000:00:1f.3: DMICs detected in NHLT tables: 4
[ 5.460831] cs42l43 sdw:0:0:01fa:4243:01: supply vdd-p not found, using dummy regulator
[ 5.460864] cs42l43 sdw:0:0:01fa:4243:01: supply vdd-d not found, using dummy regulator
[ 5.460872] cs42l43 sdw:0:0:01fa:4243:01: supply vdd-a not found, using dummy regulator
[ 5.460880] cs42l43 sdw:0:0:01fa:4243:01: supply vdd-io not found, using dummy regulator
[ 5.460889] cs42l43 sdw:0:0:01fa:4243:01: supply vdd-cp not found, using dummy regulator
[ 5.462775] sof-audio-pci-intel-lnl 0000:00:1f.3: SOF firmware and/or topology file not found.
[ 5.462778] sof-audio-pci-intel-lnl 0000:00:1f.3: Supported default profiles
[ 5.462779] sof-audio-pci-intel-lnl 0000:00:1f.3: - ipc type 1 (Requested):
[ 5.462780] sof-audio-pci-intel-lnl 0000:00:1f.3: Firmware file: intel/sof-ipc4/lnl/sof-lnl.ri
[ 5.462781] sof-audio-pci-intel-lnl 0000:00:1f.3: Topology file: intel/sof-ipc4-tplg/sof-lnl-cs42l43-l0-4ch.tplg
[ 5.462782] sof-audio-pci-intel-lnl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
[ 5.462782] sof-audio-pci-intel-lnl 0000:00:1f.3: Optionally it can be manually downloaded from:
[ 5.462783] sof-audio-pci-intel-lnl 0000:00:1f.3: https://github.com/thesofproject/sof-bin/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't working as expectedSomething isn't working as expected
Activity
bardliao commentedon Nov 19, 2024
@charleskeepax @simontrimmer FYI
simontrimmer commentedon Nov 19, 2024
Yes that's the one - there is a DMI match string change and the topology change we were talking about:
+++ b/tools/topology/topology2/production/tplg-targets-ace2.cmake
@@ -27,6 +27,13 @@ NUM_SDW_AMP_LINKS=2,SDW_DMIC_STREAM=SDW0-Capture"
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
+"cavs-sdw;sof-lnl-cs42l43-l0-4ch;PLATFORM=lnl,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,
+PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=5,DMIC1_ID=6,
+PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-lnl-cs42l43-l0-4ch.bin,
+SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,
+SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,
+HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9"
+
"cavs-sdw;sof-lnl-cs42l43-l0-cs35l56-l3;PLATFORM=lnl,NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
We were hanging on "a few more" Lenovo DMI strings
simontrimmer commentedon Nov 19, 2024
Having a crack at a PR with that topology change in, not my usual jam...
#9666
bardliao commentedon Nov 26, 2024
@cgbowman The thesofproject/linux#5248 and #9666 PRs are merged. Can you check if they work for your device?
cgbowman commentedon Nov 27, 2024
Was tinkering with the docker container setup, but seems I'm having issues getting the non-default build targets to show up. I'll keep tinkering until I get it to build correctly. Once I've been able to test, I'll post again. Thanks for the help here!
cgbowman commentedon Nov 27, 2024
I was able to build the topology file with the docker image given by the SOF documentation, but after copying the topology over to the correct location, other errors are still present. I didn't rebuild the firmware binaries, as other targets weren't accepted by the docker image suggested by the instructions (even the 'cnl' target doesn't seem to be recognized as a valid target). It's possible that not rebuilding the rest of the lnl target may produce these errors, but I'm not familiar with this codebase, so I'm not sure.
Added full dmesg here:
lenovo_yoga_tplg_added.txt
bardliao commentedon Nov 27, 2024
@cgbowman I guess your device is not listed in the sof_sdw_quirk_table[].
Can you share the output of
sudo dmidecode | grep SKU?simontrimmer commentedon Nov 27, 2024
The DMI information matches the unit I was using (including the updated bios)
simontrimmer commentedon Nov 27, 2024
Tangent - I wasn't getting "[ 8.008471] i2c_designware i2c_designware.2: i2c_dw_handle_tx_abort: lost arbitration"
cgbowman commentedon Nov 27, 2024
bardliao commentedon Nov 28, 2024
@cgbowman Did you upgrade your kernel with thesofproject/linux#5248?
cgbowman commentedon Nov 28, 2024
Yes, I cherry-picked the necessary patches onto a drm-tip base, but can retry with just the branch by itself tomorrow morning if you'd like confirmation.
bardliao commentedon Nov 28, 2024
@cgbowman Can you put sof-dyndbg.conf to the /etc/modprobe.d/ folder and share the full dmesg log? Note that the file should be rename to
sof-dyndbg.conf. I.e. remove the.txtfilename extension.4 remaining items
cgbowman commentedon Nov 29, 2024
You are correct, I turned on CONFIG_LOCALVERSION_AUTO to confirm and it was loading another kernel by default.
After loading up the kernel with the proper SHA, I saw that the volume up/down controls are no longer giving off a dummy output (progress!), now showing 'Speakers' (although still no sound yet).
Here are the kernel commits I picked up:
Here is the journalctl -k output (dmesg became too long):
lenovo_yoga_sof-dyndbg_kernel_confirmed_journalctl.txt
bardliao commentedon Nov 29, 2024
No error from the log. I guess that is the mixer setting issue. @charleskeepax Can you help on it?
simontrimmer commentedon Nov 29, 2024
Hiya,
Looking at the log I suspect you are missing the amplifier firmware and tuning - have you update to a point beyond https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=879bd9ae0b893ee00ca4069f09d018a9efd25ac3 ?
-Simon
cgbowman commentedon Nov 29, 2024
Yes, I've updated again with today's latest just to double check, along with ensuring initramfs gets updated with
sudo update-initramfs -uIt seems the files from the given SHA are installed in /lib/firmware correctly:
simontrimmer commentedon Nov 29, 2024
Hi @cgbowman,
It does feel like it's not looking for the files, I guess the only other thing that stands out to me is that this is a product that has the spkid gpio derived from the cs42l43 driver - this was a fairly new patch that was delivered via Mark's SPI tree, I wonder if that's the missing piece?
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?id=f3c605147741e0ad8f1c51a7decef2040debfd16
I'll be able to double check the device I have here on Monday,
-Simon
cgbowman commentedon Nov 29, 2024
Sounds good, I'll try on my end as well! Always happy to test :)
Edit: Looks like it's not the missing piece we're looking for. I'll keep checking around for related patches and testing what I find.
simontrimmer commentedon Dec 2, 2024
@cgbowman
Hmm, as a sanity check I just built at:
86183cdca9d6 (HEAD) spi: cs42l43: Add GPIO speaker id support to the bridge configuration
49e1628e8983 (upstream/topic/sof-dev, upstream/HEAD) ASoC: Intel: soc-acpi: arl: Add match entries for new cs42l43 laptops
Which is the sof-dev with the patch from mark's tree
git remote add spi git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
git remote update
git cherry-pick f3c605147741
and add
options snd-soc-wm_adsp dyndbg=+pmf
options spi-cs42l43 dyndbg=+pmf
To the modprobe.d dynamic debug config, I can see:
root@crus-83hm:~ # dmesg | grep -i spi_cs42l43
[ 10.982372] spi_cs42l43:cs42l43_get_speaker_id_gpios: cs42l43-spi cs42l43-spi: spk-id-gpios = 1
root@crus-83hm:~ # dmesg | grep wm_adsp
[ 11.887606] snd_soc_wm_adsp:wm_adsp_request_firmware_file: cs35l56 spi-cs35l56-right: DSP1: Failed to request 'cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1-ampr.wmfw'
[ 11.891569] snd_soc_wm_adsp:wm_adsp_request_firmware_file: cs35l56 spi-cs35l56-right: DSP1: Found 'cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1.wmfw'
[ 11.892501] snd_soc_wm_adsp:wm_adsp_request_firmware_file: cs35l56 spi-cs35l56-right: DSP1: Found 'cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1-ampr.bin'
[ 11.904986] snd_soc_wm_adsp:wm_adsp_request_firmware_file: cs35l56 spi-cs35l56-left: DSP1: Failed to request 'cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1-ampl.wmfw'
[ 11.905081] snd_soc_wm_adsp:wm_adsp_request_firmware_file: cs35l56 spi-cs35l56-left: DSP1: Found 'cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1.wmfw'
[ 11.905915] snd_soc_wm_adsp:wm_adsp_request_firmware_file: cs35l56 spi-cs35l56-left: DSP1: Found 'cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1-ampl.bin'
root@crus-83hm:~#
The firmware version should then jump up to v3.11.20
root@crus-83hm:~ # dmesg | grep v3.11.20
[ 15.352566] cs35l56 spi-cs35l56-right: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.20, 41 algorithms
[ 15.361456] cs35l56 spi-cs35l56-left: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.11.20, 41 algorithms
[ 15.474488] cs35l56 spi-cs35l56-right: DSP1: cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1-ampr.bin: v3.11.20
[ 15.591591] cs35l56 spi-cs35l56-left: DSP1: cirrus/cs35l56-b0-dsp1-misc-17aa380e-spkid1-ampl.bin: v3.11.20
root@crus-83hm:~#
cgbowman commentedon Dec 2, 2024
gotcha, thanks for the sanity check, I'll try to replicate with that setup.
cgbowman commentedon Dec 4, 2024
Just an update, I think my issue may be related to non-updated sof-lnl.ri firmware, trying to go through sof build docs, but still have to figure out why the specified targets aren't recognized as valid options in the signed/unsigned lists.
Will keep working on it, maybe I should switch to the zephyr build, but unsure what is best practice for building this firmware.
bardliao commentedon Dec 5, 2024
@cgbowman I don't think your issue is related to sof-lnl.ri. However, you could upgrade your sof-lnl.ri from https://github.com/thesofproject/sof-bin/tree/main/v2.11.x/sof-ipc4-v2.11.1/lnl/intel-signed if you want.
BTW, have you tried @simontrimmer's suggestion #9663 (comment)?
cgbowman commentedon Dec 10, 2024
Apologies for the very late reply, I was caught up in other tasks.
I have tried the suggestion and it didn't seem to yield results for my device. I keep suspecting there's something else wrong with it, but I'm unsure what yet.
Here is my kernel with the sof-dev branch (on the day of testing):
Here is my journalctl output:
sof-dev-test.txt
bardliao commentedon Dec 10, 2024
@cgbowman Just to confirm the issue you still have is that there is no sound from the speaker, right? If so, can we close the issue and create another one for the speaker no sound issue?
simontrimmer commentedon Dec 10, 2024
@cgbowman
Yes weird - at least the trace does show that the amplifiers are hooking up with the expected firmware and features now.
It's a tangent, but I'd be extremely interested in the contents of the /sys/firmware/efi/efivars/CirrusSmart* files - when you get a chance could you drop them here or on the new ticket we use to further investigate this system?
Thanks!
-Simon
cgbowman commentedon Dec 11, 2024
Yes, that's correct. I've filed a new issue here: #9720
I'll make sure to post this information in the new issue.
Thanks for all your work! 😃