diff --git a/0001-filter-utils-fix-handling-of-targetless-smart-filters.patch b/0001-filter-utils-fix-handling-of-targetless-smart-filters.patch new file mode 100644 index 0000000..b1a31c3 --- /dev/null +++ b/0001-filter-utils-fix-handling-of-targetless-smart-filters.patch @@ -0,0 +1,61 @@ +From 428462ddf3f812a1da63d0b499e105c6391abbf4 Mon Sep 17 00:00:00 2001 +From: Pauli Virtanen +Date: Thu, 21 Mar 2024 20:02:02 +0200 +Subject: [PATCH] filter-utils: fix handling of targetless smart filters + +A smart filter should be considered "targetless" (i.e. interpose on +streams going to default target) only if filter.smart.target is not set. + +Currently any smart filter with specified target not found is considered +such, which is wrong. This causes misbehavior, such as all recording +streams going to the bluetooth dummy source. + +Fix this by doing it correctly. +--- + src/scripts/lib/filter-utils.lua | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/src/scripts/lib/filter-utils.lua b/src/scripts/lib/filter-utils.lua +index c3671242..804c3ea1 100644 +--- a/src/scripts/lib/filter-utils.lua ++++ b/src/scripts/lib/filter-utils.lua +@@ -157,6 +157,19 @@ local function getFilterSmartTarget (metadata, node, om) + return target + end + ++local function getFilterSmartTargetless (metadata, node) ++ local id = node["bound-id"] ++ local value_str = nil ++ if metadata ~= nil then ++ value_str = metadata:find (id, "filter.smart.target") ++ end ++ if value_str == nil then ++ value_str = node.properties ["filter.smart.target"] ++ end ++ ++ return value_str == nil ++end ++ + local function getFilterSmartBefore (metadata, node) + -- Check metadata and fallback to properties + local id = node["bound-id"] +@@ -312,6 +325,7 @@ local function rescanFilters (om, metadata_om) + filter.disabled = getFilterSmartDisabled (metadata, n) + filter.targetable = getFilterSmartTargetable (metadata, n) + filter.target = getFilterSmartTarget (metadata, n, om) ++ filter.targetless = getFilterSmartTargetless (metadata, n) + filter.before = getFilterSmartBefore (metadata, n) + filter.after = getFilterSmartAfter (metadata, n) + +@@ -471,7 +485,7 @@ function module.get_filter_from_target (direction, si_target) + not v.disabled and + v.smart and + ((v.target ~= nil and target ~= nil and v.target.id == target.id) or +- (target == nil and v.target == nil)) then ++ (target == nil and v.targetless)) then + return v.main_si + end + end +-- +GitLab + diff --git a/wireplumber-0.5.0.obscpio b/wireplumber-0.5.0.obscpio index a95ec2c..389a314 100644 --- a/wireplumber-0.5.0.obscpio +++ b/wireplumber-0.5.0.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9c1944919f89d55e019a6feedb1db30329a213a3386f840e5f3b62d17a1258d -size 2753036 +oid sha256:80fff1147f5a16720a6945062b00a5caac5fe3e58878cc4bf40f2f8ff9b3647f +size 2996236 diff --git a/wireplumber.changes b/wireplumber.changes index 30e66ab..107c5a9 100644 --- a/wireplumber.changes +++ b/wireplumber.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Mar 22 08:30:48 UTC 2024 - Antonio Larrosa + +- Add patch from upstream to fix all input sources only working + when bluetooth profile is set to HSF/HFP, which was a regression + in 0.5.0 (glfo#pipewire/wireplumber#598): + * 0001-filter-utils-fix-handling-of-targetless-smart-filters.patch + ------------------------------------------------------------------- Tue Mar 19 07:43:16 UTC 2024 - Richard Biener diff --git a/wireplumber.spec b/wireplumber.spec index 898375a..8d00f0c 100644 --- a/wireplumber.spec +++ b/wireplumber.spec @@ -30,6 +30,8 @@ Group: Development/Libraries/C and C++ URL: https://gitlab.freedesktop.org/pipewire/wireplumber Source0: wireplumber-%{version}.tar.xz Source1: split-config-file.py +# PATCH-FIX-UPSTREAM 0001-filter-utils-fix-handling-of-targetless-smart-filters.patch alarrosa@suse.com -- Fix any mic only working when bluetooth is set to HSF/HFP profile +Patch0: 0001-filter-utils-fix-handling-of-targetless-smart-filters.patch # docs BuildRequires: doxygen BuildRequires: graphviz