Skip to content

module: ctc: rework module to use sink/source api - #11223

Open
softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:p20-ctc
Open

softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:p20-ctc

Conversation

@softwarecki

Copy link
Copy Markdown
Collaborator

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.

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>

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.

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 High severity · 1 Medium severity

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));
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.

2 participants