|
| 1 | +# |
| 2 | +# Topology for MT8196 board with mt6681 |
| 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/mt8196.m4') |
| 21 | + |
| 22 | +# |
| 23 | +# Define the pipelines |
| 24 | +# |
| 25 | +# PCM0 ---> AFE (Speaker - nau8318) |
| 26 | +# PCM1 ---> AFE (Headset playback - nau88l25) |
| 27 | +# PCM2 <--- AFE (DMIC0 - AP) |
| 28 | +# PCM3 <--- AFE (Headset record - nau88l25) |
| 29 | +# PCM4 <--- AFE (DMIC1 - AP) |
| 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, 0, 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, 1, 2, s16le, |
| 51 | + 1000, 0, 0, |
| 52 | + 48000, 48000, 48000) |
| 53 | +undefine(`ENDPOINT_NAME') |
| 54 | +# Low Latency capture pipeline 3 on PCM 18 using max 2 channels of s16le |
| 55 | +# Set 2000us deadline with priority 0 on core 0 |
| 56 | +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, |
| 57 | + 3, 2, 2, s16le, |
| 58 | + 2000, 0, 0, |
| 59 | + 48000, 48000, 48000) |
| 60 | + |
| 61 | +# Low Latency capture pipeline 4 on PCM 19 using max 2 channels of s16le |
| 62 | +# Set 2000us deadline with priority 0 on core 0 |
| 63 | +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, |
| 64 | + 4, 3, 2, s16le, |
| 65 | + 2000, 0, 0, |
| 66 | + 48000, 48000, 48000) |
| 67 | + |
| 68 | +# Low Latency capture pipeline 4 on PCM 20 using max 2 channels of s16le |
| 69 | +# Set 2000us deadline with priority 0 on core 0 |
| 70 | +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, |
| 71 | + 5, 4, 2, s16le, |
| 72 | + 2000, 0, 0, |
| 73 | + 48000, 48000, 48000) |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +# |
| 78 | +# DAIs configuration |
| 79 | +# |
| 80 | + |
| 81 | +dnl DAI_ADD(pipeline, |
| 82 | +dnl pipe id, dai type, dai_index, dai_be, |
| 83 | +dnl buffer, periods, format, |
| 84 | +dnl deadline, priority, core) |
| 85 | + |
| 86 | + |
| 87 | +# playback DAI is AFE using 2 periods |
| 88 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 89 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 90 | + 1, AFE, 0, AFE_SOF_DL_24CH, |
| 91 | + PIPELINE_SOURCE_1, 2, s16le, |
| 92 | + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 93 | + |
| 94 | +# playback DAI is AFE using 2 periods |
| 95 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 96 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 97 | + 2, AFE, 1, AFE_SOF_DL1, |
| 98 | + PIPELINE_SOURCE_2, 2, s16le, |
| 99 | + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 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 | + 3, AFE, 2, AFE_SOF_UL0, |
| 104 | + PIPELINE_SINK_3, 2, s16le, |
| 105 | + 2000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 106 | + |
| 107 | +# capture DAI is AFE using 2 periods |
| 108 | +# Buffers use s16le format, with 48 frame per 2000us on core 0 with priority 0 |
| 109 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 110 | + 4, AFE, 3, AFE_SOF_UL1, |
| 111 | + PIPELINE_SINK_4, 2, s16le, |
| 112 | + 2000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 113 | + |
| 114 | +# capture DAI is AFE using 2 periods |
| 115 | +# Buffers use s16le format, with 48 frame per 2000us on core 0 with priority 0 |
| 116 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 117 | + 5, AFE, 4, AFE_SOF_UL2, |
| 118 | + PIPELINE_SINK_5, 2, s16le, |
| 119 | + 2000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) |
| 120 | + |
| 121 | +#SCHEDULE_TIME_DOMAIN_DMA |
| 122 | +dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) |
| 123 | + |
| 124 | +# PCM Low Latency, id 0 |
| 125 | +PCM_PLAYBACK_ADD(SOF_DL_24CH, 0, PIPELINE_PCM_1) |
| 126 | +PCM_PLAYBACK_ADD(SOF_DL1, 1, PIPELINE_PCM_2) |
| 127 | +PCM_CAPTURE_ADD(SOF_UL0, 2, PIPELINE_PCM_3) |
| 128 | +PCM_CAPTURE_ADD(SOF_UL1, 3, PIPELINE_PCM_4) |
| 129 | +PCM_CAPTURE_ADD(SOF_UL2, 4, PIPELINE_PCM_5) |
| 130 | + |
| 131 | + |
| 132 | +dnl DAI_CONFIG(type, dai_index, link_id, name, afe_config) |
| 133 | + |
| 134 | +DAI_CONFIG(AFE, 0, 0, AFE_SOF_DL_24CH, |
| 135 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 0, 48000, 2, s16le))) |
| 136 | + |
| 137 | +DAI_CONFIG(AFE, 1, 0, AFE_SOF_DL1, |
| 138 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 1, 48000, 2, s16le))) |
| 139 | + |
| 140 | +DAI_CONFIG(AFE, 2, 0, AFE_SOF_UL0, |
| 141 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 2, 48000, 2, s16le))) |
| 142 | + |
| 143 | +DAI_CONFIG(AFE, 3, 0, AFE_SOF_UL1, |
| 144 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 3, 48000, 2, s16le))) |
| 145 | + |
| 146 | +DAI_CONFIG(AFE, 4, 0, AFE_SOF_UL2, |
| 147 | + AFE_CONFIG(AFE_CONFIG_DATA(AFE, 4, 48000, 2, s16le))) |
| 148 | + |
0 commit comments