From 1be2c0cc3dae82081b2f8a70fe469c292d559601 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 27 May 2026 16:16:03 +0200 Subject: [PATCH] context: run nodes in the same node.group When one of the nodes from a group is running, all the other nodes in the group should run as well. The link group is only for the session manager to avoid linking the same link group to avoid loops, like linking the output of a loopback to the input. The problem is that we removed the node.link-group from driver nodes (in ACP and elsewhere) but now the source/sink pairs (when in the same group like for pro-audio) don't run together in all cases, causing sync issues. See #5210 --- src/pipewire/context.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 1c30be70a..2231686dd 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -1046,17 +1046,15 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod } } } - /* now go through all the nodes that have the same link group and - * that are not yet visited. Note how nodes with the same group - * don't get included here. They were added to the same driver but - * need to otherwise stay idle unless some non-passive link activates - * them. */ - if (node->link_groups != NULL) { + /* now go through all the nodes that share groups and link_groups + * that are not yet visited */ + if (node->groups != NULL || node->link_groups != NULL) { spa_list_for_each(t, nodes, sort_link) { if (t->exported || !t->active || SPA_FLAG_IS_SET(t->checked, 1u<link_groups, node->link_groups) < 0) + if (pw_strv_find_common(t->groups, node->groups) < 0 && + pw_strv_find_common(t->link_groups, node->link_groups) < 0) continue; pw_log_debug(" group %p: '%s'", t, t->name);