From fae7a1f592a621f0f375f7f5812d52d0d29f00dd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 8 Feb 2022 18:35:12 +0100 Subject: [PATCH] jack: use node.lock-quantum by default As soon as a JACK app is started, the automatic quantum change is disabled. This means no pulse/alsa app can change the quantum. The only way to change the quantum is with node.force-quantum or with the settings metadata. This means only a JACK buffersize change (usually controlled from the JACK app, such as in ardour) or a metadata change (from the command line) can modify things. Both of those are usually caused by a user action. For JACK apps where the quantum is allowed to change automatically, explicit rules need to be placed in the config. --- pipewire-jack/src/pipewire-jack.c | 2 ++ src/daemon/jack.conf.in | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index 63de0c3c9..6129c6b1d 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -3267,6 +3267,8 @@ jack_client_t * jack_client_open (const char *client_name, pw_properties_set(client->props, PW_KEY_MEDIA_ROLE, "DSP"); if (pw_properties_get(client->props, PW_KEY_NODE_ALWAYS_PROCESS) == NULL) pw_properties_set(client->props, PW_KEY_NODE_ALWAYS_PROCESS, "true"); + if (pw_properties_get(client->props, PW_KEY_NODE_LOCK_QUANTUM) == NULL) + pw_properties_set(client->props, PW_KEY_NODE_LOCK_QUANTUM, "true"); pw_properties_set(client->props, PW_KEY_NODE_TRANSPORT_SYNC, "true"); client->node = pw_core_create_object(client->core, diff --git a/src/daemon/jack.conf.in b/src/daemon/jack.conf.in index ba530e036..48b637c72 100644 --- a/src/daemon/jack.conf.in +++ b/src/daemon/jack.conf.in @@ -65,7 +65,10 @@ context.modules = [ # global properties for all jack clients jack.properties = { #node.latency = 1024/48000 - #node.lock-quantum = false + #node.rate = 1/48000 + #node.quantum = 1024/48000 + #node.lock-quantum = true + #node.force-quantum = 0 #jack.show-monitor = true #jack.merge-monitor = false #jack.short-name = false