From 7f95b3d40578a703d5c03e8a2668462c75c70eb1 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Fri, 13 Nov 2026 19:18:10 +0200 Subject: [PATCH 1/2] audio: eq_iir: fix silent output in pass-through mode Commit 1061bcdc053e ("audio: eq_iir: switch to source/sink processing API") placed the memcpy_s() call of eq_iir_pass() inside an assert(). On Zephyr builds without CONFIG_ASSERT, assert() expands to an empty statement and the argument is not evaluated, so no data is copied to the sink. The sink is still committed, resulting in silence. This is hit e.g. on Intel PTL with the HDA topology, where the EQ IIR blob sets all channels to bypass and the pass-through function is used. Playback to PCM0 completes without errors but no audio is heard. Fix by evaluating memcpy_s() outside of assert(). Fixes: 1061bcdc053e ("audio: eq_iir: switch to source/sink processing API") Signed-off-by: Kai Vehmanen --- src/audio/eq_iir/eq_iir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/audio/eq_iir/eq_iir.c b/src/audio/eq_iir/eq_iir.c index a7de780ee070..d59258e22514 100644 --- a/src/audio/eq_iir/eq_iir.c +++ b/src/audio/eq_iir/eq_iir.c @@ -325,6 +325,7 @@ void eq_iir_pass(struct processing_module *mod, const struct cir_buf_source *sou const uint8_t *src = source->ptr; uint8_t *dst = sink->ptr; size_t bytes = frames * cd->frame_bytes; + int ret; while (bytes) { size_t src_contiguous = (const uint8_t *)source->buf_end - src; @@ -337,7 +338,8 @@ void eq_iir_pass(struct processing_module *mod, const struct cir_buf_source *sou continue; } - assert(!memcpy_s(dst, dst_contiguous, src, copy)); + ret = memcpy_s(dst, dst_contiguous, src, copy); + assert(!ret); bytes -= copy; src = source_cir_buf_wrap(src + copy, source->buf_start, source->buf_end); dst = cir_buf_wrap(dst + copy, sink->buf_start, sink->buf_end); From c47216d6c123b72114bf9aecc2fdc7d4cc401579 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Fri, 13 Nov 2026 19:18:10 +0200 Subject: [PATCH 2/2] audio: eq_iir: ipc3: fix pointer double advance in s32 pass functions Commit 1061bcdc053e ("audio: eq_iir: switch to source/sink processing API") changed the circular buffer wrap in eq_iir_s32_s16_pass() and eq_iir_s32_s24_pass() to use "x + n" and "y + n". These functions already advance x and y in the copy loop, so the pointers were moved forward twice per chunk, skipping input and writing output to the wrong location. Wrap the already advanced pointers, as was done before the conversion. Fixes: 1061bcdc053e ("audio: eq_iir: switch to source/sink processing API") Signed-off-by: Kai Vehmanen --- src/audio/eq_iir/eq_iir_ipc3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audio/eq_iir/eq_iir_ipc3.c b/src/audio/eq_iir/eq_iir_ipc3.c index e8e0b3d02965..ef5c33497ff1 100644 --- a/src/audio/eq_iir/eq_iir_ipc3.c +++ b/src/audio/eq_iir/eq_iir_ipc3.c @@ -151,8 +151,8 @@ static void eq_iir_s32_s16_pass(struct processing_module *mod, y++; } remaining_samples -= n; - x = source_cir_buf_wrap(x + n, source->buf_start, source->buf_end); - y = cir_buf_wrap(y + n, sink->buf_start, sink->buf_end); + x = source_cir_buf_wrap(x, source->buf_start, source->buf_end); + y = cir_buf_wrap(y, sink->buf_start, sink->buf_end); } } #endif /* CONFIG_FORMAT_S16LE && CONFIG_FORMAT_S32LE */ @@ -181,8 +181,8 @@ static void eq_iir_s32_s24_pass(struct processing_module *mod, y++; } remaining_samples -= n; - x = source_cir_buf_wrap(x + n, source->buf_start, source->buf_end); - y = cir_buf_wrap(y + n, sink->buf_start, sink->buf_end); + x = source_cir_buf_wrap(x, source->buf_start, source->buf_end); + y = cir_buf_wrap(y, sink->buf_start, sink->buf_end); } } #endif /* CONFIG_FORMAT_S24LE && CONFIG_FORMAT_S32LE */