From 147674c5ddb9e283e6098ecff48eb403a852369c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 3 Apr 2023 10:20:27 +0200 Subject: [PATCH] Revert "context: handle link-group nodes" This reverts commit 2bfe772bb4c5d8c9df36457920486e69704e9d86. This does not take into account nodes recursively becomming runnable and so does not set the runnable state on all nodes correctly, like for combine-stream. Revert for now, it probably requires a new algorithm to make this work. See #3128 --- src/pipewire/context.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 725df2050..d13062107 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -768,8 +768,7 @@ error: static int ensure_state(struct pw_impl_node *node, bool running) { enum pw_node_state state = node->info.state; - if (node->active && node->runnable && - !SPA_FLAG_IS_SET(node->spa_flags, SPA_NODE_FLAG_NEED_CONFIGURE) && running) + if (node->active && !SPA_FLAG_IS_SET(node->spa_flags, SPA_NODE_FLAG_NEED_CONFIGURE) && running) state = PW_NODE_STATE_RUNNING; else if (state > PW_NODE_STATE_IDLE) state = PW_NODE_STATE_IDLE; @@ -843,31 +842,6 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node, } } } - /* go through all the nodes that are linked together in some way. - * They inherit the runnable flag and are moved to the same driver. */ - if (n->link_group != NULL) { - spa_list_for_each(t, &context->node_list, link) { - if (t->exported || !t->active) - continue; - /* don't care if our state won't change below. */ - if ((t->runnable || !n->runnable) && t->visited) - continue; - if (!spa_streq(t->link_group, n->link_group)) - continue; - - /* All nodes from the same link group inherit the runnable - * flag. */ - t->runnable |= n->runnable; - if (!t->visited) { - /* if we did not visit this node, add it to the same - * driver */ - t->visited = true; - spa_list_append(&queue, &t->sort_link); - } - pw_log_debug("%p: %s join link group %s runnable:%u", - t, t->name, t->link_group, t->runnable); - } - } /* now go through all the nodes that have the same group and * that are not yet visited */ if (n->group != NULL) {