Skip to content

module: cadence: rework module to use sink/source api#10792

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

module: cadence: rework module to use sink/source api#10792
softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:p20-cadence

Conversation

@softwarecki
Copy link
Copy Markdown
Collaborator

Rework the cadence ipc3 module variant to only use the sink/source api to prepare sof for the full transition to pipeline 2.0.

Make cadence_copy_data_from_buffer() shared across both ipc3 and ipc4 variants. Add a common cadence_copy_data_to_buffer() function. Remove the unnecessary const modifier from sink_buffer_start and eliminate redundant type casts.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reworks the Cadence codec module (IPC3 variant) to use the sink/source APIs (aligning with the pipeline 2.0 transition), and consolidates ring-buffer wrap copy logic into shared helpers used by both IPC3 and IPC4 variants.

Changes:

  • Added shared ring-buffer copy helpers cadence_copy_data_from_buffer() and cadence_copy_data_to_buffer() to remove duplicated wrap-handling logic.
  • Converted IPC3 Cadence processing to the sink/source .process interface (instead of the deprecated .process_raw_data interface).
  • Simplified IPC4 output copy path to use the new shared helper and adjusted sink_buffer_start mutability.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/include/sof/audio/module_adapter/module/cadence.h Declares new shared ring-buffer copy helper APIs.
src/audio/module_adapter/module/cadence.c Implements the shared ring-buffer copy helper functions.
src/audio/module_adapter/module/cadence_ipc4.c Removes local copy helper and uses the shared helper for sink writes.
src/audio/module_adapter/module/cadence_ipc3.c Switches to sink/source .process API and updates data movement to use shared helpers.

Comment thread src/audio/module_adapter/module/cadence_ipc3.c
Comment thread src/audio/module_adapter/module/cadence_ipc3.c
Comment thread src/audio/module_adapter/module/cadence_ipc4.c Outdated
Comment thread src/include/sof/audio/module_adapter/module/cadence.h Outdated
Rework the cadence ipc3 module variant to only use the sink/source api to
prepare sof for the full transition to pipeline 2.0.

Make cadence_copy_data_from_buffer() shared across both ipc3 and ipc4
variants. Add a common cadence_copy_data_to_buffer() function. Remove the
unnecessary const modifier from sink_buffer_start and eliminate redundant
type casts.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
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.

3 participants