Repository navigation
ipc3: module: cadence: rework module to use sink/source api - #11289
Open
softwarecki wants to merge 2 commits into
Open
softwarecki wants to merge 2 commits into
softwarecki wants to merge 2 commits into
Conversation
Add sink_set_size() and source_set_size() backed by a new optional set_size op in struct sink_ops / source_ops, allowing a module to grow the buffer behind a sink or source after allocation. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Rework the cadence ipc3 module variant 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>
softwarecki
requested review from
abonislawski,
dbaluta,
serhiy-katsyuba-intel,
tmleman and
wjablon1
and
a balanced review from Copilot
October 9, 2026 17:50
softwarecki
requested review from
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
October 9, 2026 17:50
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Startup underruns, unsafe output-space handling, unintended shrinking, and incomplete failure cleanup must be addressed.
1 open finding
What changed in this PR
Reworks the Cadence IPC3 codec to use sink/source APIs and introduces buffer-resizing support.
Changes:
- Adds optional sink/source resize operations.
- Implements resizing for component buffers.
- Migrates Cadence IPC3 processing from raw buffers to sink/source APIs.
| File | Description |
|---|---|
src/module/audio/source_api.c |
Adds source resize dispatch. |
src/module/audio/sink_api.c |
Adds sink resize dispatch. |
src/include/module/audio/source_api.h |
Defines the source resize API. |
src/include/module/audio/sink_api.h |
Defines the sink resize API. |
src/audio/module_adapter/module/cadence_ipc3.c |
Migrates Cadence IPC3 processing. |
src/audio/buffers/comp_buffer.c |
Implements component-buffer resizing callbacks. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
|
|
||
| /* grow the sink so a whole decoded frame fits */ | ||
| ret = sink_set_size(sinks[0], 2 * codec->mpd.out_buff_size); |
PR 11289: test resultsRun date: 2026-10-09 19:32 UTC Tested commit: 6421b53df3bb04a0a144918e295f76b0b1c2c8d2 |
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.

Rework the cadence ipc3 module variant to only use the sink/source api to prepare sof for the full transition to pipeline 2.0.
Add
sink_set_size()andsource_set_size()backed by a new optionalset_sizeop instruct sink_ops/source_ops, allowing a module to grow the buffer behind a sink or source after allocation.@dbaluta: please review. I dropped
cadence_codec_deep_buff_allowed()and themod->deep_buff_bytes. It fed silence to the DAI until the decoder produced its first frame. The sink/source path has no such startup zero-fill. Is it safe to drop them, or do we need to keep that behaviour?