-
Notifications
You must be signed in to change notification settings - Fork 364
tools: test: audio: Add module specific initialize to Octave scripts #10923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -427,12 +427,39 @@ | |
|
|
||
| % 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'); | ||
| if (fh < 0) | ||
| error("mkstemp() failed: %s", msg); | ||
| end | ||
| test.extra_opts = sprintf('-s %s', name); | ||
| test.extra_opts_file = 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'); | ||
| if (fh < 0) | ||
| error("mkstemp() failed: %s", msg); | ||
| end | ||
| test.extra_opts = sprintf('-s %s', name); | ||
| test.extra_opts_file = 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) | ||
| delete_check(1, test.fn_out); | ||
| test = test_run(test); | ||
| delete_check(1, test.trace); | ||
| if isfield(test, 'extra_opts_file') && ~isempty(test.extra_opts_file) | ||
| delete_check(1, test.extra_opts_file); | ||
| end | ||
|
Comment on lines
456
to
+462
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file is useful for debugging the issue. Better to keep it. |
||
| end | ||
|
|
||
| function test_result_print(t, testverbose, testacronym, test) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 = {''}; | ||
|
Comment on lines
+22
to
+23
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently we can't support the needed topologies in ipc4 testbench. Maybe add later the four microphones tests when we have the needed topologies. |
||
|
|
||
| %% 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,16 @@ 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'); | ||
| if (fh < 0) | ||
| error("mkstemp() failed: %s", msg); | ||
| end | ||
| test.extra_opts = sprintf('-d 4 -s %s', name); | ||
| test.extra_opts_file = 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); | ||
|
singalsu marked this conversation as resolved.
|
||
| test.trace = 'tdfb_direction.txt'; | ||
| if length(arrayid) | ||
| test.comp = sprintf('tdfb_%s', arrayid); | ||
|
|
@@ -92,6 +101,9 @@ function tdfb_direction_test() | |
|
|
||
| delete_check(1, test.fn_out); | ||
| test = test_run(test); | ||
| if isfield(test, 'extra_opts_file') && ~isempty(test.extra_opts_file) | ||
| delete_check(1, test.extra_opts_file); | ||
| end | ||
|
Comment on lines
102
to
+106
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The controls file is useful for debugging the issue, better to keep it. |
||
|
|
||
| end | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.