Repository navigation
audio: crossover: const-correctness, unsigned/size_t types and comp_buffer removal - #11319
Open
softwarecki wants to merge 4 commits into
Open
softwarecki wants to merge 4 commits into
softwarecki wants to merge 4 commits into
Conversation
Convert prepare, the sink assignment and the IPC4 params helper to the sink/source API and drop their struct comp_buffer uses. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Change the channel-count parameters of the setup and coefficient init helpers and the channel count read in prepare from int to unsigned int. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Use source_cir_buf_wrap instead of cir_buf_wrap to advance the read-only source pointer in the processing functions. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Change the loop counter in the processing-function lookup helpers from int to size_t so it matches crossover_proc_fncount and avoids a signed/unsigned comparison. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
softwarecki
requested review from
abonislawski,
lgirdwood,
serhiy-katsyuba-intel,
tmleman and
wjablon1
October 16, 2026 16:17
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking issues in this focused API and type-safety refactor; builds and tests were not run.
0 open findings
What changed in this PR
Refactors the crossover component to use sink/source APIs and improves type safety without changing audio processing behavior.
Changes:
- Replaces direct buffer access with sink/source APIs.
- Uses unsigned channel counts and
size_tlookup indices. - Preserves constness when wrapping source pointers.
| File | Description |
|---|---|
| src/audio/crossover/crossover.h | Updates helper signatures and lookup index types. |
| src/audio/crossover/crossover.c | Converts preparation and sink assignment to sink/source APIs. |
| src/audio/crossover/crossover_ipc4.c | Updates formats through sink/source APIs. |
| src/audio/crossover/crossover_ipc3.c | Aligns the no-op helper signature. |
| src/audio/crossover/crossover_generic.c | Uses const-correct source pointer wrapping. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
serhiy-katsyuba-intel
approved these changes
Oct 16, 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.
Convert prepare, the sink assignment and the IPC4 params helper to the sink/source API and drop their
struct comp_bufferuses.Change the channel-count parameters of the setup and coefficient init helpers and the channel count read in prepare from
inttounsigned int.Use
source_cir_buf_wrapinstead ofcir_buf_wrapto advance the read-only source pointer in the processing functions.Change the loop counter in the processing-function lookup helpers from
inttosize_tso it matchescrossover_proc_fncountand avoids a signed/unsigned comparison.