|
| 1 | +# Low Latency Passthrough with volume Pipeline and PCM |
| 2 | +# |
| 3 | +# Pipeline Endpoints for connection are :- |
| 4 | +# |
| 5 | +# host PCM_P --> B0 --> EAP 0 --> B1 --> sink DAI0 |
| 6 | + |
| 7 | +# Include topology builder |
| 8 | +include(`utils.m4') |
| 9 | +include(`buffer.m4') |
| 10 | +include(`pcm.m4') |
| 11 | +include(`dai.m4') |
| 12 | +include(`mixercontrol.m4') |
| 13 | +include(`bytecontrol.m4') |
| 14 | +include(`enumcontrol.m4') |
| 15 | +include(`pipeline.m4') |
| 16 | +include(`eap.m4') |
| 17 | + |
| 18 | +# |
| 19 | +# Controls |
| 20 | +# |
| 21 | +# Include defines for EAP controls |
| 22 | +include(`eap_controls.m4') |
| 23 | + |
| 24 | +# |
| 25 | +# Components and Buffers |
| 26 | +# |
| 27 | +# Host "EAP Playback" PCM |
| 28 | +# with 2 sink and 0 source periods |
| 29 | +W_PCM_PLAYBACK(PCM_ID, EAP Playback, 2, 0) |
| 30 | + |
| 31 | +# "EAP 0" has x sink period and 2 source periods |
| 32 | +W_EAP(0, PIPELINE_FORMAT, DAI_PERIODS, 2, SCHEDULE_CORE, |
| 33 | + LIST(` ', "DEF_EAP_CFG")) |
| 34 | + |
| 35 | +# Playback Buffers |
| 36 | +W_BUFFER(0, COMP_BUFFER_SIZE(2, |
| 37 | + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, |
| 38 | + COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), |
| 39 | + PLATFORM_HOST_MEM_CAP) |
| 40 | +W_BUFFER(1, COMP_BUFFER_SIZE(DAI_PERIODS, |
| 41 | + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, |
| 42 | + COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), |
| 43 | + PLATFORM_DAI_MEM_CAP) |
| 44 | + |
| 45 | +# |
| 46 | +# Pipeline Graph |
| 47 | +# |
| 48 | +# host PCM_P --> B0 --> EAP --> B1 --> sink DAI0 |
| 49 | +P_GRAPH(pipe-eap-playback, PIPELINE_ID, |
| 50 | + LIST(` ', |
| 51 | + `dapm(N_BUFFER(0), N_PCMP(PCM_ID))', |
| 52 | + `dapm(N_EAP(0), N_BUFFER(0))', |
| 53 | + `dapm(N_BUFFER(1), N_EAP(0))')) |
| 54 | + |
| 55 | +# |
| 56 | +# Pipeline Source and Sinks |
| 57 | +# |
| 58 | +indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1)) |
| 59 | +indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), |
| 60 | + EAP Playback PCM_ID) |
| 61 | + |
| 62 | +# |
| 63 | +# PCM Configuration |
| 64 | + |
| 65 | +# |
| 66 | +PCM_CAPABILITIES(EAP Playback PCM_ID, `S16_LE', |
| 67 | + PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, |
| 68 | + 2, 16, 192, 16384, 65536, 65536) |
| 69 | + |
| 70 | +undefine(`DAI_EAP_CFG') |
0 commit comments