From 4398b6f07461536af64e31d33b3fdce6d401c9a7 Mon Sep 17 00:00:00 2001 From: Jaska Uimonen Date: Thu, 24 Jan 2019 11:09:12 +0200 Subject: [PATCH 1/4] pipeline: calculate frame count from stream params Previously frame count was coming as topology pipeline parameter. As the frame count might change because of some components have fixed samplerate, we might as well calculate it from the stream parameters. Component base struct will have new member output_rate, which the component should set if it has fixed output rate (like SRC). Not setting it or 0 means it can be whatever the pipeline decides. Components with 0 output_rate will have frames = (stream) sample_rate / (pipeline) deadline. Components downstream to fixed output rate will obey the fixed rate / period. Signed-off-by: Jaska Uimonen --- src/audio/pipeline.c | 12 +++++++++++- src/audio/src/src.c | 2 ++ src/include/sof/audio/component.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c index 62bd02c46764..cb5386d989e2 100644 --- a/src/audio/pipeline.c +++ b/src/audio/pipeline.c @@ -144,7 +144,6 @@ static int pipeline_comp_complete(struct comp_dev *current, void *data, /* complete component init */ current->pipeline = ppl_data->p; - current->frames = ppl_data->p->ipc_pipe.frames_per_sched; pipeline_for_each_comp(current, &pipeline_comp_complete, data, NULL, dir); @@ -286,6 +285,17 @@ static int pipeline_comp_params(struct comp_dev *current, void *data, int dir) /* send current params to the component */ current->params = ppl_data->params->params; + /* set frames from samplerate/period, but round integer up */ + if (current->output_rate != 0) { + current->frames = (current->output_rate + + current->pipeline->ipc_pipe.period - 1) / + current->pipeline->ipc_pipe.period; + } else { + current->frames = (current->params.rate + + current->pipeline->ipc_pipe.period - 1) / + current->pipeline->ipc_pipe.period; + } + err = comp_params(current); if (err < 0 || err == PPL_STATUS_PATH_STOP) return err; diff --git a/src/audio/src/src.c b/src/audio/src/src.c index 5b090f6732ac..25bd535fd75b 100644 --- a/src/audio/src/src.c +++ b/src/audio/src/src.c @@ -536,6 +536,8 @@ static struct comp_dev *src_new(struct sof_ipc_comp *comp) cd->polyphase_func = src_polyphase_stage_cir; src_polyphase_reset(&cd->src); + dev->output_rate = ipc_src->sink_rate; + dev->state = COMP_STATE_READY; return dev; } diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index b9c1b85c78b8..91c894714480 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -235,6 +235,7 @@ struct comp_dev { uint16_t is_dma_connected; /**< component is connected to DMA */ uint64_t position; /**< component rendering position */ uint32_t frames; /**< number of frames we copy to sink */ + uint32_t output_rate; /**< 0 means all output rates are fine */ struct pipeline *pipeline; /**< pipeline we belong to */ /** common runtime configuration for downstream/upstream */ From 1d6e612a6467ab3d7d6a7019353b88d238308fad Mon Sep 17 00:00:00 2001 From: Jaska Uimonen Date: Thu, 3 Jan 2019 14:11:21 +0200 Subject: [PATCH 2/4] topology: enable pcm range and pipeline rate and remove frame count Enable setting pcm min and max rate from top level m4 pipeline macro. This way it is possible to configure the whole pipeline to correct samplerate range in 1 file. Previously you needed to modify the pipeline macros where the rate was hardcoded. As the frame count is calculated from pcm/dai rate and scheduling time the frame count is obsolete. Introduce pipeline rate parameter to help configuring components with fixed output rate. We can't deduce this from pcm range since for example src might accept bigger max rate than the following dai. Even though the parameter is named "pipeline rate" it essentially means the "final" output rate to which this pipeline is connected to (dai or other pipeline). In capture pipelines it means the originating fixed dai rate. Signed-off-by: Jaska Uimonen --- tools/test/topology/test-all.m4 | 14 +- tools/test/topology/test-capture.m4 | 7 +- .../topology/test-equalizer-playback-ssp.m4 | 7 +- tools/test/topology/test-playback.m4 | 7 +- tools/test/topology/test-tone-playback.m4 | 5 +- tools/topology/m4/dai.m4 | 12 +- tools/topology/m4/pipeline.m4 | 88 ++++++---- .../platform/intel/intel-generic-dmic.m4 | 21 +-- tools/topology/sof-apl-da7219.m4 | 63 ++++--- tools/topology/sof-apl-demux-pcm512x.m4 | 46 +++-- tools/topology/sof-apl-dmic-2ch.m4 | 102 +++++++++++ tools/topology/sof-apl-dmic-a2ch-b2ch.m4 | 24 +-- tools/topology/sof-apl-dmic-a2ch-b4ch.m4 | 24 +-- tools/topology/sof-apl-dmic-a2ch.m4 | 15 +- tools/topology/sof-apl-dmic-a4ch-b2ch.m4 | 24 +-- tools/topology/sof-apl-dmic-b2ch.m4 | 15 +- tools/topology/sof-apl-dmic.m4 | 24 +-- tools/topology/sof-apl-eq-dmic.m4 | 16 +- tools/topology/sof-apl-eq-pcm512x.m4 | 9 +- tools/topology/sof-apl-keyword-detect.m4 | 28 +-- tools/topology/sof-apl-nocodec.m4 | 117 +++++++------ tools/topology/sof-apl-pcm512x-nohdmi.m4 | 15 +- tools/topology/sof-apl-pcm512x.m4 | 48 +++--- tools/topology/sof-apl-rt298.m4 | 36 ++-- tools/topology/sof-apl-src-pcm512x.m4 | 15 +- tools/topology/sof-apl-tdf8532.m4 | 89 +++++----- tools/topology/sof-apl-wm8804.m4 | 9 +- tools/topology/sof-bdw-codec.m4 | 23 +-- tools/topology/sof-bdw-rt5640.m4 | 92 ++++++++++ tools/topology/sof-byt-codec.m4 | 27 +-- tools/topology/sof-byt-da7213.m4 | 92 ++++++++++ tools/topology/sof-byt-nocodec.m4 | 92 ++++++++++ tools/topology/sof-byt-rt5651.m4 | 92 ++++++++++ tools/topology/sof-cht-max98090.m4 | 23 +-- tools/topology/sof-cht-nocodec.m4 | 24 +-- tools/topology/sof-cht-rt5682.m4 | 18 +- .../sof-cml-demux-rt5682-max98357a.m4 | 13 +- tools/topology/sof-cml-demux-rt5682.m4 | 63 ++++--- tools/topology/sof-cml-rt5682-kwd.m4 | 74 ++++---- tools/topology/sof-cml-rt5682-max98357a.m4 | 15 +- tools/topology/sof-cml-rt5682.m4 | 65 ++++--- tools/topology/sof-cml-src-rt5682.m4 | 60 ++++--- tools/topology/sof-cnl-nocodec.m4 | 69 ++++---- tools/topology/sof-cnl-rt274.m4 | 18 +- tools/topology/sof-glk-da7219-kwd.m4 | 88 +++++----- tools/topology/sof-glk-da7219.m4 | 63 ++++--- tools/topology/sof-glk-rt5682.m4 | 63 ++++--- tools/topology/sof-hda-generic-idisp.m4 | 33 ++-- tools/topology/sof-hda-generic.m4 | 64 +++---- tools/topology/sof-hsw-rt5640.m4 | 23 +-- tools/topology/sof-icl-dmic-4ch.m4 | 16 +- tools/topology/sof-icl-nocodec.m4 | 18 +- tools/topology/sof-whl-hda.m4 | 162 ++++++++++++++++++ tools/topology/sof/pipe-dai-capture.m4 | 2 +- tools/topology/sof/pipe-dai-playback.m4 | 2 +- tools/topology/sof/pipe-demux-playback.m4 | 4 +- tools/topology/sof/pipe-detect.m4 | 8 +- tools/topology/sof/pipe-eq-capture.m4 | 6 +- .../sof/pipe-eq-fir-volume-playback.m4 | 8 +- .../sof/pipe-eq-iir-volume-playback.m4 | 8 +- tools/topology/sof/pipe-eq-volume-playback.m4 | 10 +- tools/topology/sof/pipe-kfbm-capture.m4 | 6 +- .../topology/sof/pipe-low-latency-capture.m4 | 6 +- .../topology/sof/pipe-low-latency-playback.m4 | 10 +- .../sof/pipe-passthrough-capture-sched.m4 | 4 +- .../topology/sof/pipe-passthrough-capture.m4 | 4 +- .../topology/sof/pipe-passthrough-playback.m4 | 4 +- tools/topology/sof/pipe-pcm-media.m4 | 12 +- tools/topology/sof/pipe-src-capture.m4 | 8 +- tools/topology/sof/pipe-src-playback.m4 | 12 +- .../topology/sof/pipe-src-volume-playback.m4 | 8 +- tools/topology/sof/pipe-tone.m4 | 6 +- .../topology/sof/pipe-volume-capture-16khz.m4 | 4 +- .../topology/sof/pipe-volume-capture-sched.m4 | 6 +- tools/topology/sof/pipe-volume-capture.m4 | 6 +- .../sof/pipe-volume-demux-playback.m4 | 6 +- tools/topology/sof/pipe-volume-playback.m4 | 6 +- 77 files changed, 1633 insertions(+), 793 deletions(-) create mode 100644 tools/topology/sof-apl-dmic-2ch.m4 create mode 100644 tools/topology/sof-bdw-rt5640.m4 create mode 100644 tools/topology/sof-byt-da7213.m4 create mode 100644 tools/topology/sof-byt-nocodec.m4 create mode 100644 tools/topology/sof-byt-rt5651.m4 create mode 100644 tools/topology/sof-whl-hda.m4 diff --git a/tools/test/topology/test-all.m4 b/tools/test/topology/test-all.m4 index 518c909cf129..b974f64e4fb2 100644 --- a/tools/test/topology/test-all.m4 +++ b/tools/test/topology/test-all.m4 @@ -43,8 +43,9 @@ include(`byt.m4') PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, 1, 0, 2, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, - TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2) + 1000, 0, 0, + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2, + 48000, 48000, 48000) # Passthrough playback pipeline 2 on PCM 0 using max 2 channels of s24le. @@ -52,8 +53,9 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, 2, 0, 2, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, - TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2) + 1000, 0, 0, + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2, + 48000, 48000, 48000) # # DAI configuration @@ -66,14 +68,14 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, DAI_ADD(sof/pipe-dai-playback.m4, 1, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, PIPELINE_SOURCE_1, 2, TEST_DAI_FORMAT, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP TEST_DAI_PORT using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, PIPELINE_SINK_2, 2, TEST_DAI_FORMAT, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Passthrough PCM_DUPLEX_ADD(Passthrough, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/test/topology/test-capture.m4 b/tools/test/topology/test-capture.m4 index ce9c408d9899..94b3dadb4108 100644 --- a/tools/test/topology/test-capture.m4 +++ b/tools/test/topology/test-capture.m4 @@ -44,8 +44,9 @@ include(`byt.m4') PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, 2, 0, 4, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, - TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2) + 1000, 0, 0, + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2, + 48000, 48000, 48000) # # DAI configuration @@ -57,7 +58,7 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, DAI_ADD(sof/pipe-dai-capture.m4, 2, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, PIPELINE_SINK_2, 2, TEST_DAI_FORMAT, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Passthrough PCM_CAPTURE_ADD(Passthrough, 0, PIPELINE_PCM_2) diff --git a/tools/test/topology/test-equalizer-playback-ssp.m4 b/tools/test/topology/test-equalizer-playback-ssp.m4 index ab775a451ed2..f88bed47331a 100644 --- a/tools/test/topology/test-equalizer-playback-ssp.m4 +++ b/tools/test/topology/test-equalizer-playback-ssp.m4 @@ -42,8 +42,9 @@ include(`dsps/byt.m4') PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, 1, 0, 2, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, 0, 1, - SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2) + 1000, 0, 0, 0, 1, + SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2, + 48000, 48000, 48000) # # DAI configuration # @@ -55,7 +56,7 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, PIPELINE_SOURCE_1, 2, TEST_SSP_FORMAT, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Passthrough PCM_PLAYBACK_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1) diff --git a/tools/test/topology/test-playback.m4 b/tools/test/topology/test-playback.m4 index 9833ea97ddcc..38e452fcb336 100644 --- a/tools/test/topology/test-playback.m4 +++ b/tools/test/topology/test-playback.m4 @@ -43,8 +43,9 @@ include(`byt.m4') PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, 1, 0, 2, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, - TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2) + 1000, 0, 0, + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2, + 48000, 48000, 48000) # # DAI configuration # @@ -56,7 +57,7 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, DAI_ADD(sof/pipe-dai-playback.m4, 1, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, PIPELINE_SOURCE_1, 2, TEST_DAI_FORMAT, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Passthrough PCM_PLAYBACK_ADD(Passthrough, 0, PIPELINE_PCM_1) diff --git a/tools/test/topology/test-tone-playback.m4 b/tools/test/topology/test-tone-playback.m4 index 63a0a6d682fb..5f3f8d2e02b1 100644 --- a/tools/test/topology/test-tone-playback.m4 +++ b/tools/test/topology/test-tone-playback.m4 @@ -44,14 +44,15 @@ define(`TONE_SAMPLE_RATE', 48000) # Schedule with 48 frame per 1000us deadline on core 0 with priority 0 PIPELINE_ADD(sof/pipe-tone.m4, 5, 2, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, 0) + 1000, 0, 0, 0, 0, + 48000, 48000, 48000) # playback DAI is SSP2 using 2 periods # Buffers use TEST_DAI_FORMAT format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, PIPELINE_SOURCE_5, 2, TEST_DAI_FORMAT, - 48, 1000, 2, 0) + 1000, 2, 0) # # BE configurations - overrides config in ACPI if present diff --git a/tools/topology/m4/dai.m4 b/tools/topology/m4/dai.m4 index 4e7816b2c2a0..d7bd49d9e786 100644 --- a/tools/topology/m4/dai.m4 +++ b/tools/topology/m4/dai.m4 @@ -171,7 +171,7 @@ define(`DAI_CONFIG', dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core, time_domain) +dnl deadline, priority, core, time_domain) define(`DAI_ADD', `undefine(`PIPELINE_ID')' `undefine(`DAI_TYPE')' @@ -180,7 +180,6 @@ define(`DAI_ADD', `undefine(`DAI_BUF')' `undefine(`DAI_PERIODS')' `undefine(`DAI_FORMAT')' -`undefine(`SCHEDULE_FRAMES')' `undefine(`SCHEDULE_DEADLINE')' `undefine(`SCHEDULE_PRIORITY')' `undefine(`SCHEDULE_CORE')' @@ -193,11 +192,10 @@ define(`DAI_ADD', `define(`DAI_NAME', $3$4)' `define(`DAI_PERIODS', $7)' `define(`DAI_FORMAT', $8)' -`define(`SCHEDULE_FRAMES', $9)' -`define(`SCHEDULE_DEADLINE', $10)' -`define(`SCHEDULE_PRIORITY', $11)' -`define(`SCHEDULE_CORE', $12)' -`define(`SCHEDULE_TIME_DOMAIN', $13)' +`define(`SCHEDULE_DEADLINE', $9)' +`define(`SCHEDULE_PRIORITY', $10)' +`define(`SCHEDULE_CORE', $11)' +`define(`SCHEDULE_TIME_DOMAIN', $12)' `include($1)' `DEBUG_DAI($3, $4)' ) diff --git a/tools/topology/m4/pipeline.m4 b/tools/topology/m4/pipeline.m4 index 37a1f5bd227b..1bf4228877a4 100644 --- a/tools/topology/m4/pipeline.m4 +++ b/tools/topology/m4/pipeline.m4 @@ -9,16 +9,16 @@ dnl Define macro for pipeline widget dnl Pipeline name) define(`N_PIPELINE', `PIPELINE.'PIPELINE_ID`.'$1) -dnl W_PIPELINE(stream, period, priority, frames, core, initiator, platform) +dnl W_PIPELINE(stream, period, priority, core, initiator, platform) define(`W_PIPELINE', `SectionVendorTuples."'N_PIPELINE($1)`_tuples" {' ` tokens "sof_sched_tokens"' ` tuples."word" {' ` SOF_TKN_SCHED_PERIOD' STR($2) ` SOF_TKN_SCHED_PRIORITY' STR($3) -` SOF_TKN_SCHED_CORE' STR($5) -` SOF_TKN_SCHED_FRAMES' STR($4) -` SOF_TKN_SCHED_TIME_DOMAIN' STR($6) +` SOF_TKN_SCHED_CORE' STR($4) +` SOF_TKN_SCHED_FRAMES' "0" +` SOF_TKN_SCHED_TIME_DOMAIN' STR($5) ` }' `}' `SectionData."'N_PIPELINE($1)`_data" {' @@ -31,37 +31,42 @@ define(`W_PIPELINE', ` stream_name "'$1`"' ` data [' ` "'N_PIPELINE($1)`_data"' -` "'$7`"' +` "'$6`"' ` ]' `}') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, period, priority, core, +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, dnl time_domain, sched_comp) define(`PIPELINE_PCM_ADD', -`ifelse(eval(`$# > 8'), `1', +`ifelse(eval(`$# > 10'), `1', `undefine(`PCM_ID')' `undefine(`PIPELINE_ID')' `undefine(`PIPELINE_CHANNELS')' `undefine(`PIPELINE_FORMAT')' -`undefine(`SCHEDULE_FRAMES')' `undefine(`SCHEDULE_PERIOD')' `undefine(`SCHEDULE_PRIORITY')' `undefine(`SCHEDULE_CORE')' +`undefine(`PCM_MIN_RATE')' +`undefine(`PCM_MAX_RATE')' +`undefine(`PIPELINE_RATE')' `undefine(`SCHEDULE_TIME_DOMAIN')' `undefine(`SCHED_COMP')' `define(`PIPELINE_ID', $2)' `define(`PCM_ID', $3)' `define(`PIPELINE_CHANNELS', $4)' `define(`PIPELINE_FORMAT', $5)' -`define(`SCHEDULE_FRAMES', $6)' -`define(`SCHEDULE_PERIOD', $7)' -`define(`SCHEDULE_PRIORITY', $8)' -`define(`SCHEDULE_CORE', $9)' -`define(`SCHEDULE_TIME_DOMAIN', $10)' +`define(`SCHEDULE_PERIOD', $6)' +`define(`SCHEDULE_PRIORITY', $7)' +`define(`SCHEDULE_CORE', $8)' +`define(`PCM_MIN_RATE', $9)' +`define(`PCM_MAX_RATE', $10)' +`define(`PIPELINE_RATE', $11)' +`define(`SCHEDULE_TIME_DOMAIN', $12)' `define(`DAI_FORMAT', $5)' -`define(`SCHED_COMP', $11)' +`define(`SCHED_COMP', $13)' `include($1)' `DEBUG_PCM_ADD($1, $3)' ,`fatal_error(`Invalid parameters ($#) to PIPELINE_PCM_ADD')')' @@ -69,16 +74,15 @@ define(`PIPELINE_PCM_ADD', dnl PIPELINE_PCM_DAI_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, period, priority, core, +dnl period, priority, core, dnl dai type, dai_index, dai format, dnl periods, time_domain) define(`PIPELINE_PCM_DAI_ADD', -`ifelse(`$#', `13', +`ifelse(`$#', `15', `undefine(`PCM_ID')' `undefine(`PIPELINE_ID')' `undefine(`PIPELINE_CHANNELS')' `undefine(`PIPELINE_FORMAT')' -`undefine(`SCHEDULE_FRAMES')' `undefine(`SCHEDULE_PERIOD')' `undefine(`SCHEDULE_PRIORITY')' `undefine(`SCHEDULE_CORE')' @@ -87,47 +91,57 @@ define(`PIPELINE_PCM_DAI_ADD', `undefine(`DAI_INDEX')' `undefine(`DAI_FORMAT')' `undefine(`DAI_PERIODS')' +`undefine(`PCM_MIN_RATE')' +`undefine(`PCM_MAX_RATE')' +`undefine(`PIPELINE_RATE')' `define(`PIPELINE_ID', $2)' `define(`PCM_ID', $3)' `define(`PIPELINE_CHANNELS', $4)' `define(`PIPELINE_FORMAT', $5)' -`define(`SCHEDULE_FRAMES', $6)' -`define(`SCHEDULE_PERIOD', $7)' -`define(`SCHEDULE_PRIORITY', $8)' -`define(`SCHEDULE_CORE', $9)' -`define(`SCHEDULE_TIME_DOMAIN', $14)' -`define(`DAI_TYPE', STR($10))' -`define(`DAI_INDEX', STR($11))' -`define(`DAI_FORMAT', $12)' -`define(`DAI_PERIODS', $13)' -`define(`DAI_NAME', $10$11)' +`define(`SCHEDULE_PERIOD', $6)' +`define(`SCHEDULE_PRIORITY', $7)' +`define(`SCHEDULE_CORE', $8)' +`define(`SCHEDULE_TIME_DOMAIN', $16)' +`define(`DAI_TYPE', STR($9))' +`define(`DAI_INDEX', STR($10))' +`define(`DAI_FORMAT', $11)' +`define(`DAI_PERIODS', $12)' +`define(`DAI_NAME', $9$10)' +`define(`PCM_MIN_RATE', $13)' +`define(`PCM_MAX_RATE', $14)' +`define(`PIPELINE_RATE', $15)' `include($1)' ,`fatal_error(`Invalid parameters ($#) to PIPELINE_PCM_DAI_ADD')')' ) dnl PIPELINE_ADD(pipeline, dnl pipe id, max channels, format, -dnl frames, period, priority, core, -dnl sched_comp, time_domain) +dnl period, priority, core, +dnl sched_comp, time_domain, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate) define(`PIPELINE_ADD', -`ifelse(`$#', `9', +`ifelse(`$#', `12', `undefine(`PIPELINE_ID')' `undefine(`PIPELINE_CHANNELS')' `undefine(`PIPELINE_FORMAT')' -`undefine(`SCHEDULE_FRAMES')' `undefine(`SCHEDULE_PERIOD')' `undefine(`SCHEDULE_PRIORITY')' `undefine(`SCHEDULE_CORE')' `undefine(`SCHEDULE_TIME_DOMAIN')' +`undefine(`PCM_MIN_RATE')' +`undefine(`PCM_MAX_RATE')' +`undefine(`PIPELINE_RATE')' `define(`PIPELINE_ID', $2)' `define(`PIPELINE_CHANNELS', $3)' `define(`PIPELINE_FORMAT', $4)' -`define(`SCHEDULE_FRAMES', $5)' -`define(`SCHEDULE_PERIOD', $6)' -`define(`SCHEDULE_PRIORITY', $7)' -`define(`SCHEDULE_CORE', $8)' -`define(`SCHEDULE_TIME_DOMAIN', $10)' -`define(`SCHED_COMP', $9)' +`define(`SCHEDULE_PERIOD', $5)' +`define(`SCHEDULE_PRIORITY', $6)' +`define(`SCHEDULE_CORE', $7)' +`define(`SCHEDULE_TIME_DOMAIN', $9)' +`define(`SCHED_COMP', $8)' +`define(`PCM_MIN_RATE', $10)' +`define(`PCM_MAX_RATE', $11)' +`define(`PIPELINE_RATE', $12)' `include($1)' ,`fatal_error(`Invalid parameters ($#) to PIPELINE_ADD')')' ) diff --git a/tools/topology/platform/intel/intel-generic-dmic.m4 b/tools/topology/platform/intel/intel-generic-dmic.m4 index c558a9ae0cec..34648e1f0cbb 100644 --- a/tools/topology/platform/intel/intel-generic-dmic.m4 +++ b/tools/topology/platform/intel/intel-generic-dmic.m4 @@ -14,19 +14,21 @@ define(DMIC_DAI_LINK_16k_ID, `7') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline using max channels defined by CHANNELS. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, DMIC_PIPELINE_48k_ID, DMIC_DAI_LINK_48k_ID, CHANNELS, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, 48000, 48000, 48000) # Passthrough capture pipeline using max channels defined by CHANNELS. -# Schedule 16 frames per 1000us deadline on core 0 with priority 0 +# Schedule with 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, DMIC_PIPELINE_16k_ID, DMIC_DAI_LINK_16k_ID, CHANNELS, s32le, - 16, 1000, 0, 0) + 1000, 0, 0, 16000, 16000, 16000) # # DAIs configuration @@ -35,22 +37,21 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, DMIC_PIPELINE_48k_ID, DMIC, 0, dmic01, concat(`PIPELINE_SINK_', DMIC_PIPELINE_48k_ID), 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, 48000, 48000, 48000) # capture DAI is DMIC 1 using 2 periods # Buffers use s32le format, with 16 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, DMIC_PIPELINE_16k_ID, DMIC, 1, dmic16k, concat(`PIPELINE_SINK_', DMIC_PIPELINE_16k_ID), 2, s32le, - 16, 1000, 0, 0) - + 1000, 0, 0, 16000, 16000, 16000) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) dnl PCM_CAPTURE_ADD(name, pipeline, capture) diff --git a/tools/topology/sof-apl-da7219.m4 b/tools/topology/sof-apl-da7219.m4 index 3285c159b891..287375387ef6 100644 --- a/tools/topology/sof-apl-da7219.m4 +++ b/tools/topology/sof-apl-da7219.m4 @@ -30,103 +30,110 @@ include(`platform/intel/dmic.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 2, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 3, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 4 on PCM 99 using max 4 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 #PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 4, 99, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 5 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 5, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 6 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 7 on PCM 7 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is SSP5 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, SSP, 1, SSP1-Codec, PIPELINE_SOURCE_2, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, SSP, 1, SSP1-Codec, PIPELINE_SINK_3, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 4, DMIC, 0, dmic01, PIPELINE_SINK_4, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 3, iDisp1, PIPELINE_SOURCE_5, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 4, iDisp2, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, HDA, 5, iDisp3, PIPELINE_SOURCE_7, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) PCM_PLAYBACK_ADD(Speakers, 0, PIPELINE_PCM_1) PCM_DUPLEX_ADD(Headset, 1, PIPELINE_PCM_2, PIPELINE_PCM_3) diff --git a/tools/topology/sof-apl-demux-pcm512x.m4 b/tools/topology/sof-apl-demux-pcm512x.m4 index ea19ac5f1a1e..079935cdcf0c 100644 --- a/tools/topology/sof-apl-demux-pcm512x.m4 +++ b/tools/topology/sof-apl-demux-pcm512x.m4 @@ -31,30 +31,36 @@ DEBUG_START dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Demux pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-demux-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 2, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 3, 2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 3 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 4, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -63,14 +69,14 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP5 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # currently this dai is here as "virtual" capture backend W_DAI_IN(SSP, 5, SSP5-Codec, s24le, 2, 0, 0) @@ -78,7 +84,9 @@ W_DAI_IN(SSP, 5, SSP5-Codec, s24le, 2, 0, 0) # Capture pipeline 5 from demux on PCM 5 using max 2 channels of s32le. PIPELINE_PCM_ADD(sof/pipe-passthrough-capture-sched.m4, 5, 4, 2, s32le, - 48, 1000, 0, 0, 0, PIPELINE_PLAYBACK_SCHED_COMP_1) + 1000, 0, 0, + 48000, 48000, 48000, + 0, PIPELINE_PLAYBACK_SCHED_COMP_1) # Connect demux to capture SectionGraph."PIPE_CAP" { @@ -101,25 +109,25 @@ SectionGraph."PIPE_CAP_VIRT" { } # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, HDA, 0, iDisp1, PIPELINE_SOURCE_2, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 3, HDA, 1, iDisp2, PIPELINE_SOURCE_3, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, HDA, 2, iDisp3, PIPELINE_SOURCE_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-apl-dmic-2ch.m4 b/tools/topology/sof-apl-dmic-2ch.m4 new file mode 100644 index 000000000000..05fb9a5375d3 --- /dev/null +++ b/tools/topology/sof-apl-dmic-2ch.m4 @@ -0,0 +1,102 @@ +# +# Topology for Apollo Lake with direct attach digital microphones array +# + +# Include topology builder +include(`utils.m4') +include(`dai.m4') +include(`pipeline.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Apollolake DSP configuration +include(`platform/intel/bxt.m4') +include(`platform/intel/dmic.m4') + +# +# Define the pipelines +# +# PCM6 <----- DMIC6 (DMIC01) +# PCM7 <----- DMIC7 (DMIC16k) +# + +dnl PIPELINE_PCM_ADD(pipeline, +dnl pipe id, pcm, max channels, format, +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) + +# Passthrough capture pipeline 6 on PCM 6 using max 2 channels. +# Set 1000us deadline on core 0 with priority 0. +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, + 6, 6, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Passthrough capture pipeline 7 on PCM 7 using max 2 channels. +# Set 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, + 7, 7, 2, s16le, + 1000, 0, 0, + 16000, 16000, 16000) + +# +# DAIs configuration +# + +dnl DAI_ADD(pipeline, +dnl pipe id, dai type, dai_index, dai_be, +dnl buffer, periods, format, +dnl deadline, priority, core) + + +# capture DAI is DMIC 0 using 2 periods +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 6, DMIC, 0, NoCodec-6, + PIPELINE_SINK_6, 2, s32le, + 1000, 0, 0) + +# capture DAI is DMIC 1 using 2 periods +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 7, DMIC, 1, NoCodec-7, + PIPELINE_SINK_7, 2, s16le, + 1000, 0, 0) + +dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) +dnl PCM_CAPTURE_ADD(name, pipeline, capture) +PCM_CAPTURE_ADD(DMIC01, 6, PIPELINE_PCM_6) +PCM_CAPTURE_ADD(DMIC16k, 7, PIPELINE_PCM_7) + +# +# BE configurations - overrides config in ACPI if present +# + +dnl DAI_CONFIG(type, dai_index, link_id, name, ssp_config/dmic_config) + +DAI_CONFIG(DMIC, 0, 6, NoCodec-6, + dnl DMIC_CONFIG(driver_version, clk_min, clk_mac, duty_min, duty_max, + dnl sample_rate, fifo word length, type, dai_index, + dnl pdm controller config) + DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000, + dnl DMIC_WORD_LENGTH(frame_format) + DMIC_WORD_LENGTH(s32le), DMIC, 0, + dnl PDM_CONFIG(type, dai_index, num pdm active, pdm tuples list) + dnl STEREO_PDM0 is a pre-defined pdm config for stereo capture + PDM_CONFIG(DMIC, 0, STEREO_PDM0))) + +DAI_CONFIG(DMIC, 1, 7, NoCodec-7, + dnl DMIC_CONFIG(driver_version, clk_min, clk_mac, duty_min, duty_max, + dnl sample_rate, fifo word length, type, dai_index, + dnl pdm controller config) + DMIC_CONFIG(1, 500000, 4800000, 40, 60, 16000, + dnl DMIC_WORD_LENGTH(frame_format) + DMIC_WORD_LENGTH(s16le), DMIC, 1, + dnl PDM_CONFIG(type, dai_index, num pdm active, pdm tuples list) + dnl STEREO_PDM0 is a pre-defined pdm config for stereo capture + PDM_CONFIG(DMIC, 1, STEREO_PDM0))) diff --git a/tools/topology/sof-apl-dmic-a2ch-b2ch.m4 b/tools/topology/sof-apl-dmic-a2ch-b2ch.m4 index 99bdb60a270a..00aa310c3b41 100644 --- a/tools/topology/sof-apl-dmic-a2ch-b2ch.m4 +++ b/tools/topology/sof-apl-dmic-a2ch-b2ch.m4 @@ -30,19 +30,23 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 6 on PCM 6 using max channels 2. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 6, 6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 7 on PCM 7 using max channels 2. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, 7, 7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 16000, 16000, 16000) # # DAIs configuration @@ -51,21 +55,21 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 6, DMIC, 0, NoCodec-6, PIPELINE_SINK_6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC 1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 7, DMIC, 1, NoCodec-7, PIPELINE_SINK_7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) diff --git a/tools/topology/sof-apl-dmic-a2ch-b4ch.m4 b/tools/topology/sof-apl-dmic-a2ch-b4ch.m4 index fc9f10e85fc9..5a3ecf6ec050 100644 --- a/tools/topology/sof-apl-dmic-a2ch-b4ch.m4 +++ b/tools/topology/sof-apl-dmic-a2ch-b4ch.m4 @@ -30,19 +30,23 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 6 on PCM 6 using max channels 2 -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 6, 6, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 7 on PCM 7 using max channels 4. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, 7, 7, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 16000, 16000, 16000) # # DAIs configuration @@ -51,21 +55,21 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 6, DMIC, 0, NoCodec-6, PIPELINE_SINK_6, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC 1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 7, DMIC, 1, NoCodec-7, PIPELINE_SINK_7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) diff --git a/tools/topology/sof-apl-dmic-a2ch.m4 b/tools/topology/sof-apl-dmic-a2ch.m4 index 14dde38a2675..548454555f23 100644 --- a/tools/topology/sof-apl-dmic-a2ch.m4 +++ b/tools/topology/sof-apl-dmic-a2ch.m4 @@ -29,13 +29,16 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 6 on PCM 6 using max channels 2. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 6, 6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -44,14 +47,14 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 6, DMIC, 0, NoCodec-6, PIPELINE_SINK_6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) dnl PCM_CAPTURE_ADD(name, pipeline, capture) diff --git a/tools/topology/sof-apl-dmic-a4ch-b2ch.m4 b/tools/topology/sof-apl-dmic-a4ch-b2ch.m4 index af008e6e7f32..f07c73d2f1ec 100644 --- a/tools/topology/sof-apl-dmic-a4ch-b2ch.m4 +++ b/tools/topology/sof-apl-dmic-a4ch-b2ch.m4 @@ -30,19 +30,23 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 6 on PCM 6 using max channels 4. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 6, 6, 4, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 7 on PCM 7 using max channels 2. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, 7, 7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 16000, 16000, 16000) # # DAIs configuration @@ -51,21 +55,21 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 6, DMIC, 0, NoCodec-6, PIPELINE_SINK_6, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC 1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 7, DMIC, 1, NoCodec-7, PIPELINE_SINK_7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) dnl PCM_CAPTURE_ADD(name, pipeline, capture) diff --git a/tools/topology/sof-apl-dmic-b2ch.m4 b/tools/topology/sof-apl-dmic-b2ch.m4 index ce1f5476931a..3d6ccb9c2489 100644 --- a/tools/topology/sof-apl-dmic-b2ch.m4 +++ b/tools/topology/sof-apl-dmic-b2ch.m4 @@ -29,13 +29,16 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 7 on PCM 7 using max channels 2. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, 7, 7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 16000, 16000, 16000) # # DAIs configuration @@ -44,14 +47,14 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 7, DMIC, 1, NoCodec-7, PIPELINE_SINK_7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) diff --git a/tools/topology/sof-apl-dmic.m4 b/tools/topology/sof-apl-dmic.m4 index e13ab7aaeab0..3c19f4945d8f 100644 --- a/tools/topology/sof-apl-dmic.m4 +++ b/tools/topology/sof-apl-dmic.m4 @@ -29,19 +29,23 @@ define(DMIC_PDM_CONFIG, ifelse(CHANNELS, `4', ``FOUR_CH_PDM0_PDM1'', dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 6 on PCM 6 using max channels defined by CHANNELS. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 6, 6, CHANNELS, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 7 on PCM 7 using max channels defined by CHANNELS. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 7, 7, CHANNELS, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 16000, 16000, 16000) # # DAIs configuration @@ -50,21 +54,21 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 6, DMIC, 0, NoCodec-6, PIPELINE_SINK_6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC 1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 7, DMIC, 1, NoCodec-7, PIPELINE_SINK_7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) diff --git a/tools/topology/sof-apl-eq-dmic.m4 b/tools/topology/sof-apl-eq-dmic.m4 index 5af699d6bbca..976d882b73ae 100644 --- a/tools/topology/sof-apl-eq-dmic.m4 +++ b/tools/topology/sof-apl-eq-dmic.m4 @@ -25,14 +25,16 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) - +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 13 on PCM 6 using max 4 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-eq-capture.m4, 1, 6, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -41,15 +43,15 @@ PIPELINE_PCM_ADD(sof/pipe-eq-capture.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 1, DMIC, 0, NoCodec-6, PIPELINE_SINK_1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) diff --git a/tools/topology/sof-apl-eq-pcm512x.m4 b/tools/topology/sof-apl-eq-pcm512x.m4 index 25de02418a7b..39310e30ef69 100644 --- a/tools/topology/sof-apl-eq-pcm512x.m4 +++ b/tools/topology/sof-apl-eq-pcm512x.m4 @@ -24,21 +24,22 @@ include(`platform/intel/bxt.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-eq-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is SSP5 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency, id 0 PCM_PLAYBACK_ADD(Port5, 0, PIPELINE_PCM_1) diff --git a/tools/topology/sof-apl-keyword-detect.m4 b/tools/topology/sof-apl-keyword-detect.m4 index 03671b72259c..473fca553450 100644 --- a/tools/topology/sof-apl-keyword-detect.m4 +++ b/tools/topology/sof-apl-keyword-detect.m4 @@ -18,7 +18,6 @@ include(`sof/tokens.m4') include(`platform/intel/bxt.m4') include(`platform/intel/dmic.m4') -define(KWD_PERIOD_FRAMES, 320) define(KWD_PIPE_SCH_DEADLINE_US, 20000) # @@ -30,15 +29,16 @@ define(KWD_PIPE_SCH_DEADLINE_US, 20000) dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 1 on PCM 0 using max 2 channels. -# Schedule 320 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-kfbm-capture.m4, 1, 0, 2, s16le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0) + KWD_PIPE_SCH_DEADLINE_US, 0, 0, + 16000, 16000, 16000) # # DAIs configuration @@ -47,7 +47,7 @@ PIPELINE_PCM_ADD(sof/pipe-kfbm-capture.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods @@ -55,18 +55,20 @@ dnl frames, deadline, priority, core) DAI_ADD(sof/pipe-dai-capture.m4, 1, DMIC, 1, NoCodec-6, PIPELINE_SINK_1, 2, s16le, - KWD_PERIOD_FRAMES, KWD_PIPE_SCH_DEADLINE_US, 0, 0) # keyword detector pipe dnl PIPELINE_ADD(pipeline, dnl pipe id, max channels, format, -dnl frames, deadline, priority, core) -PIPELINE_ADD(sof/pipe-detect.m4, 2, 2, s16le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0, PIPELINE_SCHED_COMP_1) +dnl period, priority, core, +dnl sched_comp, time_domain, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate) +PIPELINE_ADD(sof/pipe-detect.m4, + 2, 2, s16le, + KWD_PIPE_SCH_DEADLINE_US, 0, 0, + PIPELINE_SCHED_COMP_1, 0, + 16000, 16000, 16000) # Connect pipelines together SectionGraph."pipe-sof-apl-keyword-detect" { diff --git a/tools/topology/sof-apl-nocodec.m4 b/tools/topology/sof-apl-nocodec.m4 index c0be0a7bb5a3..14e8691c2a5b 100644 --- a/tools/topology/sof-apl-nocodec.m4 +++ b/tools/topology/sof-apl-nocodec.m4 @@ -36,85 +36,96 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 3 on PCM 1 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 3, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 4 on PCM 1 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 4, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 2 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 #PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, # 5, 2, 2, s32le, # 48, 1000, 0, 0) # Low Latency capture pipeline 6 on PCM 2 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 #PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, # 6, 2, 2, s32le, # 48, 1000, 0, 0) # Low Latency playback pipeline 7 on PCM 3 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 8 on PCM 3 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 8, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 9 on PCM 4 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 #PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, # 9, 4, 2, s32le, # 48, 1000, 0, 0) # Low Latency capture pipeline 10 on PCM 4 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 #PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, # 10, 4, 2, s32le, # 48, 1000, 0, 0) # Low Latency playback pipeline 11 on PCM 5 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 11, 5, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 12 on PCM 5 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 12, 5, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 13 on PCM 6 using max 2 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 13, 6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -123,20 +134,22 @@ PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 0, NoCodec-0, PIPELINE_SOURCE_1, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # Media playback pipeline 14 on PCM 7 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 14, 7, 2, s16le, - 48, 1000, 0, 0, 0, PIPELINE_PLAYBACK_SCHED_COMP_1) + 1000, 0, 0, + 48000, 48000, 48000, + 0, PIPELINE_PLAYBACK_SCHED_COMP_1) # Connect pipelines together SectionGraph."media-pipeline" { @@ -149,88 +162,88 @@ SectionGraph."media-pipeline" { } # capture DAI is SSP0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 0, NoCodec-0, PIPELINE_SINK_2, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 3, SSP, 1, NoCodec-1, PIPELINE_SOURCE_3, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 4, SSP, 1, NoCodec-1, PIPELINE_SINK_4, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 #DAI_ADD(sof/pipe-dai-playback.m4, # 5, SSP, 2, NoCodec-2, # PIPELINE_SOURCE_5, 2, s16le, -# 48, 1000, 0, 0) +# 1000, 0, 0) # capture DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 #DAI_ADD(sof/pipe-dai-capture.m4, # 6, SSP, 2, NoCodec-2, # PIPELINE_SINK_6, 2, s16le, -# 48, 1000, 0, 0) +# 1000, 0, 0) # playback DAI is SSP3 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, SSP, 3, NoCodec-3, PIPELINE_SOURCE_7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP3 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 8, SSP, 3, NoCodec-3, PIPELINE_SINK_8, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP4 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 #DAI_ADD(sof/pipe-dai-playback.m4, # 9, SSP, 4, NoCodec-4, # PIPELINE_SOURCE_9, 2, s16le, -# 48, 1000, 0, 0) +# 1000, 0, 0) # capture DAI is SSP4 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 #DAI_ADD(sof/pipe-dai-capture.m4, # 10, SSP, 4, NoCodec-4, # PIPELINE_SINK_10, 2, s16le, -# 48, 1000, 0, 0) +# 1000, 0, 0) # playback DAI is SSP5 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 11, SSP, 5, NoCodec-5, PIPELINE_SOURCE_11, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP5 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 12, SSP, 5, NoCodec-5, PIPELINE_SINK_12, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 13, DMIC, 0, NoCodec-6, PIPELINE_SINK_13, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-apl-pcm512x-nohdmi.m4 b/tools/topology/sof-apl-pcm512x-nohdmi.m4 index 40e31a3277e9..797bdfb40633 100644 --- a/tools/topology/sof-apl-pcm512x-nohdmi.m4 +++ b/tools/topology/sof-apl-pcm512x-nohdmi.m4 @@ -27,13 +27,16 @@ DEBUG_START dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -42,14 +45,14 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP5 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-apl-pcm512x.m4 b/tools/topology/sof-apl-pcm512x.m4 index 66c0047d23da..e7b11578b73d 100644 --- a/tools/topology/sof-apl-pcm512x.m4 +++ b/tools/topology/sof-apl-pcm512x.m4 @@ -30,31 +30,37 @@ DEBUG_START dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 2, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 3, 2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 3 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 4, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -63,20 +69,22 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP5 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # Media playback pipeline 5 on PCM 4 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 5, 4, 2, s16le, - 48, 1000, 0, 0, 0, PIPELINE_PLAYBACK_SCHED_COMP_1) + 1000, 0, 0, + 8000, 96000, 48000, + 0, PIPELINE_PLAYBACK_SCHED_COMP_1) # Connect pipelines together SectionGraph."media-pipeline" { @@ -88,25 +96,25 @@ SectionGraph."media-pipeline" { } # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, HDA, 0, iDisp1, PIPELINE_SOURCE_2, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 3, HDA, 1, iDisp2, PIPELINE_SOURCE_3, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, HDA, 2, iDisp3, PIPELINE_SOURCE_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-apl-rt298.m4 b/tools/topology/sof-apl-rt298.m4 index 4245ee3b29e1..2826d54b6f15 100644 --- a/tools/topology/sof-apl-rt298.m4 +++ b/tools/topology/sof-apl-rt298.m4 @@ -27,59 +27,63 @@ include(`platform/intel/bxt.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 5 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 5, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 6 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 6, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 7 on PCM 7 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is SSP5 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 3, iDisp1, PIPELINE_SOURCE_5, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 4, iDisp2, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, HDA, 5, iDisp3, PIPELINE_SOURCE_7, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Low Latency, id 0 PCM_PLAYBACK_ADD(Port5, 0, PIPELINE_PCM_1) diff --git a/tools/topology/sof-apl-src-pcm512x.m4 b/tools/topology/sof-apl-src-pcm512x.m4 index 44532621f040..e588808cf33c 100644 --- a/tools/topology/sof-apl-src-pcm512x.m4 +++ b/tools/topology/sof-apl-src-pcm512x.m4 @@ -28,13 +28,16 @@ DEBUG_START dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-src-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 8000, 96000, 48000) # # DAIs configuration @@ -43,14 +46,14 @@ PIPELINE_PCM_ADD(sof/pipe-src-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP5 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-apl-tdf8532.m4 b/tools/topology/sof-apl-tdf8532.m4 index a3571f538b89..3e215c32e9dd 100644 --- a/tools/topology/sof-apl-tdf8532.m4 +++ b/tools/topology/sof-apl-tdf8532.m4 @@ -29,64 +29,73 @@ include(`platform/intel/bxt.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 4 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, 1, 0, 4, s32le, - 48, 1000, 0, 0, SSP, 4, s32le, 2) + 1000, 0, 0, SSP, 4, s32le, 2, + 48000, 48000, 48000) # Low Latency playback pipeline 2 on PCM 1 using max 8 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, 2, 1, 8, s32le, - 48, 1000, 0, 0, SSP, 2, s32le, 2) + 1000, 0, 0, SSP, 2, s32le, 2, + 48000, 48000, 48000) # Low Latency capture pipeline 3 on PCM 1 using max 8 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, 3, 1, 8, s32le, - 48, 1000, 0, 0, SSP, 2, s32le, 2) + 1000, 0, 0, SSP, 2, s32le, 2, 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 2 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, 4, 2, 2, s16le, - 48, 1000, 0, 0, SSP, 0, s16le, 2) + 1000, 0, 0, SSP, 0, s16le, 2, + 48000, 48000, 48000) # Low Latency capture pipeline 5 on PCM 2 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, 5, 2, 2, s16le, - 48, 1000, 0, 0, SSP, 0, s16le, 2) + 1000, 0, 0, SSP, 0, s16le, 2, + 48000, 48000, 48000) # Low Latency capture pipeline 6 on PCM 3 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, 6, 3, 2, s16le, - 48, 1000, 0, 0, SSP, 1, s16le, 2) + 1000, 0, 0, SSP, 1, s16le, 2, + 48000, 48000, 48000) # Low Latency playback pipeline 7 on PCM 4 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, 7, 4, 2, s16le, - 48, 1000, 0, 0, SSP, 3, s16le, 2) + 1000, 0, 0, SSP, 3, s16le, 2, + 48000, 48000, 48000) # Low Latency capture pipeline 8 on PCM 4 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, 8, 4, 2, s16le, - 48, 1000, 0, 0, SSP, 3, s16le, 2) + 1000, 0, 0, SSP, 3, s16le, 2, + 48000, 48000, 48000) # Low Latency playback pipeline 9 on PCM 5 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, 9, 5, 2, s16le, - 48, 1000, 0, 0, SSP, 5, s16le, 2) + 1000, 0, 0, SSP, 5, s16le, 2, + 48000, 48000, 48000) # Low Latency capture pipeline 10 on PCM 5 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, 10, 5, 2, s16le, - 48, 1000, 0, 0, SSP, 5, s16le, 2) + 1000, 0, 0, SSP, 5, s16le, 2, + 48000, 48000, 48000) # @@ -94,74 +103,74 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, # # playback DAI is SSP0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, SSP, 0, SSP0-Codec, PIPELINE_SOURCE_4, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 5, SSP, 0, SSP0-Codec, PIPELINE_SINK_5, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 6, SSP, 1, SSP1-Codec, PIPELINE_SINK_6, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, SSP, 2, SSP2-Codec, PIPELINE_SOURCE_2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, SSP, 2, SSP2-Codec, PIPELINE_SINK_3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP3 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, SSP, 3, SSP3-Codec, PIPELINE_SOURCE_7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP3 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 8, SSP, 3, SSP3-Codec, PIPELINE_SINK_8, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP4 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 4, SSP4-Codec, PIPELINE_SOURCE_1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP5 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 9, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_9, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP5 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 10, SSP, 5, SSP5-Codec, PIPELINE_SINK_10, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency, id 0 PCM_DUPLEX_ADD(Port0, 2, PIPELINE_PCM_4, PIPELINE_PCM_5) diff --git a/tools/topology/sof-apl-wm8804.m4 b/tools/topology/sof-apl-wm8804.m4 index 4dc15ebecc8c..e2ab8f816cf0 100644 --- a/tools/topology/sof-apl-wm8804.m4 +++ b/tools/topology/sof-apl-wm8804.m4 @@ -24,21 +24,22 @@ include(`platform/intel/bxt.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is SSP5 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 5, SSP5-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency, id 0 PCM_PLAYBACK_ADD(Port5, 0, PIPELINE_PCM_1) diff --git a/tools/topology/sof-bdw-codec.m4 b/tools/topology/sof-bdw-codec.m4 index f0959c896b3a..7702564aa5da 100644 --- a/tools/topology/sof-bdw-codec.m4 +++ b/tools/topology/sof-bdw-codec.m4 @@ -32,22 +32,25 @@ define(PIPE_NAME, ifelse(CODEC, `RT5640', pipe-bdw-rt5640, # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 +# 2000us deadline on core 0 with priority 1 PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 1, 2, s32le, - 96, 2000, 1, 0) + 2000, 1, 0, + 8000, 96000, 48000) # Connect pipelines together SectionGraph."PIPE_NAME" { @@ -66,18 +69,18 @@ SectionGraph."PIPE_NAME" { # # playback DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 0, Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 0, Codec, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-bdw-rt5640.m4 b/tools/topology/sof-bdw-rt5640.m4 new file mode 100644 index 000000000000..4bd8acb2a455 --- /dev/null +++ b/tools/topology/sof-bdw-rt5640.m4 @@ -0,0 +1,92 @@ +# +# Topology for generic Broadwell board with rt5640. +# + +# Include topology builder +include(`utils.m4') +include(`dai.m4') +include(`pipeline.m4') +include(`ssp.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Broadwell DSP configuration +include(`platform/intel/bdw.m4') + +# +# Define the pipelines +# +# PCM0 ----> volume ---------------+ +# |--low latency mixer ----> volume ----> SSP0 +# PCM1 -----> volume ----> SRC ----+ +# +# PCM0 <---- Volume <---- SSP0 +# + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, + 1, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, + 2, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. +# 2000us deadline on core 0 with priority 1 +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, + 3, 1, 2, s32le, + 2000, 1, 0, + 8000, 96000, 48000) + +# Connect pipelines together +SectionGraph."pipe-bdw-rt5640" { + index "0" + + lines [ + # media 0 + dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) + ] +} + +# +# DAI configuration +# +# SSP port 0 is our only pipeline DAI +# + +# playback DAI is SSP0 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 1, SSP, 0, Codec, + PIPELINE_SOURCE_1, 2, s24le, + 1000, 0, 0) + +# capture DAI is SSP0 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 2, SSP, 0, Codec, + PIPELINE_SINK_2, 2, s24le, + 1000, 0, 0) + +# PCM Low Latency +PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) + +# +# BE configurations - overrides config in ACPI if present +# +DAI_CONFIG(SSP, 0, 0, Codec, + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24000000, codec_mclk_in), + SSP_CLOCK(bclk, 2400000, codec_slave), + SSP_CLOCK(fsync, 48000, codec_slave), + SSP_TDM(2, 25, 3, 3), + SSP_CONFIG_DATA(SSP, 0, 24))) diff --git a/tools/topology/sof-byt-codec.m4 b/tools/topology/sof-byt-codec.m4 index dbf884432d7f..b2015ef63993 100644 --- a/tools/topology/sof-byt-codec.m4 +++ b/tools/topology/sof-byt-codec.m4 @@ -38,16 +38,18 @@ define(PIPE_NAME, ifelse(CODEC, `RT5682', pipe-byt-rt5682, # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAI configuration @@ -56,17 +58,19 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, # # playback DAI is SSP2 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 2, SSP2-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) -# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. +# 4000us deadline on core 0 with priority 1 PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 1, 2, s16le, - 48, 1000, 0, 0, 0, PIPELINE_PLAYBACK_SCHED_COMP_1) + 1000, 1, 0, + 8000, 96000, 48000, + 0, PIPELINE_PLAYBACK_SCHED_COMP_1) # Connect pipelines together SectionGraph."PIPE_NAME" { @@ -78,13 +82,12 @@ SectionGraph."PIPE_NAME" { ] } - # capture DAI is SSP2 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 2, SSP2-Codec, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-byt-da7213.m4 b/tools/topology/sof-byt-da7213.m4 new file mode 100644 index 000000000000..ffc07121e855 --- /dev/null +++ b/tools/topology/sof-byt-da7213.m4 @@ -0,0 +1,92 @@ +# +# Topology for generic Baytrail board with DA7213 codec. +# + +# Include topology builder +include(`utils.m4') +include(`dai.m4') +include(`pipeline.m4') +include(`ssp.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Baytrail DSP configuration +include(`platform/intel/byt.m4') + +# +# Define the pipelines +# +# PCM0 ----> volume ---------------+ +# |--low latency mixer ----> volume ----> SSP2 +# PCM1 -----> volume ----> SRC ----+ +# +# PCM0 <---- Volume <---- SSP2 +# + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, + 1, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, + 2, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. +# 4000us deadline on core 0 with priority 1 +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, + 3, 1, 2, s32le, + 4000, 1, 0, + 8000, 96000, 48000) + +# Connect pipelines together +SectionGraph."pipe-byt-da7212" { + index "0" + + lines [ + # media 0 + dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) + ] +} + +# +# DAI configuration +# +# SSP port 2 is our only pipeline DAI +# + +# playback DAI is SSP2 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 1, SSP, 2, SSP2-Codec, + PIPELINE_SOURCE_1, 2, s24le, + 1000, 0, 0) + +# capture DAI is SSP2 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 2, SSP, 2, SSP2-Codec, + PIPELINE_SINK_2, 2, s24le, + 1000, 0, 0) + +# PCM Low Latency +PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) + +# +# BE configurations - overrides config in ACPI if present +# +DAI_CONFIG(SSP, 2, 0, SSP2-Codec, + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 19200000, codec_mclk_in), + SSP_CLOCK(bclk, 2400000, codec_slave), + SSP_CLOCK(fsync, 48000, codec_slave), + SSP_TDM(2, 25, 3, 3), + SSP_CONFIG_DATA(SSP, 2, 24))) diff --git a/tools/topology/sof-byt-nocodec.m4 b/tools/topology/sof-byt-nocodec.m4 new file mode 100644 index 000000000000..88f4b6551545 --- /dev/null +++ b/tools/topology/sof-byt-nocodec.m4 @@ -0,0 +1,92 @@ +# +# Topology for generic Baytrail board with no codec. +# + +# Include topology builder +include(`pipeline.m4') +include(`utils.m4') +include(`dai.m4') +include(`ssp.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Baytrail DSP configuration +include(`platform/intel/byt.m4') + +# +# Define the pipelines +# +# PCM0 ----> volume ---------------+ +# |--low latency mixer ----> volume ----> SSP2 (NoCodec) +# PCM2 -----> volume ----> SRC ----+ +# +# PCM1 <---- Volume <---- SSP2 (NoCodec) +# + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, + 1, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, + 2, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. +# 4000us deadline on core 0 with priority 1 +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, + 3, 1, 2, s32le, + 4000, 1, 0, + 8000, 96000, 48000) + +# Connect pipelines together +SectionGraph."pipe-byt-nocodec" { + index "0" + + lines [ + # media 0 + dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) + ] +} + +# +# DAI configuration +# +# SSP port 2 is our only pipeline DAI +# + +# playback DAI is SSP2 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 1, SSP, 2, NoCodec-2, + PIPELINE_SOURCE_1, 2, s24le, + 1000, 0, 0) + +# capture DAI is SSP2 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 2, SSP, 2, NoCodec-2, + PIPELINE_SINK_2, 2, s24le, + 1000, 0, 0) + +# PCM Low Latency +PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) + +# +# BE configurations - overrides config in ACPI if present +# +DAI_CONFIG(SSP, 2, 2, NoCodec-2, + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 19200000, codec_mclk_in), + SSP_CLOCK(bclk, 2400000, codec_slave), + SSP_CLOCK(fsync, 48000, codec_slave), + SSP_TDM(2, 25, 3, 3), + SSP_CONFIG_DATA(SSP, 2, 24))) diff --git a/tools/topology/sof-byt-rt5651.m4 b/tools/topology/sof-byt-rt5651.m4 new file mode 100644 index 000000000000..55b26e44b7f0 --- /dev/null +++ b/tools/topology/sof-byt-rt5651.m4 @@ -0,0 +1,92 @@ +# +# Topology for generic Baytrail board with no RT5651. +# + +# Include topology builder +include(`utils.m4') +include(`dai.m4') +include(`pipeline.m4') +include(`ssp.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Baytrail DSP configuration +include(`platform/intel/byt.m4') + +# +# Define the pipelines +# +# PCM0 ----> volume ---------------+ +# |--low latency mixer ----> volume ----> SSP2 +# PCM1 -----> volume ----> SRC ----+ +# +# PCM0 <---- Volume <---- SSP2 +# + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, + 1, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, + 2, 0, 2, s32le, + 1000, 0, 0, + 48000, 48000, 48000) + +# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. +# 4000us deadline on core 0 with priority 1 +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, + 3, 1, 2, s32le, + 4000, 1, 0, + 8000, 96000, 48000) + +# Connect pipelines together +SectionGraph."pipe-byt-rt5651" { + index "0" + + lines [ + # media 0 + dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) + ] +} + +# +# DAI configuration +# +# SSP port 2 is our only pipeline DAI +# + +# playback DAI is SSP2 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 1, SSP, 2, SSP2-Codec, + PIPELINE_SOURCE_1, 2, s24le, + 1000, 0, 0) + +# capture DAI is SSP2 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 2, SSP, 2, SSP2-Codec, + PIPELINE_SINK_2, 2, s24le, + 1000, 0, 0) + +# PCM Low Latency +PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) + +# +# BE configurations - overrides config in ACPI if present +# +DAI_CONFIG(SSP, 2, 0, SSP2-Codec, + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 19200000, codec_mclk_in), + SSP_CLOCK(bclk, 2400000, codec_slave), + SSP_CLOCK(fsync, 48000, codec_slave), + SSP_TDM(2, 25, 3, 3), + SSP_CONFIG_DATA(SSP, 2, 24))) diff --git a/tools/topology/sof-cht-max98090.m4 b/tools/topology/sof-cht-max98090.m4 index 45b26eb303b2..7b17cea9c79c 100644 --- a/tools/topology/sof-cht-max98090.m4 +++ b/tools/topology/sof-cht-max98090.m4 @@ -28,22 +28,25 @@ include(`platform/intel/cht.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 192 frames per 4000us deadline on core 0 with priority 1 +# 4000us deadline on core 0 with priority 1 PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 1, 2, s32le, - 192, 4000, 1, 0) + 4000, 1, 0, + 8000, 96000, 48000) # Connect pipelines together SectionGraph."pipe-cht-max98090" { @@ -62,18 +65,18 @@ SectionGraph."pipe-cht-max98090" { # # playback DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 2, SSP2-Codec, PIPELINE_SOURCE_1, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 2, SSP2-Codec, PIPELINE_SINK_2, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-cht-nocodec.m4 b/tools/topology/sof-cht-nocodec.m4 index 1759a7b7592e..fe5d4d67e6f8 100644 --- a/tools/topology/sof-cht-nocodec.m4 +++ b/tools/topology/sof-cht-nocodec.m4 @@ -32,16 +32,18 @@ define(PIPE_NAME, ifelse(PLATFORM, `cht', pipe-cht-nocodec, # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAI configuration @@ -50,17 +52,19 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, # # playback DAI is SSP2 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 2, NoCodec-2, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 192 frames per 4000us deadline on core 0 with priority 1 +# 4000us deadline on core 0 with priority 1 PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 1, 2, s32le, - 192, 4000, 1, 0, 0, PIPELINE_PLAYBACK_SCHED_COMP_1) + 4000, 1, 0, + 8000, 96000, 48000, + 0, PIPELINE_PLAYBACK_SCHED_COMP_1) # Connect pipelines together SectionGraph."media-pipe" { @@ -73,11 +77,11 @@ SectionGraph."media-pipe" { } # capture DAI is SSP2 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 2, NoCodec-2, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-cht-rt5682.m4 b/tools/topology/sof-cht-rt5682.m4 index c24c0bdaed3e..3b3a4462fb17 100644 --- a/tools/topology/sof-cht-rt5682.m4 +++ b/tools/topology/sof-cht-rt5682.m4 @@ -24,16 +24,18 @@ include(`platform/intel/cht.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAI configuration @@ -42,18 +44,18 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, # # playback DAI is SSP2 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 2, SSP2-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP2 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 2, SSP2-Codec, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(SSP2, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-cml-demux-rt5682-max98357a.m4 b/tools/topology/sof-cml-demux-rt5682-max98357a.m4 index 790e91f93258..049f5cb9bfdb 100644 --- a/tools/topology/sof-cml-demux-rt5682-max98357a.m4 +++ b/tools/topology/sof-cml-demux-rt5682-max98357a.m4 @@ -15,13 +15,16 @@ include(`sof-cml-demux-rt5682.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 8 on PCM 6 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-src-volume-playback.m4, 8, 6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # Speaker DAIs configuration @@ -30,14 +33,14 @@ PIPELINE_PCM_ADD(sof/pipe-src-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP1 using 2 periods # Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 8, SSP, 1, SSP1-Codec, PIPELINE_SOURCE_8, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-cml-demux-rt5682.m4 b/tools/topology/sof-cml-demux-rt5682.m4 index 141c6c9839b1..b2e212dc1d2e 100644 --- a/tools/topology/sof-cml-demux-rt5682.m4 +++ b/tools/topology/sof-cml-demux-rt5682.m4 @@ -41,43 +41,51 @@ define(`SSP_NAME', ifelse(PLATFORM, `whl', `SSP1-Codec', dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Demux pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-demux-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 3 on PCM 1 using max 4 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 3, 1, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 2 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 4, 2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 3 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 4 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 4, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -86,26 +94,27 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP(SPP_INDEX) using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, SSP_INDEX, SSP_NAME, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP(SSP_INDEX) using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP,SSP_INDEX, SSP_NAME, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # Capture pipeline 5 on PCM 5 using max 2 channels of s32le. PIPELINE_PCM_ADD(sof/pipe-passthrough-capture-sched.m4, 5, 5, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Connect demux to capture SectionGraph."PIPE_CAP" { @@ -128,32 +137,32 @@ SectionGraph."PIPE_CAP_VIRT" { } # capture DAI is DMIC01 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, DMIC, 0, dmic01, PIPELINE_SINK_3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, HDA, 0, iDisp1, PIPELINE_SOURCE_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, HDA, 1, iDisp2, PIPELINE_SOURCE_7, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 2, iDisp3, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-cml-rt5682-kwd.m4 b/tools/topology/sof-cml-rt5682-kwd.m4 index 6c16569a04d3..440b7677b5cf 100644 --- a/tools/topology/sof-cml-rt5682-kwd.m4 +++ b/tools/topology/sof-cml-rt5682-kwd.m4 @@ -20,7 +20,6 @@ ifelse(PLATFORM, `icl', include(`platform/intel/icl.m4'), ifelse(PLATFORM, `cml', include(`platform/intel/cnl.m4'), `'))) include(`platform/intel/dmic.m4') -define(KWD_PERIOD_FRAMES, 320) define(KWD_PIPE_SCH_DEADLINE_US, 20000) DEBUG_START @@ -55,43 +54,51 @@ define(`SSP_MCLK_RATE', ifelse(PLATFORM, `icl', `19200000', dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 3 on PCM 1 using max 4 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 3, 1, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 2 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 4, 2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 3 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 4 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 4, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -100,71 +107,67 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP(SPP_INDEX) using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, SSP_INDEX, SSP_NAME, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP(SSP_INDEX) using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP,SSP_INDEX, SSP_NAME, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC01 using 2 periods # Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, DMIC, 0, dmic01, PIPELINE_SINK_3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods # Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, HDA, 0, iDisp1, PIPELINE_SOURCE_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods # Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 1, iDisp2, PIPELINE_SOURCE_5, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods # Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 2, iDisp3, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # # KWD configuration # # Passthrough capture pipeline 7 on PCM 7 using max 2 channels. -# Schedule 320 frames per 20000us deadline on core 0 with priority 0 +# Schedule 20000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-kfbm-capture.m4, 8, 8, 2, s24le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0) + KWD_PIPE_SCH_DEADLINE_US, 0, 0, + 16000, 16000, 16000) # capture DAI is DMIC 1 using 2 periods # Buffers use s32le format, with 320 frame per 20000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 8, DMIC, 1, dmic16k, PIPELINE_SINK_8, 2, s32le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0) - + KWD_PIPE_SCH_DEADLINE_US, 0, 0) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) @@ -177,11 +180,14 @@ PCM_PLAYBACK_ADD(HDMI3, 4, PIPELINE_PCM_6) # keyword detector pipe dnl PIPELINE_ADD(pipeline, dnl pipe id, max channels, format, -dnl frames, deadline, priority, core) -PIPELINE_ADD(sof/pipe-detect.m4, 9, 2, s24le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0, PIPELINE_SCHED_COMP_8) +dnl period, priority, core, +dnl sched_comp, time_domain, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate) +PIPELINE_ADD(sof/pipe-detect.m4, + 9, 2, s24le, + KWD_PIPE_SCH_DEADLINE_US, 0, 0, + PIPELINE_SCHED_COMP_8, 0, + 16000, 16000, 16000) # Connect pipelines together SectionGraph."pipe-sof-apl-keyword-detect" { diff --git a/tools/topology/sof-cml-rt5682-max98357a.m4 b/tools/topology/sof-cml-rt5682-max98357a.m4 index c5c2a57656af..2cb0b599d536 100644 --- a/tools/topology/sof-cml-rt5682-max98357a.m4 +++ b/tools/topology/sof-cml-rt5682-max98357a.m4 @@ -17,13 +17,16 @@ DEBUG_START dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 7 on PCM 5 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-src-volume-playback.m4, 7, 5, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # Speaker DAIs configuration @@ -32,14 +35,14 @@ PIPELINE_PCM_ADD(sof/pipe-src-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, SSP, 1, SSP1-Codec, PIPELINE_SOURCE_7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-cml-rt5682.m4 b/tools/topology/sof-cml-rt5682.m4 index 8e9221d5672a..c7b4a2080c30 100644 --- a/tools/topology/sof-cml-rt5682.m4 +++ b/tools/topology/sof-cml-rt5682.m4 @@ -50,49 +50,58 @@ define(`SSP_MCLK_RATE', ifelse(PLATFORM, `icl', `19200000', dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 3 on PCM 1 using max 4 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 3, 1, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 2 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 4, 2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 3 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 4 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 4, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 7 on PCM 5 using max 2 channels. -# Schedule 16 frames per 1000us deadline on core 0 with priority 0 +# Schedule 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, 8, 8, 2, s24le, - 16, 1000, 0, 0) + 1000, 0, 0, + 16000, 16000, 16000) # # DAIs configuration @@ -101,49 +110,49 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture-16khz.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP(SPP_INDEX) using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, SSP_INDEX, SSP_NAME, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP(SSP_INDEX) using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP,SSP_INDEX, SSP_NAME, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC01 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, DMIC, 0, dmic01, PIPELINE_SINK_3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, HDA, 0, iDisp1, PIPELINE_SOURCE_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 1, iDisp2, PIPELINE_SOURCE_5, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 2, iDisp3, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # capture DAI is DMIC16k using 2 periods # Buffers use s32le format, with 16 frame per 1000us on core 0 with priority 0 diff --git a/tools/topology/sof-cml-src-rt5682.m4 b/tools/topology/sof-cml-src-rt5682.m4 index 259ee3d95856..fc300e541288 100644 --- a/tools/topology/sof-cml-src-rt5682.m4 +++ b/tools/topology/sof-cml-src-rt5682.m4 @@ -33,43 +33,51 @@ DEBUG_START dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-src-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 8000, 96000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 3 on PCM 1 using max 4 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 3, 1, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 2 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 4, 2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 3 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000 ,48000 ,48000) # Low Latency playback pipeline 6 on PCM 4 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 4, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -78,49 +86,49 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP1 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 1, SSP1-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP1 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 1, SSP1-Codec, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC01 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, DMIC, 0, dmic01, PIPELINE_SINK_3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, HDA, 0, iDisp1, PIPELINE_SOURCE_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 1, iDisp2, PIPELINE_SOURCE_5, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 2, iDisp3, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-cnl-nocodec.m4 b/tools/topology/sof-cnl-nocodec.m4 index 4132fb0cb987..e22170fc8078 100644 --- a/tools/topology/sof-cnl-nocodec.m4 +++ b/tools/topology/sof-cnl-nocodec.m4 @@ -29,49 +29,58 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 3 on PCM 1 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 3, 1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 4 on PCM 1 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 4, 1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 2 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 6 on PCM 2 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 6, 2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Passthrough capture pipeline 7 on PCM 3 using max 4 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 7, 3, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -80,56 +89,56 @@ PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is SSP0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 0, NoCodec-0, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 0, NoCodec-0, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 3, SSP, 1, NoCodec-1, PIPELINE_SOURCE_3, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 4, SSP, 1, NoCodec-1, PIPELINE_SINK_4, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, SSP, 2, NoCodec-2, PIPELINE_SOURCE_5, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 6, SSP, 2, NoCodec-2, PIPELINE_SINK_6, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 7, DMIC, 0, NoCodec-3, PIPELINE_SINK_7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-cnl-rt274.m4 b/tools/topology/sof-cnl-rt274.m4 index 9a48714922f4..6a0306b25553 100644 --- a/tools/topology/sof-cnl-rt274.m4 +++ b/tools/topology/sof-cnl-rt274.m4 @@ -25,16 +25,18 @@ include(`platform/intel/cnl.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0, SSP, 0, s24le, 2) + 1000, 0, 0, SSP, 0, s24le, 2, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0, SSP, 0, s24le, 2) + 1000, 0, 0, SSP, 0, s24le, 2, + 48000, 48000, 48000) # # DAI configuration @@ -43,18 +45,18 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, # # playback DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 0, SSP0-Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 0, SSP0-Codec, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(Passthrough, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-glk-da7219-kwd.m4 b/tools/topology/sof-glk-da7219-kwd.m4 index 4c19816cb008..f66ea309e97c 100644 --- a/tools/topology/sof-glk-da7219-kwd.m4 +++ b/tools/topology/sof-glk-da7219-kwd.m4 @@ -18,7 +18,6 @@ include(`sof/tokens.m4') include(`platform/intel/bxt.m4') include(`platform/intel/dmic.m4') -define(KWD_PERIOD_FRAMES, 320) define(KWD_PIPE_SCH_DEADLINE_US, 20000) # @@ -36,120 +35,124 @@ define(KWD_PIPE_SCH_DEADLINE_US, 20000) # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 2, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 3, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 4 on PCM 99 using max 4 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 4, 99, 4, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 5 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 5, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 6 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 7 on PCM 7 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 1, SSP1-Codec, PIPELINE_SOURCE_1, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, SSP, 2, SSP2-Codec, PIPELINE_SOURCE_2, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, SSP, 2, SSP2-Codec, PIPELINE_SINK_3, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 4, DMIC, 0, dmic01, PIPELINE_SINK_4, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 3, iDisp1, PIPELINE_SOURCE_5, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 4, iDisp2, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, HDA, 5, iDisp3, PIPELINE_SOURCE_7, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # # KWD configuration # # Passthrough capture pipeline 8 on PCM 8 using max 2 channels. -# Schedule 320 frames per 20000us deadline on core 0 with priority 0 +# Schedule 20000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-kfbm-capture.m4, 8, 8, 2, s16le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0) + KWD_PIPE_SCH_DEADLINE_US, 0, 0, + 48000, 48000, 48000) # capture DAI is DMIC 1 using 2 periods # Buffers use s16le format, with 320 frame per 20000us on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 8, DMIC, 1, dmic16k, PIPELINE_SINK_8, 2, s16le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0) + KWD_PIPE_SCH_DEADLINE_US, 0, 0) PCM_PLAYBACK_ADD(Speakers, 0, PIPELINE_PCM_1) PCM_DUPLEX_ADD(Headset, 1, PIPELINE_PCM_2, PIPELINE_PCM_3) @@ -161,11 +164,14 @@ PCM_PLAYBACK_ADD(HDMI3, 7, PIPELINE_PCM_7) # keyword detector pipe dnl PIPELINE_ADD(pipeline, dnl pipe id, max channels, format, -dnl frames, deadline, priority, core) -PIPELINE_ADD(sof/pipe-detect.m4, 9, 2, s16le, - KWD_PERIOD_FRAMES, - KWD_PIPE_SCH_DEADLINE_US, - 0, 0, PIPELINE_SCHED_COMP_8) +dnl period, priority, core, +dnl sched_comp, time_domain, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate) +PIPELINE_ADD(sof/pipe-detect.m4, + 9, 2, s16le, + KWD_PIPE_SCH_DEADLINE_US, 0, 0, + PIPELINE_SCHED_COMP_8, 0, + 16000, 16000, 16000)) # Connect pipelines together SectionGraph."pipe-sof-apl-keyword-detect" { diff --git a/tools/topology/sof-glk-da7219.m4 b/tools/topology/sof-glk-da7219.m4 index 66dadf45ebb0..8a2c10a63254 100644 --- a/tools/topology/sof-glk-da7219.m4 +++ b/tools/topology/sof-glk-da7219.m4 @@ -30,103 +30,110 @@ include(`platform/intel/dmic.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 2, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 3, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 4 on PCM 99 using max 4 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 #PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 4, 99, 4, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 5 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 5, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 6 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 6, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 7 on PCM 7 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 7, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 1, SSP1-Codec, PIPELINE_SOURCE_1, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, SSP, 2, SSP2-Codec, PIPELINE_SOURCE_2, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, SSP, 2, SSP2-Codec, PIPELINE_SINK_3, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 4, DMIC, 0, dmic01, PIPELINE_SINK_4, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 3, iDisp1, PIPELINE_SOURCE_5, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 4, iDisp2, PIPELINE_SOURCE_6, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, HDA, 5, iDisp3, PIPELINE_SOURCE_7, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) PCM_PLAYBACK_ADD(Speakers, 0, PIPELINE_PCM_1) PCM_DUPLEX_ADD(Headset, 1, PIPELINE_PCM_2, PIPELINE_PCM_3) diff --git a/tools/topology/sof-glk-rt5682.m4 b/tools/topology/sof-glk-rt5682.m4 index 7cb8ed8130ca..2ea764bb0173 100644 --- a/tools/topology/sof-glk-rt5682.m4 +++ b/tools/topology/sof-glk-rt5682.m4 @@ -33,103 +33,110 @@ include(`platform/intel/dmic.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 2, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 3, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 4 on PCM 99 using max 4 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 #PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 4, 99, 4, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 5 on PCM 5 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 5, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 6 on PCM 6 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 6, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 7 on PCM 7 using max 2 channels of s16le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 # PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 7, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 1, SSP1-Codec, PIPELINE_SOURCE_1, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, SSP, 2, SSP2-Codec, PIPELINE_SOURCE_2, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 3, SSP, 2, SSP2-Codec, PIPELINE_SINK_3, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is DMIC0 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 4, DMIC, 0, dmic01, PIPELINE_SINK_4, 2, s16le, - 48, 1000, 0, 0) + 1000, 0, 0) # playback DAI is iDisp1 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 5, HDA, 3, iDisp1, PIPELINE_SOURCE_5, 2, s16le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 6, HDA, 4, iDisp2, PIPELINE_SOURCE_6, 2, s16le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s16le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, HDA, 5, iDisp3, PIPELINE_SOURCE_7, 2, s16le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) PCM_PLAYBACK_ADD(Speakers, 0, PIPELINE_PCM_1) PCM_DUPLEX_ADD(Headset, 1, PIPELINE_PCM_2, PIPELINE_PCM_3) diff --git a/tools/topology/sof-hda-generic-idisp.m4 b/tools/topology/sof-hda-generic-idisp.m4 index 1b0e666facd1..ed99ef003977 100644 --- a/tools/topology/sof-hda-generic-idisp.m4 +++ b/tools/topology/sof-hda-generic-idisp.m4 @@ -38,25 +38,30 @@ include(`platform/intel/intel-generic-dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Low Latency playback pipeline 2 on PCM 1 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 2, 1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 3, 2, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 4 on PCM 3 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Set 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 4, 3, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -65,28 +70,28 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # playback DAI is iDisp1 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 2, HDA, 0, iDisp1, PIPELINE_SOURCE_2, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 3, HDA, 1, iDisp2, PIPELINE_SOURCE_3, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 4, HDA, 2, iDisp3, PIPELINE_SOURCE_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) diff --git a/tools/topology/sof-hda-generic.m4 b/tools/topology/sof-hda-generic.m4 index f5de9e167426..7feef6370b40 100644 --- a/tools/topology/sof-hda-generic.m4 +++ b/tools/topology/sof-hda-generic.m4 @@ -1,4 +1,3 @@ -# # Topology for SKL+ HDA Generic machine # @@ -39,99 +38,106 @@ include(`platform/intel/intel-generic-dmic.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 3 on PCM 1 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 3, 1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 4 on PCM 1 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 4, 1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 7 on PCM 3 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 7, 3, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 8 on PCM 4 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 8, 4, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency playback pipeline 9 on PCM 5 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 9, 5, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration # # playback DAI is HDA Analog using 2 periods -# Dai buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Dai buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, HDA, 0, Analog Playback and Capture, PIPELINE_SOURCE_1, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # capture DAI is HDA Analog using 2 periods -# Dai buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Dai buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, HDA, 1, Analog Playback and Capture, PIPELINE_SINK_2, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is HDA Digital using 2 periods -# Dai buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Dai buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 3, HDA, 2, Digital Playback and Capture, PIPELINE_SOURCE_3, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # capture DAI is HDA Digital using 2 periods -# Dai buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Dai buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 4, HDA, 3, Digital Playback and Capture, PIPELINE_SINK_4, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp1 using 2 periods -# Dai buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Dai buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 7, HDA, 4, iDisp1, PIPELINE_SOURCE_7, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp2 using 2 periods -# Dai buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Dai buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 8, HDA, 5, iDisp2, PIPELINE_SOURCE_8, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # playback DAI is iDisp3 using 2 periods -# Dai buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Dai buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 9, HDA, 6, iDisp3, PIPELINE_SOURCE_9, 2, s32le, - 48, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) + 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) PCM_DUPLEX_ADD(HDA Analog, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) PCM_DUPLEX_ADD(HDA Digital, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) diff --git a/tools/topology/sof-hsw-rt5640.m4 b/tools/topology/sof-hsw-rt5640.m4 index 60d5bf4d0bca..3b21da6acaff 100644 --- a/tools/topology/sof-hsw-rt5640.m4 +++ b/tools/topology/sof-hsw-rt5640.m4 @@ -28,22 +28,25 @@ include(`platform/intel/hsw.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 0, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le. -# Schedule 192 frames per 4000us deadline on core 0 with priority 1 +# 4000us deadline on core 0 with priority 1 PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 1, 2, s32le, - 192, 4000, 1, 0) + 4000, 1, 0, + 8000, 96000, 48000) # Connect pipelines together SectionGraph."pipe-hsw-rt5640" { @@ -62,18 +65,18 @@ SectionGraph."pipe-hsw-rt5640" { # # playback DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 0, Codec, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 0, Codec, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-icl-dmic-4ch.m4 b/tools/topology/sof-icl-dmic-4ch.m4 index 590fe36b81ea..2cb26e007502 100644 --- a/tools/topology/sof-icl-dmic-4ch.m4 +++ b/tools/topology/sof-icl-dmic-4ch.m4 @@ -25,14 +25,16 @@ include(`platform/intel/dmic.m4') dnl PIPELINE_PCM_ADD(pipeline, dnl pipe id, pcm, max channels, format, -dnl frames, deadline, priority, core) - +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) # Passthrough capture pipeline 1 on PCM 1 using max 4 channels. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, 1, 1, 4, s32le, - 48, 1000, 0, 0) + 1000, 0, 0, + 48000, 48000, 48000) # # DAIs configuration @@ -41,15 +43,15 @@ PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl deadline, priority, core) # capture DAI is DMIC 0 using 2 periods -# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s32le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 1, DMIC, 0, dmic01, PIPELINE_SINK_1, 2, s32le, - 48, 1000, 0, 0) + 1000, 0, 0) dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture) diff --git a/tools/topology/sof-icl-nocodec.m4 b/tools/topology/sof-icl-nocodec.m4 index 224495e201e3..a27a25f2622a 100644 --- a/tools/topology/sof-icl-nocodec.m4 +++ b/tools/topology/sof-icl-nocodec.m4 @@ -24,16 +24,18 @@ include(`platform/intel/icl.m4') # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s24le, - 48, 1000, 0, 0, SSP, 0, s24le, 2) + 1000, 0, 0, SSP, 0, s24le, 2, + 48000, 48000, 48000) # Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# 1000us deadline on core 0 with priority 0 PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, 2, 0, 2, s24le, - 48, 1000, 0, 0, SSP, 0, s24le, 2) + 1000, 0, 0, SSP, 0, s24le, 2, + 48000, 48000, 48000) # # DAI configuration @@ -42,18 +44,18 @@ PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4, # # playback DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-playback.m4, 1, SSP, 0, NoCodec-0, PIPELINE_SOURCE_1, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # capture DAI is SSP0 using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 DAI_ADD(sof/pipe-dai-capture.m4, 2, SSP, 0, NoCodec-0, PIPELINE_SINK_2, 2, s24le, - 48, 1000, 0, 0) + 1000, 0, 0) # PCM Low Latency PCM_DUPLEX_ADD(Passthrough, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) diff --git a/tools/topology/sof-whl-hda.m4 b/tools/topology/sof-whl-hda.m4 new file mode 100644 index 000000000000..4c3003a41e0a --- /dev/null +++ b/tools/topology/sof-whl-hda.m4 @@ -0,0 +1,162 @@ +# +# HDA passthrough topology for WHL +# + +# Include topology builder +include(`utils.m4') +include(`dai.m4') +include(`pipeline.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include bxt DSP configuration +include(`platform/intel/bxt.m4') + +# +# Define the pipelines +# +# PCM0 <---> passthrough (pipe 1,2) <----> HDA Analog (HDA Analog playback/capture) +# PCM1 <---> passthrough (pipe 3,4) <----> HDA Digital (HDA Digital playback/capture) +# PCM3 ----> passthrough (pipe 7) -----> iDisp1 (HDMI/DP playback, BE link 3) +# PCM4 ----> passthrough (pipe 8) -----> iDisp2 (HDMI/DP playback, BE link 4) +# PCM5 ----> passthrough (pipe 9) -----> iDisp3 (HDMI/DP playback, BE link 5) +# + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, + 1, 0, 2, s24le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, + 2, 0, 2, s24le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency playback pipeline 3 on PCM 1 using max 2 channels of s24le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, + 3, 1, 2, s24le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency capture pipeline 4 on PCM 1 using max 2 channels of s24le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, + 4, 1, 2, s24le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency playback pipeline 7 on PCM 3 using max 2 channels of s24le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, + 7, 3, 2, s24le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency playback pipeline 8 on PCM 4 using max 2 channels of s24le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, + 8, 4, 2, s24le, + 1000, 0, 0, + 48000, 48000, 48000) + +# Low Latency playback pipeline 9 on PCM 5 using max 2 channels of s24le. +# 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, + 9, 5, 2, s24le, + 1000, 0, 0, + 48000, 48000, 48000) + +# +# DAIs configuration +# + +# playback DAI is HDA Analog using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 1, HDA, 0, Analog Playback and Capture, + PIPELINE_SOURCE_1, 2, s24le, + 1000, 0, 0) + +# capture DAI is HDA Analog using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 2, HDA, 1, Analog Playback and Capture, + PIPELINE_SINK_2, 2, s24le, + 1000, 0, 0) + +# playback DAI is HDA Digital using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 3, HDA, 2, Digital Playback and Capture, + PIPELINE_SOURCE_3, 2, s24le, + 1000, 0, 0) + +# capture DAI is HDA Digital using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 4, HDA, 3, Digital Playback and Capture, + PIPELINE_SINK_4, 2, s24le, + 1000, 0, 0) + +# playback DAI is iDisp1 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 7, HDA, 4, iDisp1, + PIPELINE_SOURCE_7, 2, s24le, + 1000, 0, 0) + +# playback DAI is iDisp2 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 8, HDA, 5, iDisp2, + PIPELINE_SOURCE_8, 2, s24le, + 1000, 0, 0) + +# playback DAI is iDisp3 using 2 periods +# Buffers use s24le format, 1000us deadline on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 9, HDA, 6, iDisp3, + PIPELINE_SOURCE_9, 2, s24le, + 1000, 0, 0) + +PCM_DUPLEX_ADD(HDA Analog, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_DUPLEX_ADD(HDA Digital, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) +PCM_PLAYBACK_ADD(HDMI1, 3, PIPELINE_PCM_7) +PCM_PLAYBACK_ADD(HDMI2, 4, PIPELINE_PCM_8) +PCM_PLAYBACK_ADD(HDMI3, 5, PIPELINE_PCM_9) + +# +# BE configurations - overrides config in ACPI if present +# + +# HDA outputs +DAI_CONFIG(HDA, 0, 4, Analog Playback and Capture) +DAI_CONFIG(HDA, 1, 5, Digital Playback and Capture) +# 3 HDMI/DP outputs (ID: 3,4,5) +DAI_CONFIG(HDA, 4, 1, iDisp1) +DAI_CONFIG(HDA, 5, 2, iDisp2) +DAI_CONFIG(HDA, 6, 3, iDisp3) + + +VIRTUAL_DAPM_ROUTE_IN(codec0_in, HDA, 1, IN, 1) +VIRTUAL_DAPM_ROUTE_IN(codec1_in, HDA, 3, IN, 2) +VIRTUAL_DAPM_ROUTE_OUT(codec0_out, HDA, 0, OUT, 3) +VIRTUAL_DAPM_ROUTE_OUT(codec1_out, HDA, 2, OUT, 4) + +# codec2 is not supported in dai links but it exists +# in dapm routes, so hack this one to HDA1 +VIRTUAL_DAPM_ROUTE_IN(codec2_in, HDA, 3, IN, 5) +VIRTUAL_DAPM_ROUTE_OUT(codec2_out, HDA, 2, OUT, 6) + +VIRTUAL_DAPM_ROUTE_OUT(iDisp1_out, HDA, 4, OUT, 7) +VIRTUAL_DAPM_ROUTE_OUT(iDisp2_out, HDA, 5, OUT, 8) +VIRTUAL_DAPM_ROUTE_OUT(iDisp3_out, HDA, 6, OUT, 9) diff --git a/tools/topology/sof/pipe-dai-capture.m4 b/tools/topology/sof/pipe-dai-capture.m4 index a28ef58fae88..9e68fff8d0c5 100644 --- a/tools/topology/sof/pipe-dai-capture.m4 +++ b/tools/topology/sof/pipe-dai-capture.m4 @@ -13,7 +13,7 @@ W_DAI_IN(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 2, 0, 0) # # DAI pipeline - always use 0 for DAIs # -W_PIPELINE(N_DAI_IN, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_dai_schedule_plat) +W_PIPELINE(N_DAI_IN, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_dai_schedule_plat) # # Graph connections to pipelines diff --git a/tools/topology/sof/pipe-dai-playback.m4 b/tools/topology/sof/pipe-dai-playback.m4 index e32df751fdc8..70a0518c74ae 100644 --- a/tools/topology/sof/pipe-dai-playback.m4 +++ b/tools/topology/sof/pipe-dai-playback.m4 @@ -13,7 +13,7 @@ W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2) # # DAI pipeline - always use 0 for DAIs # -W_PIPELINE(N_DAI_OUT, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_dai_schedule_plat) +W_PIPELINE(N_DAI_OUT, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_dai_schedule_plat) # # Graph connections to pipelines diff --git a/tools/topology/sof/pipe-demux-playback.m4 b/tools/topology/sof/pipe-demux-playback.m4 index ec2e10b7ea3f..2242b5b325ee 100644 --- a/tools/topology/sof/pipe-demux-playback.m4 +++ b/tools/topology/sof/pipe-demux-playback.m4 @@ -46,10 +46,10 @@ W_MUXDEMUX(0, 1, PIPELINE_FORMAT, 2, 2, LIST(` ', "DEMUX")) # Low Latency Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, val(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) # diff --git a/tools/topology/sof/pipe-detect.m4 b/tools/topology/sof/pipe-detect.m4 index c4e1d5155959..a8c056cfffad 100644 --- a/tools/topology/sof/pipe-detect.m4 +++ b/tools/topology/sof/pipe-detect.m4 @@ -81,18 +81,18 @@ W_SELECTOR(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "SELECTOR")) # Capture Buffers W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) # Capture Buffers W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) # Virtual output widget VIRTUAL_WIDGET(DETECT SINK PIPELINE_ID, out_drv, PIPELINE_ID) # Pipeline -dnl W_PIPELINE(stream, deadline, priority, frames, core, timer, platform) -W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_media_schedule_plat) +dnl W_PIPELINE(stream, deadline, priority, core, timer, platform) +W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_media_schedule_plat) # # Pipeline Graph diff --git a/tools/topology/sof/pipe-eq-capture.m4 b/tools/topology/sof/pipe-eq-capture.m4 index 03469a8ddb83..3b266d571c11 100644 --- a/tools/topology/sof/pipe-eq-capture.m4 +++ b/tools/topology/sof/pipe-eq-capture.m4 @@ -42,11 +42,11 @@ W_EQ_IIR(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "EQIIR")) # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP) # @@ -70,4 +70,4 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Highpass Capture PCM_ID) # PCM Configuration # -PCM_CAPABILITIES(Highpass Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, PIPELINE_CHANNELS, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Highpass Capture PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, PIPELINE_CHANNELS, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-eq-fir-volume-playback.m4 b/tools/topology/sof/pipe-eq-fir-volume-playback.m4 index 90df0d7cffbb..23eb772c053c 100644 --- a/tools/topology/sof/pipe-eq-fir-volume-playback.m4 +++ b/tools/topology/sof/pipe-eq-fir-volume-playback.m4 @@ -65,13 +65,13 @@ W_EQ_FIR(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "EQFIR")) # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -98,5 +98,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I # PCM Configuration # -PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-eq-iir-volume-playback.m4 b/tools/topology/sof/pipe-eq-iir-volume-playback.m4 index c50940d0988a..dd66511454a0 100644 --- a/tools/topology/sof/pipe-eq-iir-volume-playback.m4 +++ b/tools/topology/sof/pipe-eq-iir-volume-playback.m4 @@ -65,13 +65,13 @@ W_EQ_IIR(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "EQIIR")) # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -98,5 +98,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I # PCM Configuration # -PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-eq-volume-playback.m4 b/tools/topology/sof/pipe-eq-volume-playback.m4 index a0cc549584ed..15dd7748a9e5 100644 --- a/tools/topology/sof/pipe-eq-volume-playback.m4 +++ b/tools/topology/sof/pipe-eq-volume-playback.m4 @@ -82,16 +82,16 @@ W_EQ_FIR(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "EQFIR")) # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(3, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -119,5 +119,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I # PCM Configuration # -PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-kfbm-capture.m4 b/tools/topology/sof/pipe-kfbm-capture.m4 index 860da98564fd..68fef6fda607 100644 --- a/tools/topology/sof/pipe-kfbm-capture.m4 +++ b/tools/topology/sof/pipe-kfbm-capture.m4 @@ -79,15 +79,15 @@ W_KPBM(0, PIPELINE_FORMAT, 2, 2, PIPELINE_ID, LIST(` ', "KPB")) # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # Capture Buffers W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) # Capture Buffers W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) # diff --git a/tools/topology/sof/pipe-low-latency-capture.m4 b/tools/topology/sof/pipe-low-latency-capture.m4 index 7d44c78f2f8f..748b89de4159 100644 --- a/tools/topology/sof/pipe-low-latency-capture.m4 +++ b/tools/topology/sof/pipe-low-latency-capture.m4 @@ -46,10 +46,10 @@ W_PGA(0, PIPELINE_FORMAT, 2, 2, capture_pga_conf, LIST(` ', "PIPELINE_ID PCM PC # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) # @@ -73,4 +73,4 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Low Latency Capture PCM_ID # PCM Configuration # -PCM_CAPABILITIES(Low Latency Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 4, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Low Latency Capture PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 4, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-low-latency-playback.m4 b/tools/topology/sof/pipe-low-latency-playback.m4 index 1fe0fa1b6812..c59ef34abc24 100644 --- a/tools/topology/sof/pipe-low-latency-playback.m4 +++ b/tools/topology/sof/pipe-low-latency-playback.m4 @@ -77,16 +77,16 @@ W_MIXER(0, PIPELINE_FORMAT, 2, 2) # Low Latency Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) W_BUFFER(3, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -124,5 +124,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Low Latency Playback PCM_I # PCM capabilities supported by FW -PCM_CAPABILITIES(Low Latency Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Low Latency Playback PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-passthrough-capture-sched.m4 b/tools/topology/sof/pipe-passthrough-capture-sched.m4 index 47658fb4a26d..452c3826104f 100644 --- a/tools/topology/sof/pipe-passthrough-capture-sched.m4 +++ b/tools/topology/sof/pipe-passthrough-capture-sched.m4 @@ -21,7 +21,7 @@ W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2) # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP) # Virtual output widget @@ -42,7 +42,7 @@ P_GRAPH(pipe-pass-capture-PIPELINE_ID, PIPELINE_ID, indir(`define', concat(`PIPELINE_SINK_', PIPELINE_ID), N_BUFFER(0)) indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID) -W_PIPELINE(N_PCMC(PCM_ID), SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_ll_schedule_plat) +W_PIPELINE(N_PCMC(PCM_ID), SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_ll_schedule_plat) # # PCM Configuration # diff --git a/tools/topology/sof/pipe-passthrough-capture.m4 b/tools/topology/sof/pipe-passthrough-capture.m4 index 890495b039ae..9fa92d142c02 100644 --- a/tools/topology/sof/pipe-passthrough-capture.m4 +++ b/tools/topology/sof/pipe-passthrough-capture.m4 @@ -21,7 +21,7 @@ W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2) # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP) # @@ -43,4 +43,4 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID # PCM Configuration # -PCM_CAPABILITIES(Passthrough Capture PCM_ID, COMP_FORMAT_NAME(PIPELINE_FORMAT), 48000, 48000, PIPELINE_CHANNELS, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Capture PCM_ID, COMP_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, PIPELINE_CHANNELS, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-passthrough-playback.m4 b/tools/topology/sof/pipe-passthrough-playback.m4 index 6105ffa819cd..c5a84e8db517 100644 --- a/tools/topology/sof/pipe-passthrough-playback.m4 +++ b/tools/topology/sof/pipe-passthrough-playback.m4 @@ -21,7 +21,7 @@ W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0) # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP) # @@ -43,4 +43,4 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I # PCM Configuration # -PCM_CAPABILITIES(Passthrough Playback PCM_ID, COMP_FORMAT_NAME(PIPELINE_FORMAT), 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Playback PCM_ID, COMP_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-pcm-media.m4 b/tools/topology/sof/pipe-pcm-media.m4 index 75a434b4a8ac..cbe42c49c52c 100644 --- a/tools/topology/sof/pipe-pcm-media.m4 +++ b/tools/topology/sof/pipe-pcm-media.m4 @@ -32,7 +32,7 @@ C_CONTROLMIXER(PCM PCM_ID Playback Volume, PIPELINE_ID, # SRC Configuration # -W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "48000"')) +W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "PIPELINE_RATE"')) W_DATA(media_src_conf, media_src_tokens) @@ -62,15 +62,15 @@ W_SRC(0, PIPELINE_FORMAT, 2, 2, media_src_conf) # Media Source Buffers to SRC, make them big enough to deal with 2 * rate. W_BUFFER(0, COMP_BUFFER_SIZE(4, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1,COMP_BUFFER_SIZE(4, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) # Buffer B2 is on fixed rate sink side of SRC. W_BUFFER(2, COMP_BUFFER_SIZE(4, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) # @@ -96,7 +96,7 @@ indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(2)) # Pipeline Configuration. # -W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_media_schedule_plat) +W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_media_schedule_plat) # # PCM Configuration @@ -104,7 +104,7 @@ W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHE # PCM capabilities supported by FW -PCM_CAPABILITIES(Media Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 8000, 192000, 2, PIPELINE_CHANNELS, 2, 32, 192, 262144, 8388608, 8388608) +PCM_CAPABILITIES(Media Playback PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 32, 192, 262144, 8388608, 8388608) # PCM Media Playback SectionPCM.STR(Media Playback PCM_ID) { diff --git a/tools/topology/sof/pipe-src-capture.m4 b/tools/topology/sof/pipe-src-capture.m4 index db5b4dadc564..a14bdc6f6c76 100644 --- a/tools/topology/sof/pipe-src-capture.m4 +++ b/tools/topology/sof/pipe-src-capture.m4 @@ -24,7 +24,7 @@ W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 4, 0) # SRC Configuration # -W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "48000"')) +W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_IN "PIPELINE_RATE"')) W_DATA(media_src_conf, media_src_tokens) @@ -33,10 +33,10 @@ W_SRC(0, PIPELINE_FORMAT, 4, 4, media_src_conf) # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(4, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(4, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -60,4 +60,4 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID # PCM Configuration # -PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 8000, 96000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-src-playback.m4 b/tools/topology/sof/pipe-src-playback.m4 index 506d0e3d7ee8..16e11097f259 100644 --- a/tools/topology/sof/pipe-src-playback.m4 +++ b/tools/topology/sof/pipe-src-playback.m4 @@ -28,7 +28,7 @@ W_PCM_PLAYBACK(PCM_ID, SRC Playback, 3, 0) # SRC Configuration # -W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "48000"')) +W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "PIPELINE_RATE"')) W_DATA(media_src_conf, media_src_tokens) @@ -37,10 +37,13 @@ W_SRC(0, PIPELINE_FORMAT, 3, 3, media_src_conf) # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(3, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(3, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), + PLATFORM_HOST_MEM_CAP) +W_BUFFER(2, COMP_BUFFER_SIZE(2, + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -64,5 +67,6 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), SRC Playback PCM_ID) # PCM Configuration # -PCM_CAPABILITIES(SRC Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 8000, 192000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(SRC Playback PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) + diff --git a/tools/topology/sof/pipe-src-volume-playback.m4 b/tools/topology/sof/pipe-src-volume-playback.m4 index abbff836d6d2..430191a3b5a5 100644 --- a/tools/topology/sof/pipe-src-volume-playback.m4 +++ b/tools/topology/sof/pipe-src-volume-playback.m4 @@ -38,7 +38,7 @@ W_PCM_PLAYBACK(PCM_ID, SRC Playback, 3, 0) # SRC Configuration # -W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "48000"')) +W_VENDORTUPLES(media_src_tokens, sof_src_tokens, LIST(` ', `SOF_TKN_SRC_RATE_OUT "PIPELINE_RATE"')) W_DATA(media_src_conf, media_src_tokens) @@ -61,13 +61,13 @@ W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Maste # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(3, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(3, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # diff --git a/tools/topology/sof/pipe-tone.m4 b/tools/topology/sof/pipe-tone.m4 index 4bad5afe7863..f150df3bd4ee 100644 --- a/tools/topology/sof/pipe-tone.m4 +++ b/tools/topology/sof/pipe-tone.m4 @@ -59,10 +59,10 @@ W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Tone # Low Latency Buffers W_BUFFER(0,COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) @@ -87,4 +87,4 @@ indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1)) # Pipeline Configuration. # -W_PIPELINE(N_TONE(0), SCHEDULE_DEADLINE, SCHEDULE_PERIOD, SCHEDULE_FRAMES, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_tone_schedule_plat) +W_PIPELINE(N_TONE(0), SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_tone_schedule_plat) diff --git a/tools/topology/sof/pipe-volume-capture-16khz.m4 b/tools/topology/sof/pipe-volume-capture-16khz.m4 index 649e7c60b0dd..2ffb76dff851 100644 --- a/tools/topology/sof/pipe-volume-capture-16khz.m4 +++ b/tools/topology/sof/pipe-volume-capture-16khz.m4 @@ -51,10 +51,10 @@ W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Maste # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # diff --git a/tools/topology/sof/pipe-volume-capture-sched.m4 b/tools/topology/sof/pipe-volume-capture-sched.m4 index 04ac8d169599..da1f4019fbc3 100644 --- a/tools/topology/sof/pipe-volume-capture-sched.m4 +++ b/tools/topology/sof/pipe-volume-capture-sched.m4 @@ -38,10 +38,10 @@ W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Capture Volume")) # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # Virtual output widget @@ -65,7 +65,7 @@ P_GRAPH(pipe-pass-vol-capture-PIPELINE_ID, PIPELINE_ID, indir(`define', concat(`PIPELINE_SINK_', PIPELINE_ID), N_BUFFER(1)) indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID) -W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_media_schedule_plat) +W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_media_schedule_plat) # # PCM Configuration # diff --git a/tools/topology/sof/pipe-volume-capture.m4 b/tools/topology/sof/pipe-volume-capture.m4 index ebe0d4818466..9685f071a89d 100644 --- a/tools/topology/sof/pipe-volume-capture.m4 +++ b/tools/topology/sof/pipe-volume-capture.m4 @@ -48,10 +48,10 @@ W_PGA(0, PIPELINE_FORMAT, 2, 2, capture_pga_conf, LIST(` ', "PIPELINE_ID Master # Capture Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -75,5 +75,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID # PCM Configuration # -PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) diff --git a/tools/topology/sof/pipe-volume-demux-playback.m4 b/tools/topology/sof/pipe-volume-demux-playback.m4 index b05d98c84802..fe4ce342ff76 100644 --- a/tools/topology/sof/pipe-volume-demux-playback.m4 +++ b/tools/topology/sof/pipe-volume-demux-playback.m4 @@ -69,13 +69,13 @@ W_MUXDEMUX(0, 1, PIPELINE_FORMAT, 2, 2, LIST(` ', "DEMUX")) # Low Latency Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) W_BUFFER(2, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_COMP_MEM_CAP) # diff --git a/tools/topology/sof/pipe-volume-playback.m4 b/tools/topology/sof/pipe-volume-playback.m4 index 8a8b5caae668..56746228be54 100644 --- a/tools/topology/sof/pipe-volume-playback.m4 +++ b/tools/topology/sof/pipe-volume-playback.m4 @@ -49,10 +49,10 @@ W_PGA(0, PIPELINE_FORMAT, 2, 2, playback_pga_conf, LIST(` ', "PIPELINE_ID Maste # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_HOST_MEM_CAP) W_BUFFER(1, COMP_BUFFER_SIZE(2, - COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES), + COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_DAI_MEM_CAP) # @@ -77,5 +77,5 @@ indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_I # PCM Configuration # -PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) +PCM_CAPABILITIES(Passthrough Playback PCM_ID, `S32_LE,S24_LE,S16_LE', PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) From 796e467b06433b06c8b90dcbd5c444f42bf3d6e1 Mon Sep 17 00:00:00 2001 From: Jaska Uimonen Date: Fri, 11 Jan 2019 15:38:16 +0200 Subject: [PATCH 3/4] topology: add 50kHz output topology for apl Signed-off-by: Jaska Uimonen --- tools/topology/CMakeLists.txt | 1 + tools/topology/sof-apl-src-50khz-pcm512x.m4 | 74 +++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 tools/topology/sof-apl-src-50khz-pcm512x.m4 diff --git a/tools/topology/CMakeLists.txt b/tools/topology/CMakeLists.txt index 67aa3cc95208..594dc8b23c22 100644 --- a/tools/topology/CMakeLists.txt +++ b/tools/topology/CMakeLists.txt @@ -58,6 +58,7 @@ set(TPLGS "sof-apl-dmic-a2ch-b4ch\;sof-apl-dmic-a2ch-b4ch" "sof-apl-dmic\;sof-apl-dmic-4ch\;-DCHANNELS=4" "sof-apl-dmic\;sof-apl-dmic-2ch\;-DCHANNELS=2" + "sof-apl-src-50khz-pcm512x\;sof-apl-src-50khz-pcm512x" "sof-icl-dmic-4ch\;sof-icl-dmic-4ch" "sof-apl-src-pcm512x\;sof-apl-src-pcm512x" "sof-cml-rt5682\;sof-cml-rt5682\;-DPLATFORM=cml" diff --git a/tools/topology/sof-apl-src-50khz-pcm512x.m4 b/tools/topology/sof-apl-src-50khz-pcm512x.m4 new file mode 100644 index 000000000000..9db89750c4c3 --- /dev/null +++ b/tools/topology/sof-apl-src-50khz-pcm512x.m4 @@ -0,0 +1,74 @@ +# +# Topology for Apollolake UP^2 with pcm512x codec with sample rate +# conversion (SRC component). +# + +# Include topology builder +include(`utils.m4') +include(`dai.m4') +include(`pipeline.m4') +include(`ssp.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Apollolake DSP configuration +include(`platform/intel/bxt.m4') + +DEBUG_START + +# +# Define the pipelines +# +# PCM0 ----> src -----> SSP5 (pcm512x) +# + +dnl PIPELINE_PCM_ADD(pipeline, +dnl pipe id, pcm, max channels, format, +dnl period, priority, core, +dnl pcm_min_rate, pcm_max_rate, pipeline_rate, +dnl time_domain, sched_comp) + +# Playback pipeline 1 on PCM 0 using max 2 channels of s24le. +# Schedule 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-src-playback.m4, + 1, 0, 2, s24le, + 1000, 0, 0, + 48000, 50000, 50000) + +# +# DAIs configuration +# + +dnl DAI_ADD(pipeline, +dnl pipe id, dai type, dai_index, dai_be, +dnl buffer, periods, format, +dnl deadline, priority, core) + +# playback DAI is SSP5 using 2 periods +# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 1, SSP, 5, SSP5-Codec, + PIPELINE_SOURCE_1, 2, s24le, + 1000, 0, 0) + +# PCM, id 0 +dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) +PCM_PLAYBACK_ADD(Port5, 0, PIPELINE_PCM_1) + +# +# BE configurations - overrides config in ACPI if present +# + +#SSP 5 (ID: 0) +DAI_CONFIG(SSP, 5, 0, SSP5-Codec, + SSP_CONFIG(I2S, SSP_CLOCK(mclk, 19200000, codec_mclk_in), + SSP_CLOCK(bclk, 3200000, codec_slave), + SSP_CLOCK(fsync, 50000, codec_slave), + SSP_TDM(2, 32, 3, 3), + SSP_CONFIG_DATA(SSP, 5, 24))) + +DEBUG_END From 86cae1a06cc686bdc14528b7765108c8c19f4fc5 Mon Sep 17 00:00:00 2001 From: Jaska Uimonen Date: Tue, 11 Jun 2019 13:28:54 +0300 Subject: [PATCH 4/4] unit tests: fix cmocka test for pipeline connect cmocka pipeline connect unit test is checking the successful connection from frames count set in components. However the frames are not set in pipeline complete if we set the frames from stream parameters. So check now that the pipeline pointer has been set and matches the pipeline in high level test function. Signed-off-by: Jaska Uimonen --- .../audio/pipeline/pipeline_connect_upstream.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/cmocka/src/audio/pipeline/pipeline_connect_upstream.c b/test/cmocka/src/audio/pipeline/pipeline_connect_upstream.c index 65f10d0e1221..975b002a222c 100644 --- a/test/cmocka/src/audio/pipeline/pipeline_connect_upstream.c +++ b/test/cmocka/src/audio/pipeline/pipeline_connect_upstream.c @@ -84,11 +84,8 @@ static void test_audio_pipeline_complete_connect_downstream_variable_set /*Testing component*/ pipeline_complete(&result, test_data->first, test_data->second); - assert_int_equal - ( - result.sched_comp->frames, test_data->p.ipc_pipe.frames_per_sched - ); assert_ptr_equal(result.sched_comp->pipeline, &result); + assert_ptr_equal(test_data->first->pipeline, &result); } /*Test going downstream ignoring sink from other pipeline*/ @@ -171,10 +168,8 @@ static void test_audio_pipeline_complete_connect_downstream_full(void **state) /*Testing component*/ pipeline_complete(&result, test_data->first, test_data->second); - assert_int_equal(test_data->first->frames, - result.ipc_pipe.frames_per_sched); - assert_int_equal(test_data->second->frames, - result.ipc_pipe.frames_per_sched); + assert_ptr_equal(test_data->first->pipeline, &result); + assert_ptr_equal(test_data->second->pipeline, &result); } /*Test going upstream all the way*/ @@ -195,10 +190,8 @@ static void test_audio_pipeline_complete_connect_upstream_full(void **state) /*Testing component*/ pipeline_complete(&result, test_data->first, test_data->second); - assert_int_equal(test_data->first->frames, - result.ipc_pipe.frames_per_sched); - assert_int_equal(test_data->second->frames, - result.ipc_pipe.frames_per_sched); + assert_ptr_equal(test_data->first->pipeline, &result); + assert_ptr_equal(test_data->second->pipeline, &result); } /*Test going upstream all the way*/