Skip to content

Commit 59862fc

Browse files
committed
tools: test: audio: Fix tdfb module specific tests
The init script tdfb_enable.sh was missing from upstream, so the script tdfb_test.m was not working. With this change, the enable script is created on the fly. The tdfb_direct_test.m had the same issue with a missing script from upstream. Additionally, the tdfb setup tool directory path is fixed as well as the tdfb tune data directory. The line4 and circular8 array tests are removed since they are not built by default. The production configuration line2 test is kept. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 926cbfb commit 59862fc

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

tools/test/audio/tdfb_direction_test.m

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ function tdfb_direction_test()
1515
% General settings
1616
cfg.delete_files = 1;
1717
cfg.do_plots = 1;
18-
cfg.tunepath = '../../tune/tdfb/data';
18+
cfg.tunepath = '../../../src/audio/tdfb/tune/data';
1919

2020
% Arrays to test. Since the two beams configurations are merge of two designs (pm90deg)
2121
% need to specify a compatible data file identifier for a single beam design (az0el0deg)
22-
array_data_list = {'line2_50mm_az0el0deg_48khz', 'line4_28mm_az0el0deg_48khz', 'circular8_100mm_az0el0deg_48khz'};
23-
tdfb_name_list = {'', 'line4_28mm_pm90deg_48khz', 'circular8_100mm_pm30deg_48khz'};
22+
array_data_list = {'line2_50mm_az0el0deg_48khz'};
23+
tdfb_name_list = {''};
2424

2525
%% Prepare
2626
addpath('std_utils');
2727
addpath('test_utils');
28-
addpath('../../tune/tdfb');
28+
addpath('../../../src/audio/tdfb/tune');
2929

3030
for i = 1:length(array_data_list)
3131

@@ -80,7 +80,12 @@ function tdfb_direction_test()
8080
test.nch_out = bf.num_output_channels;
8181
test.ch_in = 1:test.nch_in;
8282
test.ch_out = 1:test.nch_out;
83-
test.extra_opts='-d 4';
83+
[fh, name, msg] = mkstemp('/tmp/tdfb_enable.sh.XXXXXX');
84+
test.extra_opts = sprintf('-d 4 -s %s', name);
85+
fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB track' on\n");
86+
fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB angle set' 90\n");
87+
fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB beam' on\n");
88+
fclose(fh);
8489
test.trace = 'tdfb_direction.txt';
8590
if length(arrayid)
8691
test.comp = sprintf('tdfb_%s', arrayid);

tools/test/audio/tdfb_test.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ function tdfb_test(xtrun)
7777
test.nch_out = bf.num_output_channels;
7878
test.ch_in = 1:test.nch_in;
7979
test.ch_out = 1:test.nch_out;
80-
test.extra_opts='-s tdfb_enable.sh';
80+
[fh, name, msg] = mkstemp('/tmp/tdfb_enable.sh.XXXXXX');
81+
test.extra_opts = sprintf('-s %s', name);
82+
fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB track' off\n");
83+
fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB angle set' 90\n");
84+
fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB beam' on\n");
85+
fclose(fh);
8186
if length(arrayid)
8287
test.comp = sprintf('tdfb_%s', arrayid);
8388
end

0 commit comments

Comments
 (0)