tools: test: audio: Add module specific initialize to Octave scripts#10923
Open
singalsu wants to merge 2 commits into
Open
tools: test: audio: Add module specific initialize to Octave scripts#10923singalsu wants to merge 2 commits into
singalsu wants to merge 2 commits into
Conversation
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>
Contributor
There was a problem hiding this comment.
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
amixercontrol script viamkstemp()and pass it to the testbench with-sfor TDFB tests. - Update
tdfb_direction_test.mto use the new TDFB tune path and include-salongside-d 4. - Add module-specific initialization in
process_test.mforphase_vocoderandtdfbcomponents using-sscripts.
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.