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] Lenovo Yoga Slim 7 15ILL9 - No sound coming from speakers #9720

Open
cgbowman opened this issue Dec 11, 2024 · 16 comments
Open

[BUG] Lenovo Yoga Slim 7 15ILL9 - No sound coming from speakers #9720

cgbowman opened this issue Dec 11, 2024 · 16 comments
Assignees
Labels
bug Something isn't working as expected LNL Applies to Lunar Lake platform P2 Critical bugs or normal features

Comments

@cgbowman
Copy link

Describe the bug
Despite a topology in place, the Lenovo machine doesn't produce sound from the speakers.

To Reproduce
Install Ubuntu 24.10 on the laptop, build & install 6.12.0-rc7+ kernel, then boot the laptop. With sof topology updated, sound is not being made from the speakers.

Reproduction Rate
Always

Expected behavior
Sound should be heard from the speakers.

Impact
No audio, results in an annoyance, but doesn't stop the system from functioning.

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: 49e1628e8983 (sof/topic/sof-dev)
    • SOF: sof-bin-2024.09.1 (release)
  2. Name of the topology file
    • Topology: intel/sof-ipc4-tplg/sof-lnl-cs42l43-l0-4ch.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: Lenovo Yoga Slim 7 15

Screenshots or console output
sounds-settings

journalctl -k log:
sof-dev-test.txt

@cgbowman cgbowman added the bug Something isn't working as expected label Dec 11, 2024
@cgbowman
Copy link
Author

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?

@simontrimmer , here are the contents of the directory, as requested from #9663:

/sys/firmware/efi/efivars$ ls | grep "CirrusSmart*"
CirrusSmartAmpCalibrationData-02f9af02-7734-4233-b43d-93fe5aa35db3
CirrusSmartCalInfo-ea064247-46bd-433b-9249-e31b63a64172

@simontrimmer
Copy link
Contributor

@cgbowman - Great they are both there - could you attach them and laser etched underneath is the date of manufacture "mfg date" could you grab that too please?

I'm assuming it looks to you like it is playing back and not like sox's play tool that doesn't show progress if the data isn't flowing?

Could you attach the output of alsa-info and maybe "wpctl status" as I don't think that is included yet...
Cheers
-Simon

@cgbowman
Copy link
Author

Certainly!

Cirrus Firmware: cirrus-smart-firmware.zip
alsa-info output: lenovo-yoga-slim-alsa-info.txt
wpctl status output: lenovo-yoga-slim-wpctl-status.txt

Mfg date: 2024/09/02

I'm assuming it looks to you like it is playing back and not like sox's play tool that doesn't show progress if the data isn't flowing?

Correct, if I simply attempt to 'test' the speaker in the settings UI, it will show a graphic of a bar above the output device, resembling playback:
sound-test

@simontrimmer
Copy link
Contributor

@cgbowman Thanks! I'm out of the workshop now but will compare with the one I have tomorrow, but I'm 99% certain that I have more Sinks than you see in your wpctl output - I wonder if this is one of those ucm problems?

(The unit I have will almost certainly have had all the files updated to the latest from https://github.com/alsa-project/alsa-ucm-conf as I'd recently had some fun with another product and this Lenovo would have been installed off a live USB image I'd made for the one that needed the updated ucm configuration)

@simontrimmer
Copy link
Contributor

simontrimmer commented Dec 11, 2024

@cgbowman - Actually perhaps 24.10 is missing this?

alsa-project/alsa-ucm-conf@e4277a2

@cgbowman
Copy link
Author

@cgbowman - Actually perhaps 24.10 is missing this?

alsa-project/alsa-ucm-conf@e4277a2

@simontrimmer, I updated the files, rebooted, and the Settings menu's 'output device' shows as "Dummy Output". Specifically, adding the change to the sof-soundwire.conf file causes the change.

I've also tried changing the entire ucm2 folder and replacing it with the latest dir available in the alsa-ucm-conf repo and I observe the same issue.

@simontrimmer
Copy link
Contributor

@cgbowman Interesting - I suspect we're in the right area .... Is there an error message from the UCM?

Looking at the one I have here:
...

├─ Sinks:
│ 56. Lunar Lake-M HD Audio Controller HDMI / DisplayPort 3 Output [vol: 1.00]
│ 57. Lunar Lake-M HD Audio Controller HDMI / DisplayPort 2 Output [vol: 1.00]
│ 58. Lunar Lake-M HD Audio Controller HDMI / DisplayPort 1 Output [vol: 1.00]
│ * 59. Lunar Lake-M HD Audio Controller Headphones + Speaker [vol: 0.37]

...

which mirrors the outputs to HDMI and the cs42l43/cs35l56 pair, and it looks like when I upgraded the alsa-ucm-conf files they were matched with similarly dated alsa-lib and alsa-utils, I think a new file syntax (7) was introduced that might be confusing it, this was important to make a different system I was using work, but it could also apply here too.

-Simon

@lgirdwood
Copy link
Member

@cgbowman just checking, was your alsa-info data above produced with active playback (if not, pls run again with music as speaker test is quite fast/short) ? Just want to rule out userspace isn't incorrectly modifying mixer values when a stream is started/stopped.

@cgbowman
Copy link
Author

@cgbowman just checking, was your alsa-info data above produced with active playback (if not, pls run again with music as speaker test is quite fast/short) ? Just want to rule out userspace isn't incorrectly modifying mixer values when a stream is started/stopped.

Apologies, it was not produced with active playback. I will upload more info when I have the chance.

@cgbowman
Copy link
Author

@cgbowman Interesting - I suspect we're in the right area .... Is there an error message from the UCM?

Attached full journalctl output after updating ucm2 directory:
lenovo-yoga-slim-updated-ucm-journalctl.txt

Some notable entries from alsactl:

$ cat ~/lenovo-yoga-slim-updated-ucm-journalctl.txt | grep -i alsa
Dec 12 16:44:58 cgbowman-desk6 (udev-worker)[2246]: controlC0: Process '/usr/sbin/alsactl -E HOME=/run/alsa -E XDG_RUNTIME_DIR=/run/alsa/runtime restore /dev/snd/controlC0' failed with exit code 99.
Dec 12 16:44:58 cgbowman-desk6 systemd[1]: alsa-state.service - Manage Sound Card State (restore and store) was skipped because of an unmet condition check (ConditionPathExists=/etc/alsa/state-daemon.conf).
Dec 12 16:44:58 cgbowman-desk6 systemd[1]: Starting alsa-restore.service - Save/Restore Sound Card State...
Dec 12 16:44:58 cgbowman-desk6 alsactl[2345]: Found hardware: "sof-soundwire" "Intel Lunar Lake HDMI" "HDA:80862820,80860101,00100000  cfg-amp:3 mic:dmic cfg-mics:4 iec61937-pcm:7,6,5 spk:cs35l56-bridge hs:cs42l43" "" ""
Dec 12 16:44:58 cgbowman-desk6 alsactl[2345]: Hardware is initialized using a generic method
Dec 12 16:44:58 cgbowman-desk6 alsactl[2345]: /usr/sbin/alsactl: set_control:1475: Cannot write control '2:0:0:cs42l43 Jack Override:0' : Device or resource busy
Dec 12 16:44:58 cgbowman-desk6 systemd[1]: Finished alsa-restore.service - Save/Restore Sound Card State.
Dec 12 16:46:46 cgbowman-desk6 sudo[4062]: cgbowman : TTY=pts/1 ; PWD=/home/cgbowman ; USER=root ; COMMAND=/usr/sbin/alsa-info
Dec 12 16:51:16 cgbowman-desk6 sudo[4637]: cgbowman : TTY=pts/1 ; PWD=/home/cgbowman ; USER=root ; COMMAND=/usr/sbin/alsa-info

Updated alsa-info output with music playing in Rhythmbox:
lenovo-yoga-slim-alsa-info-music-playing.txt

@lgirdwood lgirdwood added LNL Applies to Lunar Lake platform P2 Critical bugs or normal features labels Dec 13, 2024
@lgirdwood
Copy link
Member

@simontrimmer any ideas why the codec jack kcontrol would be -EBUSY above ?

@simontrimmer
Copy link
Contributor

Er,

@charleskeepax would not having a headset plugged in be the most likely reason for the Jack Override returning -EBUSY?

I was saying earlier today I should come back to this - I do think that something in the alsa-ucm-conf / alsa-utils / alsa-lib isn't happy and that is just snowballing, but the only way I could think of reproducing the problem and then working out what was happening was to sacrifice my working system running Debian12+updates and basically starting again with a clean Ubuntu noble install and working through the problems. I did that recently on a different product and whilst I got to do what I needed in the sound domain, the UI experience was less than enjoyable and put me off rushing into it 😁 Might be a good week for it.

@cgbowman - just checking, did you update the alsa-utils & alsa-lib when you updated the UCM files? (thinking about syntax 7)

-Simon

@charleskeepax
Copy link
Contributor

Yes Jack Override will return EBUSY if there is no jack present, its purpose is to set the jack to various types of device that can't be automatically detected. However, an error from alsactl restore should not have any impact on the UCM.

@cgbowman
Copy link
Author

@cgbowman - just checking, did you update the alsa-utils & alsa-lib when you updated the UCM files? (thinking about syntax 7)

Good call, I'll double check

@cgbowman
Copy link
Author

I updated alsa-lib & alsa-utils (using the tarball releases) from 1.2.11 to 1.2.13 and it didn't seem to make an impact yet:

Do you think I should try directly from the repo sources? There didn't seem to be much more than a few commits on top of the 1.2.13 tags for both upstream sources.

@lgirdwood
Copy link
Member

Yes Jack Override will return EBUSY if there is no jack present, its purpose is to set the jack to various types of device that can't be automatically detected. However, an error from alsactl restore should not have any impact on the UCM.

@charleskeepax do you mean no jack connector/pin present or connected to the codec on the PCB ? Would it be better to return ENODEV here ? i.e. EBUSY makes me think codec is busy with some other work so cant do the jack detect work atm

Agree, UCM should just carry on.

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 LNL Applies to Lunar Lake platform P2 Critical bugs or normal features
Projects
None yet
Development

No branches or pull requests

4 participants