Skip to content

Commit

Permalink
topology: sof-jsl-rt5682: add sof-jsl-rt5682.tplg
Browse files Browse the repository at this point in the history
This topology supports JSL boards which implement ALC5682I-VD/VS on
SSP0 port without speaker amplifier.

Signed-off-by: Brent Lu <brent.lu@intel.com>
(cherry picked from commit 8a394bb)
  • Loading branch information
brentlu committed Mar 2, 2023
1 parent dd08b24 commit 7dfe578
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions tools/topology/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ set(TPLGS
"sof-jsl-rt5682\;sof-jsl-rt5682-rt1015-xperi\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-rt1015\;-DINCLUDE_IIR_EQ=1"
"sof-jsl-rt5682\;sof-jsl-rt5682-mx98360a\;-DHEADPHONE=rt5682\;-DPLATFORM=jsl-dedede"
"sof-jsl-rt5682\;sof-jsl-cs42l42-mx98360a\;-DHEADPHONE=cs42l42\;-DPLATFORM=jsl-dedede"
"sof-jsl-rt5682\;sof-jsl-rt5682\;-DHEADPHONE=rt5682\;-DPLATFORM=icl\;-DNO_AMP"
)

add_custom_target(topologies ALL)
Expand Down
15 changes: 10 additions & 5 deletions tools/topology/sof-jsl-rt5682.m4
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ DEBUG_START
#
# Define the pipelines
#
# PCM0 ----> volume -----> SSP1 (Speaker - ALC1015)
ifdef(`NO_AMP',`',`
# PCM0 ----> volume -----> SSP1 (Speaker - ALC1015)')
`# PCM1 <---> volume <----> SSP0 (Headset - 'HEADPHONE`)'
# PCM2 ----> volume -----> iDisp1
# PCM3 ----> volume -----> iDisp2
Expand Down Expand Up @@ -58,6 +59,7 @@ dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
dnl frames, deadline, priority, core)

ifdef(`NO_AMP',`',`
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
define(ENDPOINT_NAME, `Speakers')
Expand All @@ -66,7 +68,7 @@ PIPELINE_PCM_ADD(
1, 0, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
undefine(ENDPOINT_NAME)
undefine(ENDPOINT_NAME)')

# Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
Expand Down Expand Up @@ -116,12 +118,13 @@ dnl pipe id, dai type, dai_index, dai_be,
dnl buffer, periods, format,
dnl frames, deadline, priority, core)

ifdef(`NO_AMP',`',`
# playback DAI is SSP1 using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
1, SSP, SPK_INDEX, SPK_NAME,
PIPELINE_SOURCE_1, 2, SPK_DATA_FORMAT,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)')

# playback DAI is SSP0 using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
Expand Down Expand Up @@ -160,7 +163,8 @@ DAI_ADD(sof/pipe-dai-playback.m4,

# PCM Low Latency, id 0
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(Speakers, 0, PIPELINE_PCM_1)
ifdef(`NO_AMP',`',`
PCM_PLAYBACK_ADD(Speakers, 0, PIPELINE_PCM_1)')
PCM_DUPLEX_ADD(Headset, 1, PIPELINE_PCM_2, PIPELINE_PCM_3)
PCM_PLAYBACK_ADD(HDMI1, 2, PIPELINE_PCM_5)
PCM_PLAYBACK_ADD(HDMI2, 3, PIPELINE_PCM_6)
Expand Down Expand Up @@ -193,9 +197,10 @@ DAI_CONFIG(SSP, 0, 0, SSP0-Codec,
SSP_CONFIG_DATA(SSP, 0, 24, 0, 0, 0, SSP_CC_BCLK_ES)))
', )

ifdef(`NO_AMP',`',`
# SSP 1 (ID: 6)
DAI_CONFIG(SSP, SPK_INDEX, 6, SPK_NAME,
SET_SSP_CONFIG)
SET_SSP_CONFIG)')

# 4 HDMI/DP outputs (ID: 3,4,5)
DAI_CONFIG(HDA, 0, 3, iDisp1,
Expand Down

0 comments on commit 7dfe578

Please sign in to comment.