Skip to content

Commit beda43c

Browse files
singalsulgirdwood
authored andcommitted
Tools: Test: Audio: Add to src_test.m option for xt-run
This patch adds to src_test.m as optional 8th argument possibility to launch SRC component tests with xt-run for xtensa binaries. With this option it's easy to check objective audio quality parameters for Xtensa implementation of SRC and ASRC components. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 0401893 commit beda43c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tools/test/audio/src_test.m

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
function [n_fail, n_pass, n_na] = src_test(bits_in, bits_out, fs_in_list, fs_out_list, full_test, show_plots, comp)
1+
function [n_fail, n_pass, n_na] = src_test(bits_in, bits_out, fs_in_list, fs_out_list, full_test, show_plots, comp, xtrun)
22

33
%%
44
% src_test - test with SRC test bench objective audio quality parameters
55
%
6-
% src_test(bits_in, bits_out, fs_in, fs_out)
6+
% src_test(bits_in, bits_out, fs_in, fs_out, full_test, show_plots, comp, xtrun)
77
%
88
% bits_in - input word length
99
% bits_out - output word length
@@ -12,13 +12,17 @@
1212
% full_test - set to 0 for chirp only, 1 for all, default 1
1313
% show_plots - set to 1 to see plots, default 0
1414
% comp - set to 'src' or 'asrc', default 'src'
15+
% xtrun - set to 'xt-run' or 'xt-run --turbo' to test with xt-testbench
16+
%
17+
% E.g.
18+
% src_test(32, 32, 44100, 48000, 1, 1, 'src', 'xt-run --turbo');
1519
%
1620
% A default in-out matrix with 32 bits data is tested if the
1721
% parameters are omitted.
1822
%
1923

2024
% SPDX-License-Identifier: BSD-3-Clause
21-
% Copyright(c) 2016 Intel Corporation. All rights reserved.
25+
% Copyright(c) 2016-2025 Intel Corporation.
2226
% Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2327

2428
addpath('std_utils');
@@ -51,14 +55,16 @@
5155
if nargin < 7
5256
comp = 'src';
5357
end
58+
if nargin < 8
59+
xtrun = '';
60+
end
5461
if isempty(fs_in_list)
5562
fs_in_list = default_in;
5663
end
5764
if isempty(fs_out_list)
5865
fs_out_list = default_out;
5966
end
6067

61-
6268
%% Generic test pass/fail criteria
6369
% Note that AAP and AIP are relaxed a bit from THD+N due to inclusion
6470
% of point Fs/2 to test. The stopband of kaiser FIR is not equiripple
@@ -80,6 +86,7 @@
8086
t.bits_out = bits_out; % Output word length
8187
t.full_test = full_test; % 0 is quick check only, 1 is full set
8288
t.comp = comp; % Component to test
89+
t.xtrun = xtrun;
8390

8491
%% Show graphics or not. With visible plot windows Octave may freeze if too
8592
% many windows are kept open. As workaround setting close windows to
@@ -450,6 +457,7 @@
450457
test.fs = t.fs1;
451458
test.fs1 = t.fs1;
452459
test.fs2 = t.fs2;
460+
test.xtrun = t.xtrun;
453461
test.coef_bits = 24; % No need to use actual word length in test
454462
test.att_rec_db = 0; % Not used in simulation test
455463
test.quick = 0; % Test speed is no issue in simulation

0 commit comments

Comments
 (0)