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] Audio driver fails to load on Dell XPS 16 2024 (9640) with a Cirrus Logic CS42L43 #4879

Closed
moritz89 opened this issue Mar 26, 2024 · 86 comments
Labels
bug Something isn't working SDW Applies to SoundWire bus for codec connection

Comments

@moritz89
Copy link

Describe the bug
The audio driver fails to load with an error that the firmware/topology (intel/sof-ipc4/mtl/sof-mtl.ri and intel/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 named sof-mtl-rt711-4ch.tplg.zst, the driver loaded but resulted in the error below.

To Reproduce

  • Boot Ubuntu 24.04 (20240319) on a Dell XPS 16 2024 (9640)
  • dmesg to show error

Reproduction Rate
100% on boot

Expected behavior
The sound card is detected

Impact
No audio via built-in speakers

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: Linux 6.8.0-11-generic x86_64 / Ubuntu 6.8.0-11.11-generic 6.8.0-rc4
    • SOF: TBD
  2. Name of the topology file
    • Topology: sof-mtl-rt711.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: Dell XPS 16 2024 (9640)

Screenshots or console output

# dmesg
sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 0
sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ace-tplg/sof-mtl-rt711.tplg
sof-audio-pci-intel-mtl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
sof-audio-pci-intel-mtl 0000:00:1f.3: Optionally it can be manually downloaded from:
sof-audio-pci-intel-mtl 0000:00:1f.3: https://github.com/thesofproject/sof-bin/
sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -2

After extracting the intel/sof-ipc4/mtl/sof-mtl.ri.zst and intel/sof-ace-tplg/sof-mtl-rt711-4ch.tplg.zst and placing them in the same folder, the following dmesg output is created:

# dmesg
snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 0
sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware paths/files for ipc type 1:
sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware lib path: intel/sof-ipc4-lib/mtl
sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ace-tplg/sof-mtl-rt711.tplg
sof-audio-pci-intel-mtl 0000:00:1f.3: Loaded firmware library: ADSPFW, version: 2.8.1.1
cs42l43 sdw:0:0:01fa:4243:01: supply vdd-p not found, using dummy regulator
cs42l43 sdw:0:0:01fa:4243:01: supply vdd-d not found, using dummy regulator
cs42l43 sdw:0:0:01fa:4243:01: supply vdd-a not found, using dummy regulator
cs42l43 sdw:0:0:01fa:4243:01: supply vdd-io not found, using dummy regulator
cs42l43 sdw:0:0:01fa:4243:01: supply vdd-cp not found, using dummy regulator
cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_P not found, using dummy regulator
cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_IO not found, using dummy regulator
cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_A not found, using dummy regulator
cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_P not found, using dummy regulator
cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_IO not found, using dummy regulator
cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_A not found, using dummy regulator
cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_P not found, using dummy regulator
cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_IO not found, using dummy regulator
cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_A not found, using dummy regulator
cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_P not found, using dummy regulator
cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_IO not found, using dummy regulator
cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_A not found, using dummy regulator
sof-audio-pci-intel-mtl 0000:00:1f.3: Booted firmware version: 2.8.1.1
cs42l43 sdw:0:0:01fa:4243:01: devid: 0x042a43, rev: 0xa1, otp: 0x03
cs35l56 sdw:0:2:01fa:3556:01:3: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
cs35l56 sdw:0:3:01fa:3556:01:1: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
cs35l56 sdw:0:2:01fa:3556:01:2: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
cs35l56 sdw:0:3:01fa:3556:01:0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
cs42l43 sdw:0:0:01fa:4243:01: Slave 6 state check1: UNATTACHED, status was 1
cs35l56 sdw:0:2:01fa:3556:01:3: Slave 1 state check1: UNATTACHED, status was 1
cs35l56 sdw:0:2:01fa:3556:01:2: Slave 2 state check1: UNATTACHED, status was 1
cs35l56 sdw:0:3:01fa:3556:01:1: Slave 1 state check1: UNATTACHED, status was 1
cs35l56 sdw:0:3:01fa:3556:01:0: Slave 2 state check1: UNATTACHED, status was 1
Adding alias for supply vdd-amp,(null) -> vdd-amp,sdw:0:0:01fa:4243:01
sof-audio-pci-intel-mtl 0000:00:1f.3: Topology: ABI 3:29:0 Kernel ABI 3:23:0
sof-audio-pci-intel-mtl 0000:00:1f.3: error: can't connect DAI dai-copier.DMIC.dmic01.capture stream dmic01
sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to add widget id 0 type 28 name : dai-copier.DMIC.dmic01.capture stream dmic01
sof_sdw sof_sdw: ASoC: failed to load widget dai-copier.DMIC.dmic01.capture
sof_sdw sof_sdw: ASoC: topology: could not load header: -22
sof-audio-pci-intel-mtl 0000:00:1f.3: error: tplg component load failed -22
sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to load DSP topology -22
sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
sof_sdw sof_sdw: ASoC: failed to instantiate card -22
sof_sdw sof_sdw: error -EINVAL: snd_soc_register_card failed -22
sof_sdw: probe of sof_sdw failed with error -22

sof-logger. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html

# sof-logger
# TBD

The bug has initially been reported on launchpad

@moritz89 moritz89 added the bug Something isn't working label Mar 26, 2024
@plbossart plbossart transferred this issue from thesofproject/sof Mar 26, 2024
@plbossart
Copy link
Member

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
sof-dyndbg.conf.txt
to /etc/modprobe.d/sof-dyndbg.conf, reboot and then attach the result of 'alsa-info' and the full dmesg log.

Thanks!

@plbossart
Copy link
Member

plbossart commented Mar 26, 2024

@bardliao @rfvirgil @charleskeepax FYI

@charleskeepax
Copy link

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.

@charleskeepax
Copy link

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.

@charleskeepax
Copy link

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.

@plbossart
Copy link
Member

@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.
But if for some reason the entry for the spurious device is added BEFORE the actual devices, then the topology selection will fail. There's an implicit order in the selection.

@charleskeepax
Copy link

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.

@plbossart
Copy link
Member

@charleskeepax is this just that one patch that's problematic on this device?
Or do we also need all the patches queued up for 6.10?

@moritz89
Copy link
Author

moritz89 commented Mar 26, 2024

I booted and signed 6.9.0-060900rc1-generic #202403242136 SMP PREEMPT_DYNAMIC Sun Mar 24 21:49:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux and now it seems to recognize the sound card as cs42l43, but cannot find the correct topology file. Will see if I can find it somewhere. Currently using firmware-sof-signed/noble,now 2023.12.1-1ubuntu1

[   18.812926] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   18.812962] snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   18.813079] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[   18.813363] snd_hda_intel 0000:01:00.1: Disabling MSI
[   18.813375] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[   18.910122] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   18.910151] sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   18.910167] sof-audio-pci-intel-mtl 0000:00:1f.3: enabling device (0000 -> 0002)
[   18.910349] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   20.366874] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   20.366907] snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   20.366919] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   20.366929] sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   20.367317] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   20.367423] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   20.374317] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
[   20.386135] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
[   20.390341] sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
[   20.390349] sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
[   20.390350] sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
[   20.390352] sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
[   20.390353] sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file: intel/sof-ace-tplg/sof-mtl-cs42l43-l0-cs35l56-l23.tplg
[   20.390354] sof-audio-pci-intel-mtl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
[   20.390355] sof-audio-pci-intel-mtl 0000:00:1f.3: Optionally it can be manually downloaded from:
[   20.390356] sof-audio-pci-intel-mtl 0000:00:1f.3:    https://github.com/thesofproject/sof-bin/
[   20.392213] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -2

Also, the patch seems to be in the 6.9-rc1 release:

@moritz89
Copy link
Author

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

[    0.608012] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[    0.608083] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
[    0.608196] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2
[    0.645175] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
[    1.603086] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input5
[    2.142103] input: VEN_2C2F:00 2C2F:0025 Mouse as /devices/pci0000:00/0000:00:15.2/i2c_designware.1/i2c-1/i2c-VEN_2C2F:00/0018:2C2F:0025.0001/input/input6
[    2.142215] input: VEN_2C2F:00 2C2F:0025 Touchpad as /devices/pci0000:00/0000:00:15.2/i2c_designware.1/i2c-1/i2c-VEN_2C2F:00/0018:2C2F:0025.0001/input/input7
[    2.142305] hid-generic 0018:2C2F:0025.0001: input,hidraw0: I2C HID v1.00 Mouse [VEN_2C2F:00 2C2F:0025] on i2c-VEN_2C2F:00
[    2.220397] input: VEN_2C2F:00 2C2F:0025 Mouse as /devices/pci0000:00/0000:00:15.2/i2c_designware.1/i2c-1/i2c-VEN_2C2F:00/0018:2C2F:0025.0001/input/input9
[    2.220475] input: VEN_2C2F:00 2C2F:0025 Touchpad as /devices/pci0000:00/0000:00:15.2/i2c_designware.1/i2c-1/i2c-VEN_2C2F:00/0018:2C2F:0025.0001/input/input10
[    2.220541] hid-multitouch 0018:2C2F:0025.0001: input,hidraw0: I2C HID v1.00 Mouse [VEN_2C2F:00 2C2F:0025] on i2c-VEN_2C2F:00
[    2.727541] input: Intel HID events as /devices/platform/INTC1077:00/input/input12
[    2.731737] input: Intel HID 5 button array as /devices/platform/INTC1077:00/input/input13
[    3.194870] input: Dell Privacy Driver as /devices/platform/PNP0C14:03/wmi_bus/wmi_bus-PNP0C14:03/6932965F-1671-4CEB-B988-D3AB0A901919/input/input14
[    3.195257] input: Dell WMI hotkeys as /devices/platform/PNP0C14:03/wmi_bus/wmi_bus-PNP0C14:03/9DBB5994-A997-11DA-B012-B622A1EF5492/input/input15
[    5.189601] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input16
[    5.189956] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:68/LNXVIDEO:01/input/input17
[   16.621663] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   16.621691] snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   16.621763] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[   16.621947] snd_hda_intel 0000:01:00.1: Disabling MSI
[   16.621951] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[   16.714404] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input18
[   16.714452] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input19
[   16.714489] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input20
[   16.714587] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input21
[   16.796998] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[   16.797027] sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   16.797050] sof-audio-pci-intel-mtl 0000:00:1f.3: enabling device (0000 -> 0002)
[   16.797211] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   16.797268] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   16.804078] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
[   16.816363] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
[   16.821158] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware paths/files for ipc type 1:
[   16.821161] sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware file:     intel/sof-ipc4/mtl/sof-mtl.ri
[   16.821162] sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware lib path: intel/sof-ipc4-lib/mtl
[   16.821162] sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file:     intel/sof-ace-tplg/sof-mtl-cs42l43-l0-cs35l56-l23.tplg
[   16.822602] sof-audio-pci-intel-mtl 0000:00:1f.3: Loaded firmware library: ADSPFW, version: 2.8.1.1
[   16.847332] cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_P not found, using dummy regulator
[   16.847349] cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_IO not found, using dummy regulator
[   16.847354] cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_A not found, using dummy regulator
[   16.847557] cs35l56 sdw:0:2:01fa:3556:01:2: Got spk-id from AF01
[   16.847761] cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_P not found, using dummy regulator
[   16.847807] cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_IO not found, using dummy regulator
[   16.847816] cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_A not found, using dummy regulator
[   16.847991] cs35l56 sdw:0:2:01fa:3556:01:3: Got spk-id from AF01
[   16.848293] cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_P not found, using dummy regulator
[   16.848405] cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_IO not found, using dummy regulator
[   16.848416] cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_A not found, using dummy regulator
[   16.848616] cs35l56 sdw:0:3:01fa:3556:01:0: Got spk-id from AF01
[   16.848860] cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_P not found, using dummy regulator
[   16.848944] cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_IO not found, using dummy regulator
[   16.848959] cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_A not found, using dummy regulator
[   16.849116] cs35l56 sdw:0:3:01fa:3556:01:1: Got spk-id from AF01
[   16.927527] sof-audio-pci-intel-mtl 0000:00:1f.3: Booted firmware version: 2.8.1.1
[   16.936641] cs35l56 sdw:0:2:01fa:3556:01:3: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
[   16.936653] cs35l56 sdw:0:3:01fa:3556:01:1: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
[   16.949958] cs35l56 sdw:0:2:01fa:3556:01:2: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
[   16.949965] cs35l56 sdw:0:3:01fa:3556:01:0: Cirrus Logic CS35L56 Rev B0 OTP3 fw:3.4.4 (patched=0)
[   16.953591] cs35l56 sdw:0:3:01fa:3556:01:1: Slave 1 state check1: UNATTACHED, status was 1
[   16.953794] cs35l56 sdw:0:2:01fa:3556:01:3: Slave 1 state check1: UNATTACHED, status was 1
[   16.953796] cs35l56 sdw:0:2:01fa:3556:01:2: Slave 2 state check1: UNATTACHED, status was 1
[   16.954099] cs35l56 sdw:0:3:01fa:3556:01:0: Slave 2 state check1: UNATTACHED, status was 1
[   17.042271] cs42l43-codec cs42l43-codec: supply vdd-amp not found, using dummy regulator
[   17.044634] sof-audio-pci-intel-mtl 0000:00:1f.3: Topology: ABI 3:29:0 Kernel ABI 3:23:0
[   17.045048] sof_sdw sof_sdw: ASoC: Parent card not yet available, widget card binding deferred
[   17.045119] cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_B not found, using dummy regulator
[   17.045134] cs35l56 sdw:0:2:01fa:3556:01:2: supply VDD_AMP not found, using dummy regulator
[   17.045717] cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_B not found, using dummy regulator
[   17.045728] cs35l56 sdw:0:2:01fa:3556:01:3: supply VDD_AMP not found, using dummy regulator
[   17.046817] cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_B not found, using dummy regulator
[   17.046829] cs35l56 sdw:0:3:01fa:3556:01:0: supply VDD_AMP not found, using dummy regulator
[   17.047485] cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_B not found, using dummy regulator
[   17.047493] cs35l56 sdw:0:3:01fa:3556:01:1: supply VDD_AMP not found, using dummy regulator
[   17.049660] cs35l56 sdw:0:2:01fa:3556:01:2: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.4.4, 37 algorithms
[   17.050180] cs35l56 sdw:0:3:01fa:3556:01:0: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.4.4, 37 algorithms
[   17.050725] cs35l56 sdw:0:2:01fa:3556:01:3: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.4.4, 37 algorithms
[   17.059582] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[   17.075341] cs35l56 sdw:0:3:01fa:3556:01:1: DSP1: Firmware: 1a00d6 vendor: 0x2 v3.4.4, 37 algorithms
[   17.075860] cs35l56 sdw:0:3:01fa:3556:01:0: Slave 2 state check1: UNATTACHED, status was 1
[   17.098944] cs35l56 sdw:0:2:01fa:3556:01:3: Slave 1 state check1: UNATTACHED, status was 1
[   17.099156] cs35l56 sdw:0:2:01fa:3556:01:2: Slave 2 state check1: UNATTACHED, status was 1
[   17.100936] cs35l56 sdw:0:3:01fa:3556:01:1: Slave 1 state check1: UNATTACHED, status was 1
[   17.105944] cs35l56 sdw:0:3:01fa:3556:01:0: Failed to write to 'CAL_AMBIENT': -2
[   17.106648] cs35l56 sdw:0:2:01fa:3556:01:3: Failed to write to 'CAL_AMBIENT': -2
[   17.107648] input: sof-soundwire Jack as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card1/input22
[   17.108055] input: sof-soundwire HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card1/input23
[   17.108723] input: sof-soundwire HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card1/input24
[   17.109037] input: sof-soundwire HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card1/input25
[   17.113165] cs35l56 sdw:0:2:01fa:3556:01:2: Failed to write to 'CAL_AMBIENT': -2
[   17.114016] cs35l56 sdw:0:3:01fa:3556:01:1: Failed to write to 'CAL_AMBIENT': -2
[   28.604009] rfkill: input handler disabled
[   32.044460] rfkill: input handler enabled
[   32.801148] rfkill: input handler disabled

@moritz89
Copy link
Author

dmesg.txt
alsa-info.txt

@plbossart
Copy link
Member

plbossart commented Mar 26, 2024

Looks liek the card is created

card 1: sofsoundwire [sof-soundwire], device 0: Jack Out (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofsoundwire [sof-soundwire], device 2: Speaker (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofsoundwire [sof-soundwire], device 5: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofsoundwire [sof-soundwire], device 6: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofsoundwire [sof-soundwire], device 7: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofsoundwire [sof-soundwire], device 31: Deepbuffer Jack Out (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****
card 1: sofsoundwire [sof-soundwire], device 1: Jack In (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofsoundwire [sof-soundwire], device 4: Microphone (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

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.

@moritz89
Copy link
Author

It is not recognized by Pipewire. Still only dummy audio. Can I test it any other way?

@moritz89
Copy link
Author

moritz89 commented Mar 26, 2024

I can see the device with pavucontrol but when enabling it, the gnome settings sound page states that there are no speakers. Tried the 3.5mm jack, but that also does not seem to be responding.

image
image
image
image

@moritz89
Copy link
Author

I did get some audio out. Ran aplay /usr/share/sounds/alsa/* and put the output stream on the following channel. The other channels don't result in any audio.

image

@mstrozek
Copy link

Hi @moritz89 , can you please share output of "alsaucm dump text" and "wpctl status"?
If I'm seeing correctly, Ubuntu 24.04 has wireplumber version 0.4.17, can you also try updating to https://gitlab.freedesktop.org/pipewire/wireplumber/-/releases/0.5.0 ? This version has fixed some problems with switching outputs and broken GUIs.

@charleskeepax
Copy link

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:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=57077702373e7ef40f0ca197724428d614bd92f8

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
alsa-project/alsa-ucm-conf@8e39917

These being missing might stop pipewire correctly setting things up.

@moritz89
Copy link
Author

moritz89 commented Mar 27, 2024

Resuming from sleep resulted in the following dmesg output: dmesg.txt

After a reboot I ran the following commands:

(sudo) alsaucm dump text

ALSA lib parser.c:244:(error_node) UCM is not supported for this HDA model (HDA NVidia at 0x8e000000 irq 17)
ALSA lib main.c:1554:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -6
alsaucm: error failed to open sound card hw:0: No such device or address

(sudo) alsaucm listcards

ALSA lib utils.c:364:(uc_mgr_config_load_into) could not open configuration file /usr/share/alsa/ucm2/sof-soundwire/cs35l56-4.conf
ALSA lib parser.c:78:(uc_mgr_config_load_file) error: failed to open file /usr/share/alsa/ucm2/sof-soundwire/cs35l56-4.conf: -2
ALSA lib main.c:1554:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
  list is empty

wpctl status

PipeWire 'pipewire-0' [1.0.3, moritz@moritz-XPS-16-9640, cookie:2905168662]
 └─ Clients:
        32. pipewire                            [1.0.3, moritz@moritz-XPS-16-9640, pid:2406]
        34. WirePlumber                         [1.0.3, moritz@moritz-XPS-16-9640, pid:2405]
        35. WirePlumber [export]                [1.0.3, moritz@moritz-XPS-16-9640, pid:2405]
       115. gnome-shell                         [1.0.3, moritz@moritz-XPS-16-9640, pid:2652]
       116. GNOME Shell Volume Control          [1.0.3, moritz@moritz-XPS-16-9640, pid:2652]
       117. GNOME Volume Control Media Keys     [1.0.3, moritz@moritz-XPS-16-9640, pid:2866]
       118. xdg-desktop-portal                  [1.0.3, moritz@moritz-XPS-16-9640, pid:3237]
       119. Mutter                              [1.0.3, moritz@moritz-XPS-16-9640, pid:2652]
       120. wpctl                               [1.0.3, moritz@moritz-XPS-16-9640, pid:4732]

Audio
 ├─ Devices:
 │      46. Meteor Lake-P HD Audio Controller   [alsa]
 │      47. HDA NVidia                          [alsa]
 │  
 ├─ Sinks:
 │  *   48. Meteor Lake-P HD Audio Controller Pro [vol: 0.56]
 │      49. Meteor Lake-P HD Audio Controller Pro 2 [vol: 1.00]
 │      50. Meteor Lake-P HD Audio Controller Pro 5 [vol: 1.00]
 │      51. Meteor Lake-P HD Audio Controller Pro 6 [vol: 1.00]
 │      52. Meteor Lake-P HD Audio Controller Pro 7 [vol: 1.00]
 │      53. Meteor Lake-P HD Audio Controller Pro 31 [vol: 1.00]
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  *   54. Meteor Lake-P HD Audio Controller Pro 1 [vol: 1.00]
 │      55. Meteor Lake-P HD Audio Controller Pro 4 [vol: 1.00]
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Video
 ├─ Devices:
 │  
 ├─ Sinks:
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-0

@moritz89
Copy link
Author

I've compiled and installed wireplumber 5.0 from source but it does not seem to have an effect on pavucontrol or gnome-settings.

wireplumber --version
wireplumber
Compiled with libwireplumber 0.5.0
Linked with libwireplumber 0.5.0

In the dropdown it only has ... Controller Pro 31
image

The aplay /usr/share/sounds/alsa/* command sometimes results in clear and sometimes distorted (tinny) audio.

image

@moritz89
Copy link
Author

@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).

@charleskeepax
Copy link

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.

@moritz89
Copy link
Author

moritz89 commented Mar 27, 2024

@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.

curl -L -o alsa-ucm-conf.tar.gz https://github.com/alsa-project/alsa-ucm-conf/archive/refs/heads/master.tar.gz
tar xvzf alsa-ucm-conf.tar.gz -C /usr/share/alsa --strip-components=1 --wildcards "*/ucm" "*/ucm2"

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.

image

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:

[  215.089659]  SDW0-Playback-SimpleJack: ASoC: error at snd_soc_link_prepare on SDW0-Playback-SimpleJack: -22
[  215.091216] soundwire sdw-master-0-0: Program transport params failed: -22
[  215.091219] soundwire sdw-master-0-0: Program params failed: -22
[  215.091220]  SDW0-Capture-SimpleJack: ASoC: error at snd_soc_link_prepare on SDW0-Capture-SimpleJack: -22
[  215.097883] soundwire sdw-master-0-0: Program transport params failed: -22
[  215.097885] soundwire sdw-master-0-0: Program params failed: -22
[  215.097886]  SDW0-Playback-SimpleJack: ASoC: error at snd_soc_link_prepare on SDW0-Playback-SimpleJack: -22
[  215.106468] soundwire sdw-master-0-0: Program transport params failed: -22
[  215.106469] soundwire sdw-master-0-0: Program params failed: -22

@charleskeepax
Copy link

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:

      dpn_prop = sdw_get_slave_dpn_prop(s_rt->slave,
                                         s_rt->direction,
                                         t_params->port_num);
       if (!dpn_prop)
               return -EINVAL;

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?

@moritz89
Copy link
Author

Compiling the kernel is a bit too involved, but I found that I could access all dmesg (kernel logs) via journalctl -k.

journalctl.txt

@charleskeepax
Copy link

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.

@moritz89
Copy link
Author

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?

@plbossart
Copy link
Member

see comments above #4879 (comment), you need an updated set of UCM files

@mikeKulasinski
Copy link

Amazing. Thank you very much for help. Worked like a charm.

@yvesh1123
Copy link

@vinassefranche
Hey can you please explain shortly how to build and install the 6.9.0-rc5 kernel?
I have the same issue, and nothing works for days.
thank you in advance :)

@plbossart
Copy link
Member

@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.

@yvesh1123
Copy link

@plbossart Hey thanks for the fast reply!
My linux is ubuntu 24.04 running with kernel 6.8.0 ( Dell XPS 16), facing the same issue.
I'll go on now and attempt the guide i think it suits ubuntu.
i'm new-ish to linux i hope i getit :)

@phit
Copy link

phit commented May 9, 2024

on ubuntu you can use mainline to easily switch to RC kernel versions

@yvesh1123
Copy link

@phit latest kernel on mainline is 6.8.8 and not 6.9.0-rc5

image

@phit
Copy link

phit commented May 9, 2024

check the settings

@yvesh1123
Copy link

@phit i love you :D i'm trying

@yvesh1123
Copy link

yvesh1123 commented May 9, 2024

@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
[ 17.334743] sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[ 17.334757] sof-audio-pci-intel-mtl 0000:00:1f.3: enabling device (0000 -> 0002)
[ 17.334938] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 18.093309] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 18.100928] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
[ 18.116060] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
[ 18.116926] sof-audio-pci-intel-mtl 0000:00:1f.3: Invalid firmware magic: 0x65746e69
[ 18.116933] sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
[ 18.116935] sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
[ 18.116935] sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
[ 18.116937] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
[ 18.116938] sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ace-tplg/sof-mtl-cs42l43-l0-cs35l56-l23.tplg
[ 18.116939] sof-audio-pci-intel-mtl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
[ 18.116940] sof-audio-pci-intel-mtl 0000:00:1f.3: Optionally it can be manually downloaded from:
[ 18.116941] sof-audio-pci-intel-mtl 0000:00:1f.3: https://github.com/thesofproject/sof-bin/
[ 18.116970] sof-audio-pci-intel-mtl 0000:00:1f.3: Direct firmware load for (null)/(null) failed with error -2
[ 18.116972] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof firmware file is missing, you might need to
[ 18.116973] sof-audio-pci-intel-mtl 0000:00:1f.3: download it from https://github.com/thesofproject/sof-bin/
[ 18.116974] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to load DSP firmware -2
[ 18.617306] Modules linked in: snd_soc_cs35l56_sdw snd_soc_cs35l56 snd_soc_wm_adsp snd_soc_rt711_sdca snd_soc_cs35l56_shared regmap_sdw_mbq snd_hda_codec_hdmi cs42l43_sdw snd_soc_cs_amp_lib regmap_sdw cs_dsp cs42l43 snd_soc_dmic qrtr cmac algif_hash algif_skcipher af_alg bnep snd_sof_pci_intel_mtl snd_sof_intel_hda_common soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core ivsc_csi snd_soc_acpi_intel_match v4l2_fwnode soundwire_generic_allocation v4l2_async intel_uncore_frequency snd_soc_acpi intel_uncore_frequency_common iwlmvm r8153_ecm videodev soundwire_bus cdc_ether usbnet x86_pkg_temp_thermal mc ivsc_ace xe intel_powerclamp snd_soc_core snd_compress mac80211 ac97_bus snd_pcm_dmaengine drm_gpuvm coretemp drm_exec snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec gpu_sched kvm_intel drm_suballoc_helper r8152 snd_hda_core drm_ttm_helper mii ledtrig_audio binfmt_misc i915 mei_vsc snd_hwdep
[ 19.065587] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -2

Although I have the actual firmware at:
image
image

:(

@plbossart
Copy link
Member

I don't know what this means
[ 18.116926] sof-audio-pci-intel-mtl 0000:00:1f.3: Invalid firmware magic: 0x65746e69

Please make sure the sof-bin release is installed. Also get the topology from this comment
#4879 (comment)

@yvesh1123
Copy link

@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

@Maccchiatooo
Copy link

Maccchiatooo commented May 12, 2024

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!
https://alsa-project.org/db/?f=38576abecf88929b9f65978b78d744144a8769a7

@yvesh1123
Copy link

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
[ 20.209875] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 20.210015] sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[ 20.210029] sof-audio-pci-intel-mtl 0000:00:1f.3: enabling device (0000 -> 0002)
[ 20.210233] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 20.780718] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 20.787758] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
[ 20.801039] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4
[ 20.802720] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware paths/files for ipc type 1:
[ 20.802722] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
[ 20.802723] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware lib path: intel/sof-ipc4-lib/mtl
[ 20.802724] sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ace-tplg/sof-mtl-cs42l43-l0-cs35l56-l23.tplg
[ 20.803253] sof-audio-pci-intel-mtl 0000:00:1f.3: Loaded firmware library: ADSPFW, version: 2.9.0.1
[ 23.806843] sof-audio-pci-intel-mtl 0000:00:1f.3: hda_cl_copy_fw: timeout with rom_status_reg (0x180000) read
[ 23.806854] sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump start ]------------
[ 23.806856] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware download failed
[ 23.806858] sof-audio-pci-intel-mtl 0000:00:1f.3: fw_state: SOF_FW_BOOT_IN_PROGRESS (3)
[ 23.806863] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM status: 0xffffffff, ROM error: 0xffffffff
[ 23.806865] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM debug status: 0xd000000c, ROM debug error: 0x97
[ 23.806867] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM feature bit enabled
[ 23.806879] sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump end ]------------
[ 23.806914] sof-audio-pci-intel-mtl 0000:00:1f.3: Failed to start DSP
[ 23.806916] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to boot DSP firmware -110
[ 23.807142] Modules linked in: qrtr cmac algif_hash algif_skcipher af_alg bnep snd_soc_cs35l56_sdw snd_soc_cs35l56 snd_soc_wm_adsp snd_soc_cs35l56_shared snd_soc_cs_amp_lib snd_soc_rt711_sdca snd_hda_codec_hdmi cs42l43_sdw cs_dsp regmap_sdw_mbq regmap_sdw cs42l43 snd_soc_dmic snd_sof_pci_intel_mtl snd_sof_intel_hda_common soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match soundwire_generic_allocation snd_soc_acpi soundwire_bus intel_uncore_frequency intel_uncore_frequency_common snd_soc_core snd_compress x86_pkg_temp_thermal ac97_bus snd_pcm_dmaengine intel_powerclamp coretemp snd_hda_intel snd_intel_dspcfg iwlmvm r8153_ecm snd_intel_sdw_acpi kvm_intel cdc_ether snd_hda_codec usbnet mac80211 xe binfmt_misc snd_hda_core libarc4 kvm ledtrig_audio snd_hwdep snd_pcm crct10dif_pclmul polyval_clmulni btusb polyval_generic snd_seq_midi ghash_clmulni_intel snd_seq_midi_event sha256_ssse3
[ 29.857034] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -110

its so frustrating, i cannot connect to work meeting on my computer >:
Please help! will offer my endless gratitude and love.

Thanks, Yves.H

@Maccchiatooo
Copy link

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 [ 20.209875] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380 [ 20.210015] sof-audio-pci-intel-mtl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver [ 20.210029] sof-audio-pci-intel-mtl 0000:00:1f.3: enabling device (0000 -> 0002) [ 20.210233] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380 [ 20.780718] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) [ 20.787758] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode [ 20.801039] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 4 [ 20.802720] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware paths/files for ipc type 1: [ 20.802722] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri [ 20.802723] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware lib path: intel/sof-ipc4-lib/mtl [ 20.802724] sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ace-tplg/sof-mtl-cs42l43-l0-cs35l56-l23.tplg [ 20.803253] sof-audio-pci-intel-mtl 0000:00:1f.3: Loaded firmware library: ADSPFW, version: 2.9.0.1 [ 23.806843] sof-audio-pci-intel-mtl 0000:00:1f.3: hda_cl_copy_fw: timeout with rom_status_reg (0x180000) read [ 23.806854] sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump start ]------------ [ 23.806856] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware download failed [ 23.806858] sof-audio-pci-intel-mtl 0000:00:1f.3: fw_state: SOF_FW_BOOT_IN_PROGRESS (3) [ 23.806863] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM status: 0xffffffff, ROM error: 0xffffffff [ 23.806865] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM debug status: 0xd000000c, ROM debug error: 0x97 [ 23.806867] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM feature bit enabled [ 23.806879] sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump end ]------------ [ 23.806914] sof-audio-pci-intel-mtl 0000:00:1f.3: Failed to start DSP [ 23.806916] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to boot DSP firmware -110 [ 23.807142] Modules linked in: qrtr cmac algif_hash algif_skcipher af_alg bnep snd_soc_cs35l56_sdw snd_soc_cs35l56 snd_soc_wm_adsp snd_soc_cs35l56_shared snd_soc_cs_amp_lib snd_soc_rt711_sdca snd_hda_codec_hdmi cs42l43_sdw cs_dsp regmap_sdw_mbq regmap_sdw cs42l43 snd_soc_dmic snd_sof_pci_intel_mtl snd_sof_intel_hda_common soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match soundwire_generic_allocation snd_soc_acpi soundwire_bus intel_uncore_frequency intel_uncore_frequency_common snd_soc_core snd_compress x86_pkg_temp_thermal ac97_bus snd_pcm_dmaengine intel_powerclamp coretemp snd_hda_intel snd_intel_dspcfg iwlmvm r8153_ecm snd_intel_sdw_acpi kvm_intel cdc_ether snd_hda_codec usbnet mac80211 xe binfmt_misc snd_hda_core libarc4 kvm ledtrig_audio snd_hwdep snd_pcm crct10dif_pclmul polyval_clmulni btusb polyval_generic snd_seq_midi ghash_clmulni_intel snd_seq_midi_event sha256_ssse3 [ 29.857034] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -110
ing on my computer >: Please help! will offer my endless gratitude and love.

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:

[   15.661676] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   15.661943] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[   15.761140] snd_hda_codec_generic hdaudioC0D2: autoconfig for Generic: line_outs=0 (0x0/0x0/0x0/0x0/0x0) type:line
[   15.761164] snd_hda_codec_generic hdaudioC0D2:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   15.761169] snd_hda_codec_generic hdaudioC0D2:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   15.761173] snd_hda_codec_generic hdaudioC0D2:    mono: mono_out=0x0
[   15.761176] snd_hda_codec_generic hdaudioC0D2:    dig-out=0x4/0x0
[   15.761179] snd_hda_codec_generic hdaudioC0D2:    inputs:

@plbossart
Copy link
Member

[ 20.803253] sof-audio-pci-intel-mtl 0000:00:1f.3: Loaded firmware library: ADSPFW, version: 2.9.0.1
[ 23.806843] sof-audio-pci-intel-mtl 0000:00:1f.3: hda_cl_copy_fw: timeout with rom_status_reg (0x180000) read
[ 23.806854] sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump start ]------------
[ 23.806856] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware download failed
[ 23.806858] sof-audio-pci-intel-mtl 0000:00:1f.3: fw_state: SOF_FW_BOOT_IN_PROGRESS (3)
[ 23.806863] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM status: 0xffffffff, ROM error: 0xffffffff
[ 23.806865] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM debug status: 0xd000000c, ROM debug error: 0x97
[ 23.806867] sof-audio-pci-intel-mtl 0000:00:1f.3: ROM feature bit enabled

@yvesh1123 Can you show the result of 'ls -l /lib/firmware/intel/sof-ipc4/mtl/sof-mtl.ri'? (or .ri.zst if compressed)
In theory it should point to the intel-signed directory. If not, you will have a firmware authentication failure.

@yvesh1123
Copy link

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
-rw-r--r-- 1 root root 887352 May 12 11:54 /lib/firmware/intel/sof-ipc4/mtl/sof-mtl.ri

@plbossart
Copy link
Member

@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:

/lib/firmware/intel/sof-ipc4/mtl$ ls -l sof-mtl.ri.zst 
lrwxrwxrwx 1 root root 27 Nov 15 09:32 sof-mtl.ri.zst -> intel-signed/sof-mtl.ri.zst

Re-install sof-bin with the install script...

@yvesh1123
Copy link

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

  • ln -s --no-target-directory sof-ipc4-v2.9 /lib/firmware/intel/sof-ipc4
  • ln -s --no-target-directory sof-ipc4-tplg-v2.9 /lib/firmware/intel/sof-ipc4-tplg
  • ln -s --no-target-directory sof-ace-tplg-v2.9 /lib/firmware/intel/sof-ace-tplg

that solved it!

image

thank you so much.
for those reading this and having the same issue:

update kernel to 6.9.0-rc5 and use the install script is all i did. hope it helps anyone

@Maccchiatooo
Copy link

Mine works now.

Procedure is,
1 upgrade to kernel 6.9.
2 reinstall sof-bin.
3 install UCM.
4 Shut down your laptop, but not easily restart.
5 Please make sure you do all of above things at the first time you install 24.04.
6 When I did research, it seems that sound is back for 24.04, xps16. but, camera is not working. And someone is working to solve it!

@yvesh1123
Copy link

@Maccchiatooo i'm having a camera issue also, can you link the issue here please so i can stay updated on it.

@Maccchiatooo
Copy link

Maccchiatooo commented May 13, 2024

@Maccchiatooo i'm having a camera issue also, can you link the issue here please so i can stay updated on it.
see this:
https://www.reddit.com/r/DellXPS/comments/1b9ddhz/does_the_xps_16_intel_ultra_7_support_linux/

@alexhulbert
Copy link

alexhulbert commented May 14, 2024

@Maccchiatooo i'm having a camera issue also, can you link the issue here please so i can stay updated on it.
see this:
https://www.reddit.com/r/DellXPS/comments/1b9ddhz/does_the_xps_16_intel_ultra_7_support_linux/

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:

https://github.com/stefanpartheym/archlinux-ipu6-webcam

@charleskeepax
Copy link

@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.

@vinassefranche
Copy link

@charleskeepax so cool! Sorry for now answering before, I don't know why I did not receive the notification email.
I'll wait for the next kernel versions I think. I'll confirm here when I have it.
Thanks a lot for the effort anyway!

@sygi
Copy link

sygi commented Sep 13, 2024

Hello from the future!
I tested the suggestions from this thread in 6.10.10. and they don't seem to work. When I moved back to 6.9.12, I started to see the hardware devices:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofsoundwire [sof-soundwire], device 0: Jack Out (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 2: Speaker (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 5: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 6: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 7: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 31: Deepbuffer Jack Out (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0

but I only managed to make one of them (2: speaker) to actually produce sound. I also observed that with options snd-intel-dspcfg dsp_driver=1, I was able to make HDMI sound work but nothing else.

@winsvega
Copy link

winsvega commented Oct 1, 2024

Thanks for hinting which version of sof and kernel to use but that alone was not enough

the solution for me was:

  1. install mainline
udo add-apt-repository ppa:cappelikan/ppa
sudo apt update && sudo apt upgrade -y
sudo apt install -y mainline

kernel for sound 6.9.12

  1. isntall sound driver over systems (remove the system ones)
sudo rm -r /lib/firmware/intel/sof-ipc4-tplg
sudo rm -r /lib/firmware/intel/sof-ace-tplg
sudo rm -r /lib/firmware/intel/sof-ipc4

git clone https://github.com/thesofproject/sof-bin
sudo ./install.sh v2.9.x/v2.9 (make sure it prints links are created)
cp -r tools-v2.9/ /usr/local/bin/
  1. install sound codecs
sudo apt-get install ubuntu-restricted-extras

use pavucontrol to enable sound driver in config tab

pactl list short sinks

set second from the list as default

pactl set-default-sink alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-2
  1. debug issues with chat gpt, but don't reinstall packages if it suggest so
journalctl --user -xe | grep pipewire
sudo dmesg | grep snd
sudo dmesg | grep pipewire
sudo dmesg | grep sof
sudo dmesg | grep audio
  1. maybe not needed but I edit
gedit /usr/share/pipewire/pipewire.conf
    default.clock.rate = 44100
    default.clock.allowed-rates = [ 44100, 48000 ]

@ilmonk
Copy link

ilmonk commented Oct 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SDW Applies to SoundWire bus for codec connection
Projects
None yet
Development

No branches or pull requests