SHA256
1
0
forked from pool/wireplumber
wireplumber/0001-default-nodes-increase-priority-if-node-has-available-routes.patch
Antonio Larrosa 8fc7b977aa 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
2022-01-14 16:07:09 +00:00

33 lines
1.1 KiB
Diff

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