From 5cc63c1b347b85b19cb280823196d1c7e4f892e3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 11 Mar 2026 12:36:39 +0100 Subject: [PATCH] audiomixer: only add the input port to mix_list Adding the output port is not a problem because there is never a buffer to consume and mix but it wastes cycles. --- spa/plugins/audiomixer/audiomixer.c | 2 +- spa/plugins/audiomixer/mixer-dsp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/audiomixer/audiomixer.c b/spa/plugins/audiomixer/audiomixer.c index 99b0658a0..54549bce8 100644 --- a/spa/plugins/audiomixer/audiomixer.c +++ b/spa/plugins/audiomixer/audiomixer.c @@ -725,7 +725,7 @@ static int do_port_set_io(struct spa_loop *loop, bool async, uint32_t seq, port->io[0] = info->data; port->io[1] = info->data; } - if (!port->active) { + if (port->direction == SPA_DIRECTION_INPUT && !port->active) { spa_list_append(&info->impl->mix_list, &port->mix_link); port->active = true; } diff --git a/spa/plugins/audiomixer/mixer-dsp.c b/spa/plugins/audiomixer/mixer-dsp.c index 5bd4e1a1e..698426d21 100644 --- a/spa/plugins/audiomixer/mixer-dsp.c +++ b/spa/plugins/audiomixer/mixer-dsp.c @@ -718,7 +718,7 @@ static int do_port_set_io(struct spa_loop *loop, bool async, uint32_t seq, port->io[0] = info->data; port->io[1] = info->data; } - if (!port->active) { + if (port->direction == SPA_DIRECTION_INPUT && !port->active) { spa_list_append(&info->impl->mix_list, &port->mix_link); port->active = true; }