Skip to content

audio: dcblock: use size_t for processing counts and unsigned channel counts - #11336

Open
softwarecki wants to merge 2 commits into
thesofproject:mainfrom
softwarecki:p20-dcblock
Open

softwarecki wants to merge 2 commits into
thesofproject:mainfrom
softwarecki:p20-dcblock

Conversation

@softwarecki

@softwarecki softwarecki commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Convert frame, sample and byte counts to size_t, and use unsigned channel counts to match the sink/source API and stream types. Remove narrowing of wide processing counts.

Switch the processing function frame argument and the per-call sample
and byte counters to size_t so they match the sink/source API and no
longer truncate wide counts.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Store and iterate the channel count as unsigned int to match the stream
channel count type.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
@softwarecki
softwarecki requested a review from a team as a code owner October 22, 2026 20:53
Copilot AI balanced review requested due to automatic review settings October 22, 2026 20:53

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 scoped type changes are consistent across the callbacks and implementations, with no unresolved correctness issues identified.

No open issues 🎉

What changed in this PR

This PR aligns DC-block processing counts and channel types with the sink/source APIs, removing narrowing conversions across the component’s processing implementations.

Changes:

  • Use size_t for frame counts, affected sample counts, and processing indices.
  • Use unsigned channel counts and channel indices.
  • Keep callback signatures consistent across generic, ARM, HiFi3, and HiFi4 implementations.
File Description
src/​audio/​dcblock/​dcblock.h Updates the callback signature, channel field, and function-map index types.
src/​audio/​dcblock/​dcblock.c Preserves API frame counts as size_t.
src/​audio/​dcblock/​dcblock_hifi4.c Aligns processing signatures and frame/channel indices.
src/​audio/​dcblock/​dcblock_hifi3.c Widens sample counters and aligns frame/channel types.
src/​audio/​dcblock/​dcblock_generic.c Aligns processing signatures and channel types.
src/​audio/​dcblock/​dcblock_arm.c Widens sample counters and indices and aligns channel types.

Review effort: Balanced

@intel-sofci

Copy link
Copy Markdown

PR 11336: test results

Run date: 2026-10-22 21:52 UTC

Tested commit: 8945a7bafdbffd13623287e7ede4a0f8f1a2bbf4

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