aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2024-01-05 15:05:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2024-01-08 12:53:33 +0000
commita868aca1a2eb32f93321ddead50e6f00e477b334 (patch)
tree834b7db7d08dadc49d68951f1cb3bf32b16f9786
parentb4bde8287eeb9bf4ab13a2fa7de79e9328824e4a (diff)
main/eudev: add patch to fix pipewire on asahi kernels
pick upstream patch from: https://github.com/eudev-project/eudev/pull/271 Explanation from patch: Pipewire requires ID_PATH to use the same device names as with systemd's udev. Some rules, such as the ones in asahi-audio [1] use those names, and fail if they don't match
-rw-r--r--main/eudev/78-sound-card.rules_Import_ID_PATH_early.patch42
-rw-r--r--main/eudev/APKBUILD4
2 files changed, 45 insertions, 1 deletions
diff --git a/main/eudev/78-sound-card.rules_Import_ID_PATH_early.patch b/main/eudev/78-sound-card.rules_Import_ID_PATH_early.patch
new file mode 100644
index 00000000000..d17fac07766
--- /dev/null
+++ b/main/eudev/78-sound-card.rules_Import_ID_PATH_early.patch
@@ -0,0 +1,42 @@
+From 917ae648f61681257000c3a1f0aca3fbd646563a Mon Sep 17 00:00:00 2001
+From: Johannes Nixdorf <mixi@shadowice.org>
+Date: Fri, 22 Dec 2023 10:27:08 +0100
+Subject: [PATCH] 78-sound-card.rules: Import ID_PATH early
+
+Pipewire requires ID_PATH to use the same device names as with systemd's
+udev. Some rules, such as the ones in asahi-audio [1] use those names, and
+fail if they don't match [2].
+
+On systemd's udev this is instead imported in 71-seat.rules, which we don't
+have.
+
+[1]: https://github.com/AsahiLinux/asahi-audio
+[2]: https://github.com/AsahiLinux/asahi-audio/issues/16
+
+Signed-off-by: Johannes Nixdorf <mixi@shadowice.org>
+---
+ rules/78-sound-card.rules | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rules/78-sound-card.rules b/rules/78-sound-card.rules
+index f2fc27739..c49bd1d4e 100644
+--- a/rules/78-sound-card.rules
++++ b/rules/78-sound-card.rules
+@@ -38,6 +38,8 @@ KERNEL!="card*", GOTO="sound_end"
+ ENV{SOUND_INITIALIZED}="1"
+
+ IMPORT{builtin}="hwdb"
++IMPORT{builtin}="path_id"
++
+ SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
+ SUBSYSTEMS=="usb", GOTO="skip_pci"
+
+@@ -62,8 +64,6 @@ LABEL="skip_pci"
+ ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}"
+ ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}"
+
+-IMPORT{builtin}="path_id"
+-
+ # The values used here for $SOUND_FORM_FACTOR and $SOUND_CLASS should be kept
+ # in sync with those defined for PulseAudio's src/pulse/proplist.h
+ # PA_PROP_DEVICE_FORM_FACTOR, PA_PROP_DEVICE_CLASS properties.
diff --git a/main/eudev/APKBUILD b/main/eudev/APKBUILD
index c40c13b857d..9888c38364c 100644
--- a/main/eudev/APKBUILD
+++ b/main/eudev/APKBUILD
@@ -4,7 +4,7 @@
pkgname=eudev
pkgver=3.2.14
_pkgver=${pkgver/_pre/-pre}
-pkgrel=0
+pkgrel=1
pkgdesc="init system agnostic fork of systemd-udev"
url="https://github.com/eudev-project/eudev"
arch="all"
@@ -29,6 +29,7 @@ source="https://github.com/eudev-project/eudev/releases/download/v$_pkgver/eudev
default-rules.patch
load-fbcon.patch
no-sgx.patch
+ 78-sound-card.rules_Import_ID_PATH_early.patch
udev-postmount.initd
"
builddir="$srcdir"/"$pkgname"-"$_pkgver"
@@ -119,5 +120,6 @@ sha512sums="
683e3c26ca4f058303f8db7d4977e436d728386ee6866719c4f11ff31db27572d3f486f51d3173310e1ec2cf995fa4c396f2415bdf45dabdd80e6e55e798a314 default-rules.patch
ff5928fd555e095d9f3234dd004ac4c5925405d308777e9b018e8e03112cd109935b51d75a3bc4a2a1018eb486e8a5e5ef6ee978860002a8fff93b116e9721f5 load-fbcon.patch
1558800e4132ed2c10b37805fca044ff3129cdfebec71d3e758143fab9ffda824e86d52960926a9042b21fc22f0cda8fe6690484913bd7c3dc4436af92923efe no-sgx.patch
+8872f124267485d682dea9c7c47aaa8c228aadef90981c430af7ca7f7025b344d2c3c07c653241190a3f44096aa1d3aff990dd05210f5b278d999d6fede659b5 78-sound-card.rules_Import_ID_PATH_early.patch
8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88 udev-postmount.initd
"