Skip to content

module: tdfb: rework module to use sink/source api - #11297

Open
softwarecki wants to merge 3 commits into
thesofproject:mainfrom
softwarecki:p20-tdfb
Open

softwarecki wants to merge 3 commits into
thesofproject:mainfrom
softwarecki:p20-tdfb

Conversation

@softwarecki

Copy link
Copy Markdown
Collaborator

Rework the tdfb audio module to only use the sink/source api to prepare sof for the full transition to pipeline 2.0.

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.

🟡 Changes recommended

The delay-size error contract and configured frame-alignment handling are currently broken.

2 open findings
What changed in this PR

Migrates TDFB processing to the sink/source API for pipeline 2.0 readiness.

Changes:

  • Reworks TDFB buffering and processing around circular source/sink views.
  • Updates generic and optimized FIR implementations to the new interfaces.
  • Adjusts related size and channel-count types.
File Description
src/​math/​iir_df1.c Changes delay-size return type.
src/​include/​sof/​math/​iir_df1.h Updates the public declaration.
src/​audio/​tdfb/​tdfb.c Migrates core processing and preparation.
src/​audio/​tdfb/​tdfb_ipc4.c Updates IPC4 source/sink formats.
src/​audio/​tdfb/​tdfb_ipc3.c Updates parameter signature.
src/​audio/​tdfb/​tdfb_hifiep.c Migrates HiFi2EP processing.
src/​audio/​tdfb/​tdfb_hifi3.c Migrates HiFi3 processing.
src/​audio/​tdfb/​tdfb_generic.c Migrates generic processing.
src/​audio/​tdfb/​tdfb_direction.c Updates frame and channel types.
src/​audio/​tdfb/​tdfb_comp.h Updates TDFB interfaces and state.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/math/iir_df1.c
Comment thread src/audio/tdfb/tdfb.c
@intel-sofci

Copy link
Copy Markdown

PR 11297: test results

Run date: 2026-10-12 22:05 UTC

Tested commit: 9c62482b0fd31c87b81d46c5e97ccd36e5b060fa

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

@lgirdwood

Copy link
Copy Markdown
Member

@softwarecki think its good to merge once copilot is resolved.

@lgirdwood

Copy link
Copy Markdown
Member

@softwarecki just one issue

/home/runner/work/sof/sof/workspace/sof/src/audio/tdfb/tdfb_direction.c:204:12: error: use of undeclared identifier 'dev'
  204 |                 comp_err(dev, "Invalid iir configuration");
      |                          ^

Change iir_delay_size_df1() to return size_t and report 0 on an invalid
configuration instead of a negative value. Document that a 0 return signals
an error, and add the missing return-value checks where callers did not
handle that failure.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Rework the tdfb module to only use the sink/source api to prepare sof for
the full transition to pipeline 2.0.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Use unsigned int for channel counts and size_t for frame, sample counts and
buffer size. Change the IIR delay-size helper to return size_t.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
@softwarecki
softwarecki force-pushed the p20-tdfb branch 2 times, most recently from 1c2b295 to 461a293 Compare October 13, 2026 14:39
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.

5 participants