From d7879aeac9f0ee4fed4ac2067346af02dc5b9540 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 12 Feb 2026 17:37:44 +0200 Subject: [PATCH 1/6] Scripts: sof-testbench-helper: Use memory model for xt-run This change adds option --mem_model to xt-run command. It should give better realistic MCPS and cycles numbers for processing with the more accurate memory model. Signed-off-by: Seppo Ingalsuo --- scripts/sof-testbench-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sof-testbench-helper.sh b/scripts/sof-testbench-helper.sh index 5de7d8d43a7b..b9ccc015f21b 100755 --- a/scripts/sof-testbench-helper.sh +++ b/scripts/sof-testbench-helper.sh @@ -147,10 +147,10 @@ if [[ "$XTRUN" == true ]]; then echo " input: $INFILE1, output: $OUTFILE1, trace: $TRACEFILE, profile: $PROFILETXT" source "$XTB4_SETUP" if [[ $PROFILE == true ]]; then - "$XTENSA_PATH"/xt-run --profile="$PROFILEOUT" "$XTB4" $OPTS 2> "$TRACEFILE" + "$XTENSA_PATH"/xt-run --mem_model --profile="$PROFILEOUT" "$XTB4" $OPTS 2> "$TRACEFILE" "$XTENSA_PATH"/xt-gprof "$XTB4" "$PROFILEOUT" > "$PROFILETXT" else - "$XTENSA_PATH"/xt-run "$XTB4" $OPTS 2> "$TRACEFILE" + "$XTENSA_PATH"/xt-run --mem_model "$XTB4" $OPTS 2> "$TRACEFILE" fi else if [ ! -x "$TB4" ]; then From b430646e3fdb16512f603b573086685716a45662 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 12 Feb 2026 17:40:15 +0200 Subject: [PATCH 2/6] Scripts: sof-testbench-helper: Separate input and output rate switches This change does input rate changing with -r and to change both input and output rate, need to specify both -r and -R. With this change it's easy to test e.g. performance of 44100 to 48000 SRC with "-r 44100". Signed-off-by: Seppo Ingalsuo --- scripts/sof-testbench-helper.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/sof-testbench-helper.sh b/scripts/sof-testbench-helper.sh index b9ccc015f21b..ea7a6590ee67 100755 --- a/scripts/sof-testbench-helper.sh +++ b/scripts/sof-testbench-helper.sh @@ -15,7 +15,8 @@ usage() { echo " -n , default 1,2" echo " -o , default none" echo " -p , use with -x, default none" - echo " -r , default 48000" + echo " -r , input rate, default 48000" + echo " -R , output rate, default 48000" echo " -t , default none, e.g. production/sof-hda-generic.tplg" echo " -v runs with valgrind, not available with -x" echo " -x runs testbench with xt-run simulator" @@ -55,7 +56,7 @@ PROFILE=false TPLG0= VALGRIND= -while getopts "b:c:hi:km:n:o:p:r:t:vx" opt; do +while getopts "b:c:hi:km:n:o:p:r:R:t:vx" opt; do case "${opt}" in b) BITS=${OPTARG} @@ -89,6 +90,8 @@ while getopts "b:c:hi:km:n:o:p:r:t:vx" opt; do ;; r) RATE_IN=${OPTARG} + ;; + R) RATE_OUT=${OPTARG} ;; t) From 2e90a891c989a408494514bb78e704357df5ef02 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 12 Feb 2026 17:46:00 +0200 Subject: [PATCH 3/6] Scripts: sof-testbench-build-profile: Test SRC and ASRC with 44.1 kHz The SRC perf numbers are unrealistic low when tested with 48 kHz input. This change adds a test list for components with 44.1 kHz input and 48 kHz output. Signed-off-by: Seppo Ingalsuo --- scripts/sof-testbench-build-profile.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/sof-testbench-build-profile.sh b/scripts/sof-testbench-build-profile.sh index 342f0710ff23..71bdaf27850c 100755 --- a/scripts/sof-testbench-build-profile.sh +++ b/scripts/sof-testbench-build-profile.sh @@ -11,7 +11,8 @@ usage() { echo } -MODULES_S32="asrc dcblock drc drc_multiband eqfir eqiir gain src tdfb" +MODULES_S32_44K_48K="asrc src" +MODULES_S32="dcblock drc drc_multiband eqfir eqiir gain tdfb" MODULES_S24="aria" if [ -z "${SOF_WORKSPACE}" ]; then @@ -61,6 +62,13 @@ $HELPER -x -t development/sof-hda-benchmark-generic.tplg -n 1,2,3 \ -p "$PDIR/profile-$PLATFORM-benchmark.txt" > "$PDIR/log-$PLATFORM-benchmark.txt" # Profile modules +for mod in $MODULES_S32_44K_48K +do + echo "Profiling $mod ..." + $HELPER -r 44100 -x -m "$mod" \ + -p "$PDIR/profile-$PLATFORM-$mod.txt" > "$PDIR/log-$PLATFORM-$mod.txt" +done + for mod in $MODULES_S32 do echo "Profiling $mod ..." From 074e730ab21558e7030b7fdfea5882d125b794ab Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 12 Feb 2026 18:04:20 +0200 Subject: [PATCH 4/6] Scripts: sof-testbench-build-profile: Add more components to profile This patch adds dolby-dax (mock), level_multiplier, micsel, sound_dose, stft_process and template_comp into profiled list. Signed-off-by: Seppo Ingalsuo --- scripts/sof-testbench-build-profile.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/sof-testbench-build-profile.sh b/scripts/sof-testbench-build-profile.sh index 71bdaf27850c..73a880a353b9 100755 --- a/scripts/sof-testbench-build-profile.sh +++ b/scripts/sof-testbench-build-profile.sh @@ -12,7 +12,8 @@ usage() { } MODULES_S32_44K_48K="asrc src" -MODULES_S32="dcblock drc drc_multiband eqfir eqiir gain tdfb" +MODULES_S32="dcblock drc drc_multiband dolby-dax eqfir eqiir gain level_multiplier micsel \ + sound_dose stft_process_1536_240_ template_comp tdfb" MODULES_S24="aria" if [ -z "${SOF_WORKSPACE}" ]; then From 70b46a772f8e3bb89877c07a800dd1365cdaa22d Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Fri, 30 Jan 2026 11:49:48 +0200 Subject: [PATCH 5/6] Tools: Topology: Bench: Change DRC blobs for test to the used ones This patch changes the blobs in playback and capture DRC test topologies to speaker and microphone defaults. It improves test coverage of DRC since the previously used "enabled" blob does very little processing for the audio signal. Signed-off-by: Seppo Ingalsuo --- tools/topology/topology2/development/tplg-targets-bench.cmake | 2 +- .../topology/topology2/include/bench/drc_controls_capture.conf | 1 + .../topology/topology2/include/bench/drc_controls_playback.conf | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/topology/topology2/development/tplg-targets-bench.cmake b/tools/topology/topology2/development/tplg-targets-bench.cmake index cb1b7300306e..0336fa9d4107 100644 --- a/tools/topology/topology2/development/tplg-targets-bench.cmake +++ b/tools/topology/topology2/development/tplg-targets-bench.cmake @@ -36,7 +36,7 @@ set(component_parameters "BENCH_ASRC_PARAMS=default" "BENCH_DCBLOCK_PARAMS=default" "BENCH_DOLBY-DAX_PARAMS=default" - "BENCH_DRC_PARAMS=enabled" + "BENCH_DRC_PARAMS=default_speaker_mic" "BENCH_DRC_MULTIBAND_PARAMS=default" "BENCH_EQIIR_PARAMS=loudness" "BENCH_EQFIR_PARAMS=loudness" diff --git a/tools/topology/topology2/include/bench/drc_controls_capture.conf b/tools/topology/topology2/include/bench/drc_controls_capture.conf index c586f940b578..42d8044a6398 100644 --- a/tools/topology/topology2/include/bench/drc_controls_capture.conf +++ b/tools/topology/topology2/include/bench/drc_controls_capture.conf @@ -8,6 +8,7 @@ "default" "include/components/drc/default.conf" "enabled" "include/components/drc/enabled.conf" "passthrough" "include/components/drc/passthrough.conf" + "default_speaker_mic" "include/components/drc/dmic_default.conf" } } mixer."1" { diff --git a/tools/topology/topology2/include/bench/drc_controls_playback.conf b/tools/topology/topology2/include/bench/drc_controls_playback.conf index 36217ab08965..2cab24d5325d 100644 --- a/tools/topology/topology2/include/bench/drc_controls_playback.conf +++ b/tools/topology/topology2/include/bench/drc_controls_playback.conf @@ -8,6 +8,7 @@ "default" "include/components/drc/default.conf" "enabled" "include/components/drc/enabled.conf" "passthrough" "include/components/drc/passthrough.conf" + "default_speaker_mic" "include/components/drc/speaker_default.conf" } } mixer."1" { From 09315da2f936bad8bde518c93c60ffa7739294be Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 12 Feb 2026 18:43:13 +0200 Subject: [PATCH 6/6] Scripts: host-testbench: Add more modules to quick test procedure This patch adds Dolby DAX (stub version), level_multiplier, micsel, sound_dose to scripts/host-testbench.sh. Running this quick test for sane output and memory violations with Valgrind helps to avoid regressions in the modules. Signed-off-by: Seppo Ingalsuo --- scripts/host-testbench.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/host-testbench.sh b/scripts/host-testbench.sh index 2392525f1b69..4780b78f6de6 100755 --- a/scripts/host-testbench.sh +++ b/scripts/host-testbench.sh @@ -122,4 +122,16 @@ test_component asrc 32 32 48000 "$FullTest" # test with template component test_component template_comp 32 32 48000 "$FullTest" +# test with Dolby DAX with stub +test_component dolby-dax 32 32 48000 "$FullTest" + +# test with level_multiplier +test_component level_multiplier 32 32 48000 "$FullTest" + +# test with micsel +test_component micsel 32 32 48000 "$FullTest" + +# test with sound_dose +test_component sound_dose 32 32 48000 "$FullTest" + echo "All tests are done!"