|
| 1 | +# |
| 2 | +# Topology for MT8365 board with mt6357 |
| 3 | +# |
| 4 | + |
| 5 | +# Include topology builder |
| 6 | +include(`utils.m4') |
| 7 | +include(`dai.m4') |
| 8 | +include(`pipeline.m4') |
| 9 | +include(`afe.m4') |
| 10 | +include(`pcm.m4') |
| 11 | +include(`buffer.m4') |
| 12 | + |
| 13 | +# Include TLV library |
| 14 | +include(`common/tlv.m4') |
| 15 | + |
| 16 | +# Include Token library |
| 17 | +include(`sof/tokens.m4') |
| 18 | + |
| 19 | +# Include DSP configuration |
| 20 | +include(`platform/mediatek/mt8365.m4') |
| 21 | + |
| 22 | +# |
| 23 | +# Define the pipelines |
| 24 | +# |
| 25 | +# PCM16 ---> AFE (Speaker - rt1019) |
| 26 | +# PCM17 ---> AFE (Headset playback - rt5682) |
| 27 | +# PCM18 <--- AFE (DMIC - MT6365) |
| 28 | +# PCM19 <--- AFE (Headset record - rt5682) |
| 29 | + |
| 30 | + |
| 31 | +dnl PIPELINE_PCM_ADD(pipeline, |
| 32 | +dnl pipe id, pcm, max channels, format, |
| 33 | +dnl period, priority, core, |
| 34 | +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, |
| 35 | +dnl time_domain, sched_comp) |
| 36 | + |
| 37 | +define(`ENDPOINT_NAME', `Speakers') |
| 38 | +# Low Latency playback pipeline 1 on PCM 16 using max 2 channels of s16le |
| 39 | +# Set 1000us deadline with priority 0 on core 0 |
| 40 | +PIPELINE_PCM_ADD(ifdef(`WAVES', sof/pipe-waves-codec-playback.m4, sof/pipe-passthrough-playback.m4), |
| 41 | + 1, 16, 2, s16le, |
| 42 | + 1000, 0, 0, |
| 43 | + 48000, 48000, 48000) |
| 44 | +undefine(`ENDPOINT_NAME') |
| 45 | + |
| 46 | +define(`ENDPOINT_NAME', `Headphones') |
| 47 | +# Low Latency playback pipeline 2 on PCM 17 using max 2 channels of s16le |
| 48 | +# Set 1000us deadline with priority 0 on core 0 |
| 49 | +PIPELINE_PCM_ADD(ifdef(`WAVES', sof/pipe-waves-codec-playback.m4, sof/pipe-passthrough-playback.m4), |
| 50 | + 2, 17, 2, s16le, |
| 51 | + 1000, 0, 0, |
| 52 | + 48000, 48000, 48000) |
| 53 | +undefine(`ENDPOINT_NAME') |
| 54 | + |
| 55 | +# Low Latency capture pipeline 3 on PCM 18 using max 2 channels of s16le |
| 56 | +# Set 2000us deadline with priority 0 on core 0 |
| 57 | +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, |
| 58 | + 3, 18, 2, s16le, |
| 59 | + 2000, 0, 0, |
| 60 | + 48000, 48000, 48000) |
| 61 | + |
| 62 | +# Low Latency capture pipeline 4 on PCM 19 using max 2 channels of s16le |
| 63 | +# Set 2000us deadline with priority 0 on core 0 |
| 64 | +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, |
| 65 | + 4, 19, 2, s16le, |
| 66 | + 2000, 0, 0, |
| 67 | + 48000, 48000, 48000) |
| 68 | + |
| 69 | +# |
| 70 | +# DAIs configuration |
| 71 | +# |
| 72 | + |
| 73 | +dnl DAI_ADD(pipeline, |
| 74 | +dnl pipe id, dai type, dai_index, dai_be, |
| 75 | +dnl buffer, periods, format, |
| 76 | +dnl deadline, priority, core) |
| 77 | + |
| 78 | + |
| 79 | +# playback DAI is AFE using 2 periods |
| 80 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 81 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 82 | + 1, AFE, 0, AFE_SOF_DL1, |
| 83 | + PIPELINE_SOURCE_1, 2, s16le, |
| 84 | + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 85 | + |
| 86 | +# playback DAI is AFE using 2 periods |
| 87 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 88 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 89 | + 2, AFE, 1, AFE_SOF_DL2, |
| 90 | + PIPELINE_SOURCE_2, 2, s16le, |
| 91 | + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 92 | + |
| 93 | +# capture DAI is AFE using 2 periods |
| 94 | +# Buffers use s16le format, with 48 frame per 2000us on core 0 with priority 0 |
| 95 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 96 | + 3, AFE, 2, AFE_SOF_AWB, |
| 97 | + PIPELINE_SINK_3, 2, s16le, |
| 98 | + 2000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 99 | + |
| 100 | +# capture DAI is AFE using 2 periods |
| 101 | +# Buffers use s16le format, with 48 frame per 2000us on core 0 with priority 0 |
| 102 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 103 | + 4, AFE, 3, AFE_SOF_VUL, |
| 104 | + PIPELINE_SINK_4, 2, s16le, |
| 105 | + 2000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 106 | + |
| 107 | +#SCHEDULE_TIME_DOMAIN_DMA |
| 108 | +dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) |
| 109 | + |
| 110 | +# PCM Low Latency, id 0 |
| 111 | +PCM_PLAYBACK_ADD(SOF_DL1, 16, PIPELINE_PCM_1) |
| 112 | +PCM_PLAYBACK_ADD(SOF_DL2, 17, PIPELINE_PCM_2) |
| 113 | +PCM_CAPTURE_ADD(SOF_AWB, 18, PIPELINE_PCM_3) |
| 114 | +PCM_CAPTURE_ADD(SOF_VUL, 19, PIPELINE_PCM_4) |
| 115 | + |
| 116 | +dnl DAI_CONFIG(type, dai_index, link_id, name, afe_config) |
| 117 | + |
| 118 | +DAI_CONFIG(AFE, 0, 0, AFE_SOF_DL1, |
| 119 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 0, 48000, 2, s16le))) |
| 120 | + |
| 121 | +DAI_CONFIG(AFE, 1, 0, AFE_SOF_DL2, |
| 122 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 1, 48000, 2, s16le))) |
| 123 | + |
| 124 | +DAI_CONFIG(AFE, 2, 0, AFE_SOF_AWB, |
| 125 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 2, 48000, 2, s16le))) |
| 126 | + |
| 127 | +DAI_CONFIG(AFE, 3, 0, AFE_SOF_VUL, |
| 128 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 3, 48000, 2, s16le))) |
0 commit comments