From 1eab3d1cb149d229169efaa7a08ec48f44f10b11 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 28 Jan 2025 19:10:24 +0200 Subject: [PATCH 1/2] Tools: Testbench: Fix non-specified output rate impact (MCPS) If the -R is omitted the Xtensa version of sof-testbench4 reports the consumed MCPS as zero. The fix is to copy the output rate from input rate value (-r ) if output rate is zero. Signed-off-by: Seppo Ingalsuo --- tools/testbench/testbench.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testbench/testbench.c b/tools/testbench/testbench.c index 58236e986616..be3e77ec918c 100644 --- a/tools/testbench/testbench.c +++ b/tools/testbench/testbench.c @@ -450,6 +450,9 @@ int main(int argc, char **argv) if (!tp->channels_out) tp->channels_out = tp->channels_in; + if (!tp->fs_out) + tp->fs_out = tp->fs_in; + /* check mandatory args */ if (!tp->tplg_file) { fprintf(stderr, "topology file not specified, use -t file.tplg\n"); From 5582bc47b67bbe95b998bf20197565697e9c719b Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 28 Jan 2025 19:15:42 +0200 Subject: [PATCH 2/2] Tools: Testbench: Print in debug information the pipeline_id Print of pipeline ID helps with use command line switch -p ,, .. to know which pipelines to schedule and to connect to input and output data files. The information is shown in the beginning of topology load. Without this addition, the pipeline ID numbers would need to be checked from topology source file. Signed-off-by: Seppo Ingalsuo --- tools/testbench/topology_ipc4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testbench/topology_ipc4.c b/tools/testbench/topology_ipc4.c index 3b018be3e2ce..4e93eea6ae45 100644 --- a/tools/testbench/topology_ipc4.c +++ b/tools/testbench/topology_ipc4.c @@ -1055,8 +1055,8 @@ static inline int tb_insert_comp(struct testbench_prm *tp) list_item_append(&comp_info->item, &tp->widget_list); - printf("debug: loading comp_id %d: widget %s type %d size %d at offset %ld is_pages %d\n", - comp_id, ctx->widget->name, ctx->widget->id, ctx->widget->size, + printf("debug: loading comp_id %d: pipeline_id %d: widget %s type %d size %d at offset %ld is_pages %d\n", + comp_id, ctx->pipeline_id, ctx->widget->name, ctx->widget->id, ctx->widget->size, ctx->tplg_offset, comp_info->basecfg.is_pages); return 0;