Accepting request 1160569 from home:alarrosa:branches:multimedia:libs

- 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

OBS-URL: https://build.opensuse.org/request/show/1160569
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=74
This commit is contained in:
Antonio Larrosa 2024-03-22 08:52:33 +00:00 committed by Git OBS Bridge
parent 2d01b0f698
commit 38e13c3711
4 changed files with 73 additions and 2 deletions

View File

@ -0,0 +1,61 @@
From 428462ddf3f812a1da63d0b499e105c6391abbf4 Mon Sep 17 00:00:00 2001
From: Pauli Virtanen <pav@iki.fi>
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

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f9c1944919f89d55e019a6feedb1db30329a213a3386f840e5f3b62d17a1258d
size 2753036
oid sha256:80fff1147f5a16720a6945062b00a5caac5fe3e58878cc4bf40f2f8ff9b3647f
size 2996236

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Mar 22 08:30:48 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- 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 <rguenther@suse.com>

View File

@ -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