1# 2# Topology for i.MX8QXP board with cs42888 codec 3# 4 5# Include topology builder 6include(`utils.m4') 7include(`dai.m4') 8include(`pipeline.m4') 9include(`esai.m4') 10include(`pcm.m4') 11include(`buffer.m4') 12 13# Include TLV library 14include(`common/tlv.m4') 15 16# Include Token library 17include(`sof/tokens.m4') 18 19# Include DSP configuration 20include(`platform/imx/imx8.m4') 21 22# 23# Define the pipelines 24# 25# PCM0 <----> volume <-----> ESAI0 (cs42888) 26# 27 28dnl PIPELINE_PCM_ADD(pipeline, 29dnl pipe id, pcm, max channels, format, 30dnl period, priority, core, 31dnl pcm_min_rate, pcm_max_rate, pipeline_rate, 32dnl time_domain, sched_comp) 33 34# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. 35# Set 1000us deadline on core 0 with priority 0 36PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 37 1, 0, 2, s24le, 38 1000, 0, 0, 39 48000, 48000, 48000) 40 41# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. 42# Set 1000us deadline on core 0 with priority 0 43PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 44 2, 0, 2, s24le, 45 1000, 0, 0, 46 48000, 48000, 48000) 47 48# 49# DAIs configuration 50# 51 52dnl DAI_ADD(pipeline, 53dnl pipe id, dai type, dai_index, dai_be, 54dnl buffer, periods, format, 55dnl period, priority, core, time_domain) 56 57# playback DAI is ESAI0 using 2 periods 58# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 59DAI_ADD(sof/pipe-dai-playback.m4, 60 1, ESAI, 0, esai0-cs42888, 61 PIPELINE_SOURCE_1, 2, s24le, 62 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) 63 64# capture DAI is ESAI0 using 2 periods 65# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 66DAI_ADD(sof/pipe-dai-capture.m4, 67 2, ESAI, 0, esai0-cs42888, 68 PIPELINE_SINK_2, 2, s24le, 69 1000, 0, 0) 70 71# PCM Low Latency, id 0 72 73dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) 74PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) 75 76dnl DAI_CONFIG(type, idx, link_id, name, esai_config) 77DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, 78 ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), 79 ESAI_CLOCK(bclk, 3072000, codec_slave), 80 ESAI_CLOCK(fsync, 48000, codec_slave), 81 ESAI_TDM(2, 32, 3, 3), 82 ESAI_CONFIG_DATA(ESAI, 0, 0))) 83