context: add force-quantum and force-rate property

Add a node.force-quantum and node.force-rate property. When no global
quantum or rate is enforce with settings, the last updated node property
is used as the quantum.

Make jack use the force-quantum property when set_buffersize is used to
make sure that the quantum is not just a suggestion but a hard forced
one. This makes it possible for ardour or other jack apps to raise the
quantum above the max-quantum but also ensure that it will not change
by any other application (unless other jack apps).

Fixes #2079
This commit is contained in:
Wim Taymans 2022-01-31 17:59:18 +01:00
parent 54d50b943f
commit 24c97b1c7e
5 changed files with 54 additions and 6 deletions

View file

@ -424,6 +424,7 @@ struct pw_context {
struct pw_mempool *pool; /**< global memory pool */
uint64_t stamp;
uint64_t serial;
struct pw_map globals; /**< map of globals */
@ -713,6 +714,9 @@ struct pw_impl_node {
struct spa_fraction latency; /**< requested latency */
struct spa_fraction max_latency; /**< maximum latency */
struct spa_fraction rate; /**< requested rate */
uint32_t force_quantum; /**< forced quantum */
uint32_t force_rate; /**< forced rate */
uint32_t stamp; /**< stamp of last update */
struct spa_source source; /**< source to remotely trigger this node */
struct pw_memblock *activation;
struct {