SHA256
1
0
forked from pool/wireplumber

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
This commit is contained in:
Antonio Larrosa 2022-01-10 09:47:11 +00:00 committed by Git OBS Bridge
parent d52394b2b8
commit 3c7ac99186
11 changed files with 142 additions and 96 deletions

View File

@ -1,46 +0,0 @@
From f4546a18e871537be698916178b40091a4a0b377 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
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

View File

@ -0,0 +1,46 @@
From afe71d7e48c28b0ae5cbd9327433e3c55c103fcb Mon Sep 17 00:00:00 2001
From: Julian Bouzas <julian.bouzas@collabora.com>
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
--

View File

@ -0,0 +1,45 @@
From bee9827ae376b75feceea926b0afc727fecca51b Mon Sep 17 00:00:00 2001
From: Julian Bouzas <julian.bouzas@collabora.com>
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)
--

View File

@ -1,34 +0,0 @@
From 83041b0ce277c95afaf1824f525ea0bec516f03f Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
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

View File

@ -4,10 +4,10 @@
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pipewire/wireplumber.git</param>
<param name="changesgenerate">enable</param>
<param name="revision">0.4.5</param>
<param name="revision">0.4.6</param>
<param name="versionformat">@PARENT_TAG@</param>
<!--
<param name="versionprefix">0.4.1+git</param>
<param name="versionprefix">0.4.6+git</param>
<param name="versionformat">@PARENT_TAG@+git%cd.%h</param>
-->
</service>

View File

@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://gitlab.freedesktop.org/pipewire/wireplumber.git</param>
<param name="changesrevision">3946457a7942a179c0f61c60de8cb8fc643391dd</param></service></servicedata>
<param name="changesrevision">9a733293d7d39554d0c9b04741a64ece023dbac6</param></service></servicedata>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:382bc959e713c2d06a53c1b4aa9d3f1fe4f543283f3efca0c90bd0c01256f0e5
size 1745932

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed1b38dd1e18d48f7b8002deb81157fb402a9b04303b20b1ef46b6d43dfa45f9
size 1798668

View File

@ -1,3 +1,39 @@
-------------------------------------------------------------------
Sat Jan 8 16:12:57 UTC 2022 - Alexei Sorokin <sor.alexei@meowr.ru>
- 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 <alarrosa@suse.com>

View File

@ -1,5 +1,4 @@
name: wireplumber
version: 0.4.5
mtime: 1636626925
commit: 3946457a7942a179c0f61c60de8cb8fc643391dd
version: 0.4.6
mtime: 1641485511
commit: 9a733293d7d39554d0c9b04741a64ece023dbac6

View File

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