-
Notifications
You must be signed in to change notification settings - Fork 130
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] Audio driver fails to load on Dell XPS 16 2024 (9640) with a Cirrus Logic CS42L43 #4879
Comments
There are multiple problems here.... First, the use of a topology with RT711 on a platform with Cirrus Logic seems very very odd. There's clearly a problem in the detection of the hardware. Can you please add this file Thanks! |
Yeah that is definitely odd, looking at the log it looks like the cs35l56's are on links 2/3 whereas the current MTL topology has them on links 1/2. So that might be why we are not picking up the system, weird it picks a RT711 that makes me wonder if there is some weirdness in the ACPI as well. Let me do some checking at this end. |
ah I think the kernel is just missing this patch: ASoC: Intel: mtl-match: Add cs42l43_l0 cs35l56_l23 for MTL It is in mainline already but not in the 6.8 kernel, can you please test with Linus's tree. |
So taking a dump of the ACPI on our copy of this laptop there does indeed appear to be a spurious rt711 in the ACPI tables, not quite sure where that is coming from. We have tested the laptop so I assume the right topology etc. gets picked once the kernel has support but weird there is a redundant Realtek device in the ACPI table. |
@charleskeepax it's a classic that the DSDT includes devices that are not there. Intel reference has e.g. entries for RT700 and RT701, they are ignored and unused. |
I see... well in that case everything should be fine here, pretty sure the kernel just needs updating, it will get the new entries and find the correct topology. |
@charleskeepax is this just that one patch that's problematic on this device? |
I booted and signed
Also, the patch seems to be in the 6.9-rc1 release: |
Installed the file and now resulting in the following dmesg output. Filtered with sudo dmesg | grep -E 'sof-audio-pci-intel-mtl|snd_hda_intel|cs35l56|sof_sdw|sof-audio-pci-intel-mtl|input|cs42l43-codec'. Will try debug info from #4879 (comment) next
|
Looks liek the card is created
is this usable or not? I am not sure if the "Failed to write to 'CAL_AMBIENT'" reports are a problem, that would be for Cirrus folks to comment on. |
It is not recognized by Pipewire. Still only dummy audio. Can I test it any other way? |
Hi @moritz89 , can you please share output of "alsaucm dump text" and "wpctl status"? |
Regarding the: [ 17.114016] cs35l56 sdw:0:3:01fa:3556:01:1: Failed to write to 'CAL_AMBIENT': -2 This indicates that the firmware for the cs35l56 is missing it should work fine without although the performance might be slightly worse. If you want to add the firmware it was added in this commit: The current message is a little obtuse but it has been improved in the recently merged commit e2d7ad7 ("ASoC: cs-amp-lib: Check for no firmware controls when writing calibration"). It would also be worth checking you have the latest UCM files: alsa-project/alsa-ucm-conf@e87dde5 These being missing might stop pipewire correctly setting things up. |
Resuming from sleep resulted in the following dmesg output: dmesg.txt After a reboot I ran the following commands: (sudo) alsaucm dump text
(sudo) alsaucm listcards
wpctl status
|
@charleskeepax I checked my installed alsa-ucm-conf and the patch is not present in the installed version (checked the contents of /usr/share/alsa/ucm2/sof-soundwire/sof-soundwire.conf and the ucm2/codecs/cs42l43/* files were not present). |
Sorry I think you also need alsa-project/alsa-ucm-conf@c0a4df6 Shouldn't be trying to load the amp config with the -4 on the end. |
@charleskeepax I installed the conf files from the latest master commit from https://github.com/alsa-project/alsa-ucm-conf which contains the above files.
I now have an new option in pavucontrol, Play HiFi Quality Music, next to the Pro Audio and off options. I now have a microphone that can record audio. record-thesofproject-linux-issues-4879_24-03-27.zip The settings in gnome-settings seem sensible and it recognizes two speakers and a microphone. However, the sound crashed while running a youtube speaker test video when jumping to a later part of the video. It seems pipewire had a problem as when gnome-settings said there was no audio and pavucontrol also said it was waiting for pulseaudio to load... dmesg is spammed with the following error:
|
Hmm... I am not sure that is one we have seen before. The -22 along with the no specific error message leads to me a slight suspicion that the check at the top of sdw_program_slave_port_params is failing:
But why is a bit of a mystery. If you felt up to it a printk checking if this is the failure point and letting us know the port number would be handy. The other thing that would be really handy here would be a full kernel log, ideally if you can manage to be fast enough covering the bit where the error actually starts happening. These soundwire errors can be a bit annoyingly spammy at times which tends to run the important info off the top of the kernel buffer. Meanwhile will see if we can reproduce anything here. Also any further detail on how easy the error is to trigger and what things cause it would be valuable. For example does it always happen immediately when you jump forward in a youtube video or only sometimes? |
Compiling the kernel is a bit too involved, but I found that I could access all dmesg (kernel logs) via journalctl -k. |
Your attached log, whilst it does show the boot of the device nicely, it doesn't appear to show the actual error you reported. Would be good if you could generate a new log including that. And any additional information you can provide about how easy to reproduce the issue is and if there is anything other than skipping through a youtube video we need to do, that would also be very handy. |
Just reinstalled Ubuntu and all the steps above and it seems to be working as it should. Tested the speakers with <100Hz and while they are EQed differently than on Windows, can still hear them. I guess now it's a waiting game until the kernel is packaged by Ubuntu and the other packages are as well. So the bug can be closed? |
see comments above #4879 (comment), you need an updated set of UCM files |
Amazing. Thank you very much for help. Worked like a charm. |
@vinassefranche |
@yvesh1123 building and installing a kernel is usually distribution-specific. You should refer to the documentation provided by your distro, or lookup the short guide we provided here: https://thesofproject.github.io/latest/getting_started/setup_linux/install_locally.html It's not simple, but it's not the end of the world either. |
@plbossart Hey thanks for the fast reply! |
on ubuntu you can use mainline to easily switch to RC kernel versions |
@phit latest kernel on mainline is 6.8.8 and not 6.9.0-rc5 |
check the settings |
@phit i love you :D i'm trying |
@phit thanks! I've successfully installed kernel 6.9.0-rc5 but the same errors on dmesg regarding the firmware: [ 17.334712] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380 Although I have the actual firmware at: :( |
I don't know what this means Please make sure the sof-bin release is installed. Also get the topology from this comment |
@plbossart Yup, this is where i got the file from. and the other file i got from: https://github.com/thesofproject/sof-bin/blob/main/v2.9.x/sof-ipc4-v2.9/mtl/sof-mtl.ri |
I have the same problem for XPS 16 (9640). There is no sound when I install 24.04, and I tried a lot of solutions, but it seems that I made the system messy. Here is my alsa txt. Many thanks for any help! |
I'm still with no audio nor microphone (also Dell XPS 16 (9640)). I replaced the firmware files again, and now there is a different issue in dmesg: yves-halimi@yves-halimi-XPS-16-9640:~$ sudo dmesg | grep audio its so frustrating, i cannot connect to work meeting on my computer >: Thanks, Yves.H |
Hi, I have the same problem for the same laptop. I am wondering how could you install sof audio? my mesg is like this:
|
@yvesh1123 Can you show the result of 'ls -l /lib/firmware/intel/sof-ipc4/mtl/sof-mtl.ri'? (or .ri.zst if compressed) |
Hey @plbossart thank you for trying to help! here is the output: yves-halimi@yves-halimi-XPS-16-9640:~$ ls -l /lib/firmware/intel/sof-ipc4/mtl/sof-mtl.ri |
@yvesh1123 you probably have an installation issue, you're not pointing to the 'right' file, that looks like a manual override. see what I have on my device:
Re-install sof-bin with the install script... |
I just did install with install.sh script: yves-halimi@yves-halimi-XPS-16-9640:~/sof-bin$ sudo ./install.sh v2.9.x/v2.9
that solved it! thank you so much. update kernel to 6.9.0-rc5 and use the install script is all i did. hope it helps anyone |
Mine works now. Procedure is, |
@Maccchiatooo i'm having a camera issue also, can you link the issue here please so i can stay updated on it. |
|
From what I can tell, the ipu6 camera stuff is kinda a mess rn. Since it's not built into the Linux Kernel, it breaks on every kernel release. I'm pretty sure some people have just managed to get it to work with 6.7, and we'd need 6.9. At least on arch, several changes are needed to get ipu6 cameras working, you can find those changes documented here: |
@vinassefranche - This patch https://lore.kernel.org/linux-sound/20240604132843.3309114-1-ckeepax@opensource.cirrus.com/ should fix your sporadic headset detection issues. I am not sure if building a custom kernel is something you would feel up to, but if so should be pretty easy to cherry-pick that patch in. If not then it is fairly likely the patch should get included in 6.10, 6.11 at the latest. So waiting for those to release would be the way to go. |
@charleskeepax so cool! Sorry for now answering before, I don't know why I did not receive the notification email. |
Hello from the future!
but I only managed to make one of them (2: speaker) to actually produce sound. I also observed that with |
Thanks for hinting which version of sof and kernel to use but that alone was not enough the solution for me was:
kernel for sound 6.9.12
use pavucontrol to enable sound driver in config tab
set second from the list as default
|
Thanks! I followed the steps, and now, if I set my configuration to 'Pro Audio' and use Audio Controller 2, the audio works. However, there's another problem: the headphone jack and the microphone still don't work. If I use USB headphones, the audio is fine, but the microphone doesn't work. |
Describe the bug
The audio driver fails to load with an error that the firmware/topology (
intel/sof-ipc4/mtl/sof-mtl.ri
andintel/sof-ace-tplg/sof-mtl-rt711.tplg
) files were not found.Attempts to fix where to extract the zst file
sof-mtl.ri
of the same name and the similarly namedsof-mtl-rt711-4ch.tplg.zst
, the driver loaded but resulted in the error below.To Reproduce
dmesg
to show errorReproduction Rate
100% on boot
Expected behavior
The sound card is detected
Impact
No audio via built-in speakers
Environment
Screenshots or console output
After extracting the
intel/sof-ipc4/mtl/sof-mtl.ri.zst
andintel/sof-ace-tplg/sof-mtl-rt711-4ch.tplg.zst
and placing them in the same folder, the following dmesg output is created:sof-logger. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html
The bug has initially been reported on launchpad
The text was updated successfully, but these errors were encountered: