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
This commit is contained in:
Wim Taymans 2026-05-27 16:16:03 +02:00
parent a1c1d9f9f1
commit 1be2c0cc3d

View file

@ -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<<direction))
continue;
if (pw_strv_find_common(t->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);