From 926cbfb67175b24dac617cd7c8b90bdd90d8a2b3 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 16 Jun 2026 14:14:27 +0300 Subject: [PATCH 1/2] tools: test: audio: Add module specific initialize to process_test.m The modules phase_vocoder and tdfb are by default algorithms switched off for passthrough. To measure with process_test() the the true characteristic the controls need to be set to enable the processing. Signed-off-by: Seppo Ingalsuo --- tools/test/audio/process_test.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/test/audio/process_test.m b/tools/test/audio/process_test.m index 1af293b1967a..fba89aa57ec0 100644 --- a/tools/test/audio/process_test.m +++ b/tools/test/audio/process_test.m @@ -427,6 +427,22 @@ % No need to collect trace test.trace = [tempname('/tmp') '.txt']; + + switch t.comp + case 'phase_vocoder' + [fh, name, msg] = mkstemp('/tmp/phase_vocoder_enable.sh.XXXXXX'); + test.extra_opts = sprintf('-s %s', name); + fprintf(fh, "amixer -c0 cset name='Analog Playback Phase Vocoder speed' 1.0\n"); + fprintf(fh, "amixer -c0 cset name='Analog Playback Phase Vocoder enable' on\n"); + fclose(fh); + case 'tdfb' + [fh, name, msg] = mkstemp('/tmp/tdfb_enable.sh.XXXXXX'); + test.extra_opts = sprintf('-s %s', name); + fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB track' off\n"); + fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB angle set' 90\n"); + fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB beam' on\n"); + fclose(fh); + end end function test = test_run_process(test) From 59862fc6389555606db957667fe2ba39c5fbfdde Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 16 Jun 2026 14:49:37 +0300 Subject: [PATCH 2/2] 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 --- tools/test/audio/tdfb_direction_test.m | 15 ++++++++++----- tools/test/audio/tdfb_test.m | 7 ++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/test/audio/tdfb_direction_test.m b/tools/test/audio/tdfb_direction_test.m index 9152ee28c53f..03ce6f082f94 100644 --- a/tools/test/audio/tdfb_direction_test.m +++ b/tools/test/audio/tdfb_direction_test.m @@ -15,17 +15,17 @@ function tdfb_direction_test() % General settings cfg.delete_files = 1; cfg.do_plots = 1; -cfg.tunepath = '../../tune/tdfb/data'; +cfg.tunepath = '../../../src/audio/tdfb/tune/data'; % Arrays to test. Since the two beams configurations are merge of two designs (pm90deg) % need to specify a compatible data file identifier for a single beam design (az0el0deg) -array_data_list = {'line2_50mm_az0el0deg_48khz', 'line4_28mm_az0el0deg_48khz', 'circular8_100mm_az0el0deg_48khz'}; -tdfb_name_list = {'', 'line4_28mm_pm90deg_48khz', 'circular8_100mm_pm30deg_48khz'}; +array_data_list = {'line2_50mm_az0el0deg_48khz'}; +tdfb_name_list = {''}; %% Prepare addpath('std_utils'); addpath('test_utils'); -addpath('../../tune/tdfb'); +addpath('../../../src/audio/tdfb/tune'); for i = 1:length(array_data_list) @@ -80,7 +80,12 @@ function tdfb_direction_test() test.nch_out = bf.num_output_channels; test.ch_in = 1:test.nch_in; test.ch_out = 1:test.nch_out; -test.extra_opts='-d 4'; +[fh, name, msg] = mkstemp('/tmp/tdfb_enable.sh.XXXXXX'); +test.extra_opts = sprintf('-d 4 -s %s', name); +fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB track' on\n"); +fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB angle set' 90\n"); +fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB beam' on\n"); +fclose(fh); test.trace = 'tdfb_direction.txt'; if length(arrayid) test.comp = sprintf('tdfb_%s', arrayid); diff --git a/tools/test/audio/tdfb_test.m b/tools/test/audio/tdfb_test.m index 0c75c3cf1053..f7a1bde77290 100644 --- a/tools/test/audio/tdfb_test.m +++ b/tools/test/audio/tdfb_test.m @@ -77,7 +77,12 @@ function tdfb_test(xtrun) test.nch_out = bf.num_output_channels; test.ch_in = 1:test.nch_in; test.ch_out = 1:test.nch_out; -test.extra_opts='-s tdfb_enable.sh'; +[fh, name, msg] = mkstemp('/tmp/tdfb_enable.sh.XXXXXX'); +test.extra_opts = sprintf('-s %s', name); +fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB track' off\n"); +fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB angle set' 90\n"); +fprintf(fh, "amixer -c0 cset name='Analog Playback TDFB beam' on\n"); +fclose(fh); if length(arrayid) test.comp = sprintf('tdfb_%s', arrayid); end