Add Dell XPS 13 sidecar amp workaround
This commit is contained in:
6 files changed
+147
No files matched your search
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"source": "local"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Spencer Bull
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,32 @@
|
||||
# Maintainer: Spencer Bull <spencerbull2554@gmail.com>
|
||||
|
||||
pkgname=dell-xps13-sidecar-amps
|
||||
pkgver=1.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Temporary sidecar speaker amplifier enablement for the Dell XPS 13 DX13260"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/omacom-io/omarchy-pkgs"
|
||||
license=('MIT')
|
||||
depends=('kmod' 'mkinitcpio')
|
||||
optdepends=('limine-mkinitcpio-hook: rebuild Limine Unified Kernel Images')
|
||||
install=dell-xps13-sidecar-amps.install
|
||||
options=('!debug')
|
||||
source=(
|
||||
'dell-xps13-sidecar-amps.conf'
|
||||
'dell-xps13-sidecar-amps.install'
|
||||
'LICENSE'
|
||||
'README.md'
|
||||
)
|
||||
sha256sums=('dcef05d30c15b70943e621325d813980894c4c9d646aafe645e73e194f47f9d7'
|
||||
'69d054e8e156c3449b53a972cde429216bad17841c6937228106ba2102b29e14'
|
||||
'fd9348252dda847b9b4c19e44c5ab101098c7d0470c2238857ce1e14bb63207b'
|
||||
'95553269a76775ab28d5f376ed0f5daed06fe094e2b4357928f6bebab7731e97')
|
||||
|
||||
package() {
|
||||
install -Dm644 dell-xps13-sidecar-amps.conf \
|
||||
"${pkgdir}/usr/lib/modprobe.d/dell-xps13-sidecar-amps.conf"
|
||||
install -Dm644 LICENSE \
|
||||
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
install -Dm644 README.md \
|
||||
"${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# Dell XPS 13 sidecar speaker amplifiers
|
||||
|
||||
This temporary package enables the two CS35L56 sidecar speaker amplifiers on
|
||||
the Dell XPS 13 DX13260 with PCI subsystem ID `1028:0e53`.
|
||||
|
||||
Linux commit
|
||||
[`efd80de2de9d`](https://github.com/torvalds/linux/commit/efd80de2de9d06ddf0eee55ca11b04e39bfc7cd8)
|
||||
adds this machine to the `snd_soc_sof_sdw` PCI quirk table with
|
||||
`SOC_SDW_SIDECAR_AMPS`. That commit first appears in Linux 7.2-rc5. Until the
|
||||
Arch kernel ships it, this package selects the equivalent existing driver path
|
||||
with the module's `quirk=65536` override.
|
||||
|
||||
The package does not replace the kernel, audio firmware, or speaker tuning. It
|
||||
owns only a modprobe drop-in and rebuilds the boot images when installed,
|
||||
upgraded, or removed.
|
||||
|
||||
## Removal
|
||||
|
||||
Once every kernel you intend to boot contains the upstream commit, remove the
|
||||
workaround and reboot:
|
||||
|
||||
```bash
|
||||
sudo pacman -Rns dell-xps13-sidecar-amps
|
||||
systemctl reboot
|
||||
```
|
||||
|
||||
Removing the package deletes its modprobe drop-in and rebuilds the boot images,
|
||||
so no temporary override remains embedded in the initramfs or Limine UKIs.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Temporary workaround for Dell XPS 13 DX13260 subsystem 1028:0e53.
|
||||
# Remove this package once every bootable kernel contains Linux efd80de2de9d.
|
||||
options snd_soc_sof_sdw quirk=65536
|
||||
@@ -0,0 +1,60 @@
|
||||
_legacy_override="/etc/modprobe.d/dell-xps13-dx13260-sidecar-amps.conf"
|
||||
_legacy_sha256="97f36bce41581ecc6b1d7963cd0dab29c7b1a107b2dd4d17db7a56094a7b7289"
|
||||
|
||||
_remove_legacy_override() {
|
||||
local actual_sha256 hash_output
|
||||
|
||||
[ -f "$_legacy_override" ] || return 0
|
||||
if ! hash_output=$(sha256sum "$_legacy_override"); then
|
||||
printf ':: Unable to hash legacy override: %s\n' "$_legacy_override" >&2
|
||||
return 1
|
||||
fi
|
||||
actual_sha256=${hash_output%% *}
|
||||
|
||||
if [ "$actual_sha256" = "$_legacy_sha256" ]; then
|
||||
if ! rm -f -- "$_legacy_override"; then
|
||||
printf ':: Unable to remove legacy override: %s\n' "$_legacy_override" >&2
|
||||
return 1
|
||||
fi
|
||||
printf ':: Removed the superseded Dell XPS 13 sidecar amplifier override.\n'
|
||||
else
|
||||
printf ':: Preserving modified legacy override: %s\n' "$_legacy_override"
|
||||
fi
|
||||
}
|
||||
|
||||
_rebuild_boot_images() {
|
||||
local output status
|
||||
|
||||
if command -v limine-mkinitcpio >/dev/null 2>&1; then
|
||||
output=$(limine-mkinitcpio 2>&1)
|
||||
status=$?
|
||||
[ -z "$output" ] || printf '%s\n' "$output"
|
||||
|
||||
[ "$status" -eq 0 ] || return "$status"
|
||||
case "$output" in
|
||||
*"ERROR:"*) return 1 ;;
|
||||
esac
|
||||
elif command -v mkinitcpio >/dev/null 2>&1; then
|
||||
mkinitcpio -P
|
||||
else
|
||||
printf ':: Unable to rebuild boot images: install mkinitcpio and rebuild before rebooting.\n' >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
_remove_legacy_override || return
|
||||
_rebuild_boot_images || return
|
||||
printf ':: Reboot to enable the Dell XPS 13 sidecar speaker amplifiers.\n'
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
_remove_legacy_override || return
|
||||
_rebuild_boot_images || return
|
||||
printf ':: Reboot to apply the Dell XPS 13 sidecar amplifier update.\n'
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
_rebuild_boot_images || return
|
||||
printf ':: Reboot to finish removing the Dell XPS 13 sidecar amplifier workaround.\n'
|
||||
}
|
||||
Reference in new issue
Block a user