module: ctc: rework module to use sink/source api - #11223
Open
softwarecki wants to merge 1 commit into
Open
softwarecki wants to merge 1 commit into
softwarecki wants to merge 1 commit into
Conversation
Rework the google ctc audio processing module 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,
piotrhoppeintel,
serhiy-katsyuba-intel,
tmleman and
wjablon1
September 22, 2026 16:02
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Outstanding buffer sizing, circular-buffer handling, and rollback findings must be fixed.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (3)
What changed in this PR
Reworks the Google CTC audio processing module to use the SOF sink/source API for Pipeline 2.0 compatibility.
Changes:
- Updates CTC interfaces and callbacks.
- Migrates processing to sink/source acquisition and commit APIs.
- Adapts format and buffer handling.
| File | Summary |
|---|---|
src/audio/google/google_ctc_audio_processing.h |
Updates the CTC callback contract. |
src/audio/google/google_ctc_audio_processing.c |
Implements sink/source-based CTC processing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| size_t samples = frames * n_ch; | ||
| const int16_t *src, *src_start; | ||
| int16_t *dest, *dest_start; | ||
| size_t src_samples, dest_samples; |
Comment on lines
+97
to
+100
| samples_to_process = MIN(samples, cir_buf_samples_without_wrap_s16(src, | ||
| src_start + src_samples)); | ||
| samples_to_written = MIN(samples, cir_buf_samples_without_wrap_s16(dest, | ||
| dest_start + dest_samples)); |
|
|
||
| ret = source_release_data(source, samples_to_process * sizeof(int32_t)); | ||
| if (ret) { | ||
| sink_commit_buffer(sink, written_samples * sizeof(int32_t)); |
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 google ctc audio processing module to only use the sink/source api to prepare sof for the full transition to pipeline 2.0.