From 6e6fb1207dd3ff32f182e7cf2c9e89be6f283ff2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 20 May 2026 11:32:39 +0200 Subject: [PATCH] filter-graph: sync_volume initializes the control ports Setting the volume control ports with a volume param also initializes the controls. This ensures the controls are not restored to their default value when the graph is activated. Fixes #5192 --- spa/plugins/filter-graph/filter-graph.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spa/plugins/filter-graph/filter-graph.c b/spa/plugins/filter-graph/filter-graph.c index 024d6ecf0..058453761 100644 --- a/spa/plugins/filter-graph/filter-graph.c +++ b/spa/plugins/filter-graph/filter-graph.c @@ -773,6 +773,9 @@ static int sync_volume(struct graph *graph, struct volume *vol) } v = v * (vol->max[n_port] - vol->min[n_port]) + vol->min[n_port]; + p->control_initialized = true; + p->control_current = v; + n_hndl = SPA_MAX(1u, p->node->n_hndl); res += port_id_set_control_value(p, i % n_hndl, v); }