From 4ab3ab6081a0b15d2432d376fd59fba63814398f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 13 Feb 2024 15:55:07 +0100 Subject: [PATCH] impl-device: set quantum-limit correctly Pass the quantum limit also to the main node. --- src/pipewire/impl-device.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pipewire/impl-device.c b/src/pipewire/impl-device.c index 7f50a1c3b..b090203f5 100644 --- a/src/pipewire/impl-device.c +++ b/src/pipewire/impl-device.c @@ -770,6 +770,7 @@ static void device_add_object(struct pw_impl_device *device, uint32_t id, struct pw_context *context = device->context; struct spa_handle *handle, *subhandle = NULL; spa_autoptr(pw_properties) props = NULL; + const struct pw_properties *p; int res; void *iface; struct object_data *od = NULL; @@ -790,6 +791,10 @@ static void device_add_object(struct pw_impl_device *device, uint32_t id, if ((str = pw_properties_get(device->properties, "device.object.properties"))) pw_properties_update_string(props, str, strlen(str)); + p = pw_context_get_properties(context); + pw_properties_set(props, "clock.quantum-limit", + pw_properties_get(p, "default.clock.quantum-limit")); + handle = pw_context_load_spa_handle(context, info->factory_name, &props->dict); if (handle == NULL) { pw_log_warn("%p: can't load handle %s: %m", @@ -805,11 +810,6 @@ static void device_add_object(struct pw_impl_device *device, uint32_t id, if (spa_streq(info->type, SPA_TYPE_INTERFACE_Node)) { struct pw_impl_node *node; - const struct pw_properties *p; - - p = pw_context_get_properties(context); - pw_properties_set(props, "clock.quantum-limit", - pw_properties_get(p, "default.clock.quantum-limit")); if ((str = pw_properties_get(props, "node.adapter")) != NULL) { char name[64];