Fix a confusing mistake high-pass -> low_pass and typo. It's
only a user help text change for "help stdlpf".
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes the upper frequency for distortion plus noise
measurement. The min(fs1, fs2) leaves part of upper band unmeasured
and gives a too good looking THD+N performance figure when output
rate is higher than input rate. The proper way is to measure the
(near) full output rate bandwidth.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The test is treated passed if there were no failed cases. The fix in
this patch is to force one failed case if both failed and passed counts
are zeros. Then the upper level test scripts/host-testbench.sh reports
correctly the test fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When series of tests are run, only last result with same component is
saved. Make unique output filename. For now adding bits per sample
at the end of file, all the logs can be saved.
Ideally datetime string would be good. I keep it as FIXME.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
fulltest param to control quick chirp test only or full test
including all quality tests.
As minor clean up, unused parameter in thdnf_mask() and test_run_process()
is removed.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
No functional change. Set common function indentation and add comment
sections for better readability.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
This patch adds the Kconfig option COMP_SRC_IPC4_FULL_MATRIX and
adds handling to src.c. Testbench build was changed to use this
largest matrix.
The coefficients were generated with script src_ipc4_int32.m. The
new sample rates were added to test script src_test.m.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.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 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>
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>
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>
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>
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>
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 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>
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 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>
The src_run.sh is converted into a generic component run script
that is called by new simple component specific scripts asrc_run.sh,
eqfir_run.sh, eqiir_run.sh, src_run.sh, and volume_run.sh.
Note: The testbench does not yet have fully working capture support
so the direction is not exposed yet.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the SRC to run with the updated test topologies
set. The script is also cleaned up a bit.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Chirp test signals confused the test signal begin marker position
seek and caused false test fails. The test stimulus may produce
stronger cross correlation level than the actual marker. Also
the check omitted that the cross correlation max could be negative
so the test was changed into power domain and use first/last
cross correlation peak above threshold as test begin/end position.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Gain of SRC varies by 1 dB due built-in attenuation in the filter
coefficients. It was added to avoid signal overshoots to distort
with some challenging music content. When a converter consists of
two filters in series the attenuation duplicates. While SRC is
missing the gain compensation the test criteria needs to be relaxed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the locations of "make install" libraries default
install locations into shell script to run SRC test cases. The script
also now prints the used LD_LIBRARY path to ease setting up code
debugging.
The segfault of testbench executable is fixed by returning a valid
pointer reference instead of a NULL from test dummy function
arch_schedulers_get(). The rest of testbench version of schedule.c
was also updated to be like the current real version module.
Finally in the testbench.c main the file names string pointers are
initilizated to null as well as the word length parameter to avoid
a segfault if executable is started without command line arguments
to see the usage help text.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds a shell script sof_test_perf.sh that measures
gain, frequency response, and total harmonic distortion plus
noise for a remote device.
Matlab or Octave is needed. The shell script launches by default
Octave to process the signal generation and test results analysis
scripts.
The remote device must be set to be accessible by ssh without
passwords. An external high quality USB sound card is recommended
as analog interface to connect to test device's analog interface.
The configuration file sof_test_perf_config.m must be edited for
the remote device's user account, audio device, audio format, and
capture sound card audio device, and audio format.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The tests created lot of unnecessary fails when testing with S16_LE
format. The test pass criteria for THD+N, DR is relaxed for tests
with 16 bit data.
Since the gain of SRC conversions was lowered to -1 dB the test
case for gain need to be updated. The gain is retrieved from
src_param() function. An exception is added for FS1 == FS2 case
when data is passed through. In that case expected gain is 0 dB.
The frequency response measurement grid does not necessarily cover
the exact upper frequency of pass-band. Therefore the min. upper
passband frequency is scaled by 0.99. This avoids measurement
technique related fails in test.
The chirp spectra test case was updated to use for RMS level criteria
for testing the level of signal. The peak level was less robust and
caused unnecessary test fails.
The option to not open plot windows during test is set. It improves
speed of test and avoids display clutter.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the testbench binary path into current default
install location when built with scripts/host-build-all.sh.
The path to test topologies is updated also.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>