From 8e95f1a5757065095214021a4e2a10fd2312e08f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 13 Oct 2023 13:46:20 +0200 Subject: [PATCH] module-ffado: remove hardcoded quantum_limit --- src/modules/module-ffado-driver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/module-ffado-driver.c b/src/modules/module-ffado-driver.c index 4f7237271..22dc3562f 100644 --- a/src/modules/module-ffado-driver.c +++ b/src/modules/module-ffado-driver.c @@ -505,7 +505,7 @@ static void make_stream_ports(struct stream *s) port->latency[s->direction] = latency; port->is_midi = is_midi; - port->buffer = calloc(sizeof(float), impl->quantum_limit); + port->buffer = calloc(impl->quantum_limit, sizeof(float)); if (port->buffer == NULL) { pw_log_error("Can't create port buffer: %m"); return; @@ -1024,9 +1024,12 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) "latency.internal.input", 0); impl->output_latency = pw_properties_get_uint32(props, "latency.internal.output", 0); - impl->quantum_limit = 8192; impl->utils = pw_thread_utils_get(); + impl->quantum_limit = pw_properties_get_uint32( + pw_context_get_properties(context), + "default.clock.quantum-limit", 8192u); + impl->sink.props = pw_properties_new(NULL, NULL); impl->source.props = pw_properties_new(NULL, NULL); if (impl->source.props == NULL || impl->sink.props == NULL) {