Skip to content

Commit d6fd943

Browse files
xiulipanbkokoszx
authored andcommitted
topology: add KWD comp into sof-tgl-max98373-rt5682
Add KWD pipelines with vol-kfpm pipe using intel-generic-dmic-kwd tmplate. 48K DMIC still uses PCM 99 Add 16K DMIC KWD on PCM 100 Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
1 parent 8f3e79a commit d6fd943

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,38 @@ include(`platform/intel/dmic.m4')
2020

2121
DEBUG_START
2222

23+
24+
2325
#
2426
# Define the pipelines
2527
#
2628
# PCM0 ---> volume ----> SSP1 (Speaker - max98373)
2729
# PCM1 <---> volume <----> SSP0 (Headset - ALC5682)
28-
# PCM99 <---- volume <---- DMIC01 (dmic0 capture)
2930
# PCM2 ----> volume -----> iDisp1
3031
# PCM3 ----> volume -----> iDisp2
3132
# PCM4 ----> volume -----> iDisp3
3233
# PCM5 ----> volume -----> iDisp4
33-
34+
# PCM99 <---- volume <---- DMIC01 (dmic 48k capture)
35+
# PCM100 <---- kpb <---- DMIC16K (dmic 16k capture)
36+
37+
# Define pipeline id for intel-generic-dmic-kwd.m4
38+
# to generate dmic setting with kwd when we have dmic
39+
# define channel
40+
define(CHANNELS, `4')
41+
# define kfbm with volume
42+
define(KFBM_TYPE, `vol-kfbm')
43+
# define pcm, pipeline and dai id
44+
define(DMIC_PCM_48k_ID, `99')
45+
define(DMIC_PIPELINE_48k_ID, `4')
46+
define(DMIC_DAI_LINK_48k_ID, `1')
47+
define(DMIC_PCM_16k_ID, `100')
48+
define(DMIC_PIPELINE_16k_ID, `9')
49+
define(DMIC_PIPELINE_KWD_ID, `10')
50+
define(DMIC_DAI_LINK_16k_ID, `2')
51+
# define pcm, pipeline and dai id
52+
define(KWD_PIPE_SCH_DEADLINE_US, 20000)
53+
# include the generic dmic with kwd
54+
include(`platform/intel/intel-generic-dmic-kwd.m4')
3455

3556
dnl PIPELINE_PCM_ADD(pipeline,
3657
dnl pipe id, pcm, max channels, format,
@@ -57,13 +78,6 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
5778
1000, 0, 0,
5879
48000, 48000, 48000)
5980

60-
# Passthrough capture pipeline 4 on PCM 99 using max 4 channels.
61-
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
62-
PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4,
63-
4, 99, 4, s32le,
64-
1000, 0, 0,
65-
48000, 48000, 48000)
66-
6781
# Low Latency playback pipeline 5 on PCM 2 using max 2 channels of s32le.
6882
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
6983
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
@@ -122,13 +136,6 @@ DAI_ADD(sof/pipe-dai-capture.m4,
122136
PIPELINE_SINK_3, 2, s24le,
123137
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
124138

125-
# capture DAI is DMIC01 using 2 periods
126-
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
127-
DAI_ADD(sof/pipe-dai-capture.m4,
128-
4, DMIC, 0, dmic01,
129-
PIPELINE_SINK_4, 2, s32le,
130-
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
131-
132139
# playback DAI is iDisp1 using 2 periods
133140
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
134141
DAI_ADD(sof/pipe-dai-playback.m4,
@@ -163,7 +170,6 @@ DAI_ADD(sof/pipe-dai-playback.m4,
163170
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
164171
PCM_PLAYBACK_ADD(max373-spk, 0, PIPELINE_PCM_1)
165172
PCM_DUPLEX_ADD(Headset, 1, PIPELINE_PCM_2, PIPELINE_PCM_3)
166-
PCM_CAPTURE_ADD(DMIC, 99, PIPELINE_PCM_4)
167173
PCM_PLAYBACK_ADD(HDMI1, 2, PIPELINE_PCM_5)
168174
PCM_PLAYBACK_ADD(HDMI2, 3, PIPELINE_PCM_6)
169175
PCM_PLAYBACK_ADD(HDMI3, 4, PIPELINE_PCM_7)
@@ -195,12 +201,6 @@ DAI_CONFIG(SSP, 0, 0, SSP0-Codec,
195201
SSP_TDM(2, 25, 3, 3),
196202
SSP_CONFIG_DATA(SSP, 0, 24)))
197203

198-
# dmic01 (ID: 1)
199-
DAI_CONFIG(DMIC, 0, 1, dmic01,
200-
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000,
201-
DMIC_WORD_LENGTH(s32le), 400, DMIC, 0,
202-
PDM_CONFIG(DMIC, 0, FOUR_CH_PDM0_PDM1)))
203-
204204
# 4 HDMI/DP outputs (ID: 3,4,5,6)
205205
DAI_CONFIG(HDA, 0, 3, iDisp1)
206206
DAI_CONFIG(HDA, 1, 4, iDisp2)

0 commit comments

Comments
 (0)