New trace entry parameter is defined: uuid of the source.
Technically, this is an address of uuid entry linked
inside a special section in elf.
Has_ids is removed from the static log entry since eventually
all entries will use uuids and -1 detection is good enough
detection for those who still do not provide ids.
Note: both changes are done in a single patch to avoid two
major dbg-abi version bumps.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Unique identification in form of Guid is much more
scalable for fw parts (components, dais, ...) then
existing ids and trace class ids.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Time unit is crucial to properly use this field so it is convenient
to have it written in comment near field declaration.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
After introducing compiler_attributes.h it is possible to make
this dependence shorter.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
New introduced macro is much shorten, have less parethesiss and
create possibility to easy change __section behavior in future
what is relevant in cross-platform source code.
Using such a macro is preferred way to define target section
in used checkpatch version.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This part of source code is frequently used in IPC packets
definitions, so it shouldn't have any platform dependence.
After change this file may be include from mentioned place
without any doubt about ipc message dependances from used
sof build configuration.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
The change allows to select at a configuration time default clock for
cavs 2.x platforms (Icelake, Jasperlake, Tigerlake) on top of already
enabled support for cavs 1.8. By default the LP clock is set (120 MHz
- platform dependent). In case of workloads that require HP clock
(400 MHz) system integrator shall select the right clock as a part of
FW configuration process.
Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
This commit adds spaces around the operator '/', fixing the checkpatch
error: "spaces preferred around that '/'".
Signed-off-by: Constantin Raducanu <raducanu.costi@gmail.com>
This commit removes the empty line after the open brace,
fixing the checkpatch error: "Blank lines aren't necessary
after an open brace '{'".
Signed-off-by: Constantin Raducanu <raducanu.costi@gmail.com>
This commit removes the unnecessaries spaces after casts, fixing
the checkpatch error: "No space is necessary after a cast".
Signed-off-by: Constantin Raducanu <raducanu.costi@gmail.com>
Add noreturn attribute to decrease number of
false positives when using assert / panic.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Clang cannot compile some xtensa-specific ASM, so it
has to be ignored when running static analysis.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Add support for compiling FW with settings acceptable for clang,
in order to let it perform static analysis on the code.
Clang works mostly on ASTs made out of C code, so there is
no need to build complete signed binary for it.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Separate post-processing steps to not have fw image parts building
mixed with tools processing.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Mixer shouldn't go into COMP_STATE_PREPARE if there is at least
one source in COMP_STATE_PAUSED.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
New IP version introduces Version ID and Parameter registers
and optionally added Timestamp feature.
VERID and PARAM registers are placed at the top of registers
address space and some registers are shifted according to
the following:
Tx/Rx data registers and Tx/Rx FIFO registers keep their
addresses, all other registers are shifted by 8.
SAI Memory map is described in chapter 13.10.4.1.1 I2S Memory map
of the Reference Manual [1].
In order to make as less changes as possible we attach an offset
to each register offset to each changed register definition. The
offset is specified via CONFIG option. We now that this new SAI
version is supported only for i.MX8M.
[1]https://cache.nxp.com/secured/assets/documents/en/reference-manual/IMX8DQXPRM.pdf?__gda__=1583251106_f508ef5d5353cd8fc33150778708874b&fileExt=.pdf
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Introduced solution is more elegant and reliable because of
masking given argument in SET_BITS.
Moreover remove unused masks which usability is taken by SET_BITS
macro with given bits range.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
The two functions in sof/audio/format.h are renamed to more descriptive
get_sample_bytes() and get_frame_bytes() to avoid potentially same
name variables to shadow the inline functions defined in the header.
The shadowing happened in component ASRC. The DAI component and another
header audio_stream.h uses these functions and needed minor edits.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch removes redundant code. The local variables update were
remains of executing the changed if statements as while loop. Since
it is no more done the code can be simplified.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit removes unused output_rate field from
comp_dev struct. If needed, component can retrieve
rate parameter from sink/source buffers.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Overwrite frame_fmt hardware parameters with DAI private frame_fmt
in dai_comp_get_hw_params() function as DAI component is able to
convert stream with different frame_fmt's
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Changes implementation of notifications allocation.
Instead of using common empty list of messages let's
switch to allocating message per source of notification.
This way we won't have problem with memory and lack of
empty messages and also we will be able to optimize memory.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds helper methods for IPC notifications allocation and free.
This way we can allocate only the size we need without preallocating
the maximum size. Free operation automatically handles synchronization.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds improved implementation for sending IPC notifications
to host. New function takes ipc_msg directly and adds
it to message queue if message is not already there.
Also critical notifications will be sent right away
or added to the beginning of the queue if sending fails.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Returns status -EBUSY, when IPC upstream channel is
currently busy and notification cannot be sent.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds additional parameter to control whether upstream IPC
channel is currently free or not. It's helpful in case
for some reason checking IPC bits is not enough.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
In such a solution it is possible to assign BIT(31) to
uint32_t register value without any warning.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit moves fetching mux/demux processing functions from
mux_prepare() to mux_set_values(). It insures us against
situation when we fetch proc_func in mux_prepare() and
after that comes mux_set_values() with new mux config.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Fix cppcheck warning:
[src/drivers/dw/ssi-spi.c:111]: (style) struct member
'spi_reg_list::ctrlr1' is never used.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fix cppcheck warnings
[src/audio/kpb.c:202]: (style) Variable 'temp_ca_size' is assigned a
value that is never used.
[src/audio/kpb.c:742]: (style) Variable 'current_time' is assigned a
value that is never used.
[src/audio/kpb.c:946]: (style) Variable 'local_buffered' is assigned a
value that is never used.
[src/audio/kpb.c:948]: (style) Variable 'drain_interval' is assigned a
value that is never used.
[src/audio/kpb.c:954]: (style) Variable 'period_bytes_limit' is
assigned a value that is never used.
[src/audio/kpb.c:984]: (style) Variable 'local_buffered' is assigned a
value that is never used.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fix cppcheck warning (ret not modified between two returns).
[src/audio/detect_test.c:700] -> [src/audio/detect_test.c:710]:
(warning) Identical condition 'ret', second condition is always false
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Introduce SSTSA_TXEN and SSRSA_RXEN macro to define bit value in
header file instead of usage raw value in source code.
Moreover use SET_BITS to set Rx/Tx slot value.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This enum code, and whats more important, related structures is
unused in whole source code, so it shouldn't be kept.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It's a part of ABI interface, so enum value shouldn't change
for example after removing some old enum code.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This conversion in source code looks quite magic. It should be described
in header file where are registers bits description.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
The sof-logger and potentially other debug API clients perform ABI
compatibility check using the single FW ABI version. The same one is used
by the primary FW client which is the kernel driver. If there is a change
made to the debug API, the main ABI has to be updated to protect integrity
of the debug tools while such a change may not affect the kernel driver
at all.
This patch introduces new debug ABI version to be increased when changing
user space debug interfaces while the the main ABI is not affected.
Recompilation and installation of the new driver every time the tunneled
debug protocol is upgraded may be avoided.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
The previous copy() function frames computation code contained
a mistake that unnecessarily prevented the filter core to access
more than nominal amount of samples from source buffer in pull mode.
It have corrupted occasionally input PCM samples and possibly
could have stalled the algorithm with an impossible processing amount
constraint.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Implement buffer lifecycle callbacks to properly handle extraction
from probe. Implement probe data packet header generation and sending
it along with data from buffer via extraction DMA.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>