From 3c7ac99186cb4a9b3f06ac145b2c9821e4a2fcd3d6ee29971cc1716348a335f8 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Mon, 10 Jan 2022 09:47:11 +0000 Subject: [PATCH] Accepting request 945147 from home:XRevan86 - Update to version 0.4.6. OBS-URL: https://build.opensuse.org/request/show/945147 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=17 --- ...ace-the-hash-table-key-on-new-insert.patch | 46 ------------------- ...meout-if-defined-target-is-not-found.patch | 46 +++++++++++++++++++ ...able-if-default-one-cannot-be-linked.patch | 45 ++++++++++++++++++ ...it-for-nodes-when-we-become-unlinked.patch | 34 -------------- _service | 4 +- _servicedata | 2 +- wireplumber-0.4.5.obscpio | 3 -- wireplumber-0.4.6.obscpio | 3 ++ wireplumber.changes | 36 +++++++++++++++ wireplumber.obsinfo | 7 ++- wireplumber.spec | 12 ++--- 11 files changed, 142 insertions(+), 96 deletions(-) delete mode 100644 0001-m-reserve-device-replace-the-hash-table-key-on-new-insert.patch create mode 100644 0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch create mode 100644 0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch delete mode 100644 0002-policy-node-wait-for-nodes-when-we-become-unlinked.patch delete mode 100644 wireplumber-0.4.5.obscpio create mode 100644 wireplumber-0.4.6.obscpio diff --git a/0001-m-reserve-device-replace-the-hash-table-key-on-new-insert.patch b/0001-m-reserve-device-replace-the-hash-table-key-on-new-insert.patch deleted file mode 100644 index 106c504..0000000 --- a/0001-m-reserve-device-replace-the-hash-table-key-on-new-insert.patch +++ /dev/null @@ -1,46 +0,0 @@ -From f4546a18e871537be698916178b40091a4a0b377 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 12 Nov 2021 11:19:54 +1000 -Subject: [PATCH] m-reserve-device: replace the hash table key on new insert - -We're using the WpReserveDevice's name as key in the hash table, so we -must update the key as well when we replace an item in the hashtable - -the old device (and its name) will be released. - -The side-effect of this is that the *third* device with an identical -name will no longer replace the previous device. This results in the -following sequence: - -- dev1 added: name Audio0 - - dev1 requests name owner Audio0 -- dev2 added: name Audio0 - - replace dev1 in the hashtable - - dev1 emits "release" signal - - dev1 unowns the Audio0 name - - dev2 requests name owner Audio0 -- dev3 added: name Audio0 - - adds to the hashtable because the existing key is now undefined - - dev3 requests name owner Audio0 - - error, you cannot request ownership for the same name twice - -Fixes #93 ---- - modules/module-reserve-device/plugin.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/module-reserve-device/plugin.c b/modules/module-reserve-device/plugin.c -index d8e4e092..68df6ee8 100644 ---- a/modules/module-reserve-device/plugin.c -+++ b/modules/module-reserve-device/plugin.c -@@ -221,7 +221,7 @@ wp_reserve_device_plugin_create_reservation (WpReserveDevicePlugin *self, - NULL); - - /* use rd->name to avoid copying @em name again */ -- g_hash_table_insert (self->reserve_devices, rd->name, rd); -+ g_hash_table_replace (self->reserve_devices, rd->name, rd); - - return g_object_ref (rd); - } --- -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 new file mode 100644 index 0000000..fa4391d --- /dev/null +++ b/0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch @@ -0,0 +1,46 @@ +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 new file mode 100644 index 0000000..9c0cb31 --- /dev/null +++ b/0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch @@ -0,0 +1,45 @@ +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/0002-policy-node-wait-for-nodes-when-we-become-unlinked.patch b/0002-policy-node-wait-for-nodes-when-we-become-unlinked.patch deleted file mode 100644 index 05358e5..0000000 --- a/0002-policy-node-wait-for-nodes-when-we-become-unlinked.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 83041b0ce277c95afaf1824f525ea0bec516f03f Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Thu, 18 Nov 2021 15:23:23 +0100 -Subject: [PATCH] policy-node: wait for nodes when we become unlinked - -If we were linked before but our node is removed, wait until a new node -becomes available instead of failing. - -This fixes an issue where there is only 1 sink available and the card -profile is toggeled between pro and stereo. After the profile is -toggled, the sink is removed and the node would be killed with an error -because there is no fallback sink. The fix is similar to the -pipewire-media-session logic. ---- - src/scripts/policy-node.lua | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua -index 5029d1b3..445b1a7b 100644 ---- a/src/scripts/policy-node.lua -+++ b/src/scripts/policy-node.lua -@@ -493,6 +493,9 @@ function handleLinkable (si) - if not reconnect then - Log.info (si, "... destroy node") - node:request_destroy() -+ elseif si_flags[si.id].was_handled then -+ Log.info (si, "... waiting reconnect") -+ return - end - - local client_id = node.properties["client.id"] --- -GitLab - diff --git a/_service b/_service index f47dd1e..41a4530 100644 --- a/_service +++ b/_service @@ -4,10 +4,10 @@ git https://gitlab.freedesktop.org/pipewire/wireplumber.git enable - 0.4.5 + 0.4.6 @PARENT_TAG@ diff --git a/_servicedata b/_servicedata index fcdf076..9ebeb1d 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://gitlab.freedesktop.org/pipewire/wireplumber.git - 3946457a7942a179c0f61c60de8cb8fc643391dd \ No newline at end of file + 9a733293d7d39554d0c9b04741a64ece023dbac6 \ No newline at end of file diff --git a/wireplumber-0.4.5.obscpio b/wireplumber-0.4.5.obscpio deleted file mode 100644 index 60fd686..0000000 --- a/wireplumber-0.4.5.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:382bc959e713c2d06a53c1b4aa9d3f1fe4f543283f3efca0c90bd0c01256f0e5 -size 1745932 diff --git a/wireplumber-0.4.6.obscpio b/wireplumber-0.4.6.obscpio new file mode 100644 index 0000000..8aaa301 --- /dev/null +++ b/wireplumber-0.4.6.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed1b38dd1e18d48f7b8002deb81157fb402a9b04303b20b1ef46b6d43dfa45f9 +size 1798668 diff --git a/wireplumber.changes b/wireplumber.changes index 633f1d7..c839c88 100644 --- a/wireplumber.changes +++ b/wireplumber.changes @@ -1,3 +1,39 @@ +------------------------------------------------------------------- +Sat Jan 8 16:12:57 UTC 2022 - Alexei Sorokin + +- Update to version 0.4.6: + * Fix a lot of race condition bugs that would cause strange + crashes or many log messages being printed when streaming + clients would connect and disconnect very fast. + * Improve the logic for selecting a default target device. + * Fix switching to headphones when the wired headphones are + plugged in. + * Fix an issue where "udevadm trigger" would break wireplumber. + * Fix an issue where switching profiles of a device could kill + client nodes. + * Fix briefly switching output to a secondary device when switching device + profiles (#85) + * Fix "wpctl status" showing default device selections when + dealing with module-loopback virtual sinks and sources. + * WirePlumber now ignores hidden files from the config directory. + * Fix an interoperability issue with jackdbus. + * Fix an issue where pulseaudio tcp clients would not have + permissions to connect to PipeWire. + * Fix a crash in the journald logger with NULL debug messages. + * Enable real-time priority for the bluetooth nodes to run in RT. + * Make the default stream volume configurable. + * Scripts are now also looked up in $XDG_CONFIG_HOME/wireplumber/scripts + * Update documentation on configuring WirePlumber and fixed some + more documentation issues. + * Add support for using strings as log level selectors in WIREPLUMBER_DEBUG. +- Drop 0001-m-reserve-device-replace-the-hash-table-key-on-new-insert.patch, + 0002-policy-node-wait-for-nodes-when-we-become-unlinked.patch: + merged upstream. +- Add 0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch: + fix a pulse client hanging issue. +- Add 0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch: + fix an issue with libpipewire-module-echo-cancel. + ------------------------------------------------------------------- Wed Dec 15 13:48:27 UTC 2021 - Antonio Larrosa diff --git a/wireplumber.obsinfo b/wireplumber.obsinfo index 1a47e57..386836b 100644 --- a/wireplumber.obsinfo +++ b/wireplumber.obsinfo @@ -1,5 +1,4 @@ name: wireplumber -version: 0.4.5 -mtime: 1636626925 -commit: 3946457a7942a179c0f61c60de8cb8fc643391dd - +version: 0.4.6 +mtime: 1641485511 +commit: 9a733293d7d39554d0c9b04741a64ece023dbac6 diff --git a/wireplumber.spec b/wireplumber.spec index 565422b..7893b3d 100644 --- a/wireplumber.spec +++ b/wireplumber.spec @@ -1,7 +1,7 @@ # # spec file for package wireplumber # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,13 +16,13 @@ # -%define pipewire_minimum_version 0.3.32 +%define pipewire_minimum_version 0.3.43 %define apiver 0.4 %define apiver_str 0_4 %define sover 0 %define libwireplumber libwireplumber-%{apiver_str}-%{sover} Name: wireplumber -Version: 0.4.5 +Version: 0.4.6 Release: 0 Summary: Session / policy manager implementation for PipeWire License: MIT @@ -30,8 +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 -Patch0: 0001-m-reserve-device-replace-the-hash-table-key-on-new-insert.patch -Patch1: 0002-policy-node-wait-for-nodes-when-we-become-unlinked.patch +Patch0: 0001-policy-node-schedule-rescan-without-timeout-if-defined-target-is-not-found.patch +Patch1: 0002-policy-node-find-best-linkable-if-default-one-cannot-be-linked.patch Patch100: reduce-meson-required-version.patch # docs BuildRequires: doxygen @@ -54,7 +54,7 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.62.0 BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: pkgconfig(gobject-2.0) >= 2.62 BuildRequires: pkgconfig(gobject-introspection-1.0) -BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.32 +BuildRequires: pkgconfig(libpipewire-0.3) >= %{pipewire_minimum_version} BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(lua5.3) BuildRequires: pkgconfig(systemd)