Skip to content

Commit 2157774

Browse files
committed
topology: sdw: fix dmic issue on tgl sdw platforms
Port commit a716056 ("tgl: use additional CHANNEL define in rt711 + rts1308 tplg") to all tgl sdw platforms Signed-off-by: Rander Wang <rander.wang@intel.com>
1 parent 104226b commit 2157774

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

tools/topology/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ set(TPLGS
119119
"sof-tgl-rt711-i2s-rt1308\;sof-tgl-rt711-i2s-rt1308-2ch\;-DHDMI=1\;-DCHANNELS=2"
120120
"sof-tgl-rt711-i2s-rt1308\;sof-tgl-rt711-i2s-rt1308-4ch\;-DHDMI=1\;-DCHANNELS=4"
121121
"sof-tgl-rt711-i2s-rt1308\;sof-tgl-rt711-i2s-rt1308-nohdmi"
122-
"sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308"
122+
"sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-2ch\;-DCHANNELS=2"
123+
"sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-4ch\;-DCHANNELS=4"
123124
"sof-tgl-rt5682\;sof-tgl-rt5682\;-DHDMI=1"
124125
"sof-tgl-nocodec\;sof-ehl-nocodec"
125126
"sof-ehl-rt5660\;sof-ehl-rt5660\;-DHDMI=1"
@@ -130,7 +131,8 @@ set(TPLGS
130131
"sof-imx8qxp-wm8960\;sof-imx8qxp-wm8960"
131132
"sof-tgl-max98357a-rt5682\;sof-tgl-max98357a-rt5682"
132133
"sof-tgl-max98373-rt5682\;sof-tgl-max98373-rt5682"
133-
"sof-tgl-sdw-max98373-rt5682\;sof-tgl-sdw-max98373-rt5682\;-DSDW=1"
134+
"sof-tgl-sdw-max98373-rt5682\;sof-tgl-sdw-max98373-rt5682-2ch\;-DSDW=1\;-DCHANNELS=2"
135+
"sof-tgl-sdw-max98373-rt5682\;sof-tgl-sdw-max98373-rt5682-4ch\;-DSDW=1\;-DCHANNELS=4"
134136
"sof-jsl-da7219\;sof-jsl-da7219\;-DPLATFORM=jsl"
135137
"sof-jsl-da7219\;sof-jsl-da7219-mx98360a\;-DPLATFORM=jsl-dedede"
136138
"sof-imx8mp-wm8960\;sof-imx8mp-wm8960"

tools/topology/sof-tgl-rt711-rt1308.m4

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ include(`sof/tokens.m4')
1818

1919
include(`platform/intel/tgl.m4')
2020

21+
define(DMIC_PDM_CONFIG, ifelse(CHANNELS, `4', ``FOUR_CH_PDM0_PDM1'',
22+
`ifelse(CHANNELS, `2', ``STEREO_PDM0'', `')'))
23+
2124
DEBUG_START
2225

2326
#
@@ -70,7 +73,7 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
7073
# Passthrough capture pipeline 5 on PCM 4 using max 4 channels.
7174
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
7275
PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4,
73-
5, 4, 4, s16le,
76+
5, 4, CHANNELS, s32le,
7477
1000, 0, 0,
7578
16000, 16000, 16000)
7679

@@ -140,10 +143,10 @@ DAI_ADD(sof/pipe-dai-capture.m4,
140143
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
141144

142145
# capture DAI is DMIC16k using 2 periods
143-
# Buffers use s16le format, with 16 frame per 1000us on core 0 with priority 0
146+
# Buffers use s32le format, with 16 frame per 1000us on core 0 with priority 0
144147
DAI_ADD(sof/pipe-dai-capture.m4,
145148
5, DMIC, 1, dmic16k,
146-
PIPELINE_SINK_5, 2, s16le,
149+
PIPELINE_SINK_5, 2, s32le,
147150
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
148151

149152
# playback DAI is iDisp1 using 2 periods
@@ -211,8 +214,8 @@ DAI_CONFIG(DMIC, 0, 3, dmic01,
211214
# dmic16k (ID: 4)
212215
DAI_CONFIG(DMIC, 1, 4, dmic16k,
213216
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 16000,
214-
DMIC_WORD_LENGTH(s16le), 400, DMIC, 1,
215-
PDM_CONFIG(DMIC, 1, STEREO_PDM0)))
217+
DMIC_WORD_LENGTH(s32le), 400, DMIC, 1,
218+
PDM_CONFIG(DMIC, 1, DMIC_PDM_CONFIG)))
216219

217220
# 3 HDMI/DP outputs (ID: 5,6,7)
218221
DAI_CONFIG(HDA, 0, 5, iDisp1,

tools/topology/sof-tgl-sdw-max98373-rt5682.m4

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ include(`sof/tokens.m4')
1919
include(`platform/intel/tgl.m4')
2020
include(`platform/intel/dmic.m4')
2121

22+
define(DMIC_PDM_CONFIG, ifelse(CHANNELS, `4', ``FOUR_CH_PDM0_PDM1'',
23+
`ifelse(CHANNELS, `2', ``STEREO_PDM0'', `')'))
24+
2225
DEBUG_START
2326

2427
#
@@ -92,7 +95,7 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
9295
# Passthrough capture pipeline 5 on PCM 4 using max 4 channels.
9396
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
9497
PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4,
95-
6, 5, 4, s16le,
98+
6, 5, CHANNELS, s32le,
9699
1000, 0, 0,
97100
16000, 16000, 16000)
98101

@@ -155,10 +158,10 @@ DAI_ADD(sof/pipe-dai-capture.m4,
155158
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
156159

157160
# capture DAI is DMIC16k using 2 periods
158-
# Buffers use s16le format, with 16 frame per 1000us on core 0 with priority 0
161+
# Buffers use s32le format, with 16 frame per 1000us on core 0 with priority 0
159162
DAI_ADD(sof/pipe-dai-capture.m4,
160163
6, DMIC, 1, dmic16k,
161-
PIPELINE_SINK_6, 2, s16le,
164+
PIPELINE_SINK_6, 2, s32le,
162165
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
163166

164167
# playback DAI is iDisp1 using 2 periods
@@ -224,8 +227,8 @@ DAI_CONFIG(DMIC, 0, 4, dmic01,
224227
# dmic16k (ID: 5)
225228
DAI_CONFIG(DMIC, 1, 5, dmic16k,
226229
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 16000,
227-
DMIC_WORD_LENGTH(s16le), 400, DMIC, 1,
228-
PDM_CONFIG(DMIC, 1, STEREO_PDM0)))
230+
DMIC_WORD_LENGTH(s32le), 400, DMIC, 1,
231+
PDM_CONFIG(DMIC, 1, DMIC_PDM_CONFIG)))
229232

230233
# 4 HDMI/DP outputs (ID: 6,7,8,9)
231234
DAI_CONFIG(HDA, 0, 6, iDisp1,

0 commit comments

Comments
 (0)