From 0feff0b3e430b9f4ae5062e516f7b774c5043490 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Mon, 4 Apr 2022 19:38:41 +0300 Subject: [PATCH] Tools: Test: Topology: Set DAI buffer periods to 3 for SRC tests Test pipelines with SRC due internal block processing constraints need this to avoid fail due to insufficient buffer. Other pipelines continue to use 2 buffer periods. Signed-off-by: Seppo Ingalsuo --- tools/test/topology/test-all.m4 | 11 +++++++---- tools/test/topology/test-capture.m4 | 9 ++++++--- tools/test/topology/test-playback.m4 | 7 +++++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/tools/test/topology/test-all.m4 b/tools/test/topology/test-all.m4 index fd0404c5f..0187ba96d 100644 --- a/tools/test/topology/test-all.m4 +++ b/tools/test/topology/test-all.m4 @@ -60,18 +60,21 @@ PIPELINE_PCM_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, # SSP port TEST_DAI_PORT is our only pipeline DAI # -# playback DAI is SSP TEST_DAI_PORT using 2 periods +# Use 3 periods for SRC DAI buffer, otherwise 2 periods +ifelse(TEST_PIPE_NAME, `src', `define(TEST_DAI_PERIODS, `3')', `define(TEST_DAI_PERIODS, `2')') + +# playback DAI is SSP TEST_DAI_PORT using TEST_DAI_PERIODS periods # schedule 1000us on core 0 with priority 0 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, + PIPELINE_SOURCE_1, TEST_DAI_PERIODS, TEST_DAI_FORMAT, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) -# capture DAI is SSP TEST_DAI_PORT using 2 periods +# capture DAI is SSP TEST_DAI_PORT using TEST_DAI_PERIODS periods # schedule 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, + PIPELINE_SINK_2, TEST_DAI_PERIODS, TEST_DAI_FORMAT, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Passthrough diff --git a/tools/test/topology/test-capture.m4 b/tools/test/topology/test-capture.m4 index ff10dde0f..b7354544c 100644 --- a/tools/test/topology/test-capture.m4 +++ b/tools/test/topology/test-capture.m4 @@ -55,12 +55,15 @@ PIPELINE_PCM_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, # DAI configuration # # SSP port TEST_DAI_PORT is our only pipeline DAI -# -# capture DAI is SSP TEST_DAI_PORT using 2 periods + +# Use 3 periods for SRC DAI buffer, otherwise 2 periods +ifelse(TEST_PIPE_NAME, `src', `define(TEST_DAI_PERIODS, `3')', `define(TEST_DAI_PERIODS, `2')') + +# capture DAI is SSP TEST_DAI_PORT using TEST_DAI_PERIODS periods # schedule 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, + PIPELINE_SINK_2, TEST_DAI_PERIODS, TEST_DAI_FORMAT, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) # PCM Passthrough diff --git a/tools/test/topology/test-playback.m4 b/tools/test/topology/test-playback.m4 index 7d5f65b6d..040058333 100644 --- a/tools/test/topology/test-playback.m4 +++ b/tools/test/topology/test-playback.m4 @@ -152,11 +152,14 @@ SectionGraph."pipe-sof-fourth-pipe" { # DAI configuration -# playback DAI is SSP TEST_DAI_PORT using 2 periods +# Use 3 periods for SRC DAI buffer, otherwise 2 periods +ifelse(TEST_PIPE_NAME, `src', `define(TEST_DAI_PERIODS, `3')', `define(TEST_DAI_PERIODS, `2')') + +# playback DAI is SSP TEST_DAI_PORT using TEST_DAI_PERIODS periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 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, + PIPELINE_SOURCE_1, TEST_DAI_PERIODS, TEST_DAI_FORMAT, 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) ifdef(`TEST_HAS_PIPE2',