Skip to content

module: cadence: keep ipc3 on the raw-data path to fix compressed playback - #11144

Open
dbaluta wants to merge 1 commit into
thesofproject:mainfrom
dbaluta:cadence-ipc3-fix-on-main
Open

module: cadence: keep ipc3 on the raw-data path to fix compressed playback#11144
dbaluta wants to merge 1 commit into
thesofproject:mainfrom
dbaluta:cadence-ipc3-fix-on-main

Conversation

@dbaluta

@dbaluta dbaluta commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Partially revert 0b94fe7 for the IPC3 variant only. Moving cadence IPC3 to the sink/source .process interface broke compressed playback a decoded codec frame is far larger than the LL sink can hold, so output never fits and is never committed. The raw-data path uses the adapter's intermediate buffer, which absorbs the frame. IPC4 and the shared helpers from that commit are kept.

Fixes: 0b94fe7 ("module: cadence: rework module to use sink/source api")

…yback

Partially revert 0b94fe7 for the IPC3 variant only. Moving cadence IPC3
to the sink/source .process interface broke compressed playback a decoded
codec frame is far larger than the LL sink can hold, so output
never fits and is never committed. The raw-data path uses the adapter's
intermediate buffer, which absorbs the frame. IPC4 and the shared helpers
from that commit are kept.

Fixes: 0b94fe7 ("module: cadence: rework module to use sink/source api")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Assisted-by:  Claude Opus 4.8
Copilot AI lite review requested due to automatic review settings August 31, 2026 15:21

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.

Pull request overview

This PR adjusts the IPC3 Cadence codec module to use the module-adapter raw-data processing path again, restoring compressed playback by routing decoded frames through the adapter’s intermediate buffering rather than directly through the sink/source .process interface.

Changes:

  • Switch IPC3 Cadence processing from sink/source .process to .process_raw_data to re-enable the raw-data buffering path.
  • Update the IPC3 processing function to consume/produce via input_stream_buffer / output_stream_buffer instead of sink/source APIs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 221 to +225
struct module_data *codec = &mod->priv;
size_t output_bytes = cadence_codec_get_samples(mod) *
int free_bytes, output_bytes = cadence_codec_get_samples(mod) *
mod->stream_params->sample_container_bytes *
mod->stream_params->channels;
size_t remaining = source_get_data_available(sources[0]);
const void *source_buffer_start, *src_ptr;
void *sink_ptr, *sink_buffer_start;
size_t src_bytes, sink_bytes;
uint32_t remaining = input_buffers[0].size;
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