Repository navigation
topology2: ipc3: add Cherry Trail RT5677 topology #11326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lgirdwood
merged 1 commit into
thesofproject:main
from
Yoga-Book:submission/cht-rt5677-topology2-main-v1
Oct 23, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,334 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| <searchdir:include> | ||
| <searchdir:include/common> | ||
| <searchdir:include/components> | ||
| <searchdir:include/dais> | ||
| <searchdir:include/pipelines> | ||
| <searchdir:platform> | ||
| <searchdir:platform/intel> | ||
|
|
||
| <vendor-token.conf> | ||
| <tokens.conf> | ||
| <manifest.conf> | ||
| <data.conf> | ||
| <pcm.conf> | ||
| <pcm_caps.conf> | ||
| <fe_dai.conf> | ||
| <route.conf> | ||
| <common_definitions.conf> | ||
| <virtual.conf> | ||
| <ipc3/volume-playback.conf> | ||
| <ipc3/mixer-volume-dai-playback.conf> | ||
| <ipc3/volume-dai-capture.conf> | ||
| <ssp.conf> | ||
| <intel/cht-hw-config.conf> | ||
|
|
||
| Define { | ||
| # Cherry Trail uses the first-generation SSP configuration blob and IPC3. | ||
| SSP_BLOB_VERSION $SSP_BLOB_VERSION_1_0 | ||
| } | ||
|
|
||
| # The machine driver connects the RT5677 AIF routes through these platform | ||
| # widgets. They mirror the widgets exposed by the legacy Cherry Trail topology. | ||
| Object.Widget.virtual [ | ||
| { name "codec_out0" type "output" index 1 } | ||
| { name "codec_out1" type "output" index 2 } | ||
| { name "codec_in0" type "input" index 3 } | ||
| { name "codec_in1" type "input" index 4 } | ||
| { name "ssp2 Rx" type "input" index 5 } | ||
| { name "ssp2 Tx" type "output" index 6 } | ||
| ] | ||
|
|
||
| # SSP2 carries the RT5677 AIF1 stream. The bit and frame clocks are driven by | ||
| # the Cherry Trail SSP; the codec consumes both clocks. | ||
| Object.Dai.SSP [ | ||
| { | ||
| id 0 | ||
| dai_index 2 | ||
| direction "duplex" | ||
| name "SSP2-Codec" | ||
| default_hw_config_id 0 | ||
| sample_bits 24 | ||
|
|
||
| Object.Base.hw_config.1 { | ||
| name "SSP2" | ||
| id 0 | ||
| format "DSP_B" | ||
| mclk "codec_mclk_in" | ||
| mclk_freq 19200000 | ||
| bclk "codec_consumer" | ||
| bclk_freq 4800000 | ||
| # Match SND_SOC_DAIFMT_IB_NF in the machine driver: | ||
| # invert BCLK while leaving the frame clock non-inverted. | ||
| bclk_invert "true" | ||
| fsync "codec_consumer" | ||
| fsync_freq 48000 | ||
| fsync_invert "false" | ||
| tdm_slots 4 | ||
| tdm_slot_width 25 | ||
| # The frame has four slots, but the stereo stream uses slots 0 and 1. | ||
| # IPC3 derives the DAI channel count from these active-slot masks. | ||
| tx_slots 3 | ||
| rx_slots 3 | ||
| } | ||
| } | ||
| ] | ||
|
|
||
| Object.Pipeline { | ||
| ipc3-mixer-volume-dai-playback.1 { | ||
| index 1 | ||
| format "s24le" | ||
| channels 2 | ||
| dai_type "SSP" | ||
| dai_index 2 | ||
| periods 2 | ||
| # Two 1 ms periods at 48 kHz, stereo, four bytes per sample. | ||
| size 768 | ||
|
|
||
| Object.Widget.pipeline.1 { | ||
| stream_name "dai.SSP.2.playback" | ||
| priority 1 | ||
| core 0 | ||
| frames 0 | ||
| mips 5000 | ||
| } | ||
| Object.Widget.dai.playback { | ||
| format "s24le" | ||
| stream_name "SSP2-Codec" | ||
| core_id 0 | ||
| } | ||
| Object.Widget.pga.1 { | ||
| ramp_step_ms 20 | ||
| Object.Control.mixer.1 { | ||
| name "1 Master Playback Volume" | ||
| Object.Base.tlv.vtlv_m64s2 { | ||
| Object.Base.scale.m64s2 {} | ||
| } | ||
| } | ||
| } | ||
| Object.Base.route.4 { | ||
| source "buffer.1.2" | ||
| sink "dai.SSP.2.playback" | ||
| } | ||
| } | ||
|
|
||
| ipc3-volume-dai-capture.2 { | ||
| index 2 | ||
| format "s32le" | ||
| channels 2 | ||
| dai_type "SSP" | ||
| dai_index 2 | ||
| periods 2 | ||
| # Two 1 ms periods at 48 kHz, stereo, four bytes per sample. | ||
| size 768 | ||
|
|
||
| Object.Widget.pipeline.1 { | ||
| stream_name "dai.SSP.2.capture" | ||
| priority 0 | ||
| core 0 | ||
| frames 0 | ||
| mips 5000 | ||
| } | ||
| Object.Widget.dai.capture { | ||
| format "s24le" | ||
| stream_name "SSP2-Codec" | ||
| core_id 0 | ||
| } | ||
| Object.Widget.host.capture { | ||
| stream_name "Low Latency Capture 0" | ||
| core_id 0 | ||
| } | ||
| Object.Widget.pga.1 { | ||
| ramp_step_ms 250 | ||
| Object.Control.mixer.1 { | ||
| name "2 PCM 0 Capture Volume" | ||
| max 40 | ||
| Object.Base.channel.1 { | ||
| name "fl" | ||
| reg 0 | ||
| shift 0 | ||
| } | ||
| Object.Base.channel.2 { | ||
| name "fr" | ||
| reg 0 | ||
| shift 1 | ||
| } | ||
| Object.Base.tlv.vtlv_m64s2 { | ||
| Object.Base.scale.m64s2 {} | ||
| } | ||
| } | ||
| } | ||
| Object.Base.route.4 { | ||
| source "dai.SSP.2.capture" | ||
| sink "buffer.2.1" | ||
| } | ||
| } | ||
|
|
||
| ipc3-volume-playback.3 { | ||
| index 3 | ||
| format "s32le" | ||
| channels 2 | ||
| period 1000 | ||
| time_domain "dma" | ||
|
|
||
| Object.Widget.pipeline.1 { | ||
| priority 0 | ||
| core 0 | ||
| frames 0 | ||
| mips 100000 | ||
| stream_name "dai.SSP.2.playback" | ||
| } | ||
| Object.Widget.host.playback { | ||
| stream_name "Playback 0" | ||
| core_id 0 | ||
| period_sink_count 0 | ||
| period_source_count 2 | ||
| } | ||
| Object.Widget.pga.1 { | ||
| ramp_step_ms 20 | ||
| period_sink_count 2 | ||
| period_source_count 2 | ||
| Object.Control.mixer.1 { | ||
| name "3 Playback Volume" | ||
| Object.Base.tlv.vtlv_m64s2 { | ||
| Object.Base.scale.m64s2 {} | ||
| } | ||
| } | ||
| } | ||
| Object.Widget.buffer.1 { | ||
| caps "ram_dma_cache" | ||
| # IPC3 needs SOF_TKN_BUF_SIZE serialized explicitly. An object | ||
| # value takes precedence over the class's automatic size value. | ||
| size 768 | ||
| } | ||
| Object.Widget.buffer.2 { | ||
| caps "ram_dma_cache" | ||
| size 768 | ||
| } | ||
| } | ||
|
|
||
| ipc3-volume-playback.4 { | ||
| index 4 | ||
| format "s32le" | ||
| channels 2 | ||
| period 5000 | ||
| time_domain "dma" | ||
|
|
||
| Object.Widget.pipeline.1 { | ||
| priority 0 | ||
| core 0 | ||
| frames 0 | ||
| mips 100000 | ||
| stream_name "dai.SSP.2.playback" | ||
| } | ||
| Object.Widget.host.playback { | ||
| stream_name "Playback 1" | ||
| core_id 0 | ||
| period_sink_count 0 | ||
| period_source_count 2 | ||
| } | ||
| Object.Widget.pga.1 { | ||
| ramp_step_ms 20 | ||
| period_sink_count 2 | ||
| period_source_count 2 | ||
| Object.Control.mixer.1 { | ||
| name "4 Playback Volume" | ||
| Object.Base.tlv.vtlv_m64s2 { | ||
| Object.Base.scale.m64s2 {} | ||
| } | ||
| } | ||
| } | ||
| Object.Widget.buffer.1 { | ||
| caps "ram_dma_cache" | ||
| # Five milliseconds at 48 kHz, two channels and four bytes per | ||
| # sample, with two periods: 5 ms * 48 * 2 * 4 * 2 = 3840. | ||
| size 3840 | ||
| } | ||
| Object.Widget.buffer.2 { | ||
| caps "ram_dma_cache" | ||
| size 3840 | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # Both playback front ends feed the low-latency SSP2 mixer. | ||
| Object.Base.route [ | ||
| { source "buffer.3.2" sink "ipc3-mixer.1.1" } | ||
| { source "buffer.4.2" sink "ipc3-mixer.1.1" } | ||
| ] | ||
|
|
||
| Object.PCM.pcm [ | ||
| { | ||
| name "PCM" | ||
| id 0 | ||
| direction "duplex" | ||
|
|
||
| Object.Base.fe_dai.1 { | ||
| name "PCM 0" | ||
| } | ||
| Object.PCM.pcm_caps.playback { | ||
| direction "playback" | ||
| name "Playback 0" | ||
| formats "S16_LE,S24_LE,S32_LE" | ||
| rates "48000" | ||
| rate_min 48000 | ||
| rate_max 48000 | ||
| channels_min 2 | ||
| channels_max 2 | ||
| # Match the proven Cherry Trail IPC3 topology instead of the | ||
| # much larger generic topology2 PCM capability defaults. | ||
| periods_min 2 | ||
| periods_max 16 | ||
| period_size_min 192 | ||
| period_size_max 16384 | ||
| buffer_size_min 65536 | ||
| buffer_size_max 65536 | ||
| } | ||
| Object.PCM.pcm_caps.capture { | ||
| direction "capture" | ||
| name "Low Latency Capture 0" | ||
| formats "S16_LE,S24_LE,S32_LE" | ||
| rates "48000" | ||
| rate_min 48000 | ||
| rate_max 48000 | ||
| channels_min 2 | ||
| channels_max 2 | ||
| periods_min 2 | ||
| # The low-latency capture path supports fewer queued periods | ||
| # than playback in the legacy Cherry Trail topology. | ||
| periods_max 4 | ||
| period_size_min 192 | ||
| period_size_max 16384 | ||
| buffer_size_min 65536 | ||
| buffer_size_max 65536 | ||
| } | ||
| } | ||
| { | ||
| name "PCM Deep Buffer" | ||
| id 1 | ||
| direction "playback" | ||
|
|
||
| Object.Base.fe_dai.1 { | ||
| name "PCM Deep Buffer 1" | ||
| } | ||
| Object.PCM.pcm_caps.playback { | ||
| direction "playback" | ||
| name "Playback 1" | ||
| formats "S16_LE,S24_LE,S32_LE" | ||
| rates "48000" | ||
| rate_min 48000 | ||
| rate_max 48000 | ||
| channels_min 2 | ||
| channels_max 2 | ||
| # Keep userspace constraints identical for the low-latency and | ||
| # deep-buffer playback PCMs, as on the legacy CHT topology. | ||
| periods_min 2 | ||
| periods_max 16 | ||
| period_size_min 192 | ||
| period_size_max 16384 | ||
| buffer_size_min 65536 | ||
| buffer_size_max 65536 | ||
| } | ||
| } | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaurizioCasciano Thanks for the new PR! Can you check the git commit message formatting? We use Linux kernel style formatting (wrap lines at 72 chars). Rest looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 050cf8e. The commit message is now wrapped at 72 columns; the source tree is unchanged. Thanks!