Repository navigation
Conversation
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>
ujfalusi
requested review from
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
December 3, 2026 13:51
Contributor
There was a problem hiding this comment.
🟢 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_STEREOconfiguration 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
kv2019i
approved these changes
Dec 3, 2026
singalsu
approved these changes
Dec 3, 2026
lgirdwood
approved these changes
Dec 3, 2026
PR 11608: test resultsRun date: 2026-12-03 17:55 UTC Tested commit: 90d96d9fb9260c5fb28a00ce46506f10f711f485 |
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.
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")