Dell XPS 9530 (15", 2023 model) comes with 4 speakers: two up firing tweeters, and two down firing woofers. Upper speakers are connected directly to audio codec, while bottom ones are powered by Cirrus CS35L41 smart amplifiers.
On Linux, only two upper speakers worked, enabling bottom ones requires extra steps. Since most of volume comes from bottom speakers, without them speakers are essentially worthless.
Reason for lack of support out of the box was as following:
- Cirrus amp requires correct parameter to operate, which typicall shall be part of BIOS's ACPI tables in the form of _DSD (Device specific data). For particalar model these were missing. A patch is required to add them to directly in Cirrus's kernel driver.
- Cirrus amp requires firmware and tuning files to operate. These are not part of Linux kernel, and shall be loaded from userspace. These can be (unoficially) extracted from Windows Realtek audio driver, or (officially) added to
linux-firmware
repository by Cirrus developers. - Particularly XPS 9530 experiences a BIOS firmware bug, which misconfigures Intel Lpss subsystem to use incorrect clock rates. This results in hugely capped SPI speed (3051Hz, instead of required 4Mhz), which makes firmware loading (which takes place on boot and on wake up from suspend) to take just over 3 minutes. During this 3 minutes anything sound related is not really operational. Morevover, during wake up from suspend, device will not resume operation but will be stuck with black screen for the said duration. A patch to Intel Lpss driver is required to conditionally disable incorrecrtly configured clock divider for particular model, since its unlikely that Dell will ever fix it in their firmware.
There are a number of independent fixes required to make speakers work. Details can be found in Guide section, here is latest status of each one:
- Amplifier's Firmware and Tunings were merged to
linux-firmware
upstream, available from tag20240115
onwards. For Arch users it is already in aur repositories. For Ubuntu users, it is not yet, but can be downloaded as debian package from here. - Quirk to enable woofers and Cirrus amp loading was merged to
sound
subsystem and to kernel upstream, available from tag6.7
onwards. - Missing _DSD properties fix and safety guard against too slow SPI speed were merged (1, 2) to
sound
subsystem and to kernel upstream, available from tag6.8
onwards. Was later backported to6.7.1
. - Intel Lpss patch was merged (1, 2) to kernel upstream. Landing with
6.9
release.
Projection: Sounds will be fully operation out-of-the-box from kernel 6.9
onwards. Backport to 6.8.y
(link) and 6.7.y
(link) were submitted, but not reviewed/accepted yet.
Optional, but highly recommended equilizer changes are (and always will be required) to be added manually. See Post Installation
for more for more info.
- Github issue, a lot of development took place here
- Dell Discord server, most of development took place here
- Bugzilla link
- Asus CS35L41 thread, based on which patches for particalur model were possible.
- Asus sound patching guide, based on which patches for particalur model were possible.
I have compiled 6.7
kernel with backported Intel Lpss patch. Installing this kernel (provided that you have correct version of linux-firmware
installed) will automatically fix your sound. Please note its highly recommended to compile your own kernel, both for compatibility and security reasons. If you still decide to use ready solution instead, install all of these packages with sudo dpkg -i packageNameHere.deb anotherPackageHere.deb....
:
Reboot, make sure you are running kernel version 6.7.0-xps9530-sound
. Equalizer guide (see below) still applies, as it will never be included in the kernel.
In order to apply patches:
- Download kernel from source, Git or tarball.
- Copy your current .config for simplicity.
- Make sure you can build the kernel as is.
- Apply required patches. This can be done by running
git apply path_to_file/name_of_file.patch
inside of kernel root folder. - Rebuild the kernel with patches applied.
- Install the kernel. Make sure to update boot prefernce (In case of ubuntu this is done in Grub). Make sure to boot from newly modified kernel.
A lot/most of steps described here were automated with scripts to automatically download/patch/build/install modified kernel. These are conditioned on distro and kernel version being used, thus will not be added here. They can be found in Discord/Github discussion threads.
- Add amplifier firmware and tuning files either manually (see below) or by getting
linux-firmware
package version20240115
or newer. - Apply Intel Lpss patch to unblock capped SPI speed. Patch was submitted here, however, due to selective backporting of patches to stable, will not apply cleanly. A pseudo-backport of the patch is attached in this gist as
mfd-intel-lpss-v4-backport.patch
.
Rest of patches were merged to stable.
- Add amplifier firmware and tuning files either manually (see below) or by getting
linux-firmware
package version20240115
or newer. - Apply Intel Lpss patch to unblock capped SPI speed. Patch was submitted here, or attached in this gist as
mfd-intel-lpss-v4.patch
.
Rest of patches were merged to mainline.
For those patching kernel source of version 6.7:
- Add amplifier firmware and tuning files either manually (see below) or by getting
linux-firmware
package version20240115
or newer. - Cirrus has alterened framework for adding missing _DSD, which makes it significantly easier. However, commit adding _DSD for 9530 was not merged until early 6.8. You should apply these (1, 2) patches manually, or cherry-pick them.
- Apply Intel Lpss patch to unblock capped SPI speed. Patch was submitted here, or attached in this gist as
mfd-intel-lpss-v4.patch
.
Before 6.7, Cirrus used slightly different framework for adding missing _DSD, so different patch is required.
- Add amplifier firmware and tuning files. Cirrus developers have added these to
linux-firmware
in this commit. If you do not get this update yet, you can manually add these files to respective folders in/lib/firmware/cirrus...
. Only files with..10280beb..
in the name are required for XPS 9530.2 - Apply older patch adding the same missing _DSD, just in different format. Patch was submitted here, or attached in this gist as
ALSA-hda-cs35l41-Dell-Fiorano-add-missing-_DSD-CS.patch
. - Apply patch to enable audio output to woofers, and Cirrus SPI modules loading. Patch was submitted here, or attached in this gist as
ALSA-hda-realtek-fix-speakers-on-XPS-9530-2023.patch
. - Apply Intel Lpss patch to unblock capped SPI speed. Patch was submitted here, or attached in this gist as
mfd-intel-lpss-v4.patch
. It may not apply cleanly, as some intermediate changes were merged. In that case, add changes manually, its pretty straight forward.
Most of development work and debugging takes/took place on Discord server, and some of it on the github issue thread, both links added above. Please do not use this this gist for debugging discussions, it is here to serve as a top level summary. All the questions can be asked on Discord server. These changes was tested on multiple XPS 9530 devices, on kernels 6.6...6.8, for months, and is known to work.
Above changes, once merged to mainline kernel will enable subwoofers audio output on Dell XPS 9530 out of the box. With default tuning files from Cirrus, sound is incredebely loud, however quality is far from awesome compared to Windows: there is additional cracking, vibrations due to resonance etc.
Thus, its highly recommended to apply equlizer tunning: @DanShaders has made a tuning table for Pipewire based on band-wise comparison between Windows and Linux playback. Adding proposed changes makes sound extremely close to (in my opinion, the same as) sound on Windows. Max volume is slightly lower than without this change, however sound clarity and surround effect is much higher, most of cracking and vibration is gone, just like on Windows.
To do so, add contents of this file to ~/.config/pipewire/pipewire.conf.d/sink-eq6.conf
, and run systemctl --user restart pipewire && wpctl set-default internal_speaker
once.
More details in original comment.
- Everyone participating in development and debugging of these patches both on Github issue thread and Discord server.
- Andy Shevchenko for his help with Intel Lpss patch.
- @DanShaders for equalizer tuning.
Thanks to you and everyone that got these patches together. Dell's response in their forums was so disappointing, but the open source community's perseverance is amazing. Just wanted to say thanks.