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 multi-microphone beamforming component. It enhances
microphone capture via spatial noise suppression. The component is a
quite generic FIR time domain filter bank and the fixed filter band
needs to be programmed with super directive or other beamformer criteria
filter coefficients. The coefficients are fixed but they can be
re-programmed during run-time.
The component reuses the FIR filter core but has different inputs
selection and outputs mixing features than FIR EQ so it is made a
separate new processing component.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch enables FIR filter core usage independently from FIR
equalizer component. The inline of FIR core is removed to reduce
the code size when FIR is used from several components. Each
component also typically used inline FIR version for each supported
PCM format that increased further the size.
Most of the changes are due to rename and directory move of some FIR
data structures and macros. The code functionality is not changed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
For different connected pipelines, they are usually connected via a
component with >1 source or sink buffers, as most of those components
don't have ability to converse frame format or sample rate, we need add
a params negotiation mechanism between those pipelines.
If all buffers are iterated in the params propagation direction, no
negotiation needed, otherwise we need to iterate all other buffers in
the opposite direction, to make sure all connected buffers have chance
to take part in the negotiation.
The negotiation should happen before we can propagate the params
further, when doing negotiation in a branch/buffer, we should check:
If a branch is active, check if params is matched, return error to
reject the whole .params() requirement if not.
If a branch is inactive, force update the params to its calling buffer,
to make sure all branches are aligned on the format.
We are propagating the params to branched buffer, and the subsequent
component's .params() or .prepare() should be responsible to calibrate
the buffer params if needed. For example, a component who has different
channels buffers should explicitly configure the channels for its
branched buffers (the ones connected to another pipeline).
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add a flag 'walking' to the buffer struct, to indicate if the buffer is
just being traversed while walking through the graph, and don't go back
to the buffer which is already walked.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add a helper buffer_param_match() to check if the configured runtime
buffer frame format/rate/channels are matched to the param ones
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Sequence of VI(Voltage and current) sensing data is changed from
IVIV to VIVI. Swapped VI sequence to supply proper data format
to DSM library.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
This commit disable Maxim smart amp component as default.
This change will remain until DSM library and its license file are merged.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.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>
Currently selector unit tests mock audio_stream by hand, which
adds maintenance overhead in case of changes in audio_stream
implementation, which are under way.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Currently volume unit tests mock buffer components by hand, which
adds maintenance overhead in case of changes in buffer implementation,
which are under way.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Currently buffer is filled by memcpy_s and verified by memcmp, which
would require more UT maintenance during upcoming buffer changes.
With this change, usage of the buffer better reflects real-life usage.
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>
This patch adds the token into header file tokens.h. It is used for
topology parsing for testbench and. The same token has been already
defined in topology m4 macros.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This commit reverts eq fir and iir set/cmd actual implementations
and makes them use generic component data blob functions.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit refines component model functions in order to allow
component reconfiguration during the streaming (implementation
is based on equalizer set and get methods). It implements new
comp_is_new_data_blob_available() to check whether new data
blob is available. User can fetch pointer to data blob by
using comp_get_data_blob() function.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Change name of slave core to secondary core in order to
make terminology in SOF more inclusive.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Change name of slave core to secondary core in order to
make terminology in SOF more inclusive.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Zephyr has it's own memory map for secondary cores. Memory
PM isn't implemented on them yet.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.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>
This commit adds Crossover to the list of SOF components. A crossover
filter can be used to split an input to different frequency bands.
The number of outputs should be set statically in the topology. The user
then uses the control bytes to route the frequency bands to different
outputs. (similar to the demux component).
This commit adds support for the following formats:
- S16_LE
- S24_LE
- S32_LE
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
Use "%pU" for all UUID traces, it will print lower case 'a'-'f'
hexadecimal digits and use little endianness by default.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Updated new UUID for the Maxim DSM component.
New component UUID : 0cd84e80-ebd3-11ea-adc1-0242ac120002
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>