|
| 1 | +# |
| 2 | +# Topology for generic Tigerlake board with no codec and digital mic array. |
| 3 | +# |
| 4 | +# TGL Host GW DMAC support max 6 playback and max 6 capture channels so some |
| 5 | +# pipelines/PCMs/DAIs are commented out to keep within HW bounds. If these |
| 6 | +# are needed then they can be used provided other PCMs/pipelines/SSPs are |
| 7 | +# commented out in their place. |
| 8 | + |
| 9 | +# Include topology builder |
| 10 | +include(`utils.m4') |
| 11 | +include(`dai.m4') |
| 12 | +include(`ssp.m4') |
| 13 | +include(`pipeline.m4') |
| 14 | + |
| 15 | +# Include TLV library |
| 16 | +include(`common/tlv.m4') |
| 17 | + |
| 18 | +# Include Token library |
| 19 | +include(`sof/tokens.m4') |
| 20 | + |
| 21 | +# Include Tigerlake DSP configuration |
| 22 | +include(`platform/intel/tgl.m4') |
| 23 | +include(`platform/intel/dmic.m4') |
| 24 | + |
| 25 | +# |
| 26 | +# Define the pipelines |
| 27 | +# |
| 28 | +# PCM0 <---> volume <----> SSP0 |
| 29 | +# PCM1 <---> Volume <----> SSP1 |
| 30 | +# PCM2 <---> volume <----> SSP2 |
| 31 | +# PCM6 <---- volume <----- DMIC6 (DMIC01) |
| 32 | +# |
| 33 | + |
| 34 | +dnl PIPELINE_PCM_ADD(pipeline, |
| 35 | +dnl pipe id, pcm, max channels, format, |
| 36 | +dnl frames, deadline, priority, core) |
| 37 | + |
| 38 | +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s16le. |
| 39 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 40 | +PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, |
| 41 | + 1, 0, 2, s16le, |
| 42 | + 1000, 0, 0, |
| 43 | + 48000, 48000, 48000) |
| 44 | + |
| 45 | +# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s16le. |
| 46 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 47 | +PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, |
| 48 | + 2, 0, 2, s16le, |
| 49 | + 1000, 0, 0, |
| 50 | + 48000, 48000, 48000) |
| 51 | + |
| 52 | +# Low Latency playback pipeline 3 on PCM 1 using max 2 channels of s16le. |
| 53 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 54 | +PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, |
| 55 | + 3, 1, 2, s16le, |
| 56 | + 1000, 0, 0, |
| 57 | + 48000, 48000, 48000) |
| 58 | + |
| 59 | +# Low Latency capture pipeline 4 on PCM 1 using max 2 channels of s16le. |
| 60 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 61 | +PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, |
| 62 | + 4, 1, 2, s16le, |
| 63 | + 1000, 0, 0, |
| 64 | + 48000, 48000, 48000) |
| 65 | + |
| 66 | +# Low Latency playback pipeline 5 on PCM 2 using max 2 channels of s16le. |
| 67 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 68 | +PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, |
| 69 | + 5, 2, 2, s16le, |
| 70 | + 1000, 0, 0, |
| 71 | + 48000, 48000, 48000) |
| 72 | + |
| 73 | +# Low Latency capture pipeline 6 on PCM 2 using max 2 channels of s16le. |
| 74 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 75 | +PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, |
| 76 | + 6, 2, 2, s16le, |
| 77 | + 1000, 0, 0, |
| 78 | + 48000, 48000, 48000) |
| 79 | + |
| 80 | +# Passthrough capture pipeline 13 on PCM 6 using max 2 channels. |
| 81 | +# 1000us deadline on core 0 with priority 0 |
| 82 | +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, |
| 83 | + 13, 6, 2, s32le, |
| 84 | + 1000, 0, 0, |
| 85 | + 48000, 48000, 48000) |
| 86 | +# |
| 87 | +# DAIs configuration |
| 88 | +# |
| 89 | + |
| 90 | +dnl DAI_ADD(pipeline, |
| 91 | +dnl pipe id, dai type, dai_index, dai_be, |
| 92 | +dnl buffer, periods, format, |
| 93 | +dnl frames, deadline, priority, core) |
| 94 | + |
| 95 | +# playback DAI is SSP0 using 2 periods |
| 96 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 97 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 98 | + 1, SSP, 0, NoCodec-0, |
| 99 | + PIPELINE_SOURCE_1, 2, s16le, |
| 100 | + 1000, 0, 0) |
| 101 | + |
| 102 | +# capture DAI is SSP0 using 2 periods |
| 103 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 104 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 105 | + 2, SSP, 0, NoCodec-0, |
| 106 | + PIPELINE_SINK_2, 2, s16le, |
| 107 | + 1000, 0, 0) |
| 108 | + |
| 109 | +# playback DAI is SSP1 using 2 periods |
| 110 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 111 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 112 | + 3, SSP, 1, NoCodec-1, |
| 113 | + PIPELINE_SOURCE_3, 2, s16le, |
| 114 | + 1000, 0, 0) |
| 115 | + |
| 116 | +# capture DAI is SSP1 using 2 periods |
| 117 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 118 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 119 | + 4, SSP, 1, NoCodec-1, |
| 120 | + PIPELINE_SINK_4, 2, s16le, |
| 121 | + 1000, 0, 0) |
| 122 | + |
| 123 | +# playback DAI is SSP2 using 2 periods |
| 124 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 125 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 126 | + 5, SSP, 2, NoCodec-2, |
| 127 | + PIPELINE_SOURCE_5, 2, s16le, |
| 128 | + 1000, 0, 0) |
| 129 | + |
| 130 | +# capture DAI is SSP2 using 2 periods |
| 131 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 132 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 133 | + 6, SSP, 2, NoCodec-2, |
| 134 | + PIPELINE_SINK_6, 2, s16le, |
| 135 | + 1000, 0, 0) |
| 136 | + |
| 137 | +# capture DAI is DMIC 0 using 2 periods |
| 138 | +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 |
| 139 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 140 | + 13, DMIC, 0, NoCodec-6, |
| 141 | + PIPELINE_SINK_13, 2, s32le, |
| 142 | + 1000, 0, 0) |
| 143 | + |
| 144 | +dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) |
| 145 | +PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) |
| 146 | +PCM_DUPLEX_ADD(Port1, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) |
| 147 | +PCM_DUPLEX_ADD(Port2, 2, PIPELINE_PCM_5, PIPELINE_PCM_6) |
| 148 | +PCM_CAPTURE_ADD(DMIC01, 6, PIPELINE_PCM_13) |
| 149 | + |
| 150 | +# |
| 151 | +# BE configurations - overrides config in ACPI if present |
| 152 | +# |
| 153 | + |
| 154 | +DAI_CONFIG(SSP, 0, 0, NoCodec-0, |
| 155 | + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 38400000, codec_mclk_in), |
| 156 | + SSP_CLOCK(bclk, 2400000, codec_slave), |
| 157 | + SSP_CLOCK(fsync, 48000, codec_slave), |
| 158 | + SSP_TDM(2, 25, 3, 3), |
| 159 | + SSP_CONFIG_DATA(SSP, 0, 24, 0, SSP_QUIRK_LBM))) |
| 160 | + |
| 161 | +DAI_CONFIG(SSP, 1, 1, NoCodec-1, |
| 162 | + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 38400000, codec_mclk_in), |
| 163 | + SSP_CLOCK(bclk, 2400000, codec_slave), |
| 164 | + SSP_CLOCK(fsync, 48000, codec_slave), |
| 165 | + SSP_TDM(2, 25, 3, 3), |
| 166 | + SSP_CONFIG_DATA(SSP, 1, 24, 0, SSP_QUIRK_LBM))) |
| 167 | + |
| 168 | +DAI_CONFIG(SSP, 2, 2, NoCodec-2, |
| 169 | + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 38400000, codec_mclk_in), |
| 170 | + SSP_CLOCK(bclk, 2400000, codec_slave), |
| 171 | + SSP_CLOCK(fsync, 48000, codec_slave), |
| 172 | + SSP_TDM(2, 25, 3, 3), |
| 173 | + SSP_CONFIG_DATA(SSP, 2, 24, 0, SSP_QUIRK_LBM))) |
| 174 | + |
| 175 | +DAI_CONFIG(DMIC, 0, 6, NoCodec-6, |
| 176 | + dnl DMIC_CONFIG(driver_version, clk_min, clk_mac, duty_min, duty_max, |
| 177 | + dnl sample_rate, fifo word length, unmute time, type, |
| 178 | + dnl dai_index, pdm controller config) |
| 179 | + DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000, |
| 180 | + DMIC_WORD_LENGTH(s32le), 400, DMIC, 0, |
| 181 | + dnl PDM_CONFIG(type, dai_index, num pdm active, pdm tuples list) |
| 182 | + dnl STEREO_PDM0 is a pre-defined pdm config for stereo capture |
| 183 | + PDM_CONFIG(DMIC, 0, STEREO_PDM0))) |
| 184 | + |
0 commit comments