Commit Graph

3879 Commits

Author SHA1 Message Date
Dragos Tarcatu d98a7ed103 checkpatch: check ABI updates before warning on it
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>
2019-11-05 14:49:22 +01:00
Tomasz Lauda 0b7fd030b3 demux: return config on COMP_CMD_GET_DATA
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>
2019-11-04 17:01:05 +00:00
Paul Olaru 5c7a49af38 sof: build: Disallow void pointer arithmetic
Add compiler flags so that void pointer arithmetic is not allowed.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-11-04 15:26:20 +01:00
Janusz Jankowski e044194844 checkpatch: disable short fixed size types for SOF
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>
2019-11-04 14:41:27 +01:00
Janusz Jankowski d88ac84e54 checkpatch: restore MAINTAINER file check
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>
2019-11-04 14:41:27 +01:00
Janusz Jankowski 386abbe8bc checkpatch: add SOF constant
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>
2019-11-04 14:41:27 +01:00
Paul Olaru 8e16ced80c platform: imx: Fix NUM_CLOCKS being too small
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>
2019-11-04 14:12:20 +01:00
Pan Xiuli d310beb9bb scripts: qemu: change ipc shm file name for cavs platform
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>
2019-11-04 10:07:57 +01:00
Keyon Jie 92307c0665 tplg: pipe-kfbm-capture: increase the buffer max and period max
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>
2019-11-04 10:07:24 +01:00
Janusz Jankowski 62012c49a4 checkpatch: update to match kernel 5.4-rc4
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>
2019-11-04 10:06:55 +01:00
Paul Olaru e5fe2ca270 sof: components: dai: Only get the handshake for DAIs which require it
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-11-02 11:34:35 +02:00
Paul Olaru 18e7c88b1e drivers: imx: sai: Select correct EDMA channel number
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>
2019-11-02 11:34:35 +02:00
Dragos Tarcatu 3cbc289c0c tools: README: Drop bash syntax for usage snippets
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
2019-11-01 10:20:13 +01:00
Dragos Tarcatu 59c95e8801 tools: README: Update sof-logger description
Add the usage descriptions for the sof-logger -u, -r and -s options.

Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
2019-11-01 10:20:13 +01:00
Dragos Tarcatu 7334d63fd4 tools: logger: (cosmetic) Improve usage text
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>
2019-11-01 10:20:13 +01:00
Karol Trzcinski ccff986795 trace: Add pipeline id to src traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 70b85f5ec4 trace: Add pipeline id to selector traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski f6304f5154 trace: Add pipeline id to tone traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski a9c3c9a489 trace: Build switch traces macro
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>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 21d3ece9ac trace: Add pipeline id to kpb traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 5300ab42f2 trace: Add pipeline id to component traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 3df1d5b978 trace: Add pipeline id to keyword traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski fea2b7e491 trace: Reformat trace_dai macro
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>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 92d63e2bb3 trace: Add missed pipeline id to dai traces
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski bf7f74f289 trace: Add pipeline id to mux traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski ac5d174025 trace: Add pipeline id to eq_iir traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 643b9ade00 trace: Add pipeline id to eq_fir traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski cdfa9d78ad trace: Add pipeline id to mixer traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 7de934a7e7 trace: Add pipeline id to volume traces
It will be helpful during debugging components
to see correlated pipeline id.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-01 10:16:17 +01:00
Karol Trzcinski a213fb94a1 trace: Resolve unused variable warning
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>
2019-11-01 10:16:17 +01:00
Karol Trzcinski 7a60f7cd91 trace: Create trace macros _comp family
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>
2019-11-01 10:16:17 +01:00
Bartosz Kokoszko 010f60184c dma: remove spinlock_init() in dw_dma_probe()
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>
2019-11-01 10:04:04 +01:00
Tomasz Lauda fe321d65f8 host: dai: handle dma buffer in cache functions
Adds missing writebacks and invalidations of DMA buffer in
host and dai components.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-31 18:34:32 +01:00
Tomasz Lauda e6e886a942 kmod_scripts: add support for snd_soc_rt1011
Adds support for inserting and removing snd_soc_rt1011 codec
in kmod_scripts.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-31 11:54:51 +01:00
Tomasz Lauda dd3575ab48 topology: sof-glk-da7219: add volume to DMIC pipeline
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-31 11:54:30 +01:00
Tomasz Lauda 19b23cc505 topology: sof-tgl-rt711-rt1308: add volume to DMIC pipelines
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-31 09:16:55 +01:00
Paul Olaru e2e3ed3fd8 sof: spinlock: Fix trace_lock_value macro
_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>
2019-10-31 09:06:31 +01:00
Paul Olaru f3163c958a sof: spinlock: Fix several compile errors related to spinlock debug
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>
2019-10-31 09:06:31 +01:00
Bartosz Kokoszko 20ce9661da volume: add schedule_task_free() in volume_free()
Adds schedule_task_free() in volume_free() in order
to avoid memory leaks.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-10-31 08:59:49 +01:00
Bartosz Kokoszko 2e9c5c5636 kpb: kpb task initialization displacement
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>
2019-10-31 08:59:49 +01:00
Bartosz Kokoszko 782a962218 dmic: dmic task initialization displacement
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>
2019-10-31 08:56:41 +01:00
Pan Xiuli 59c9338337 CI: travis: add JSL build check
Enable JSL build check in travis.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-10-30 17:46:11 +01:00
Pan Xiuli 074ea8b93d scripts: add build for JSL
Add build scripts for JSL with gcc and xcc support.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-10-30 17:46:11 +01:00
Pan Xiuli 60ca19ff22 build: Fix firmware name for Jasperlake build
JSL FW should use sof-jsl.ri instead of sof-icl.ri.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-10-30 17:46:11 +01:00
Pan Xiuli e8b67b5bc5 rimage: add support for jsl
JSL should have almost same config as ICL, but they should
have different fw name.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-10-30 17:46:11 +01:00
Karol Trzcinski 3600cf0eea ipc: Break ipc_comp_dai_config after first error
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>
2019-10-30 14:25:03 +01:00
Paul Olaru fb21866c0d sof: debug: Do not have empty debug macros when debug is disabled
This allows using them in if() expressions similarly to the previous
commit without any breakage.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-10-30 11:02:07 +01:00
Paul Olaru 47eece02b1 sof: trace: Do not have empty trace macros when traces are off
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>
2019-10-30 11:02:07 +01:00
Paul Olaru 30528e3e48 assert: Do not call assert() with side effects in the argument
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>
2019-10-30 10:53:37 +01:00
Bard Liao 2ca6a4afbb Topology: sof-icl-rt711-rt1308-rt715: modify PCM name
To be more readable.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2019-10-29 14:55:52 +01:00