Skip to content

tools: test: audio: Add module specific initialize to Octave scripts#10923

Open
singalsu wants to merge 2 commits into
thesofproject:mainfrom
singalsu:process_test_module_init
Open

tools: test: audio: Add module specific initialize to Octave scripts#10923
singalsu wants to merge 2 commits into
thesofproject:mainfrom
singalsu:process_test_module_init

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

No description provided.

singalsu added 2 commits June 16, 2026 14:30
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 <seppo.ingalsuo@linux.intel.com>
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>
@singalsu singalsu marked this pull request as ready for review June 30, 2026 12:24
Copilot AI review requested due to automatic review settings June 30, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Octave-based audio component tests to generate per-run “control script” files (passed to sof-testbench4 via -s) to initialize module-specific ALSA controls, instead of relying on a shared static script.

Changes:

  • Generate a temporary amixer control script via mkstemp() and pass it to the testbench with -s for TDFB tests.
  • Update tdfb_direction_test.m to use the new TDFB tune path and include -s alongside -d 4.
  • Add module-specific initialization in process_test.m for phase_vocoder and tdfb components using -s scripts.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
tools/test/audio/tdfb_test.m Creates a per-run temporary control script and passes it via test.extra_opts (-s).
tools/test/audio/tdfb_direction_test.m Updates tune paths and adds a per-run control script (-d 4 -s ...) for direction tracing tests.
tools/test/audio/process_test.m Adds component-specific initialization scripts for phase_vocoder and tdfb via -s.

Comment on lines +80 to +81
[fh, name, msg] = mkstemp('/tmp/tdfb_enable.sh.XXXXXX');
test.extra_opts = sprintf('-s %s', name);
Comment on lines +80 to +85
[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);
Comment on lines +83 to +85
[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");
Comment on lines +83 to +88
[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);
Comment on lines +432 to +437
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);
Comment on lines +433 to +444
[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);
Comment on lines +438 to +444
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants