topology: add KWD component into sof-tgl-sdw-max98373-rt5682

Add KWD pipelines with vol-kfpm pipe using intel-generic-dmic-kwd template.
- 48K DMIC still uses PCM-4
- Add 16K DMIC KWD on PCM-5
- Correct few minor pipeline numbers in comments

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
This commit is contained in:
Naveen Manohar 2020-09-14 12:37:44 +05:30 committed by Liam Girdwood
parent 4c78e94a08
commit 2b54bacdb2
1 changed files with 26 additions and 49 deletions

View File

@ -34,8 +34,8 @@ DEBUG_START
# |
# |
# PCM3 <---- demux <----- ALH0x103 (Speaker -max98373)
# PCM4 <---- volume <---- DMIC01
# PCM5 <---- volume <---- DMIC16k
# PCM4 <---- volume <---- DMIC01 (dmic 48k capture)
# PCM5 <---- kpb <---- DMIC16k (dmic 16k capture)
# PCM6 ----> volume -----> iDisp1
# PCM7 ----> volume -----> iDisp2
# PCM8 ----> volume -----> iDisp3
@ -77,56 +77,61 @@ dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
dnl frames, deadline, priority, core)
# Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le.
# 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
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
1, 0, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency capture pipeline 3 on PCM 1 using max 2 channels of s32le.
# Low Latency capture pipeline 2 on PCM 1 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
2, 1, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Passthrough capture pipeline 4 on PCM 3 using max 4 channels.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
5, 4, 4, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Define pipeline id for intel-generic-dmic-kwd.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, `4')
define(DMIC_PIPELINE_48k_ID, `11')
define(DMIC_DAI_LINK_48k_ID, `4')
define(DMIC_PCM_16k_ID, `5')
define(DMIC_PIPELINE_16k_ID, `12')
define(DMIC_PIPELINE_KWD_ID, `13')
define(DMIC_DAI_LINK_16k_ID, `5')
# define pcm, pipeline and dai id
define(KWD_PIPE_SCH_DEADLINE_US, 5000)
# include the generic dmic with kwd
include(`platform/intel/intel-generic-dmic-kwd.m4')
# Passthrough capture pipeline 5 on PCM 4 using max 4 channels.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4,
6, 5, CHANNELS, s32le,
1000, 0, 0,
16000, 16000, 16000)
# Low Latency playback pipeline 5 on PCM 2 using max 2 channels of s32le.
# Low Latency playback pipeline 7 on PCM 6 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
7, 6, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 6 on PCM 3 using max 2 channels of s32le.
# Low Latency playback pipeline 8 on PCM 7 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
8, 7, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 7 on PCM 4 using max 2 channels of s32le.
# Low Latency playback pipeline 9 on PCM 8 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
9, 8, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 8 on PCM 5 using max 2 channels of s32le.
# Low Latency playback pipeline 10 on PCM 9 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
10, 9, 2, s32le,
@ -156,20 +161,6 @@ DAI_ADD(sof/pipe-dai-capture.m4,
PIPELINE_SINK_2, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# 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,
5, DMIC, 0, dmic01,
PIPELINE_SINK_5, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# capture DAI is DMIC16k using 2 periods
# Buffers use s32le format, with 16 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-capture.m4,
6, DMIC, 1, dmic16k,
PIPELINE_SINK_6, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# 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,
@ -204,8 +195,6 @@ DAI_ADD(sof/pipe-dai-playback.m4,
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(Headphone, 0, PIPELINE_PCM_1)
PCM_CAPTURE_ADD(Headset mic, 1, PIPELINE_PCM_2)
PCM_CAPTURE_ADD(DMIC, 4, PIPELINE_PCM_5)
PCM_CAPTURE_ADD(DMIC16kHz, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI1, 6, PIPELINE_PCM_7)
PCM_PLAYBACK_ADD(HDMI2, 7, PIPELINE_PCM_8)
PCM_PLAYBACK_ADD(HDMI3, 8, PIPELINE_PCM_9)
@ -224,18 +213,6 @@ DAI_CONFIG(ALH, 2, 0, SDW0-Playback,
DAI_CONFIG(ALH, 3, 1, SDW0-Capture,
ALH_CONFIG(ALH_CONFIG_DATA(ALH, 3, 48000, 2)))
# dmic01 (ID: 4)
DAI_CONFIG(DMIC, 0, 4, dmic01,
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000,
DMIC_WORD_LENGTH(s32le), 400, DMIC, 0,
PDM_CONFIG(DMIC, 0, FOUR_CH_PDM0_PDM1)))
# dmic16k (ID: 5)
DAI_CONFIG(DMIC, 1, 5, dmic16k,
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 16000,
DMIC_WORD_LENGTH(s32le), 400, DMIC, 1,
PDM_CONFIG(DMIC, 1, DMIC_PDM_CONFIG)))
# 4 HDMI/DP outputs (ID: 6,7,8,9)
DAI_CONFIG(HDA, 0, 6, iDisp1,
HDA_CONFIG(HDA_CONFIG_DATA(HDA, 0, 48000, 2)))