Skip to content

Commit d1a251c

Browse files
brentlukv2019i
authored andcommitted
topology: sof-jsl-rt5682: add support for cs42l42 with max98360a
Add support for cs42l42 with max98360a running on JSL boards. The cs42l42 needs to enable bclk earlier in prepare stage and disable bclk at hw_free statge so we add the SSP_CC_BCLK_ES flag for it. Signed-off-by: Brent Lu <brent.lu@intel.com> (cherry picked from commit 80a7795)
1 parent c2cd312 commit d1a251c

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

tools/topology/topology1/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,10 @@ set(TPLGS
215215
"sof-jsl-da7219\;sof-jsl-da7219\;-DPLATFORM=jsl"
216216
"sof-jsl-da7219\;sof-jsl-da7219-mx98360a\;-DPLATFORM=jsl-dedede"
217217
"sof-smart-amplifier-nocodec\;sof-smart-amplifier-nocodec"
218-
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015\;-DPLATFORM=jsl-rt1015"
219-
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015-xperi\;-DPLATFORM=jsl-rt1015\;-DINCLUDE_IIR_EQ=1"
220-
"sof-jsl-rt5682\;sof-jsl-rt5682-mx98360a\;-DPLATFORM=jsl-dedede"
218+
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-rt1015"
219+
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015-xperi\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-rt1015\;-DINCLUDE_IIR_EQ=1"
220+
"sof-jsl-rt5682\;sof-jsl-rt5682-mx98360a\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-dedede"
221+
"sof-jsl-rt5682\;sof-jsl-cs42l42-mx98360a\;-DHEADPHONE=cs42l42\;-DPLATFORM=jsl-dedede"
221222
"sof-jsl-rt5682\;sof-jsl-rt5682\;-DHEADPHONE=rt5682\;-DPLATFORM=icl\;-DNO_AMP"
222223

223224
## DRC/EQ topologies

tools/topology/topology1/sof-jsl-rt5682.m4

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#
2-
# Topology for JasperLake with rt5682 codec + DMIC + 3 HDMI + Speaker amp
2+
# Topology for JasperLake with rt5682 or cs42l42 codec +
3+
# DMIC +
4+
# 3 HDMI +
5+
# speaker amp
36
#
47

58
# Include topology builder
@@ -25,7 +28,7 @@ DEBUG_START
2528
#
2629
ifdef(`NO_AMP',`',`
2730
# PCM0 ----> volume -----> SSP1 (Speaker - ALC1015)')
28-
# PCM1 <---> volume <----> SSP0 (Headset - ALC5682)
31+
`# PCM1 <---> volume <----> SSP0 (Headset - 'HEADPHONE`)'
2932
# PCM2 ----> volume -----> iDisp1
3033
# PCM3 ----> volume -----> iDisp2
3134
# PCM4 ----> volume -----> iDisp3
@@ -176,13 +179,23 @@ dnl SSP_CONFIG(format, mclk, bclk, fsync, tdm, ssp_config_data)
176179
dnl SSP_CLOCK(clock, freq, codec_master, polarity)
177180
dnl SSP_CONFIG_DATA(type, idx, valid bits, mclk_id)
178181

182+
ifelse(HEADPHONE, `rt5682', `
179183
# SSP 0 (ID: 0) ALC5682
180184
DAI_CONFIG(SSP, 0, 0, SSP0-Codec,
181185
SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24000000, codec_mclk_in),
182186
SSP_CLOCK(bclk, 2400000, codec_slave),
183187
SSP_CLOCK(fsync, 48000, codec_slave),
184188
SSP_TDM(2, 25, 3, 3),
185189
SSP_CONFIG_DATA(SSP, 0, 24)))
190+
', HEADPHONE, `cs42l42', `
191+
# SSP 0 (ID: 0) CS42L42
192+
DAI_CONFIG(SSP, 0, 0, SSP0-Codec,
193+
SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24000000, codec_mclk_in),
194+
SSP_CLOCK(bclk, 2400000, codec_slave),
195+
SSP_CLOCK(fsync, 48000, codec_slave),
196+
SSP_TDM(2, 25, 3, 3),
197+
SSP_CONFIG_DATA(SSP, 0, 24, 0, 0, 0, SSP_CC_BCLK_ES)))
198+
', )
186199

187200
ifdef(`NO_AMP',`',`
188201
# SSP 1 (ID: 6)

0 commit comments

Comments
 (0)