context: only apply lock-quantum for unsuspended nodes

When the node is suspended, don't take into account the lock-quantum
settings or else the graph would not want to change to the requested
quantum of the node.

Say we have a jack node with node.lock-quantum = true and
node.latency=256/48000. When it joins the graph and is suspended, the
lock-quantum is ignored and the node.latency is set on the graph.
After that, the lock-quantum ensures the graph quantum doesn't change
anymore until the node is suspended.
This commit is contained in:
Wim Taymans 2021-09-08 11:53:08 +02:00
parent 9423e8d648
commit 2071a14c82

View file

@ -1246,8 +1246,10 @@ again:
/* collect quantum and rate */
spa_list_for_each(s, &n->follower_list, follower_link) {
lock_quantum |= s->lock_quantum;
lock_rate |= s->lock_rate;
if (s->info.state > PW_NODE_STATE_SUSPENDED) {
lock_quantum |= s->lock_quantum;
lock_rate |= s->lock_rate;
}
/* smallest latencies */
if (latency.denom == 0 ||