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>
Introduce constant that enables SOF-specific behaviour of checkpatch.
Changes made to original checkpatch should be easily visible
to make merging updates easier.
If code that is not applicable to SOF is just removed, then
while updating it's hard to distinguish if it is new feature
in checkpatch or was removed for SOF. It's better to just disable
parts of code that do not work for SOF.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Since SOF requires CLK_SSP to be defined and the SSP clock should be
separate from the actual CPU clock increasing the array size to 2 should
fix it.
This is a hack because i.MX doesn't actually have a SSP clock but SOF
unconditionally uses CLK_SSP macro.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
The cavs platform IPC shm file name in QEMU is changed
from ipc-io to ipc-dsp-io.
Use regular expression to find the right SHM IPC register file,
so that we can smoothly pass the transition of the QEMU update.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
We need large host buffer for keyword detection to make sure there will
be no overwritten during the history buffer draining, increase the buffer
min/max and period max to fit it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Merge kernel's checkpatch with custom features added for SOF.
SOF follows kernel code style, so checkpatch should be also up-to-date.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
The SAI doesn't use channel 0, but channels 14 and 15. The handshake
contains the correct channel number.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Improve the sof-logger usage description text a little bit.
Specifically the -s argument is pretty confusing right now as
it says nothing about having an additional argument for the state
name.
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Old switch macro traces didn't have VA_ARG arguments.
It will be helpful during debugging components
to see correlated pipeline id after using with_ids macros.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Trace verbose and trace error macros positions
is swapped to be more consistent with rest of files
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
During compilation as library there was unused id_0
and id_1 in _log_message preprocessor function.
Solved by casting parameters to void type.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It makes trace macros in component space much shorter
and simpler so trace module will be more reliable.
Thanks to usage one preprocessor macro in each type of
_comp traces, code is more flexible and consistent.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Remove spinlock_init() in dw_dma_probe() function
in order to avoid memory leaks. spinlock_init() is
invoked in dmac_init() platform/*/lib/dma.c
files.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
_trace_error_atomic doesn't exist, so this commit replaces it with
what was probably intended in the first place.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
src/include/sof/schedule/ll_schedule_domain.h: In function 'domain_init':
src/include/sof/spinlock.h:87:9: error: 'domain->lock' is a pointer; did you mean to use '->'?
(lock)->user = __LINE__; \
^~
src/include/sof/schedule/ll_schedule_domain.h:71:2: note: in expansion of macro 'spinlock_init'
spinlock_init(&domain->lock);
^~~~~~~~~~~~~
Plus specific errors related to the platform, like:
src/platform/imx8/lib/dma.c: In function 'edma_init':
src/include/sof/spinlock.h:87:9: error: 'dma[i].lock' is a pointer; did you mean to use '->'?
(lock)->user = __LINE__; \
^~
src/platform/imx8/lib/dma.c:54:3: note: in expansion of macro 'spinlock_init'
spinlock_init(&dma[i].lock);
^~~~~~~~~~~~~
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Moves kpb task initialization from kpb_prepare()
to kpb_new() (kpb_prepare() can be invoked several times
for one kpb instance). Adds schedule_task_free() to
kpb_free() in order to avoid memory leaks.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Moves dmic task initialization from dmic_set_config()
to dmic_probe() in order to avoid memory leaks - in theory
driver could send dmic_set_config() ipc many times without
releasing resources. Also adds schedule_task_free() in
dmic_remove().
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Added break statement after error, as it was before refactoring
this part of code in commit <89ef0af07612c0bcf1a85fec3871d0c31e60087b>
("ipc: Refactor ipc_comp_dai_config function").
While at it, also removed additional parenthesis around trace_ipc_error.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit allows code such as:
if (ret < 0)
trace_error("error: %d", ret);
return ret;
to work properly.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
If the assert semantics are changed to be the more usual ones, on
disabling asserts the calls that I changed would have also removed the
desirable side effects when the assertion itself passed (no memcpy_s
would have occurred, in particular). I have changed the usage of the
assert() macro so that the code becomes immune to such a change.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>