Commit Graph

4398 Commits

Author SHA1 Message Date
Tomasz Lauda 85e69f8009 dai: pass sof context to dai_init
Changes dai_init function's argument list to take
sof context. It will be needed to add dai list pointer
into sof context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 019f02e023 dai: move dai_init to common header
Moves dai_init function from platform to common header.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 3231717232 notifier: add notify_data to sof context
Adds notify_data to sof main context. Also implements
getter to easily retrieve the pointer through one point
of access.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 1af651ac5a notifier: pass sof context to init_system_notify
Passes sof context pointer to init_system_notify.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 72150acfd5 init: pass sof context to slave_core_init
Passes sof context pointer to slave_core_init.
This will allow to pass context even further.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 82ea5c1bf1 notifier: move notify_data definition to header
Moves notify_data struct definition to notifier header.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda af79cf4656 pm_runtime: add pm runtime data to sof context
Adds pm runtime data to sof main context. Also implements
getter to easily retrieve the data through one point of access.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 41a5e795a7 pm_runtime: pass sof context to pm_runtime_init
Changes pm_runtime_init function's argument list to take
sof context. It will be needed to add pm runtime data pointer
into sof context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 1065e12a63 memory: add memory map to sof context
Adds memory map to sof main context. Also implements
getter to easily retrieve it through one point of access.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 3f53d59e7b memory: pass sof context to platform_init_memmap
Changes platform_init_memmap function's argument list to take
sof context. It will be needed to add memory map pointer into
sof context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda b332bee751 agent: use pointer from sof context
Directly uses agent structure pointer from sof context
instead of global variable.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda a1a8940d4a ipc: remove dma_trace_data pointer
Removes dma_trace_data pointer from ipc structure.
We shall now use new static getter for DMA traces.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda dda0d0be59 imx: add missing headers
Adds missing headers in drivers and platform code.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 224b04b250 dma-trace: use pointer from sof context
Uses dma_trace_data pointer from sof context instead
of using the static one. In order to do this we need
additional getter.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 5e9b702a6b ll_schedule_domain: add domains to sof context
Adds both timer and DMA scheduling domains to sof main context.
Also implements getters for these domains to easily retrieve them
through one point of access.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 670246e2f8 timer: use platform_timer from sof context
Changes accesses across the code to use platform_timer saved
in sof context instead of using externed global variable.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 30ac5f2feb platform: move core disabling to platform code
Disabling unused cores looks like platform specific
optimization. Let's move it to cAVS platforms specific code.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 5c473f307c pm_runtime: remove unnecessary log from pm_runtime_init
Removes unnecessary log from pm_runtime_init.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda dece398b22 timer: add platform timer to sof context
Adds pointer to default platform timer to main sof context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 45e3a93b57 clk: use clocks_get() instead of global pointer
Uses clock_get() as one point of access to clock info
instead of global pointer.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 452f8ef6d3 clk: add clocks pointer to sof main context
Adds pointer to platforms clock info to sof main context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda f4af2a6671 clk: pass sof context to platform_clock_init
Passess sof context as an argument to the platform_clock_init
function. This way we will be able to store clocks pointer
in the main context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 6e2cf6920b trace: add trace to sof main context
Adds pointer to generic trace data to sof main context.
Also changes access to the trace data to go only through
sof context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 6524cc89c1 sof: add getter for sof main context
Adds getter function for acquiring pointer to sof main context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda 964ff207a7 sof: align sof structure to cache line size
Aligns sof structure to cache line size. It is needed
in order to assure that no data will be randomly overwritten
by cache eviction with multicore access.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Tomasz Lauda a8fdfea147 host: move PLATFORM_DCACHE_ALIGN to the right header
Moves PLATFORM_DCACHE_ALIGN for host to memory header.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-01-11 16:10:04 +00:00
Marcin Maka 91fb594bd9 cannonlake: use low power ring osc as default dsp clock
Running on 120MHz Low Power Ring Oscillator enables more
aggressive power saving. Therefore this should be a default
options for all Cannonlake configurations that may run
on a single dsp core and does not need more than 120 MCPS.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-01-10 12:30:35 +01:00
Marcin Maka c5db2daeab build: use xcc defconfigs as the default ones
Since xcc is the default toolchain for xtensa architecture,
the defconfigs should be customized for xcc.

gcc versions are saved for CI builds.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-01-10 12:30:35 +01:00
Marcin Rajwa dd6a3c5946 detector: send queued IPC msg to host before notifing KPB
This patch takes care of host notification at the time
key phrase is detected. In essence we want to notify
host ASAP to let it prepare itself for
incoming history data. This enables host to:
1. Wake up (in case it was in d0ix or other
low power state at the time detection happened
2. Prepare itself for incoming key phrase
data

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-01-10 12:18:51 +01:00
Marcin Rajwa 02e06263f0 kpb: display state changes in more convenient way
This patch display state changes in trace log as hexadecimal
numbers. Therefore KPB state changes are easy to follow.
As an example "state log 65656567" shows that KPB has been
changing its state from 6 (draining) to 5 (buffering) and
eventually got reset request (state 7).

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-01-10 12:18:51 +01:00
Rander Wang f73332eafe dai: ALH set burst_elems
The burst length of GP-DMA should align to DMAT setting
in Audio Link Hub, or XRUN will happen. We don't change
DMAT setting since it is also used by cAVS FW.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2020-01-10 10:04:25 +00:00
Janusz Jankowski c6baa9796c drivers: intel: deduplicate ssp trace macros
Trace macros are already defined in ssp.h.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-09 13:14:21 +00:00
Janusz Jankowski c52e59d18a github: fix link to bug tracking docs
Update bug form to point to new location of the document.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-09 11:24:06 +00:00
Karol Trzcinski f8d596562c pcm_converter: Properly handle CONFIG_FORMAT_CONVERT_HIFI3
Include config.h in header where this define is used

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-01-09 11:11:35 +00:00
Janusz Jankowski 79d6ea654c lib: remove unused cmemcpy
Function cmemcpy is unused, there is no need to keep dead code.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-08 15:10:15 +02:00
Yong Zhi 5340225a7c topology: Add JSL da7219+max98373 support
Add topology support for max98373 and da7219
codec for JasperLake platform.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2020-01-08 09:09:02 +01:00
Seppo Ingalsuo 4a0a17814d EQ FIR: Process in copy() only even number of frames
This patch fixes audio corruption problem by removing odd and single
frame or sample processing capability. The Xtensa optimized filter
core depends on 64 bit loads from the filter internal 32 bit delay
line. The two sample at time capable algorithm core needs such
data alignment and fixing single frame capability would have created
unnecessary complexity from additional pointed address based filter
core selection.

The odd frames number capable FIR version also creates double
processing load and use of two filters would cause load variation
depending on how many samples available for processing when scheduled.
This simple fix is the best option since there is no requirement for
processing one frame at time.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-01-07 20:25:54 +00:00
Seppo Ingalsuo 707ffa7f07 Topology: FIR: Increase maximum size of configuration data blob
This patch increases the max. size to 4 kB. Such size allows
setting up e.g. 8ch 192 tap FIR. The multiple part configuration
IPC support has existed in the EQ component for a while and this
limit in topology has remained not updated.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-01-07 15:43:34 +00:00
Janusz Jankowski c1f4c3f197 cmake: version: consider unannotated tags
Command git describe looks only for annotated tags, but we should
get any tag reachable from master, that's why --tags flag is needed.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-07 14:59:48 +00:00
Janusz Jankowski 79bbca113d platform: remove unused mn functions
These functions are unused and can be deleted.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-07 15:18:04 +02:00
Dragos Tarcatu 60112865cc sof: spinlock: Fix placement of spin_try_lock
Enabling CONFIG_DEBUG_LOCKS currently breaks the build for APL as
spin_try_lock is undefined.

src/drivers/intel/cavs/dmic.c:167:8:
error: implicit declaration of function 'spin_try_lock';
did you mean 'arch_try_lock'? [-Werror=implicit-function-declaration]
  ret = spin_try_lock(dai->lock);
        ^~~~~~~~~~~~~

Fix that by making sure spin_try_lock gets defined regardless of
either CONFIG_DEBUG_LOCKS is enabled or not.

Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
2020-01-07 15:13:45 +02:00
Janusz Jankowski c68605403c ssp: replace hweight with builtin popcount
Hweight32 function can be replaced with builtin popcount
that is more performant.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-06 10:44:56 +02:00
Janusz Jankowski 373f33190c codeowners: add @dbaluta as imx folders owner
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-05 14:07:40 +00:00
Janusz Jankowski ab71c889ae codeowners: add maintainers for default match
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-01-05 14:07:40 +00:00
Karol Trzcinski 0194175daa trace: Add pipeline id to buffer traces
It will be helpful during debugging components
to see correlated pipeline id.

Kept two lines over 80 charakters because of readability issues.
For same reason there is not introduced special construction to
avoid 'parameter reuse in macro' warning for trace macros.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-01-02 13:33:45 +01:00
Adrian Bonislawski 9bae27fd2b math: allow crc32 calculations on non-continuous data blocks
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-12-23 23:14:35 +01:00
Tomasz Lauda 977b6b5866 alloc: add prepare step for rfree function
Adds platform_rfree_prepare implementations, which are called
right before actual freeing of the buffer. For some of the platforms
there might be a need to manipulate pointer before freeing it e.g.
cAVS platforms are checking for cache aliasing.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-12-23 21:11:48 +01:00
Tomasz Lauda b4f4142418 cavs: memory: do not use uncached memory for UP config
This patch changes platform_shared_get implementation based
on the current number of supported cores. Let's not use
uncached memory for UP configuration.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-12-23 21:11:48 +01:00
Tomasz Lauda d2b0823daa alloc: add method for getting shared memory
Adds platform implementations for getting shared memory.
Uncached tranformations are not very generic, since not all
platforms have such memory region.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-12-23 21:11:48 +01:00
Tomasz Lauda 84bc15e3dd cavs: memory: move uncache related macros and defines
Moves uncache related macros and defines to cavs common header.
There is no point in duplicating those across all of the platforms.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-12-23 21:11:48 +01:00