|
| 1 | +# |
| 2 | +# Topology for Geminilake with headset on SSP2, spk on SSP1 and DMIC capture |
| 3 | +# |
| 4 | + |
| 5 | +# Include topology builder |
| 6 | +include(`utils.m4') |
| 7 | +include(`dai.m4') |
| 8 | +include(`pipeline.m4') |
| 9 | +include(`ssp.m4') |
| 10 | + |
| 11 | +# Include TLV library |
| 12 | +include(`common/tlv.m4') |
| 13 | + |
| 14 | +# Include Token library |
| 15 | +include(`sof/tokens.m4') |
| 16 | + |
| 17 | +# Include bxt DSP configuration |
| 18 | +include(`platform/intel/bxt.m4') |
| 19 | +include(`platform/intel/dmic.m4') |
| 20 | + |
| 21 | +# |
| 22 | +# Define the pipelines |
| 23 | +# |
| 24 | +# PCM0 <---- volume <----- DMIC0 (dmic capture) |
| 25 | +# PCM1 ----> volume -----> SSP1 (speaker - maxim98357a) |
| 26 | +# PCM2 ----> volume -----> SSP2 (headset - da7219) |
| 27 | +# |
| 28 | + |
| 29 | +# Low Latency capture pipeline 1 on PCM 0 using max 4 channels of s32le. |
| 30 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 31 | +PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, |
| 32 | + 1, 0, 4, s32le, |
| 33 | + 48, 1000, 0, 0, DMIC, 0, s32le, 2) |
| 34 | + |
| 35 | +# Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s16le. |
| 36 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 37 | +PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, |
| 38 | + 2, 1, 2, s16le, |
| 39 | + 48, 1000, 0, 0, SSP, 1, s16le, 2) |
| 40 | + |
| 41 | +# Low Latency playback pipeline 3 on PCM 2 using max 2 channels of s16le. |
| 42 | +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 |
| 43 | +PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, |
| 44 | + 3, 2, 2, s16le, |
| 45 | + 48, 1000, 0, 0, SSP, 2, s16le, 2) |
| 46 | + |
| 47 | +# |
| 48 | +# DAIs configuration |
| 49 | +# |
| 50 | + |
| 51 | +# capture DAI is DMIC0 using 2 periods |
| 52 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 53 | +DAI_ADD(sof/pipe-dai-capture.m4, |
| 54 | + 1, DMIC, 0, DMIC0, |
| 55 | + PIPELINE_SINK_1, 2, s32le, |
| 56 | + 48, 1000, 0, 0) |
| 57 | + |
| 58 | +# playback DAI is SSP1 using 2 periods |
| 59 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 60 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 61 | + 2, SSP, 1, SSP1-Codec, |
| 62 | + PIPELINE_SOURCE_2, 2, s16le, |
| 63 | + 48, 1000, 0, 0) |
| 64 | + |
| 65 | +# playback DAI is SSP2 using 2 periods |
| 66 | +# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 |
| 67 | +DAI_ADD(sof/pipe-dai-playback.m4, |
| 68 | + 3, SSP, 2, SSP2-Codec, |
| 69 | + PIPELINE_SOURCE_3, 2, s16le, |
| 70 | + 48, 1000, 0, 0) |
| 71 | + |
| 72 | +# PCM |
| 73 | +PCM_CAPTURE_ADD(DMIC0, 1, 0, 0, PIPELINE_PCM_1) |
| 74 | +PCM_PLAYBACK_ADD(SSP1, 2, 1, 1, PIPELINE_PCM_2) |
| 75 | +PCM_PLAYBACK_ADD(SSP2, 3, 2, 2, PIPELINE_PCM_3) |
| 76 | + |
| 77 | +# |
| 78 | +# BE configurations - overrides config in ACPI if present |
| 79 | +# |
| 80 | + |
| 81 | +DAI_CONFIG(DMIC, 0, 0, DMIC0, |
| 82 | + DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000, |
| 83 | + DMIC_WORD_LENGTH(s32le), DMIC, 0, |
| 84 | + PDM_CONFIG(DMIC, 0, FOUR_CH_PDM0_PDM1))) |
| 85 | + |
| 86 | +#SSP 1 (ID: 1) with 19.2MHz mclk with MCLK_ID 1 |
| 87 | +DAI_CONFIG(SSP, 1, 1, SSP1-Codec, |
| 88 | + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 19200000, codec_mclk_in), |
| 89 | + SSP_CLOCK(bclk, 1920000, codec_slave), |
| 90 | + SSP_CLOCK(fsync, 48000, codec_slave), |
| 91 | + SSP_TDM(2, 20, 3, 3), |
| 92 | + SSP_CONFIG_DATA(SSP, 1, 16, 1))) |
| 93 | + |
| 94 | +#SSP 2 (ID: 2) with 19.2MHz mclk with MCLK_ID 1 |
| 95 | +DAI_CONFIG(SSP, 2, 2, SSP2-Codec, |
| 96 | + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 19200000, codec_mclk_in), |
| 97 | + SSP_CLOCK(bclk, 1920000, codec_slave), |
| 98 | + SSP_CLOCK(fsync, 48000, codec_slave), |
| 99 | + SSP_TDM(2, 20, 3, 3), |
| 100 | + SSP_CONFIG_DATA(SSP, 2, 16, 1))) |
0 commit comments