Skip to content

Commit d3b2fa0

Browse files
xiulipanjajanusz
authored andcommitted
topology: add tgl_rt1308 topology
Add tgl_rt1308 topology with RT1308 speaker, DMIC and 4 HDMI. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
1 parent 3f4c3c8 commit d3b2fa0

2 files changed

Lines changed: 164 additions & 0 deletions

File tree

tools/topology/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ set(TPLGS
7373
"sof-cml-rt5682-max98357a\;sof-cml-rt5682-max98357a\;-DPLATFORM=cml"
7474
"sof-cml-demux-rt5682-max98357a\;sof-cml-demux-rt5682-max98357a\;-DPLATFORM=cml"
7575
"sof-tgl-nocodec\;sof-tgl-nocodec"
76+
"sof-tgl-rt1308\;sof-tgl-rt1308"
7677
)
7778

7879
add_custom_target(topologies ALL)

tools/topology/sof-tgl-rt1308.m4

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
#
2+
# Topology for Tigerlake with rt1308 codec + DMIC + 4 HDMI
3+
#
4+
5+
# Include topology builder
6+
include(`utils.m4')
7+
include(`dai.m4')
8+
include(`pipeline.m4')
9+
include(`ssp.m4')
10+
11+
# Include TLV library
12+
include(`common/tlv.m4')
13+
14+
# Include Token library
15+
include(`sof/tokens.m4')
16+
17+
# Include Tigerlake DSP configuration
18+
include(`platform/intel/tgl.m4')
19+
include(`platform/intel/dmic.m4')
20+
21+
DEBUG_START
22+
23+
#
24+
# Define the pipelines
25+
#
26+
# PCM0 ----> volume -----> SSP2
27+
# PCM1 <---- volume <----- DMIC01 (dmic0 capture)
28+
# PCM2 ----> volume -----> iDisp1
29+
# PCM3 ----> volume -----> iDisp2
30+
# PCM4 ----> volume -----> iDisp3
31+
# PCM5 ----> volume -----> iDisp4
32+
#
33+
34+
dnl PIPELINE_PCM_ADD(pipeline,
35+
dnl pipe id, pcm, max channels, format,
36+
dnl frames, deadline, priority, core)
37+
38+
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le.
39+
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
40+
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
41+
1, 0, 2, s24le,
42+
1000, 0, 0,
43+
48000, 48000, 48000)
44+
45+
# Passthrough capture pipeline 3 on PCM 1 using max 4 channels.
46+
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
47+
PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4,
48+
2, 1, 4, s32le,
49+
1000, 0, 0,
50+
48000, 48000, 48000)
51+
52+
# Low Latency playback pipeline 2 on PCM 2 using max 2 channels of s32le.
53+
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
54+
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
55+
3, 2, 2, s32le,
56+
1000, 0, 0,
57+
48000, 48000, 48000)
58+
59+
# Low Latency playback pipeline 3 on PCM 3 using max 2 channels of s32le.
60+
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
61+
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
62+
4, 3, 2, s32le,
63+
1000, 0, 0,
64+
48000, 48000, 48000)
65+
66+
# Low Latency playback pipeline 4 on PCM 4 using max 2 channels of s32le.
67+
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
68+
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
69+
5, 4, 2, s32le,
70+
1000, 0, 0,
71+
48000, 48000, 48000)
72+
73+
# Low Latency playback pipeline 4 on PCM 5 using max 2 channels of s32le.
74+
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
75+
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
76+
6, 5, 2, s32le,
77+
1000, 0, 0,
78+
48000, 48000, 48000)
79+
80+
#
81+
# DAIs configuration
82+
#
83+
84+
dnl DAI_ADD(pipeline,
85+
dnl pipe id, dai type, dai_index, dai_be,
86+
dnl buffer, periods, format,
87+
dnl frames, deadline, priority, core)
88+
89+
# playback DAI is SSP2 using 2 periods
90+
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
91+
DAI_ADD(sof/pipe-dai-playback.m4,
92+
1, SSP, 2, SSP2-Codec,
93+
PIPELINE_SOURCE_1, 2, s24le,
94+
1000, 0, 0)
95+
96+
# capture DAI is DMIC01 using 2 periods
97+
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
98+
DAI_ADD(sof/pipe-dai-capture.m4,
99+
2, DMIC, 0, dmic01,
100+
PIPELINE_SINK_2, 2, s32le,
101+
1000, 0, 0)
102+
103+
# playback DAI is iDisp1 using 2 periods
104+
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
105+
DAI_ADD(sof/pipe-dai-playback.m4,
106+
3, HDA, 0, iDisp1,
107+
PIPELINE_SOURCE_3, 2, s32le,
108+
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
109+
110+
# playback DAI is iDisp2 using 2 periods
111+
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
112+
DAI_ADD(sof/pipe-dai-playback.m4,
113+
4, HDA, 1, iDisp2,
114+
PIPELINE_SOURCE_4, 2, s32le,
115+
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
116+
117+
# playback DAI is iDisp3 using 2 periods
118+
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
119+
DAI_ADD(sof/pipe-dai-playback.m4,
120+
5, HDA, 2, iDisp3,
121+
PIPELINE_SOURCE_5, 2, s32le,
122+
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
123+
124+
# playback DAI is iDisp4 using 2 periods
125+
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
126+
DAI_ADD(sof/pipe-dai-playback.m4,
127+
6, HDA, 3, iDisp4,
128+
PIPELINE_SOURCE_6, 2, s32le,
129+
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
130+
131+
# PCM Low Latency, id 0
132+
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
133+
PCM_PLAYBACK_ADD(Speaker, 0, PIPELINE_PCM_1)
134+
PCM_CAPTURE_ADD(DMIC01, 1, PIPELINE_PCM_2)
135+
PCM_PLAYBACK_ADD(HDMI1, 2, PIPELINE_PCM_3)
136+
PCM_PLAYBACK_ADD(HDMI2, 3, PIPELINE_PCM_4)
137+
PCM_PLAYBACK_ADD(HDMI3, 4, PIPELINE_PCM_5)
138+
PCM_PLAYBACK_ADD(HDMI4, 5, PIPELINE_PCM_6)
139+
140+
#
141+
# BE configurations - overrides config in ACPI if present
142+
#
143+
#SSP 2 (ID: 0)
144+
DAI_CONFIG(SSP, 2, 0, SSP2-Codec,
145+
SSP_CONFIG(I2S, SSP_CLOCK(mclk, 38400000, codec_mclk_in),
146+
SSP_CLOCK(bclk, 2400000, codec_slave),
147+
SSP_CLOCK(fsync, 48000, codec_slave),
148+
SSP_TDM(2, 25, 3, 3),
149+
SSP_CONFIG_DATA(SSP, 2, 24)))
150+
151+
# dmic01 (ID: 1)
152+
DAI_CONFIG(DMIC, 0, 1, dmic01,
153+
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000,
154+
DMIC_WORD_LENGTH(s32le), 400, DMIC, 0,
155+
PDM_CONFIG(DMIC, 0, FOUR_CH_PDM0_PDM1)))
156+
157+
# 4 HDMI/DP outputs (ID: 2,3,4,5)
158+
DAI_CONFIG(HDA, 0, 2, iDisp1)
159+
DAI_CONFIG(HDA, 1, 3, iDisp2)
160+
DAI_CONFIG(HDA, 2, 4, iDisp3)
161+
DAI_CONFIG(HDA, 3, 5, iDisp4)
162+
163+
DEBUG_END

0 commit comments

Comments
 (0)