We need clang support for the testbench therefore the following changes
are needed
remove -ftree-vectorizer-verbose since its deprecated in gcc and not
supported in clang
remove =3 from -Wimplicit-fallthrough=3 since 3 is the default level
anyways
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
fread() returns number of readed blocks, 0 when nothing read.
Comparison fread return value with "!ret" is quite misleading -
may suggests that negative value is returrned after fail.
Swapping if content makes flow easier, then first is error check,
and eventyally return statement, next try to reopen file.
It allows to check error condition only in one place, so there
won't be possibility to use different error checks in subsequent
stages (like ferror() and errno).
in_file alignment with trace entry size check has been added,
to warn about corrupted file.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
log format text comes from ldc file (may be invalid),
so error check is needed. Don't treat it as fatal error,
because this error may not impact following logs, when
formatting text is root cause of the issue.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
fread may return 0 when some error occurred or nothig has been reded.
Moreover errno may not be set on Windows plaform, use ferror
instead. See:
https://www.gnu.org/software/gnulib/manual/html_node/fread.html
Fixes: 337afc4f3809: ("logger: add error message when reading sof/etrace instead of sof/trace")
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Add KWD pipelines with vol-kfpm pipe using intel-generic-dmic-kwd template.
- 48K DMIC still uses PCM-4
- Add 16K DMIC KWD on PCM-5
- Correct few minor pipeline numbers in comments
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
The naming should be SMART_REF_CH_NUM and value should be 4 for 4
speakers, correct it.
Fixes: 399b97afe6 ("topology: Modify init params for the Demux Config")
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We can't test KWD on nocodec machines due to the DAPM issues reported
here: https://github.com/thesofproject/linux/issues/1987
Remove KWD pipelines from sof-tgl-nocodec-ci to avoid performing invalid
test on it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This patch modifies the number of reference feedback channels from the
Demux component to the host capture stream in sof-tgl-max98373-rt5682.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This patch creates macros for the channel map of Feedback
and reference streams. Also, modifies the feedback channels and channel map
of the Demux configuration to send voltage and current data to the
smart amplifier component and only voltage data to the host as Feedback
stream.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Changed the tplg file name in kernel driver according to Maintainers
feedback. So, topology file name here needs the corresponding change.
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
For first run, allocated memory pointer has been written twice to
config->filter_config but freed only once - memory leak.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Reported by VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l
and gcc version 9.3.0-10ubuntu2:
tools/logger/convert.c:630:5: error: ignoring return value of ‘freopen’,
declared with attribute warn_unused_result [-Werror=unused-result]
Tested with sof-test/test-case/check-suspend-resume-with-audio.sh
Fixes commit 6a84b4e945 ("sof: logger: reopen trace file upon EOF")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Reported by VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l
and gcc version 9.3.0-10ubuntu2.
out_fd is not initialized on the first "goto err:" and this can result in
trying to close a random file descriptor.
Fixes commit 126060ae63 ("logger: Send parsed runtime log levels to FW
via debugFS")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As reported by gcc 9.3.0-10ubuntu2 and
VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l
‘__builtin___snprintf_chk’ output between 23 and 57 bytes
into a time_fmt destination of size 32
Fixes commit d7b535e282 ("logger: Add option to set timestamp
precision")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
UUID objects are represented by struct sof_uuid_entry instances in SOF.
Instead of casting pointers to them to integers for passing around,
carry them as pointers until they have to be cast to integers for
packing into data structures. This also fixes printing UUID, using a
"%pU" format.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch modifies the number of feedback channels from the
smart amplifier on max98373 codec in sof-tgl-max98373-rt5682.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This patch modifies the feedback channels and channel map
of the smart_amp configuration based on the number of feedback
channels from the codec.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Failing silently is not nice. Now prints instead:
TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
error: in logger_read(), fread(..., /sys/kernel/debug/sof/etrace) \
failed: Invalid argument(22)
Also make logger_read() and the process return [-]errno which can have
different values and some information instead of -ferror() which has
only one value (non-zero in theory, 1 in practice) hence no information.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
To produce the exact same binaries than before this commit:
CMAKE_BUILD_TYPE=' ' ./scripts/build-tools.sh
To observe which CFLAGS are being used:
CMAKE_BUILD_TYPE=Release VERBOSE=1 ./scripts/build-tools.sh
Off topic: the logger fails to build with: -O3 -DNDEBUG -Wall -Werror
(all other tools build fine with these flags)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The if test needs to be done for comp_type. The index does not refer
to comp types but items in lib_table that is not correct. As result
testbench loads crossover for all UUID based components. The load of
beamformer works correctly with this change.
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>
This patch adds the playback (for test only) and capture pipelines
with Time Domain Fixed Beamformer (TDFB) component.
Topologies variants to test capture with beamformer are built for
sof-hda-generic and sof-apl-pcm512x platforms. The beam direction
is +/- 10 degrees as compromise between notebook camera and stereo
capture. The dual beams preserve the stereo characteristic. The
beamformers are added to both 48 kHz and 16 kHz DMIC capture
pipelines.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
These are data files created by the example scripts in
tools/tune/tdfb. The generation is time consuming and requires
Octave or Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds support to define from CMakeLists.txt or a
higher level platform topology file the definition of DMICPROC and
DMIC16KPROC to select desired capture processing algorithms pipeline
from pipe-x-capture.m4 and pipe-x-capture-16khz.m4 macros instead
of hard coded processing eq-iir-volume. It is preparation to add
support for beamformer processing for microphones.
The impacted platforms are sof-hda-generic, sof-cml-rt5682, and
sof-apl-pcm512x. This patch does not change built topologies.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the tool for creating beamformer configurations. The
microphone array geometry and beam angle (azimuth, elevation) need
to be specified. See the example scripts and sample array helper
functions.
The FIR blob quantize function needed a minor change to prevent strip
of trailing zero coefficients. The beamformer filter bank needs to use
equal length filters.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the uuid argument to smart_amp widget, uuid
parameter can be configured by the topology files while
integrating any new component. If not configured, uuid will
be assigned with the UUID of the smart_amp_test component as
default value.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
In case we ever needed to load the entry from ldc file, without params
processing and printing.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Add methods to load process libraries based on uuid. Testbench will
first search the old process enums and if match isn't found the same
search is done with uuid. Hence old process components should get loaded
with enums and new uuid based components should get loaded with uuids if
the uuid definition is declared and added to the library table.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
It may be needed for situation when user have firmware after
small fixes without updated ldc file or fw_ready file is not
accessible. Option dedicated for advanced users.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit adds the tools to generate the control bytes for the
crossover component. To generate the control bytes, run the
example_crossover.m script.
The parameters of the crossover components are:
- number of outputs
- sink assignments (routing crossover output to different pipelines)
- frequency cutoffs
To tweak the parameters modify the values in example_crossover.m and run
it.
Refer to sof/src/include/user/crossover.h for more information on how
the crossover config is structured and how sink assignments are done.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This commit adds the topology files for the crossover component.
The control bytes are generated by the tools in tune/crossover.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
Most functions in logger depend on values stored in conver_config struct
which are passed to almost all function calls. This patch moves pointer
to the config to global context and allows each function to derive
necessary values from there. This reduces needless parameters passed
to function calls and allows for more flexible access to data in nested
functions.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Add development folder for topologies that not for production.
First add sof-tgl-nocodec-ci as a validation topology.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add KPB pipeline into the sof-tgl-nocodec-ci topology.
This topology will be a reference test topology for all features used
on TGL.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add default dai name for dmic dai, we can override them in
if dai name in machine driver is different.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add FW echo reference to nocodec TPLG on SSP0.
Add internal loopback on SSP0. We can compare echo reference and
loopback capture stream.
Add smart amplifier for nocodec on SSP2
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>