|
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) |
2 | 2 |
|
3 | 3 | %% |
4 | 4 | % src_test - test with SRC test bench objective audio quality parameters |
5 | 5 | % |
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) |
7 | 7 | % |
8 | 8 | % bits_in - input word length |
9 | 9 | % bits_out - output word length |
|
12 | 12 | % full_test - set to 0 for chirp only, 1 for all, default 1 |
13 | 13 | % show_plots - set to 1 to see plots, default 0 |
14 | 14 | % 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'); |
15 | 19 | % |
16 | 20 | % A default in-out matrix with 32 bits data is tested if the |
17 | 21 | % parameters are omitted. |
18 | 22 | % |
19 | 23 |
|
20 | 24 | % SPDX-License-Identifier: BSD-3-Clause |
21 | | -% Copyright(c) 2016 Intel Corporation. All rights reserved. |
| 25 | +% Copyright(c) 2016-2025 Intel Corporation. |
22 | 26 | % Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> |
23 | 27 |
|
24 | 28 | addpath('std_utils'); |
|
51 | 55 | if nargin < 7 |
52 | 56 | comp = 'src'; |
53 | 57 | end |
| 58 | +if nargin < 8 |
| 59 | + xtrun = ''; |
| 60 | +end |
54 | 61 | if isempty(fs_in_list) |
55 | 62 | fs_in_list = default_in; |
56 | 63 | end |
57 | 64 | if isempty(fs_out_list) |
58 | 65 | fs_out_list = default_out; |
59 | 66 | end |
60 | 67 |
|
61 | | - |
62 | 68 | %% Generic test pass/fail criteria |
63 | 69 | % Note that AAP and AIP are relaxed a bit from THD+N due to inclusion |
64 | 70 | % of point Fs/2 to test. The stopband of kaiser FIR is not equiripple |
|
80 | 86 | t.bits_out = bits_out; % Output word length |
81 | 87 | t.full_test = full_test; % 0 is quick check only, 1 is full set |
82 | 88 | t.comp = comp; % Component to test |
| 89 | +t.xtrun = xtrun; |
83 | 90 |
|
84 | 91 | %% Show graphics or not. With visible plot windows Octave may freeze if too |
85 | 92 | % many windows are kept open. As workaround setting close windows to |
|
450 | 457 | test.fs = t.fs1; |
451 | 458 | test.fs1 = t.fs1; |
452 | 459 | test.fs2 = t.fs2; |
| 460 | +test.xtrun = t.xtrun; |
453 | 461 | test.coef_bits = 24; % No need to use actual word length in test |
454 | 462 | test.att_rec_db = 0; % Not used in simulation test |
455 | 463 | test.quick = 0; % Test speed is no issue in simulation |
|
0 commit comments