From 437a8d32f265b284525a4e522fa541a461dbc91f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 5 Mar 2026 15:03:30 +0100 Subject: [PATCH] impl-node: remove the leaf node check This was a hack around some scheduler issues that we should be able to handle better now. One of the cases is: Source -> (p)pw-record Which would never work otherwise because pw-record does not activate the Source and when the Source is activated in any other way, pw-record would not follow. This will still fail with the current scheduler, but the leaf check is not so great because it doesn't work in this case: Source -> (p)loopback-in|loopback-out(p) -> Sink What is probably required is a passive mode that doesn't activate but does follows the peer. --- src/pipewire/impl-node.c | 4 ---- src/pipewire/private.h | 1 - 2 files changed, 5 deletions(-) diff --git a/src/pipewire/impl-node.c b/src/pipewire/impl-node.c index 85bf452b0..f5dd7c96b 100644 --- a/src/pipewire/impl-node.c +++ b/src/pipewire/impl-node.c @@ -1325,10 +1325,6 @@ static void check_properties(struct pw_impl_node *node) } } node->lock_rate = pw_properties_get_bool(node->properties, PW_KEY_NODE_LOCK_RATE, false); - /* the leaf node is one that only produces/consumes the data. We can deduce this from the - * absence of a link-group and the fact that it has no output/input ports. */ - node->leaf = node->link_groups == NULL && - (node->info.max_input_ports == 0 || node->info.max_output_ports == 0); value = pw_properties_get_uint32(node->properties, PW_KEY_NODE_FORCE_RATE, SPA_ID_INVALID); if (value == 0) diff --git a/src/pipewire/private.h b/src/pipewire/private.h index 3eda9ed4e..25a2928fe 100644 --- a/src/pipewire/private.h +++ b/src/pipewire/private.h @@ -786,7 +786,6 @@ struct pw_impl_node { unsigned int async:1; /**< async processing, one cycle latency */ unsigned int lazy:1; /**< the graph is lazy scheduling */ unsigned int exclusive:1; /**< ports can only be linked once */ - unsigned int leaf:1; /**< node only produces/consumes data */ unsigned int reliable:1; /**< ports need reliable tee */ uint32_t transport; /**< latest transport request */