Repository navigation
module: mux: use size_t for frame and byte counts - #11290
Open
softwarecki wants to merge 2 commits into
Open
softwarecki wants to merge 2 commits into
softwarecki wants to merge 2 commits into
Conversation
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>
softwarecki
requested review from
abonislawski,
piotrhoppeintel,
tmleman and
wjablon1
and
a balanced review from Copilot
October 9, 2026 18:47
softwarecki
requested review from
dbaluta,
fkwasowi,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
October 9, 2026 18:47
Contributor
There was a problem hiding this comment.
🟢 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_tthrough mux/demux processing callbacks and loops. - Uses
size_tfor 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.
lgirdwood
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change the return type and the sample_bytes and channels parameters of
circ_buf_frames_without_wraptosize_t. Update the frame-count in mux module helpers to use and returnsize_t. Propagatesize_tthrough the mux and demux processing paths.