topology2: add Cherry Trail RT5677 IPC3 topology - #11129
Open
MaurizioCasciano wants to merge 2 commits into
Open
topology2: add Cherry Trail RT5677 IPC3 topology#11129MaurizioCasciano wants to merge 2 commits into
MaurizioCasciano wants to merge 2 commits into
Conversation
Add topology2 support for generating and deploying IPC3 topology files alongside the existing IPC4 production set. Describe the Yoga Book RT5677 SSP2 playback, capture, low-latency and deep-buffer paths while preserving the Cherry Trail memory, scheduler and hardware configuration required by the legacy IPC3 firmware. Signed-off-by: Maurizio Casciano <mauriziocasciano7@gmail.com>
SOF IPC3 derives the DAI channel count from the population count of the active TDM slot mask. The original topology enabled all four frame slots with mask 0xf while exposing two-channel PCM streams, so STREAM_PCM_PARAMS failed with -EINVAL. Keep the required four-slot, 25-bit frame geometry but activate only the two stereo slots with mask 0x3. Also use the defined default_hw_config_id attribute and add an artifact verifier for the SSP clocks, format, frame geometry, sample width and PCM capabilities. Tested on a Lenovo Yoga Book YB1-X91L with PCM0 playback and capture in S16_LE, S24_LE and S32_LE at 48 kHz stereo, plus PCM1 deep-buffer playback. Signed-off-by: Maurizio Casciano <mauriziocasciano7@gmail.com>
Collaborator
|
Can one of the admins verify this patch?
|
lgirdwood
requested changes
Aug 26, 2026
lgirdwood
left a comment
Member
There was a problem hiding this comment.
LGTM, but pls also line wrap the commit messages.
| @@ -0,0 +1,231 @@ | |||
| #!/usr/bin/env python3 | |||
| # SPDX-License-Identifier: BSD-3-Clause | |||
| """Verify the compiled Cherry Trail RT5677 topology contract.""" | |||
Member
There was a problem hiding this comment.
It may be more useful for all topology users as a general validation tool for verifying PCMs and SSPs i.e. where topology could be passed in from command line
Comment on lines
+145
to
+158
| "format": 5, # SND_SOC_DAI_FORMAT_DSP_B | ||
| "invert_bclk": 1, | ||
| "invert_fsync": 0, | ||
| "bclk_provider": 1, | ||
| "fsync_provider": 1, | ||
| "mclk_direction": 1, | ||
| "mclk_rate": 19_200_000, | ||
| "bclk_rate": 4_800_000, | ||
| "fsync_rate": 48_000, | ||
| "tdm_slots": 4, | ||
| "tdm_slot_width": 25, | ||
| "tx_slots": 0x3, | ||
| "rx_slots": 0x3, | ||
| } |
Member
There was a problem hiding this comment.
i.e. these would be the defaults but could be overridden on command line to test other configs.
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.
Summary
Root cause
SOF IPC3 derives the DAI channel count from the population count of the active TDM slot mask. Enabling all four frame slots with
0xfwhile exposing stereo PCMs makesSTREAM_PCM_PARAMSfail with-EINVAL. The RT5677 still uses a four-slot frame, but only slots 0 and 1 are active (0x3).Validation
cmake --build build-tools --target topology2_prod_ipc3_sof-cht-rt5677python3 tools/topology/topology2/verify-cht-rt5677.py build-tools/topology/topology2/production/ipc3/sof-cht-rt5677.tplgcmake --build build-tools --target topologies2(580 generated targets)746962d80115e3b9b0b2fbe44673b4e3acef5f06f7914baf235a5a652e8be09cHardware-tested on a Lenovo Yoga Book YB1-X91L. PCM0 playback and capture open successfully as S16_LE, S24_LE and S32_LE at 48 kHz stereo; PCM1 deep-buffer playback also opens successfully. Speaker, headphones and internal DMIC routing were exercised through UCM without the previous IPC parameter error.
Repeated suspend/resume while live PipeWire streams remain open can still expose a separate SOF 2.2 firmware resume failure. This PR fixes the topology channel contract and does not claim to solve that firmware lifecycle issue.
Fixes #11105