forked from pool/wireplumber
Accepting request 946457 from home:alarrosa:branches:multimedia:libs
- Add patch from upstream to fix a problem changing the default device: * 0001-default-nodes-increase-priority-if-node-has-available-routes.patch - Add patch from upstream to fix selection of Pro Audio nodes as default nodes: * 0002-default-nodes-handle-nodes-without-Routes.patch OBS-URL: https://build.opensuse.org/request/show/946457 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=20
This commit is contained in:
parent
1a9557b2d4
commit
8fc7b977aa
@ -0,0 +1,32 @@
|
|||||||
|
From ad80faaa8da75fd562cac4eb776312b83160c9d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Julian Bouzas <julian.bouzas@collabora.com>
|
||||||
|
Date: Fri, 14 Jan 2022 07:24:52 -0500
|
||||||
|
Subject: [PATCH] default-nodes: increase priority if node has available routes
|
||||||
|
|
||||||
|
Fixes #163
|
||||||
|
---
|
||||||
|
modules/module-default-nodes.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules/module-default-nodes.c b/modules/module-default-nodes.c
|
||||||
|
index ac9a87bd..32b2725b 100644
|
||||||
|
--- a/modules/module-default-nodes.c
|
||||||
|
+++ b/modules/module-default-nodes.c
|
||||||
|
@@ -206,11 +206,11 @@ find_best_media_class_node (WpDefaultNodes * self, const gchar *media_class,
|
||||||
|
WP_PIPEWIRE_OBJECT (node), PW_KEY_PRIORITY_SESSION);
|
||||||
|
gint prio = prio_str ? atoi (prio_str) : -1;
|
||||||
|
|
||||||
|
- if (!node_has_available_routes (self, node))
|
||||||
|
- continue;
|
||||||
|
+ if (node_has_available_routes (self, node))
|
||||||
|
+ prio += 10000;
|
||||||
|
|
||||||
|
if (name && node_name && g_strcmp0 (name, node_name) == 0)
|
||||||
|
- prio += 10000;
|
||||||
|
+ prio += 20000;
|
||||||
|
|
||||||
|
if (prio > highest_prio || res == NULL) {
|
||||||
|
highest_prio = prio;
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
47
0002-default-nodes-handle-nodes-without-Routes.patch
Normal file
47
0002-default-nodes-handle-nodes-without-Routes.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From 211f1e6b6cd4898121e4c2b821fae4dea6cc3317 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wim Taymans <wtaymans@redhat.com>
|
||||||
|
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
|
||||||
|
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 14 15:59:55 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- Add patch from upstream to fix a problem changing the default
|
||||||
|
device:
|
||||||
|
* 0001-default-nodes-increase-priority-if-node-has-available-routes.patch
|
||||||
|
|
||||||
|
- Add patch from upstream to fix selection of Pro Audio nodes
|
||||||
|
as default nodes:
|
||||||
|
* 0002-default-nodes-handle-nodes-without-Routes.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 13 09:56:28 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>
|
Thu Jan 13 09:56:28 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ Group: Development/Libraries/C and C++
|
|||||||
URL: https://gitlab.freedesktop.org/pipewire/wireplumber
|
URL: https://gitlab.freedesktop.org/pipewire/wireplumber
|
||||||
Source0: wireplumber-%{version}.tar.xz
|
Source0: wireplumber-%{version}.tar.xz
|
||||||
Source1: split-config-file.py
|
Source1: split-config-file.py
|
||||||
|
Patch0: 0001-default-nodes-increase-priority-if-node-has-available-routes.patch
|
||||||
|
Patch1: 0002-default-nodes-handle-nodes-without-Routes.patch
|
||||||
Patch100: reduce-meson-required-version.patch
|
Patch100: reduce-meson-required-version.patch
|
||||||
# docs
|
# docs
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
|
Loading…
Reference in New Issue
Block a user