Test pipelines with SRC due internal block processing constraints need
this to avoid fail due to insufficient buffer. Other pipelines continue
to use 2 buffer periods.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Building in parallel is much faster but it makes logs unreadable and
build failures impossible to understand. This is especially true when
building with recent ALSA that produces of deprecation warnings, see
examples below. For test topologies the problem is even worse: its
XARGS parallel build provides no log at all.
To find what actually fails, it is required to fall back on a single
threaded and verbose build and this is achieved with the variables
USE_XARGS, NO_PROCESSORS and VERBOSE. Pass these through docker-run.sh
and CMake.
Examples from #5608https://github.com/thesofproject/sof/runs/5717553555?check_suite_focus=truehttps://sof-ci.01.org/sofpr/PR5608/build12556/build/tools.txt
ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',...
ALSA pcm.c:1471:(parse_hw_config) deprecated bclk value 'codec_slave',...
ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',...
ALSA pcm.c:1471:(parse_hw_config) deprecated bclk value 'codec_slave',...
ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',...
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This removes two layers of indirection when trying to find what fails.
The lack of this proved especially painful when working on #5632 and
similar backports.
Also move outputs to a subdirectory by default. No change when invoked
from CMake which does not use the default output directory.
Also show the exact m4 and alsatplg commands run when not using XARGS
parallelization. Again this is critical when something fails.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Remove the extra argument for fprintf(). For some reason there was
no harm seen but this should trigger an error when run in Octave or
Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The test scripts missed test component keyword change from e.g.
eqiir to eq-iir. Due to this the process_test() failed for IIR and
FIR for gain and frequency response due to wrong result expect.
The expected result is retrieved with the blob decode function. It
can be also used manually to check the filters defined in the
blob. The help texts in the decode functions needed fix. Also some
usage examples were added.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This reverts commit f50b6fe0ad.
I discovered the hard way that this change causes alsatplg version
1.2.2 (the default version in the current LTS Ubuntu) to corrupt just
a few bytes in .tplg output in an incredibly discrete and
time-consuming way: no error message at build time and same file size.
See example at https://github.com/thesofproject/sof/pull/5162.
We could/should just require a minimum alsatplg version at the CMake
level but at this moment we don't even know which minimum version is
needed and we would also need to take some time to test a few alsatplg
versions. If version 1.2.2 would just fail with an decent error
message that can be searched and discussed then everything would be
fine but silent corruption is really not OK.
So users of recent versions will unfortunately have to live with the
huge number of warnings for now.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch adds Matlab script tdfb_direction_test.m. The test
simulates acoustical microphone array capture with 360 degrees
rotated noise source. The test topologies build adds an array
identifier to component name in topology file name. That
allows the scripts to simulate with several arrays. Now a
basic 2 mic array (no array suffix, just tdfb), 4 mic line,
and 8 mic circular are tested. Test pass/fail is so far only
visual check from plot.
The existing tdfb_test.c is extended to perform test with the
three test array configurations.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The trace print slows down the test a lot while the testbench
trace output is not needed usually in these audio quality
tests. The test script can set .trace to redirect trace to a file
that is also a lot faster than scrolling the trace in Matlab
or Octave shell.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds test for to-be-deleted trace output file or
simulation output PCM data file. Doing delete only for regular
files allows to use e.g. /dev/null to redirect trace to
be not shown when not needed. Or run test in debugger without
need for output file.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The value for VALGRIND in the run command parameters needs to
be true or false. The value "no" causes an error in comp_run.sh
script run.
Fixes 30012d1454
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The path append of current directory (.) is not correct for
the signal processing package function iirnotch. The issue does
not happen with Octave since it has pei_tseng_notch().
The standard notch function is used in all THD+N tests so this
issue has caused fail of nearly all tests with Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to command line switch -n for output channels count.
Existing -c is for in channels, new -n is for out channels count. Out
channels count is same as input if -n is not present. Switch -q is
added to quiet the trace output if it is not needed.
The Matlab language test scripts for components are updated to use
the -t config.sh interface of comp_run.sh. It allows more flexible
control of input and output streams.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
All .tplg output files have been compared and are strictly identical
after the change.
The deprecation warnings were added more than one year ago in
https://github.com/alsa-project/alsa-lib/commits//706192341d1d0bbb906
Now that we just upgraded our Docker image to ALSA 1.2.6
(https://hub.docker.com/r/thesofproject/sof/tags) so #5153 can enable
topology v2, the volume of warnings has became unbearable. For instance
good luck trying to find the actual error messages for the build
failures of #5155 - they're totally drowned in these deprecation
warnings.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The run with valgrind will error if memory leaks are detected.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The change for topology1 was missing from various tuning
and testing scripts those access binary blob data from
topology m4 directories.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Matlab does not support isfile(), so another command is used to
check if a file exists. The new way works both in Octave and Matlab.
The bf_defaults.m is fixed to properly initialize empty strings
to cell arrays. It's needed with minimal command like usage
as shown in SOF Docs examples.
In bf_design.m the num_filters determination is moved after array
helpers because other than line and circle do not use mic_n parameter.
The bug resulted to zero num_filters.
In bf_merge.m the unused bf3 and bf4 are removed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In preparation for Topology2.0, move the current topology files
to the topology1 folder and once the 1.0 topologies are
built copy them to the /sof/tools/build-tools/topology folder.
When Topology2.0 topologies come along, they will be built into
the topology2 folder and the 2.0 binaries will be copied over
the 1.0 binaries.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To make sure we are using max 1 octave step, we need to use noct+1 to
get noct sections from logspace.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
To support exist function - fullfile() path addition is to prevent Matlab (differently than Octave)
to give false positive with some other directory location with it's search path
Added correction to isempty.
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
This commit adds the topology files for the multiband_drc component.
The control bytes are generated by the tools in tune/multiband_drc.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
The set of figure property in figure() command is not supported
in Matlab. The separate set() property works for both Octave and
Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The common array identifier string is brought up for easier edit to
test other array geometries than this default. A typo about 16 kHz
is fixed, the test runs at 48 kHz testbench default rate.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit adds the topology files for the drc component.
The control bytes are generated by the tools in tune/drc.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
The generation of multiple tone frequencies failed due accidental
square matrix generation when mixed row and column vectors were added.
The new version uses only vectors in first dimension and avoids the
problem.
The license text format also is changed to current.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The added check and print helps the user to generate the array
configuration data and other beam pattern test related binary files
to carry out this test for TDFB (beamformer) component.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Due to the missing semicolons the variable config_fn got printed
to screen unnecessarily.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The script to load back to Matlab or Octave the test input data
was missing from previous patch that introduced TDFB (beamformer)
component.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The log() function returns -Inf for level measure for stream of
digital zeros. It is correct but requires extra handling in the
upper level functions to avoid unnecessary tests fails. Adding of
offset 1e-20 results to -196.99 dBFS be the smallest possible
reported value. The function remains sufficient for all audio
measurements with 16 - 32 bit formats.
The license text is also updated to current version.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The script adds tdfb_test.m to check the TDFB beam pattern
versus theoretical. It also measures the noise suppression
capability of the test beamformer in simulated diffuse and
random noise field.
As simple quick test this patch adds TDFB to cell array of
accepted components for process test.
Note: There tests can't be used until load of UUID based non-legacy
components is added to testbench. The scripts were used with earlier
legacy mode version of the component.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The patch adds the playback and capture test pipelines. The
configuration is set to `tdfb_coef_line2_50mm_pm90deg_16khz.m4'.
A mistake in PIPELINE_FILTERx macro defining is fixed for IIR and
FIR. The pipeline macros expect it to contain an include file or
no macro defined at all. Defining it for empty string caused fail
in topologies build when PIPELINE_FILTER1 is used for TDFB.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Support up to 4 output pipelines for test/topology/test-playback.m4, where
argument TEST_PIPE_AMOUNT is added for identifying the number of pipelines
while generating test topologies.
Multi-output component should be added in ALG_MULTI_MODE_TESTS and
ALG_MULTI_SIMPLE_TESTS to generate test topologies with multiple output
pipelines in the future.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Zero functional change and 100% identical outputs.
Also add some comments.
Interestingly, -P$(nproc) is a tiny bit faster than -P0 on my
system. Thrashing?
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Let's stop ignoring build and test failures. Start gradually with the
scripts involved in testbench, more files later.
Follow-up to to bug #2752 "host-testbench.sh ignores errors" and commit
ab421466af ("CI: Travis: enable host testbnech again") and
ab421466aff826~1
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The main change in this patch is to allow process_test to use
frequency dependent masks for frequency response and THD+N. It
allows tests with pass/fail criteria for components like EQs
and DCblock. SRC test not really changed but the small changes
in passing test controls are updated there as well.
In EQs tests the process test can decode the theoretical response
from setup blob. The measured frequency response is compared to
that.
The test print and plot output look is improved for nicer reports.
The runtime plots opening is disabled for batch mode operation
but the plots now appear to test output directory in png format.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The criteria of overall -3 dB RMS attenuation was too tight
for sample EQ responses to pass. With new -6 dB criteria the
used EQ loudness responses do not trigger error.
The chirp test is only a quick generic component health check so this
is not critical. The other AES17 tests will catch minor characteristic
changes.
The other changes are cosmetic and improve result print and plot
output look.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The function getpid() is only available in Octave. Instead use
a random integer number as identification to avoid conflict with
possible several simultaneous simulations with temporary files.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch changes the response for both EQ types into loudness
shape (bass boost, mid attenuate, high boost) that is a useful
in validating EQs functionality. The previous flat response does
not exercise thoroughly the processing functions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds an Octave test script process_test.m to audio processing
components like FIR and IIR EQ.
Parts of src_test.m are moved to common functions to ease printing of
test results matrix.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
With this commit:
./scripts/build-tools.sh -t -f | wc -l
525
VERBOSE=anything ./scripts/build-tools.sh -t -f | wc -l
137030
This a followup to commit aa6c0f2ad1 ("topology: cmake: silence super
chatty alsatplg unless VERBOSE=1")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Enable 3 simple test with host-testbench:
volume, src and eqiir
Usage:
./scripts/build-tools.sh -t
./scripts/host-build-all.sh
./scripts/host-testbench.sh
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit includes a new test case in tplg-build.sh. It also includes
the new simple pipelines pipe-dcblock-capture/playback. Those new
pipelines are used by tplg-build.sh to generate the test pipelines.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This patch adds the double quotes to shell scripts to avoid fails
with arguments or shell variables when there are space characters.
The processing components run scripts are all edited for better
structure with functions usage() and main() and with local variables
within functions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>