2019-10-02 20:09:20 +08:00
|
|
|
#
|
|
|
|
# Topology for i.MX8QXP board with cs42888 codec
|
|
|
|
#
|
|
|
|
|
|
|
|
# Include topology builder
|
|
|
|
include(`utils.m4')
|
|
|
|
include(`dai.m4')
|
|
|
|
include(`pipeline.m4')
|
|
|
|
include(`esai.m4')
|
|
|
|
include(`pcm.m4')
|
|
|
|
include(`buffer.m4')
|
|
|
|
|
|
|
|
# Include TLV library
|
|
|
|
include(`common/tlv.m4')
|
|
|
|
|
|
|
|
# Include Token library
|
|
|
|
include(`sof/tokens.m4')
|
|
|
|
|
|
|
|
# Include DSP configuration
|
2021-04-28 23:08:02 +08:00
|
|
|
include(`platform/imx/imx8.m4')
|
2019-10-02 20:09:20 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Define the pipelines
|
|
|
|
#
|
2019-11-08 19:39:59 +08:00
|
|
|
# PCM0 <----> volume <-----> ESAI0 (cs42888)
|
2019-10-02 20:09:20 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
dnl PIPELINE_PCM_ADD(pipeline,
|
|
|
|
dnl pipe id, pcm, max channels, format,
|
|
|
|
dnl period, priority, core,
|
|
|
|
dnl pcm_min_rate, pcm_max_rate, pipeline_rate,
|
|
|
|
dnl time_domain, sched_comp)
|
|
|
|
|
|
|
|
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le.
|
2021-09-15 20:48:14 +08:00
|
|
|
# Set 1000us deadline with priority 0 on core 0
|
2019-10-02 20:09:20 +08:00
|
|
|
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
|
|
|
|
1, 0, 2, s24le,
|
|
|
|
1000, 0, 0,
|
|
|
|
48000, 48000, 48000)
|
|
|
|
|
2019-11-08 19:39:59 +08:00
|
|
|
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le.
|
2021-09-15 20:48:14 +08:00
|
|
|
# Set 1000us deadline with priority 0 on core 0
|
2019-11-08 19:39:59 +08:00
|
|
|
PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
|
|
|
|
2, 0, 2, s24le,
|
|
|
|
1000, 0, 0,
|
|
|
|
48000, 48000, 48000)
|
|
|
|
|
2019-10-02 20:09:20 +08:00
|
|
|
#
|
|
|
|
# DAIs configuration
|
|
|
|
#
|
|
|
|
|
|
|
|
dnl DAI_ADD(pipeline,
|
|
|
|
dnl pipe id, dai type, dai_index, dai_be,
|
|
|
|
dnl buffer, periods, format,
|
|
|
|
dnl period, priority, core, time_domain)
|
|
|
|
|
|
|
|
# playback DAI is ESAI0 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,
|
2020-01-27 20:26:55 +08:00
|
|
|
1, ESAI, 0, esai0-cs42888,
|
2019-10-02 20:09:20 +08:00
|
|
|
PIPELINE_SOURCE_1, 2, s24le,
|
2019-11-15 14:01:04 +08:00
|
|
|
1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA)
|
2019-10-02 20:09:20 +08:00
|
|
|
|
2019-11-08 19:39:59 +08:00
|
|
|
# capture DAI is ESAI0 using 2 periods
|
|
|
|
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
|
|
|
|
DAI_ADD(sof/pipe-dai-capture.m4,
|
2020-01-27 20:26:55 +08:00
|
|
|
2, ESAI, 0, esai0-cs42888,
|
2019-11-08 19:39:59 +08:00
|
|
|
PIPELINE_SINK_2, 2, s24le,
|
|
|
|
1000, 0, 0)
|
|
|
|
|
2019-10-02 20:09:20 +08:00
|
|
|
# PCM Low Latency, id 0
|
|
|
|
|
2019-11-08 19:39:59 +08:00
|
|
|
dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture)
|
|
|
|
PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2)
|
2019-10-02 20:09:20 +08:00
|
|
|
|
|
|
|
dnl DAI_CONFIG(type, idx, link_id, name, esai_config)
|
2020-01-27 20:26:55 +08:00
|
|
|
DAI_CONFIG(ESAI, 0, 0, esai0-cs42888,
|
2019-10-02 20:09:20 +08:00
|
|
|
ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in),
|
2022-01-12 09:43:56 +08:00
|
|
|
ESAI_CLOCK(bclk, 3072000, codec_slave),
|
|
|
|
ESAI_CLOCK(fsync, 48000, codec_slave),
|
2019-10-02 20:09:20 +08:00
|
|
|
ESAI_TDM(2, 32, 3, 3),
|
|
|
|
ESAI_CONFIG_DATA(ESAI, 0, 0)))
|