Accepting request 1035773 from home:alarrosa:branches:multimedia:libs
- Add patch from upstream to work around a problem when a link is not activated: * 0001-policy-node-wait-for-unactivated-links-instead-of-removing.patch - Add patch from upstream to fix handling null devices which result in lua exceptions: * 0001-alsa.lua-remove-the-disabled-entities-from-the-names-table.patch OBS-URL: https://build.opensuse.org/request/show/1035773 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=52
This commit is contained in:
parent
1c0d79e47a
commit
d503c29728
@ -0,0 +1,60 @@
|
|||||||
|
From e77ad8c0c024529deb4de5ebd69009a0cec11a78 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
|
||||||
|
Date: Tue, 8 Nov 2022 04:20:21 +0530
|
||||||
|
Subject: [PATCH] alsa.lua: remove the disabled entities from the names table
|
||||||
|
|
||||||
|
entities here are the device cards and the device nodes.
|
||||||
|
|
||||||
|
sometimes null device objects are reported by monitor, this results in lua
|
||||||
|
exceptions handle this use case.
|
||||||
|
|
||||||
|
Fixes #361
|
||||||
|
---
|
||||||
|
src/scripts/monitors/alsa.lua | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/scripts/monitors/alsa.lua b/src/scripts/monitors/alsa.lua
|
||||||
|
index 660c47c0..195c0916 100644
|
||||||
|
--- a/src/scripts/monitors/alsa.lua
|
||||||
|
+++ b/src/scripts/monitors/alsa.lua
|
||||||
|
@@ -175,6 +175,7 @@ function createNode(parent, id, obj_type, factory, properties)
|
||||||
|
-- apply properties from config.rules
|
||||||
|
rulesApplyProperties(properties)
|
||||||
|
if properties["node.disabled"] then
|
||||||
|
+ node_names_table [properties ["node.name"]] = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -190,6 +191,10 @@ function createDevice(parent, id, factory, properties)
|
||||||
|
device:connect("create-object", createNode)
|
||||||
|
device:connect("object-removed", function (parent, id)
|
||||||
|
local node = parent:get_managed_object(id)
|
||||||
|
+ if not node then
|
||||||
|
+ return
|
||||||
|
+ end
|
||||||
|
+
|
||||||
|
node_names_table[node.properties["node.name"]] = nil
|
||||||
|
end)
|
||||||
|
device:activate(Feature.SpaDevice.ENABLED | Feature.Proxy.BOUND)
|
||||||
|
@@ -269,6 +274,7 @@ function prepareDevice(parent, id, obj_type, factory, properties)
|
||||||
|
-- apply properties from config.rules
|
||||||
|
rulesApplyProperties(properties)
|
||||||
|
if properties["device.disabled"] then
|
||||||
|
+ device_names_table [properties ["device.name"]] = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -346,6 +352,10 @@ function createMonitor ()
|
||||||
|
-- handle object-removed to destroy device reservations and recycle device name
|
||||||
|
m:connect("object-removed", function (parent, id)
|
||||||
|
local device = parent:get_managed_object(id)
|
||||||
|
+ if not device then
|
||||||
|
+ return
|
||||||
|
+ end
|
||||||
|
+
|
||||||
|
if rd_plugin then
|
||||||
|
local rd_name = device.properties["api.dbus.ReserveDevice1"]
|
||||||
|
if rd_name then
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -0,0 +1,46 @@
|
|||||||
|
From f79a330849ebf320c42d03c123f48fec6b9ad3a8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pauli Virtanen <pav@iki.fi>
|
||||||
|
Date: Thu, 3 Nov 2022 19:22:20 +0200
|
||||||
|
Subject: [PATCH] scripts: policy-node: wait for unactivated links instead of
|
||||||
|
removing
|
||||||
|
|
||||||
|
If a link is not activated, don't remove it. Instead, schedule a rescan
|
||||||
|
when a link activates, so that we'll handle it once it does.
|
||||||
|
|
||||||
|
This is a workaround for some problems, see
|
||||||
|
https://github.com/Audio4Linux/JDSP4Linux/issues/74
|
||||||
|
However, the underlying cause is not understood.
|
||||||
|
---
|
||||||
|
src/scripts/policy-node.lua | 9 ++++++---
|
||||||
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
|
||||||
|
index 43df701c..a25d0a5e 100644
|
||||||
|
--- a/src/scripts/policy-node.lua
|
||||||
|
+++ b/src/scripts/policy-node.lua
|
||||||
|
@@ -123,6 +123,7 @@ function createLink (si, si_target, passthrough, exclusive)
|
||||||
|
end
|
||||||
|
Log.info (l, "activated si-standard-link")
|
||||||
|
end
|
||||||
|
+ scheduleRescan()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -696,9 +697,11 @@ function handleLinkable (si)
|
||||||
|
if link ~= nil then
|
||||||
|
-- remove old link
|
||||||
|
if ((link:get_active_features() & Feature.SessionItem.ACTIVE) == 0) then
|
||||||
|
- -- remove also not yet activated links: they might never become active,
|
||||||
|
- -- and we should not loop waiting for them
|
||||||
|
- Log.warning (link, "Link was not activated before removing")
|
||||||
|
+ -- Link not yet activated. We don't want to remove it now, as that
|
||||||
|
+ -- may cause problems. Instead, give up for now. A rescan is scheduled
|
||||||
|
+ -- once the link activates.
|
||||||
|
+ Log.info (link, "Link to be moved was not activated, will wait for it.")
|
||||||
|
+ return
|
||||||
|
end
|
||||||
|
si_flags[si_id].peer_id = nil
|
||||||
|
link:remove ()
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 15 08:21:15 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- Add patch from upstream to work around a problem when a link is
|
||||||
|
not activated:
|
||||||
|
* 0001-policy-node-wait-for-unactivated-links-instead-of-removing.patch
|
||||||
|
|
||||||
|
- Add patch from upstream to fix handling null devices which result
|
||||||
|
in lua exceptions:
|
||||||
|
* 0001-alsa.lua-remove-the-disabled-entities-from-the-names-table.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 4 13:01:17 UTC 2022 - Alexei Sorokin <sor.alexei@meowr.ru>
|
Tue Oct 4 13:01:17 UTC 2022 - Alexei Sorokin <sor.alexei@meowr.ru>
|
||||||
|
|
||||||
|
@ -32,6 +32,10 @@ Source0: wireplumber-%{version}.tar.xz
|
|||||||
Source1: split-config-file.py
|
Source1: split-config-file.py
|
||||||
# PATCH-FIX-OPENSUSE reduce-meson-required-version.patch
|
# PATCH-FIX-OPENSUSE reduce-meson-required-version.patch
|
||||||
Patch0: reduce-meson-required-version.patch
|
Patch0: reduce-meson-required-version.patch
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch1: 0001-alsa.lua-remove-the-disabled-entities-from-the-names-table.patch
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch2: 0001-policy-node-wait-for-unactivated-links-instead-of-removing.patch
|
||||||
# docs
|
# docs
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: graphviz
|
BuildRequires: graphviz
|
||||||
@ -140,6 +144,8 @@ the wireplumber shared library.
|
|||||||
%if 0%{?sle_version} <= 150300
|
%if 0%{?sle_version} <= 150300
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%endif
|
%endif
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
pushd src/config/main.lua.d
|
pushd src/config/main.lua.d
|
||||||
python3 %{SOURCE1}
|
python3 %{SOURCE1}
|
||||||
|
Loading…
Reference in New Issue
Block a user