Skip to content

Commit 641cf4b

Browse files
committed
topology1: Add mt8365 related pipelines and components
Add topology files for mt8365 including mt8365.m4 and sof-mt8365-mt6357.m4. Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
1 parent dc76416 commit 641cf4b

File tree

3 files changed

+153
-0
lines changed

3 files changed

+153
-0
lines changed

tools/topology/topology1/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ set(TPLGS
100100
"sof-mt8188-mt6359\;sof-mt8188-waves\;-DWAVES=1"
101101
"sof-mt8196-mt6681\;sof-mt8196"
102102
"sof-mt8196-mt6681\;sof-mt8196-waves\;-DWAVES=1"
103+
"sof-mt8365-mt6357\;sof-mt8365"
104+
"sof-mt8365-mt6357\;sof-mt8365-waves\;-DWAVES=1"
103105

104106
"sof-acp-renoir\;sof-acp"
105107
"sof-rn-rt5682-rt1019\;sof-rn-rt5682-rt1019"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# MT8365 differentiation for pipelines and components
3+
#
4+
5+
include(`memory.m4')
6+
7+
define(`PLATFORM_DAI_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_DMA, MEM_CAP_CACHE))
8+
define(`PLATFORM_HOST_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_DMA, MEM_CAP_CACHE))
9+
define(`PLATFORM_PASS_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_DMA, MEM_CAP_CACHE))
10+
define(`PLATFORM_COMP_MEM_CAP', MEMCAPS(MEM_CAP_RAM, MEM_CAP_CACHE))
11+
12+
# Low Latency PCM Configuration
13+
W_VENDORTUPLES(pipe_ll_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "50000"'))
14+
W_DATA(pipe_ll_schedule_plat, pipe_ll_schedule_plat_tokens)
15+
16+
# Media PCM Configuration
17+
W_VENDORTUPLES(pipe_media_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "100000"'))
18+
W_DATA(pipe_media_schedule_plat, pipe_media_schedule_plat_tokens)
19+
20+
# DAI schedule Configuration - scheduled by IRQ
21+
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
22+
W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens)
23+
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#
2+
# Topology for MT8365 board with mt6357
3+
#
4+
5+
# Include topology builder
6+
include(`utils.m4')
7+
include(`dai.m4')
8+
include(`pipeline.m4')
9+
include(`afe.m4')
10+
include(`pcm.m4')
11+
include(`buffer.m4')
12+
13+
# Include TLV library
14+
include(`common/tlv.m4')
15+
16+
# Include Token library
17+
include(`sof/tokens.m4')
18+
19+
# Include DSP configuration
20+
include(`platform/mediatek/mt8365.m4')
21+
22+
#
23+
# Define the pipelines
24+
#
25+
# PCM16 ---> AFE (Speaker - rt1019)
26+
# PCM17 ---> AFE (Headset playback - rt5682)
27+
# PCM18 <--- AFE (DMIC - MT6365)
28+
# PCM19 <--- AFE (Headset record - rt5682)
29+
30+
31+
dnl PIPELINE_PCM_ADD(pipeline,
32+
dnl pipe id, pcm, max channels, format,
33+
dnl period, priority, core,
34+
dnl pcm_min_rate, pcm_max_rate, pipeline_rate,
35+
dnl time_domain, sched_comp)
36+
37+
define(`ENDPOINT_NAME', `Speakers')
38+
# Low Latency playback pipeline 1 on PCM 16 using max 2 channels of s16le
39+
# Set 1000us deadline with priority 0 on core 0
40+
PIPELINE_PCM_ADD(ifdef(`WAVES', sof/pipe-waves-codec-playback.m4, sof/pipe-passthrough-playback.m4),
41+
1, 16, 2, s16le,
42+
1000, 0, 0,
43+
48000, 48000, 48000)
44+
undefine(`ENDPOINT_NAME')
45+
46+
define(`ENDPOINT_NAME', `Headphones')
47+
# Low Latency playback pipeline 2 on PCM 17 using max 2 channels of s16le
48+
# Set 1000us deadline with priority 0 on core 0
49+
PIPELINE_PCM_ADD(ifdef(`WAVES', sof/pipe-waves-codec-playback.m4, sof/pipe-passthrough-playback.m4),
50+
2, 17, 2, s16le,
51+
1000, 0, 0,
52+
48000, 48000, 48000)
53+
undefine(`ENDPOINT_NAME')
54+
55+
# Low Latency capture pipeline 3 on PCM 18 using max 2 channels of s16le
56+
# Set 2000us deadline with priority 0 on core 0
57+
PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4,
58+
3, 18, 2, s16le,
59+
2000, 0, 0,
60+
48000, 48000, 48000)
61+
62+
# Low Latency capture pipeline 4 on PCM 19 using max 2 channels of s16le
63+
# Set 2000us deadline with priority 0 on core 0
64+
PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4,
65+
4, 19, 2, s16le,
66+
2000, 0, 0,
67+
48000, 48000, 48000)
68+
69+
#
70+
# DAIs configuration
71+
#
72+
73+
dnl DAI_ADD(pipeline,
74+
dnl pipe id, dai type, dai_index, dai_be,
75+
dnl buffer, periods, format,
76+
dnl deadline, priority, core)
77+
78+
79+
# playback DAI is AFE using 2 periods
80+
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
81+
DAI_ADD(sof/pipe-dai-playback.m4,
82+
1, AFE, 0, AFE_SOF_DL1,
83+
PIPELINE_SOURCE_1, 2, s16le,
84+
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
85+
86+
# playback DAI is AFE using 2 periods
87+
# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
88+
DAI_ADD(sof/pipe-dai-playback.m4,
89+
2, AFE, 1, AFE_SOF_DL2,
90+
PIPELINE_SOURCE_2, 2, s16le,
91+
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
92+
93+
# capture DAI is AFE using 2 periods
94+
# Buffers use s16le format, with 48 frame per 2000us on core 0 with priority 0
95+
DAI_ADD(sof/pipe-dai-capture.m4,
96+
3, AFE, 2, AFE_SOF_AWB,
97+
PIPELINE_SINK_3, 2, s16le,
98+
2000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
99+
100+
# capture DAI is AFE using 2 periods
101+
# Buffers use s16le format, with 48 frame per 2000us on core 0 with priority 0
102+
DAI_ADD(sof/pipe-dai-capture.m4,
103+
4, AFE, 3, AFE_SOF_VUL,
104+
PIPELINE_SINK_4, 2, s16le,
105+
2000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
106+
107+
#SCHEDULE_TIME_DOMAIN_DMA
108+
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
109+
110+
# PCM Low Latency, id 0
111+
PCM_PLAYBACK_ADD(SOF_DL1, 16, PIPELINE_PCM_1)
112+
PCM_PLAYBACK_ADD(SOF_DL2, 17, PIPELINE_PCM_2)
113+
PCM_CAPTURE_ADD(SOF_AWB, 18, PIPELINE_PCM_3)
114+
PCM_CAPTURE_ADD(SOF_VUL, 19, PIPELINE_PCM_4)
115+
116+
dnl DAI_CONFIG(type, dai_index, link_id, name, afe_config)
117+
118+
DAI_CONFIG(AFE, 0, 0, AFE_SOF_DL1,
119+
AFE_CONFIG(AFE_CONFIG_DATA(AFE, 0, 48000, 2, s16le)))
120+
121+
DAI_CONFIG(AFE, 1, 0, AFE_SOF_DL2,
122+
AFE_CONFIG(AFE_CONFIG_DATA(AFE, 1, 48000, 2, s16le)))
123+
124+
DAI_CONFIG(AFE, 2, 0, AFE_SOF_AWB,
125+
AFE_CONFIG(AFE_CONFIG_DATA(AFE, 2, 48000, 2, s16le)))
126+
127+
DAI_CONFIG(AFE, 3, 0, AFE_SOF_VUL,
128+
AFE_CONFIG(AFE_CONFIG_DATA(AFE, 3, 48000, 2, s16le)))

0 commit comments

Comments
 (0)