1# 2# Topology for i.MX8QXP/i.MX8QM with wm8960 (cpu board) + cs42888 (base board) 3# 4 5# Include topology builder 6include(`utils.m4') 7include(`dai.m4') 8include(`pipeline.m4') 9include(`esai.m4') 10include(`sai.m4') 11include(`pcm.m4') 12include(`buffer.m4') 13 14# Include TLV library 15include(`common/tlv.m4') 16 17# Include Token library 18include(`sof/tokens.m4') 19 20# Include DSP configuration 21include(`platform/imx/imx8.m4') 22 23# 24# Define the pipelines 25# 26# PCM0 <----> volume <-----> ESAI0 (cs42888) 27# PCM1 <----> volume <-----> SAI1 (wm8960) 28 29dnl PIPELINE_PCM_ADD(pipeline, 30dnl pipe id, pcm, max channels, format, 31dnl period, priority, core, 32dnl pcm_min_rate, pcm_max_rate, pipeline_rate, 33dnl time_domain, sched_comp) 34 35# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. 36# Set 1000us deadline with priority 0 on core 0 37PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 38 1, 0, 2, s24le, 39 1000, 0, 0, 40 48000, 48000, 48000) 41 42# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. 43# Set 1000us deadline with priority 0 on core 0 44PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 45 2, 0, 2, s24le, 46 1000, 0, 0, 47 48000, 48000, 48000) 48 49# Low Latency playback pipeline 1 on PCM 1 using max 2 channels of s32le. 50# Set 1000us deadline with priority 0 on core 0 51PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 52 3, 1, 2, s32le, 53 1000, 0, 0, 54 48000, 48000, 48000) 55 56# Low Latency capture pipeline 2 on PCM 1 using max 2 channels of s32le. 57# Set 1000us deadline with priority 0 on core 0 58PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 59 4, 1, 2, s32le, 60 1000, 0, 0, 61 48000, 48000, 48000) 62# 63# DAIs configuration 64# 65 66dnl DAI_ADD(pipeline, 67dnl pipe id, dai type, dai_index, dai_be, 68dnl buffer, periods, format, 69dnl period, priority, core, time_domain) 70 71# playback DAI is ESAI0 using 2 periods 72# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 73DAI_ADD(sof/pipe-dai-playback.m4, 74 1, ESAI, 0, esai0-cs42888, 75 PIPELINE_SOURCE_1, 2, s24le, 76 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) 77 78# capture DAI is ESAI0 using 2 periods 79# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 80DAI_ADD(sof/pipe-dai-capture.m4, 81 2, ESAI, 0, esai0-cs42888, 82 PIPELINE_SINK_2, 2, s24le, 83 1000, 0, 0) 84 85# playback DAI is SAI1 using 2 periods 86# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 87DAI_ADD(sof/pipe-dai-playback.m4, 88 3, SAI, 1, sai1-wm8960-hifi, 89 PIPELINE_SOURCE_3, 2, s32le, 90 1000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) 91 92# capture DAI is SAI1 using 2 periods 93# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 94DAI_ADD(sof/pipe-dai-capture.m4, 95 4, SAI, 1, sai1-wm8960-hifi, 96 PIPELINE_SINK_4, 2, s32le, 97 1000, 0, 0) 98 99 100dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) 101PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) 102PCM_DUPLEX_ADD(Port1, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) 103 104dnl DAI_CONFIG(type, idx, link_id, name, esai_config) 105DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, 106 ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), 107 ESAI_CLOCK(bclk, 3072000, codec_slave), 108 ESAI_CLOCK(fsync, 48000, codec_slave), 109 ESAI_TDM(2, 32, 3, 3), 110 ESAI_CONFIG_DATA(ESAI, 0, 0))) 111 112dnl DAI_CONFIG(type, idx, link_id, name, sai_config) 113DAI_CONFIG(SAI, 1, 0, sai1-wm8960-hifi, 114 SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), 115 SAI_CLOCK(bclk, 3072000, codec_master), 116 SAI_CLOCK(fsync, 48000, codec_master), 117 SAI_TDM(2, 32, 3, 3), 118 SAI_CONFIG_DATA(SAI, 1, 0))) 119