Skip to content

module: mux: use size_t for frame and byte counts - #11290

Merged
lgirdwood merged 2 commits into
thesofproject:mainfrom
softwarecki:p20-size_t3
Oct 12, 2026
Merged

lgirdwood merged 2 commits into
thesofproject:mainfrom
softwarecki:p20-size_t3

Conversation

@softwarecki

Copy link
Copy Markdown
Collaborator

Change the return type and the sample_bytes and channels parameters of circ_buf_frames_without_wrap to size_t. Update the frame-count in mux module helpers to use and return size_t. Propagate size_t through the mux and demux processing paths.

Change the return type and the sample_bytes and channels parameters of
circ_buf_frames_without_wrap to size_t.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Update the mux frame-count helpers to use and return size_t. Propagate
size_t through the mux and demux processing paths.

Signed-off-by: Adrian Warecki <adrian.warecki@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 type propagation is complete and consistent with the surrounding buffer APIs.

0 open findings

What changed in this PR

Updates mux/demux frame and byte accounting to consistently use size_t, matching buffer APIs and preventing narrowing.

Changes:

  • Changes circular-buffer frame calculations to size_t.
  • Propagates size_t through mux/demux processing callbacks and loops.
  • Uses size_t for derived byte counts.
File Description
src/​include/​module/​audio/​audio_stream.h Updates the circular-buffer helper signature.
src/​audio/​mux/​mux.h Updates processing callback frame types.
src/​audio/​mux/​mux.c Uses size_t for process frame counts.
src/​audio/​mux/​mux_generic.c Propagates size_t through format-specific processing.

🧠 Review effort: Balanced


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

@intel-sofci

Copy link
Copy Markdown

PR 11290: test results

Run date: 2026-10-09 19:12 UTC

Tested commit: 3d3cd9953b986ffad512b401a8984e335cef9550

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

@lgirdwood
lgirdwood merged commit ddd8914 into thesofproject:main Oct 12, 2026
46 checks passed
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.

4 participants