Skip to content

Commit

Permalink
topology: Enable WoV on TGL tplg for tgl-max98357a-rt5682
Browse files Browse the repository at this point in the history
This patch adds the changes to enable WoV for tgl-max98357a-rt5682.

Signed-off-by: Dharageswari R <dharageswari.r@inetl.com>
  • Loading branch information
Dharageswari R authored and lgirdwood committed Apr 7, 2020
1 parent 0b80998 commit 5b99262
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions tools/topology/sof-tgl-max98357a-rt5682.m4
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ DEBUG_START
# PCM3 ----> volume -----> iDisp2
# PCM4 ----> volume -----> iDisp3
# PCM5 ----> volume -----> iDisp4
# PCM99 <---- volume <---- DMIC01 (dmic 48k capture)
# PCM100 <---- kpb <---- DMIC16K (dmic 16k capture)

# Define pipeline id for sof-tgl-max98357a-rt5682.m4
# to generate dmic setting with kwd when we have dmic
# define channel
define(CHANNELS, `4')
# define kfbm with volume
define(KFBM_TYPE, `vol-kfbm')
# define pcm, pipeline and dai id
define(DMIC_PCM_48k_ID, `99')
define(DMIC_PIPELINE_48k_ID, `10')
define(DMIC_DAI_LINK_48k_ID, `1')
define(DMIC_PCM_16k_ID, `100')
define(DMIC_PIPELINE_16k_ID, `11')
define(DMIC_PIPELINE_KWD_ID, `12')
define(DMIC_DAI_LINK_16k_ID, `2')
# define pcm, pipeline and dai id
define(KWD_PIPE_SCH_DEADLINE_US, 20000)
# include the generic dmic with kwd
include(`platform/intel/intel-generic-dmic-kwd.m4')

dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
Expand All @@ -54,12 +75,6 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
3, 1, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Passthrough capture pipeline 4 on PCM 99 using max 4 channels.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4,
4, 99, 4, s32le,
1000, 0, 0,
48000, 48000, 48000)

# Low Latency playback pipeline 2 on PCM 2 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
Expand Down Expand Up @@ -117,13 +132,6 @@ DAI_ADD(sof/pipe-dai-capture.m4,
PIPELINE_SINK_3, 2, s24le,
1000, 0, 0)

# capture DAI is DMIC01 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-capture.m4,
4, DMIC, 0, dmic01,
PIPELINE_SINK_4, 2, s32le,
1000, 0, 0)

# playback DAI is iDisp1 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
Expand Down Expand Up @@ -156,7 +164,6 @@ DAI_ADD(sof/pipe-dai-playback.m4,
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(max357a-spk, 0, PIPELINE_PCM_1)
PCM_DUPLEX_ADD(Headset, 1, PIPELINE_PCM_2, PIPELINE_PCM_3)
PCM_CAPTURE_ADD(DMIC, 99, PIPELINE_PCM_4)
PCM_PLAYBACK_ADD(HDMI1, 2, PIPELINE_PCM_5)
PCM_PLAYBACK_ADD(HDMI2, 3, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI3, 4, PIPELINE_PCM_7)
Expand Down Expand Up @@ -187,12 +194,6 @@ DAI_CONFIG(SSP, 0, 0, SSP0-Codec,
SSP_TDM(2, 25, 3, 3),
SSP_CONFIG_DATA(SSP, 0, 24)))

# dmic01 (ID: 1)
DAI_CONFIG(DMIC, 0, 1, dmic01,
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000,
DMIC_WORD_LENGTH(s32le), 400, DMIC, 0,
PDM_CONFIG(DMIC, 0, FOUR_CH_PDM0_PDM1)))

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

0 comments on commit 5b99262

Please sign in to comment.