summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>2022-04-21 21:02:38 +0300
committerSam James <sam@gentoo.org>2022-04-21 22:57:00 +0100
commitdbd15d4f2887fa9bd30a88ae68e77d23f0835928 (patch)
treea3f7a5227578e2e29f58e7c5c5b1493b184abeb0 /media-video/wireplumber/files
parentkde-apps/eventviews: add kde-frameworks/kholiday dep (diff)
downloadgentoo-dbd15d4f2887fa9bd30a88ae68e77d23f0835928.tar.gz
gentoo-dbd15d4f2887fa9bd30a88ae68e77d23f0835928.tar.bz2
gentoo-dbd15d4f2887fa9bd30a88ae68e77d23f0835928.zip
media-video/wireplumber: backport two minor fixes
The first fix deals with handling of device removal and is included for correctness sake, since it appears to be the right thing for WirePlumber to do. The second fix implements and documents D-Bus disabling for WirePlumber which must be done when attempting to run WirePlumber as a system service. This does not mean it's a recommended or even fully supported configuration but there's people who want it. And having it available should not cause any harm to other users. Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video/wireplumber/files')
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.9-config-document-which-options-need-to-be-turned-off-.patch87
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.9-scripts-policy-device-profile-clear-tables-when-devi.patch33
2 files changed, 120 insertions, 0 deletions
diff --git a/media-video/wireplumber/files/wireplumber-0.4.9-config-document-which-options-need-to-be-turned-off-.patch b/media-video/wireplumber/files/wireplumber-0.4.9-config-document-which-options-need-to-be-turned-off-.patch
new file mode 100644
index 000000000000..9e664ec56564
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.9-config-document-which-options-need-to-be-turned-off-.patch
@@ -0,0 +1,87 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/0da29f38181e391160fa8702623050b8544ec775
+
+From 0da29f38181e391160fa8702623050b8544ec775 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Mon, 4 Apr 2022 14:38:28 +0300
+Subject: [PATCH] config: document which options need to be turned off to use
+ wp without D-Bus
+
+and actually implement an option for the logind module
+
+Related to: #237
+---
+ src/config/bluetooth.lua.d/30-bluez-monitor.lua | 4 +++-
+ src/config/bluetooth.lua.d/50-bluez-config.lua | 8 ++++++++
+ src/config/main.lua.d/50-alsa-config.lua | 4 +++-
+ src/config/main.lua.d/50-default-access-config.lua | 3 +++
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/config/bluetooth.lua.d/30-bluez-monitor.lua b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
+index 266d3e2f..ba86657f 100644
+--- a/src/config/bluetooth.lua.d/30-bluez-monitor.lua
++++ b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
+@@ -8,5 +8,7 @@ function bluez_monitor.enable()
+ rules = bluez_monitor.rules,
+ })
+
+- load_optional_module("logind")
++ if bluez_monitor.properties["with-logind"] then
++ load_optional_module("logind")
++ end
+ end
+diff --git a/src/config/bluetooth.lua.d/50-bluez-config.lua b/src/config/bluetooth.lua.d/50-bluez-config.lua
+index 072504ec..dd8033ff 100644
+--- a/src/config/bluetooth.lua.d/50-bluez-config.lua
++++ b/src/config/bluetooth.lua.d/50-bluez-config.lua
+@@ -34,6 +34,14 @@ bluez_monitor.properties = {
+ -- Register dummy AVRCP player, required for AVRCP volume function.
+ -- Disable if you are running mpris-proxy or equivalent.
+ --["bluez5.dummy-avrcp-player"] = true,
++
++ -- Enable the logind module, which arbitrates which user will be allowed
++ -- to have bluetooth audio enabled at any given time (particularly useful
++ -- if you are using GDM as a display manager, as the gdm user also launches
++ -- pipewire and wireplumber).
++ -- This requires access to the D-Bus user session; disable if you are running
++ -- a system-wide instance of wireplumber.
++ ["with-logind"] = true,
+ }
+
+ bluez_monitor.rules = {
+diff --git a/src/config/main.lua.d/50-alsa-config.lua b/src/config/main.lua.d/50-alsa-config.lua
+index 6c97e8ad..d29b0b6f 100644
+--- a/src/config/main.lua.d/50-alsa-config.lua
++++ b/src/config/main.lua.d/50-alsa-config.lua
+@@ -7,6 +7,8 @@ alsa_monitor.properties = {
+ --["alsa.jack-device"] = false,
+
+ -- Reserve devices via org.freedesktop.ReserveDevice1 on D-Bus
++ -- Disable if you are running a system-wide instance, which
++ -- doesn't have access to the D-Bus user session
+ ["alsa.reserve"] = true,
+ --["alsa.reserve.priority"] = -20,
+ --["alsa.reserve.application-name"] = "WirePlumber",
+@@ -20,7 +22,7 @@ alsa_monitor.properties = {
+
+ alsa_monitor.rules = {
+ -- An array of matches/actions to evaluate.
+- --
++ --
+ -- If you want to disable some devices or nodes, you can apply properties per device as the following example.
+ -- The name can be found by running pw-cli ls Device, or pw-cli dump Device
+ --{
+diff --git a/src/config/main.lua.d/50-default-access-config.lua b/src/config/main.lua.d/50-default-access-config.lua
+index 6cf18bed..45cc5b73 100644
+--- a/src/config/main.lua.d/50-default-access-config.lua
++++ b/src/config/main.lua.d/50-default-access-config.lua
+@@ -1,4 +1,7 @@
+ default_access.properties = {
++ -- Enable the use of the flatpak portal integration.
++ -- Disable if you are running a system-wide instance, which
++ -- doesn't have access to the D-Bus user session
+ ["enable-flatpak-portal"] = true,
+ }
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.9-scripts-policy-device-profile-clear-tables-when-devi.patch b/media-video/wireplumber/files/wireplumber-0.4.9-scripts-policy-device-profile-clear-tables-when-devi.patch
new file mode 100644
index 000000000000..4dc8e276fbfa
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.9-scripts-policy-device-profile-clear-tables-when-devi.patch
@@ -0,0 +1,33 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/da5d25acbea5ae03336bd2b4ef2b0687b380978e
+
+From da5d25acbea5ae03336bd2b4ef2b0687b380978e Mon Sep 17 00:00:00 2001
+From: Pauli Virtanen <pav@iki.fi>
+Date: Mon, 28 Mar 2022 20:16:52 +0300
+Subject: [PATCH] scripts: policy-device-profile: clear tables when devices
+ removed
+
+When device ids are invalidated, clear all local tables about them,
+because the id may be reused by different object, or the same object
+reappearing.
+---
+ src/scripts/policy-device-profile.lua | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/scripts/policy-device-profile.lua b/src/scripts/policy-device-profile.lua
+index d0aa2696..9daeafaa 100644
+--- a/src/scripts/policy-device-profile.lua
++++ b/src/scripts/policy-device-profile.lua
+@@ -229,4 +229,10 @@ self.om:connect("object-added", function (_, device)
+ handleProfiles (device, true)
+ end)
+
++self.om:connect("object-removed", function (_, device)
++ local dev_id = device["bound-id"]
++ self.active_profiles[dev_id] = nil
++ self.best_profiles[dev_id] = nil
++end)
++
+ self.om:activate()
+--
+GitLab
+