-
Notifications
You must be signed in to change notification settings - Fork 350
Scripts: Updates to scripts using sof-testbench4 simulation #10545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d7879ae
b430646
2e90a89
074e730
70b46a7
09315da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,9 @@ 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 dolby-dax eqfir eqiir gain level_multiplier micsel \ | ||||||
| sound_dose stft_process_1536_240_ template_comp tdfb" | ||||||
|
||||||
| sound_dose stft_process_1536_240_ template_comp tdfb" | |
| sound_dose stft_process_1536_240 template_comp tdfb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The topology name it uses is sof-hda-benchmark-stft_process_1536_240_32.tplg. And the simple append of test word length to component name, that now includes FFT size 1536 and hop 240, has the underscore. It's ugly but this is how it is now with test scripts.
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable name MODULES_S32_44K_48K implies these modules should be profiled at both 44.1k and 48k, but the loop only runs at 44100. Either rename the variable to match the implemented behavior (e.g., MODULES_S32_44K) or add a second run at 48000 to align with the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input is 44.1 kHz and output is 48 kHz, so the test really runs at both rates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea to add 44100 testing! We should maybe add such a test to PR CI too?..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be quite simple with a scripts/hosts-testbench.sh change.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,8 @@ usage() { | |
| echo " -n <pipelines>, default 1,2" | ||
| echo " -o <output wav>, default none" | ||
| echo " -p <profiling result text>, use with -x, default none" | ||
| echo " -r <rate>, default 48000" | ||
| echo " -r <rate>, input rate, default 48000" | ||
| echo " -R <rate>, output rate, default 48000" | ||
| echo " -t <force topology>, 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} | ||
| ;; | ||
|
Comment on lines
91
to
96
|
||
| t) | ||
|
|
@@ -147,10 +150,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" | ||
|
Comment on lines
+153
to
+156
|
||
| fi | ||
| else | ||
| if [ ! -x "$TB4" ]; then | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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_PARAMS=default_speaker_mic" | |
| "BENCH_DRC_PARAMS=default_io" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cmake scripts and topologies system has limitations and currently this is the way to apply with a keyword the blob for playback and capture that is in this case different. Default_io in my opinion is less descriptive than my proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable name
MODULES_S32_44K_48Kimplies these modules should be profiled at both 44.1k and 48k, but the loop only runs at 44100. Either rename the variable to match the implemented behavior (e.g.,MODULES_S32_44K) or add a second run at 48000 to align with the name.