Skip to content

Commit 80a7795

Browse files
brentlumwasko
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>
1 parent db7deb9 commit 80a7795

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

tools/topology/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ set(TPLGS
143143
"sof-jsl-da7219\;sof-jsl-da7219-mx98360a\;-DPLATFORM=jsl-dedede"
144144
"sof-imx8mp-wm8960\;sof-imx8mp-wm8960"
145145
"sof-smart-amplifier-nocodec\;sof-smart-amplifier-nocodec"
146-
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015\;-DPLATFORM=jsl-rt1015"
147-
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015-xperi\;-DPLATFORM=jsl-rt1015\;-DINCLUDE_IIR_EQ=1"
148-
"sof-jsl-rt5682\;sof-jsl-rt5682-mx98360a\;-DPLATFORM=jsl-dedede"
146+
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-rt1015"
147+
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015-xperi\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-rt1015\;-DINCLUDE_IIR_EQ=1"
148+
"sof-jsl-rt5682\;sof-jsl-rt5682-mx98360a\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-dedede"
149+
"sof-jsl-rt5682\;sof-jsl-cs42l42-mx98360a\;-DHEADPHONE=cs42l42\;-DPLATFORM=jsl-dedede"
149150
)
150151

151152
add_custom_target(topologies ALL)

tools/topology/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
@@ -24,7 +27,7 @@ DEBUG_START
2427
# Define the pipelines
2528
#
2629
# PCM0 ----> volume -----> SSP1 (Speaker - ALC1015)
27-
# PCM1 <---> volume <----> SSP0 (Headset - ALC5682)
30+
`# PCM1 <---> volume <----> SSP0 (Headset - 'HEADPHONE`)'
2831
# PCM2 ----> volume -----> iDisp1
2932
# PCM3 ----> volume -----> iDisp2
3033
# 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
# SSP 1 (ID: 6)
188201
DAI_CONFIG(SSP, SPK_INDEX, 6, SPK_NAME,

0 commit comments

Comments
 (0)