From 7d862c00c0ec82331e5281382e2ccd622c4b2179 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 27 Nov 2024 11:40:16 +0200 Subject: [PATCH] Tools: Test: Audio: Fix IIR and FIR tests handling in process_test.m The component names are slightly different in IPC4 test topologies for sof-testbench4, so the script is updated to handle both names like eq-iir and eqiir. This avoids reporting failure in gain and frequency response mask tests. The help text and default are also updated for default sof-testbench4. Signed-off-by: Seppo Ingalsuo --- tools/test/audio/process_test.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/test/audio/process_test.m b/tools/test/audio/process_test.m index 4b90a2908b88..70df2978a439 100644 --- a/tools/test/audio/process_test.m +++ b/tools/test/audio/process_test.m @@ -13,8 +13,8 @@ % xtrun - set to 'xt-run' or 'xt-run --turbo' to test with xt-testbench % % E.g. -% process_test('eq-iir', 32, 32, 48000, 0, 0, 'xt-run --turbo'); -% process_test('eq-iir', 32, 32); +% process_test('eqiir', 32, 32, 48000, 0, 0, 'xt-run --turbo'); +% process_test('eqiir', 32, 32); % SPDX-License-Identifier: BSD-3-Clause % Copyright(c) 2017-2022 Intel Corporation. All rights reserved. @@ -23,7 +23,7 @@ function [n_fail, n_pass, n_na] = process_test(comp, bits_in_list, bits_out_list, fs, fulltest, show_plots, xtrun) %% Defaults for call parameters if nargin < 1 - comp = 'EQIIR'; + comp = 'eqiir'; end if nargin < 2 @@ -340,10 +340,10 @@ function test = g_spec(test, prm) switch lower(test.comp) - case 'eq-iir' + case {'eq-iir', 'eqiir'} blob = fullfile(prm.blobpath, prm.iirblob); h = sof_eq_blob_plot(blob, 'iir', test.fs, test.f, 0); - case 'eq-fir' + case {'eq-fir', 'eqfir'} blob = fullfile(prm.blobpath, prm.firblob); h = sof_eq_blob_plot(blob, 'fir', test.fs, test.f, 0); otherwise @@ -356,10 +356,10 @@ function test = fr_mask(test, prm) switch lower(test.comp) - case 'eq-iir' + case {'eq-iir', 'eqiir'} blob = fullfile(prm.blobpath, prm.iirblob); h = sof_eq_blob_plot(blob, 'iir', test.fs, test.f, 0); - case 'eq-fir' + case {'eq-fir', 'eqfir'} blob = fullfile(prm.blobpath, prm.firblob); h = sof_eq_blob_plot(blob, 'fir', test.fs, test.f, 0); otherwise