Skip to content

Commit

Permalink
Tools: Test: Audio: Fix IIR and FIR tests handling in process_test.m
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
singalsu committed Nov 27, 2024
1 parent 5249d28 commit 7d862c0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/test/audio/process_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7d862c0

Please sign in to comment.