topology2: add Cherry Trail RT5677 IPC3 topology - #11129
topology2: add Cherry Trail RT5677 IPC3 topology#11129MaurizioCasciano 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>
|
Can one of the admins verify this patch?
|
lgirdwood
left a comment
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.""" | |||
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
| "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, | ||
| } |
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.
kv2019i
left a comment
There was a problem hiding this comment.
This is pretty cool @MaurizioCasciano ! This is not the easiest solution as SOF main has no official IPC3 support for Intel targets built with topology2 (we never transitioned old Intel targets to new alsaconf-style topology2 language). We do still maintain CHT/BYT support with m4-based topology1 in stable-v2.2 branch of this project that has all the IPC3 infra and we are adding new binaries from this branch to our public sof-bin releases.
Both are fine to me. Just noting it's possible to add new CHT//BYT targets to stable-v2.2 as well.
|
Tagged for v2.15, we can pull in as fix once stable branch is created. |
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