topology: add simple topology with codec processing

This patch adds a processing topology which uses external
codec for processing. This topology comprises of:

HOST -> CODEC_ADAPTER -> DAI

So the only processing component is codec_adapter which can be
configured to work with any codec.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
Marcin Rajwa 2020-09-30 17:52:15 +02:00 committed by Liam Girdwood
parent 09dadff771
commit aacbe98768
1 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,58 @@
# Low Latency Passthrough Pipeline and PCM
#
# Pipeline Endpoints for connection are :-
#
# host PCM_P --> B0 --> sink DAI0
# Include topology builder
include(`utils.m4')
include(`buffer.m4')
include(`pcm.m4')
include(`dai.m4')
include(`pipeline.m4')
include(`codec_adapter.m4')
include(`bytecontrol.m4')
ifdef(`PP_CORE',`', `define(`PP_CORE', 1)')
#
# Components and Buffers
#
# Host "Playback with post processing" PCM
# with 2 sink and 0 source periods
W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, DAI_PERIODS, 0, SCHEDULE_CORE)
W_CODEC_ADAPTER(0, PIPELINE_FORMAT, DAI_PERIODS, DAI_PERIODS, PP_CORE,
LIST(` ', "Post Process Setup Config", "Post Process Runtime Params"))
# Playback Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(DAI_PERIODS,
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
PLATFORM_HOST_MEM_CAP, SCHEDULE_CORE)
W_BUFFER(1, COMP_BUFFER_SIZE(DAI_PERIODS,
COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
PLATFORM_DAI_MEM_CAP, SCHEDULE_CORE)
#
# Pipeline Graph
#
# host PCM_P --> B0 --> CODEC_ADAPTER -> B1 --> sink DAI0
P_GRAPH(pipe-pass-playback-PIPELINE_ID, PIPELINE_ID,
LIST(` ',
`dapm(N_BUFFER(0), N_PCMP(PCM_ID))',
`dapm(N_CODEC_ADAPTER(0), N_BUFFER(0))',
`dapm(N_BUFFER(1), N_CODEC_ADAPTER(0))'))
#
# Pipeline Source and Sinks
#
indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1))
indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_ID)
#
# PCM Configuration
#
PCM_CAPABILITIES(Passthrough Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)