Skip to content

module: cadence_ipc4: fix mono AAC playback - #11608

Open
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/compr-aac-mono
Open

ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/compr-aac-mono

Conversation

@ujfalusi

@ujfalusi ujfalusi commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

The Cadence stereo AAC decoder library always produces 2-channel interleaved output. TO_STEREO is ignored for non-mono streams and for mono streams it only selects whether the second channel is a duplicate (default) or left unmodified, the output is never packed mono.

Setting TO_STEREO based on ch_out for RAW streams was therefore wrong and with a mono path all mono AAC streams were played at half speed.

Drop the TO_STEREO configuration and keep only channel 0 of the decoder output when the path is mono. Reject paths with more than 2 channels.

Fixes: fd8fa85 ("audio: cadence: support RAW AAC decoding with IPC4")

The Cadence stereo AAC decoder library always produces 2-channel
interleaved output. TO_STEREO is ignored for non-mono streams and for
mono streams it only selects whether the second channel is a duplicate
(default) or left unmodified, the output is never packed mono.

Setting TO_STEREO based on ch_out for RAW streams was therefore wrong
and with a mono path all mono AAC streams were played at half speed.

Drop the TO_STEREO configuration and keep only channel 0 of the decoder
output when the path is mono. Reject paths with more than 2 channels.

Fixes: fd8fa85 ("audio: cadence: support RAW AAC decoding with IPC4")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings December 3, 2026 13:51

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.

🟢 Approval recommended

No actionable issues were found in the reviewed changes.

No open issues 🎉

What changed in this PR

Fixes half-speed mono AAC playback in the IPC4 Cadence module by adapting the decoder’s stereo output to mono paths.

Changes:

  • Removes TO_STEREO configuration and retains only channel 0 for mono output.
  • Rejects output paths with channel counts other than one or two.
File Description
src/​include/​sof/​audio/​module_adapter/​module/​cadence.h Tracks sample size for mono output compaction.
src/​audio/​module_adapter/​module/​cadence_ipc4.c Compacts stereo output for mono paths and validates channel counts.

Review effort: Balanced

@intel-sofci

Copy link
Copy Markdown

PR 11608: test results

Run date: 2026-12-03 17:55 UTC

Tested commit: 90d96d9fb9260c5fb28a00ce46506f10f711f485

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

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.

6 participants