Skip to content

audio: eq_iir: fix silent output in pass-through mode (and other fixes) - #11458

Open
kv2019i wants to merge 2 commits into
thesofproject:mainfrom
kv2019i:202611-eqiir-fixes-main
Open

kv2019i wants to merge 2 commits into
thesofproject:mainfrom
kv2019i:202611-eqiir-fixes-main

Conversation

@kv2019i

@kv2019i kv2019i commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

A few fixes to eq_iir related to pipeline2.0 conversion in commit 1061bcd

Commit 1061bcd ("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: 1061bcd ("audio: eq_iir: switch to source/sink processing API")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Commit 1061bcd ("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: 1061bcd ("audio: eq_iir: switch to source/sink processing API")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The IIR equalizer pass-through changes have no active review issues.

No open issues 🎉

What changed in this PR

Fixes IIR equalizer pass-through regressions introduced during the pipeline 2.0 conversion, restoring sample copying and correct buffer traversal.

Changes:

  • Moves memcpy_s() outside the assertion so copying still occurs when assertions are disabled.
  • Removes duplicate pointer advances in IPC3 S32-to-S16 and S32-to-S24 pass-through conversions.
File Description
src/​audio/​eq_iir/​eq_iir.c Ensures pass-through copying runs independently of assertions.
src/​audio/​eq_iir/​eq_iir_ipc3.c Corrects circular-buffer pointer wrapping after sample conversion.

Review effort: Balanced

@intel-sofci

Copy link
Copy Markdown

PR 11458: test results

Run date: 2026-11-13 18:23 UTC

Tested commit: c47216d6c123b72114bf9aecc2fdc7d4cc401579

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants