From 559ce75d31c368ee93fce2d79df5016d1092704e8f838b4947662d47b8a5edbb Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 27 Jan 2022 22:16:21 +0000 Subject: [PATCH] Accepting request 949044 from multimedia:libs OBS-URL: https://build.opensuse.org/request/show/949044 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/wireplumber?expand=0&rev=4 --- ...lt-nodes-handle-nodes-without-Routes.patch | 47 +++++++++++++++++++ ...meout-if-defined-target-is-not-found.patch | 46 ------------------ ...able-if-default-one-cannot-be-linked.patch | 45 ------------------ _service | 2 +- _servicedata | 2 +- wireplumber-0.4.6.obscpio | 3 -- wireplumber-0.4.7.obscpio | 3 ++ wireplumber.changes | 27 +++++++++++ wireplumber.obsinfo | 6 +-- wireplumber.spec | 6 +-- 10 files changed, 85 insertions(+), 102 deletions(-) create mode 100644 0001-default-nodes-handle-nodes-without-Routes.patch delete mode 100644 0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch delete mode 100644 0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch delete mode 100644 wireplumber-0.4.6.obscpio create mode 100644 wireplumber-0.4.7.obscpio diff --git a/0001-default-nodes-handle-nodes-without-Routes.patch b/0001-default-nodes-handle-nodes-without-Routes.patch new file mode 100644 index 0000000..457c6e1 --- /dev/null +++ b/0001-default-nodes-handle-nodes-without-Routes.patch @@ -0,0 +1,47 @@ +From 211f1e6b6cd4898121e4c2b821fae4dea6cc3317 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Fri, 14 Jan 2022 16:28:48 +0100 +Subject: [PATCH] default-nodes: handle nodes without Routes + +When a node has not part of any EnumRoute, we must assume it is +available. + +Fixes selection of Pro Audio nodes as default nodes. +--- + modules/module-default-nodes.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/modules/module-default-nodes.c b/modules/module-default-nodes.c +index 32b2725b..15aadeaa 100644 +--- a/modules/module-default-nodes.c ++++ b/modules/module-default-nodes.c +@@ -108,6 +108,7 @@ node_has_available_routes (WpDefaultNodes * self, WpNode *node) + gint dev_id = dev_id_str ? atoi (dev_id_str) : -1; + gint cpd = cpd_str ? atoi (cpd_str) : -1; + g_autoptr (WpDevice) device = NULL; ++ gint found = 0; + + if (dev_id == -1 || cpd == -1) + return TRUE; +@@ -168,6 +169,7 @@ node_has_available_routes (WpDefaultNodes * self, WpNode *node) + for (; wp_iterator_next (it, &v); g_value_unset (&v)) { + gint32 *d = (gint32 *)g_value_get_pointer (&v); + if (d && *d == cpd) { ++ found++; + if (route_avail != SPA_PARAM_AVAILABILITY_no) + return TRUE; + } +@@ -175,6 +177,10 @@ node_has_available_routes (WpDefaultNodes * self, WpNode *node) + } + } + } ++ /* The node is part of a profile without routes so we assume it ++ * is available. This can happen for Pro Audio profiles */ ++ if (found == 0) ++ return TRUE; + + return FALSE; + } +-- +GitLab + diff --git a/0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch b/0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch deleted file mode 100644 index fa4391d..0000000 --- a/0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch +++ /dev/null @@ -1,46 +0,0 @@ -From afe71d7e48c28b0ae5cbd9327433e3c55c103fcb Mon Sep 17 00:00:00 2001 -From: Julian Bouzas -Date: Thu, 6 Jan 2022 10:53:38 -0500 -Subject: [PATCH] policy-node: schedule a rescan without timeout if defined - target is not found - -Fixes #146 ---- - src/scripts/policy-node.lua | 17 ++++------------- - 1 file changed, 4 insertions(+), 13 deletions(-) - -diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua -index 8ca5a695..c273c1fe 100644 ---- a/src/scripts/policy-node.lua -+++ b/src/scripts/policy-node.lua -@@ -552,25 +552,16 @@ function handleLinkable (si) - si_target = nil - end - -- -- wait up to 2 seconds for the requested target to become available -- -- this is because the client may have already "seen" a target that we haven't -- -- yet prepared, which leads to a race condition -+ -- if the client has seen a target that we haven't yet prepared, schedule -+ -- a rescan one more time and hope for the best - local si_id = si.id - if si_props["node.target"] and si_props["node.target"] ~= "-1" - and not si_target - and not si_flags[si_id].was_handled - and not si_flags[si_id].done_waiting then -- if not si_flags[si_id].timeout_source then -- si_flags[si_id].timeout_source = Core.timeout_add(2000, function() -- if si_flags[si_id] then -- si_flags[si_id].done_waiting = true -- si_flags[si_id].timeout_source = nil -- scheduleRescan() -- end -- return false -- end) -- end - Log.info (si, "... waiting for target") -+ si_flags[si_id].done_waiting = true -+ scheduleRescan() - return - end - --- diff --git a/0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch b/0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch deleted file mode 100644 index 9c0cb31..0000000 --- a/0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch +++ /dev/null @@ -1,45 +0,0 @@ -From bee9827ae376b75feceea926b0afc727fecca51b Mon Sep 17 00:00:00 2001 -From: Julian Bouzas -Date: Fri, 7 Jan 2022 15:35:10 -0500 -Subject: [PATCH] policy-node: find best linkable if default one cannot be - linked - -Fixes issue with echo cancellation pipewire module. ---- - src/scripts/policy-node.lua | 21 +++++++++++++++------ - 1 file changed, 15 insertions(+), 6 deletions(-) - -diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua -index 8ca5a695..3210f579 100644 ---- a/src/scripts/policy-node.lua -+++ b/src/scripts/policy-node.lua -@@ -477,13 +477,22 @@ function findBestLinkable (si) - end - - function findUndefinedTarget (si) -- -- Find the default linkable if the default nodes module is loaded, otherwise -- -- just find the best linkable based on priority and routes -- if default_nodes ~= nil then -- return findDefaultlinkable (si) -- else -- return findBestlinkable (si) -+ -- Just find the best linkable if default nodes module is not loaded -+ if default_nodes == nil then -+ return findBestLinkable (si) - end -+ -+ -- Otherwise find the default linkable. If the default linkabke cannot link, -+ -- we find the best one instead. We return nil if default does not exist. -+ local si_target, can_passthrough = findDefaultlinkable (si) -+ if si_target then -+ if canLink (si.properties, si_target) then -+ return si_target, can_passthrough -+ else -+ return findBestLinkable (si) -+ end -+ end -+ return nil, nil - end - - function lookupLink (si_id, si_target_id) --- diff --git a/_service b/_service index 41a4530..69e3b07 100644 --- a/_service +++ b/_service @@ -4,7 +4,7 @@ git https://gitlab.freedesktop.org/pipewire/wireplumber.git enable - 0.4.6 + 0.4.7 @PARENT_TAG@