diff --git a/0001-scripts-policy-device-profile-clear-tables-when-devices-removed.patch b/0001-scripts-policy-device-profile-clear-tables-when-devices-removed.patch new file mode 100644 index 0000000..ddcb328 --- /dev/null +++ b/0001-scripts-policy-device-profile-clear-tables-when-devices-removed.patch @@ -0,0 +1,31 @@ +From 82856f8643402d56b62d62b0eea4debfae1cd16e Mon Sep 17 00:00:00 2001 +From: Pauli Virtanen +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 + diff --git a/wireplumber.changes b/wireplumber.changes index f5b9d9f..f707cfc 100644 --- a/wireplumber.changes +++ b/wireplumber.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 30 16:12:03 UTC 2022 - Antonio Larrosa + +- Add patch from upstream to fix no sound on reconnection of + bluetooth device (glfo#pipewire/wireplumber#234): + * 0001-scripts-policy-device-profile-clear-tables-when-devices-removed.patch + ------------------------------------------------------------------- Tue Mar 29 12:04:24 UTC 2022 - Antonio Larrosa diff --git a/wireplumber.spec b/wireplumber.spec index 47fcb28..ed47974 100644 --- a/wireplumber.spec +++ b/wireplumber.spec @@ -32,6 +32,8 @@ Source0: wireplumber-%{version}.tar.xz Source1: split-config-file.py # PATCH-FIX-UPSTREAM Patch0: 0001-src-setlocale-in-main-for-tools-and-the-daemon.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-scripts-policy-device-profile-clear-tables-when-devices-removed.patch # PATCH-FIX-OPENSUSE reduce-meson-dependency.patch Patch100: reduce-meson-required-version.patch # docs