context: when forcing rate/quantum don't limit latency

Usually, the max-latency is calculated by the device when it is
configured based on the maximum buffer size and limits the latency
change that can be done.

When we are forcing a rate/quantum and we are going to reconfigure the
device, this limit should not apply because the current buffer settings
and latency are going to change because of the reconfigure.

See #3613
This commit is contained in:
Wim Taymans 2023-10-30 11:18:55 +01:00
parent e4def0ce18
commit 2ff62641b9

View file

@ -1465,8 +1465,9 @@ again:
node_max_quantum = node_max_quantum * current_rate / node_rate_quantum; node_max_quantum = node_max_quantum * current_rate / node_rate_quantum;
} }
/* calculate desired quantum */ /* calculate desired quantum. Don't limit to the max_latency when we are
if (max_latency.denom != 0) { * going to force a quantum or rate and reconfigure the nodes. */
if (max_latency.denom != 0 && !force_quantum && !force_rate) {
uint32_t tmp = (max_latency.num * current_rate / max_latency.denom); uint32_t tmp = (max_latency.num * current_rate / max_latency.denom);
if (tmp < node_max_quantum) if (tmp < node_max_quantum)
node_max_quantum = tmp; node_max_quantum = tmp;