diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 0db250c0f..c615ea4e7 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -794,9 +794,9 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node, spa_list_consume(n, &queue, sort_link) { spa_list_remove(&n->sort_link); spa_list_append(collect, &n->sort_link); - n->passive = !n->always_process; + n->runnable = n->always_process; - pw_log_debug(" next node %p: '%s' passive:%u", n, n->name, n->passive); + pw_log_debug(" next node %p: '%s' runnable:%u", n, n->name, n->runnable); if (!n->active) continue; @@ -814,7 +814,7 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node, continue; if (!l->passive) - n->passive = false; + n->runnable = true; if (!t->visited) { t->visited = true; @@ -835,7 +835,7 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node, continue; if (!l->passive) - n->passive = false; + n->runnable = true; if (!t->visited) { t->visited = true; @@ -865,13 +865,13 @@ static void move_to_driver(struct pw_context *context, struct spa_list *nodes, struct pw_impl_node *driver) { struct pw_impl_node *n; - pw_log_debug("driver: %p %s", driver, driver->name); + pw_log_debug("driver: %p %s runnable:%u", driver, driver->name, driver->runnable); spa_list_consume(n, nodes, sort_link) { spa_list_remove(&n->sort_link); - if (!n->passive) - driver->passive = false; - pw_log_debug(" follower: %p %s passive:%u driver-passive:%u", n, n->name, - n->passive, driver->passive); + if (n->runnable) + driver->runnable = true; + pw_log_debug(" follower: %p %s runnable:%u driver-runnable:%u", n, n->name, + n->runnable, driver->runnable); pw_impl_node_set_driver(n, driver); } } @@ -1133,7 +1133,7 @@ again: if (fallback == NULL) fallback = n; - if (n->passive) + if (!n->runnable) continue; spa_list_for_each(s, &n->follower_list, follower_link) { @@ -1179,7 +1179,7 @@ again: driver = NULL; spa_list_for_each(t, &collect, sort_link) { /* is any active and want a driver */ - if (t->want_driver && t->active && !t->passive) { + if (t->want_driver && t->active && t->runnable) { driver = target; break; } @@ -1267,10 +1267,10 @@ again: rate = s->rate; if (s->active) - running = !n->passive; + running = n->runnable; - pw_log_debug("%p: follower %p running:%d passive:%d rate:%u/%u latency %u/%u '%s'", - context, s, running, s->passive, rate.num, rate.denom, + pw_log_debug("%p: follower %p running:%d runnable:%d rate:%u/%u latency %u/%u '%s'", + context, s, running, s->runnable, rate.num, rate.denom, latency.num, latency.denom, s->name); s->moved = false; @@ -1379,8 +1379,8 @@ again: n->current_pending = false; } - pw_log_debug("%p: driver %p running:%d passive:%d quantum:%u '%s'", - context, n, running, n->passive, quantum, n->name); + pw_log_debug("%p: driver %p running:%d runnable:%d quantum:%u '%s'", + context, n, running, n->runnable, quantum, n->name); /* first change the node states of the followers to the new target */ spa_list_for_each(s, &n->follower_list, follower_link) { diff --git a/src/pipewire/impl-link.c b/src/pipewire/impl-link.c index c87843e44..b476bccfb 100644 --- a/src/pipewire/impl-link.c +++ b/src/pipewire/impl-link.c @@ -759,9 +759,9 @@ int pw_impl_link_prepare(struct pw_impl_link *this) { struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this); - pw_log_debug("%p: prepared:%d preparing:%d in_active:%d out_active:%d", + pw_log_debug("%p: prepared:%d preparing:%d in_active:%d out_active:%d passive:%u", this, this->prepared, this->preparing, - impl->inode->active, impl->onode->active); + impl->inode->active, impl->onode->active, this->passive); if (!impl->inode->active || !impl->onode->active) return 0; diff --git a/src/pipewire/private.h b/src/pipewire/private.h index ae93b0daa..8fcae46da 100644 --- a/src/pipewire/private.h +++ b/src/pipewire/private.h @@ -686,7 +686,7 @@ struct pw_impl_node { * is selected to drive the graph */ unsigned int visited:1; /**< for sorting */ unsigned int want_driver:1; /**< this node wants to be assigned to a driver */ - unsigned int passive:1; /**< driver graph only has passive links */ + unsigned int runnable:1; /**< node is runnable */ unsigned int freewheel:1; /**< if this is the freewheel driver */ unsigned int loopchecked:1; /**< for feedback loop checking */ unsigned int always_process:1; /**< this node wants to always be processing, even when idle */