1# 2# Topology for i.MX8QM / i.MX8QXP boards with cs42888 codec demonstrating mixer component 3# 4 5# Include topology builder 6include(`utils.m4') 7include(`dai.m4') 8include(`pipeline.m4') 9include(`esai.m4') 10 11# Include TLV library 12include(`common/tlv.m4') 13 14# Include Token library 15include(`sof/tokens.m4') 16 17# Include DSP configuration 18include(`platform/imx/imx8.m4') 19 20# 21# Define the pipelines 22# 23# PCM0 -----> volume -------v 24# low latency mixer ----> volume ----> ESAI0 25# PCM1 -----> volume -------^ 26# PCM0 <---- Volume <---- ESAI0 27# 28 29# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. 30# 1000us deadline on core 0 with priority 0 31PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 32 2, 0, 2, s24le, 33 1000, 0, 0, 34 48000, 48000, 48000) 35 36# 37# DAI configuration 38# 39# ESAI port 0 is our only pipeline DAI 40# 41 42# playback DAI is ESAI0 using 2 periods 43# Buffers use s24le format, 1000us deadline on core 0 with priority 1 44# this defines pipeline 1. The 'NOT_USED_IGNORED' is due to dependencies 45# and is adjusted later with an explicit dapm line. 46DAI_ADD(sof/pipe-mixer-dai-playback.m4, 47 1, ESAI, 0, esai0-cs42888, 48 NOT_USED_IGNORED, 2, s24le, 49 1000, 1, 0, SCHEDULE_TIME_DOMAIN_DMA, 50 2, 48000) 51 52# PCM Playback pipeline 3 on PCM 0 using max 2 channels of s24le. 53# 1000us deadline on core 0 with priority 0 54# this is connected to pipeline DAI 1 55PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, 56 3, 0, 2, s24le, 57 1000, 0, 0, 58 48000, 48000, 48000, 59 SCHEDULE_TIME_DOMAIN_DMA, 60 PIPELINE_PLAYBACK_SCHED_COMP_1) 61 62# PCM Playback pipeline 4 on PCM 1 using max 2 channels of s24le. 63# 5ms deadline on core 0 with priority 0 64# this is connected to pipeline DAI 1 65PIPELINE_PCM_ADD(sof/pipe-host-volume-playback.m4, 66 4, 1, 2, s24le, 67 5000, 0, 0, 68 48000, 48000, 48000, 69 SCHEDULE_TIME_DOMAIN_DMA, 70 PIPELINE_PLAYBACK_SCHED_COMP_1) 71 72# Connect pipelines together 73SectionGraph."PIPE_NAME" { 74 index "0" 75 76 lines [ 77 # PCM pipeline 3 to DAI pipeline 1 78 dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) 79 # PCM pipeline 4 to DAI pipeline 1 80 dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_4) 81 82 ] 83} 84 85# capture DAI is ESAI0 using 2 periods 86# Buffers use s24le format, 1000us deadline on core 0 with priority 0 87# this is part of pipeline 2 88DAI_ADD(sof/pipe-dai-capture.m4, 89 2, ESAI, 0, esai0-cs42888, 90 PIPELINE_SINK_2, 2, s24le, 91 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) 92 93 94# PCM definitions 95PCM_DUPLEX_ADD(PCM, 0, PIPELINE_PCM_3, PIPELINE_PCM_2) 96PCM_PLAYBACK_ADD(PCM Deep Buffer, 1, PIPELINE_PCM_4) 97 98# 99# BE configurations 100# 101DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, 102 ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), 103 ESAI_CLOCK(bclk, 3072000, codec_slave), 104 ESAI_CLOCK(fsync, 48000, codec_slave), 105 ESAI_TDM(2, 32, 3, 3), 106 ESAI_CONFIG_DATA(ESAI, 0, 0))) 107