Start a Conversation

Solved!

Go to Solution

1 Rookie

 • 

1 Message

1870

December 11th, 2023 17:59

XPS 9530 Firmware bug prevents releasing audio fix for Linux devices

Hi,

As you may be familiar, when running Linux on XPS 9530 series, audio is horrible. This is because only two tweeters (top firing speakers) work, while woofers (down firing speakers) which provide the most volume, and bass do not. Me and fellow XPS users have worked hard to add support for this, (see github thread, and discord server), and managed to make it work!

Background info:

Bottom speakers are connected via active amplifier by Cirrus Logic, which requires to be properly initialized, and loaded firmware. There are multiple patches to Linux kernel required for this (quirk was added, missing properties patch is ready but not published yet, see below) , as well as addition of Cirrus amp firmware (PR pending).

With all of these changes applied, all 4 speakers are finally working on Linux, sound is significantly louder, and there is finally some bass.

Problem:
Communication with Cirrus amp is happening over SPI, and is meant to be at 4Mhz. However, in present state, the process of firmware loading to amplifier takes ~3 minutes. During first boot during this 3 minutes, sound is extremely buggy. Even worse, upon wake up, system is completely unavailable for the same 3 minutes. It appears reason is, SPI speed is capped at 3051Hz, due to the bug in Dell Firmware (UEFI): one of registers incorrectly sets required clock divider  parameters to 0x7FFF0003; This value is picked by `intel-lpss.c` driver, which enables divider with ratio of 1/32767. As source clock is 100Mhz, diving it by 32767 results in unusable rate of 3051Hz, and bug described above.

Due to this issue, we are unable to propose sound fixing patch upstream. Solution for this is to either:
a) Create bypass in `intel-lpss.c` driver. I got in contact with Intel developer (Andy Shevchenko) and was pointed out that this is indeed a firmware bug, and normally shall be solved in firmware. Me and fellow XPS users have locally tested patch which conditionally disables clock divider in intel lpss driver, and it fixed slow firmware loading, everything works flawlessly.

b) Dell to release UEFI BIOS update, with corrected value: 0x7FFF0003 shall become 0. As also confirmed by Andy Shevchenko, Intel Lpss is currently not using clock divider for SPI mode, and thus Dell's firmware should absolutely not attempt to enable this divider. I have tested a patch that forcefully sets 0x7FFF0003 to 0, and it also works perfectly, SPI is able to operate at requested speed of 4Mhz, and with above mentioned patches all 4 speakers perfectly work on this machine.

There are more bugs in Dell firmware, eg. ACPI tables are missing SPI's chip select pins definitions for right amplifier, as well as device specific properties. All these however can be set with a simpler kernel patch (linked above), and are awaiting to be upstreamed once SPI speed issue is resolved.

It seems that on Windows, custom Realtek driver handles both the missing _DSD properties, as well as wrongly configured intel's lpss clock divider.

On behalf of all Linux users and fans of Dell XPS 9530 series, I thus kindly request Dell to look into this issue, and correct this firmware bug. I also ask all fellow XPS 9530 users to like this post, as indication for Dell moderators of how many people are affected by this issue.

This is an amazing machine, and even though Dell officially does not support Linux on it, a lot of use it as one of the best devices in the industry. We have already done enormous work to get sound fix by means of community, however it seems for particular issue, there is really required an input from Dell's officials.

Thank you in advance,
Kind Regards,

Alex Vinarskis (and others rest of XPS 9530 users)


UPDATE: As it seems Dell does not consider this an issue to be fixed, appropriate change was submitted to Linux kernel (patch1, patch2) which shall ignore BIOS's set parameters for SPI clock speed. This change is expected to arrive in kernel 6.9. If/When that takes place, it can potentially be backported to stable kernel (6.7.X). Since this is still months out, current solution is to manually apply required patches, as per this guide. With these changes, SPI and thus sound system works as expected.

1 Rookie

 • 

1 Message

June 10th, 2024 16:44

Hi Alex,

Thank you for your detailed explanation and hard work on this issue. To summarize:

The audio issue on the XPS 9530 when running Linux is due to a firmware bug affecting SPI speed. The current workaround involves manual patches to the Linux kernel and firmware.

We request Dell to release a UEFI BIOS update to correct the clock divider parameters, enabling SPI to operate at the required 4MHz. This would allow all four speakers to function correctly and significantly improve sound quality.

Thank you for your attention and support.

Kind regards,
Alex Vinarskis and fellow XPS 9530 users

Lightroom for PC

1 Rookie

 • 

1 Message

June 14th, 2024 12:18

Great news! Dell has released BIOS version 1.9, which includes the Thermal Management feature in Dell Power Manager application version 3.0. This update addresses long-standing thermal issues following widespread user feedback and complaints. Thank you to everyone who contributed across various platforms to ensure Dell heard our concerns and took action.

No Events found!

Top