Include in footprint only support for selected
data formats. It may make footprint lighter.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It will be helpful in next step -
- selective function compilation by
supported data type
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Compile support only for data types selected in configuration.
It may make footprint smaller.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It will be helpful in next step - conditional code compilation
according to configuration
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Do not include data type test when it is not supported by
some platform or firmware version.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Use introduced configuration option in mux component to make
firmware footprint smaller.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It will be helpful during next step - conditional code
compilation depending on configuration
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It will be used to make footprint smaller by selective
compilation of supported data format in components
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
In order to avoid dead locks in dmic_work I've replaced
spin_lock() with spin_try_lock(). In case when
spin_try_lock() fails we reschedule dmic work.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Adds return to spin_try_lock() in order to retrieve status
from arch_try_lock() function.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Latest GCC does additional checks. This patch fixes the following build
error.
Scanning dependencies of target sof-logger
[ 0%] Building C object logger/CMakeFiles/sof-logger.dir/convert.c.o
/home/lrg/work/sof/sof/tools/logger/convert.c: In function ‘serial_read’:
/home/lrg/work/sof/sof/tools/logger/convert.c:311:2: error: converting a packed ‘struct log_entry_header’ pointer (alignment 1) to a ‘uint32_t’ {aka ‘unsigned int’} pointer (alignment 4) may result in an unaligned pointer value [-Werror=address-of-packed-member]
311 | for (len = 0, n = (uint32_t *)&dma_log; len < sizeof(dma_log); n++) {
| ^~~
In file included from /home/lrg/work/sof/sof/tools/logger/convert.c:15:
/home/lrg/work/sof/sof/tools/../src/include/user/trace.h:94:8: note: defined here
94 | struct log_entry_header {
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [logger/CMakeFiles/sof-logger.dir/build.make:76: logger/CMakeFiles/sof-logger.dir/convert.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: logger/CMakeFiles/sof-logger.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The test determinating the current SAI mode (M/S) was buggy.
As a consequence SAI generated bit clock and FS clock when the codec was
in master mode (which is the default configuration for SAI currently with
SOF). This bug didn't prevent the DAI to function and to have good sound.
Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Use of low power sequencer lowers power consumption, since
DSP may be completely turned off when calling waiti and then
powered on interrupt, booting via restore vector installed in
lpsram.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
We need this in order to match the exact comment from the
similar file in the Linux kernel.
sof_ipc_effect_type was the old name of the component no longer
used now.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
It isn't necessary to do a dai_get this early for the ESAI; the SAI
doesn't even have one.
Calling dai_probe() after dai_get() is pointless since dai_probe() was
already called from a previous dai_get() with CREAT flag (in particular
the one which incremented sref from 0 to 1).
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Use optimization configs that come from Kconfig in CMake
to set appropriate compiler flags.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Add configs for optimization levels.
These configs should be used by build system to properly
tune compiler flags.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
When there are changes made to Kconfig files it's better
to run olddefconfig automatically to prevent undesired behaviour,
like for example depending on added config that has some default value
that is not present because developer didn't run olddefconfig
after pulling changes.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Traces in SOF are used like trace("<func>() info"),
in that case __func__ is not convenient, because it is not literal
and it would be needed to use %s everywhere and change
all current traces.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
i.MX8QXP has one SAI interface. Create a simple topology
without a codec for playback of 2 channels, 16bits samples
at 48Khz.
Host -> Buffer0 -> Volume -> Buffer1 -> SAI1
This is useful for testing various components like Dummy DMA,
EDMA and SAI drivers.
For more information about SAI you can read i.MX8QXP RM at:
https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf
Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
SAI is one of the DAIs found on i.MX8 platforms. Introduce
sai_params used to pass configuration from topology via AP to DSP.
Only MCLK and TDM related params for now.
Because this is a new struct, increment only ABI MINOR version
which makes the SOF FW backward compatible with older kernel
versions.
Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
To repair tracev_mux_with_ids macro.
Because with current macro definition
and enabled CONFIG_TRACEV macro code won't compile.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Power control hw programming should go through the pm_runtime
interface. It provides more granular control over the power
gating of each single dsp core.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
get() operation called for dsp core resource disables
power gating of that core so it is locked in d0 state.
This is a default power state when the core is running.
put() operation enables power gating of the core, so
that the core goes to d3 every time it enters idle
(waiti is called and there is no interrupt to handle).
This handler should be called before the waiti is called
if pm-runtime for the core is enabled (see pm_runtime_enable()).
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
There might be other flows defined in future, that would
need to reprogram hw registers only while preserving
the content of memory windows.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Access to vecbase, excsave2/3/4/5 is required for saving
the dsp core context while internal d0/d3 transitions
initiated by the low power sequencer.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This will prevent from compiler warnings when
local variables are used only in trace log and
trace is disabled.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
UNUSED macro should prevent compiler from throwing warnings
about unused wariables during conditional builds.
Usable for example in trace logs.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It was needed to define empty implementation of error and verbose
macros in two places what is not compliant with DRY methodology.
It is done by moving trace defs around, outside #if CONFIG_TRACE block.
After changes it is defined in only one place.
Also trace_*_comp should be defined once bacause it may be
independent from CONFIG_TRACE values.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Because those functions was hardly used in source code.
Moreover it is better practise to add short trace
description, at least variable name instead of trace
with only variable value.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
cavs specific set d0ix message is read directly from ipc
registers and does not use mailbox located in SRAM which is
the only safe way to send a message to the cAVS DSP when
the DSP is in a lower power state.
The message is translated to SOF_IPC_PM_PWR_GATING message.
Response always use the mailbox since there is no way to write
the *T registers back with the current bi-directional communication
implemented using a single *T register set.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
A new message that may be used by the driver to configure
power gating and clock gating using platform specific method.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
checkpatch is currently checking for changes that need ABI updates
and actual ABI changes in the same loop in process(). So if some
file that needs an ABI change comes first, a WARNING will be issued.
Look for an actual ABI change before starting to crunch the entire
patch line by line.
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Returns current config on COMP_CMD_GET_DATA. It fixes the problem
with wrong demux configuration after suspend. Kernel doesn't cache
initial kcontrol config and overwrites it with configuration returned
from component.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Do not check for u/s* vs u/sint*_t in SOF,
because there is only the longer variant.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
It was previously removed from SOF, but it's better to just disable
it for SOF to make delta with original checkpatch as small as possible.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>