Adding static libraries properly may be troublesome for developers
that are not familiar with CMake, so function that makes it easier
should be useful.
Usually developer will just add sources directly to the target.
Using static libraries should be limited just to closed / precompiled
3rd party components.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Target dependencies have to be added in the same CMakeLists in which
they are declared. CMake interface library is needed to enable adding
static libraries to sof target from subdirectories.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
ESAI implementation is still dummy, anyhow we need to initialize ESAI
spinlock in order to avoid FW crashes.
Similar with commit 2ee7a24f97 ("byt: hsw: ssp: move spinlock init
to earlier stage") we initialize the spinlock in an early stage at
dai_init.
We started to notice the crash after commit f7abaf7b33 ("spinlock:
allocate spinlocks in uncached memory") which requires that the lock
must be dynamically allocated at init. Before, the lock was statically
allocated and there were no crashes.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
sof-pci-dev and sof-acpi-dev were renamed, so make sure we handle the
new names. The old ones are kept for backwards compatibility but will
be removed at some point.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
In theory we wouldn't need to explicitly load the rt700 driver but
doing so solves a race condition we will have to fix in the kernel at
some point.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This is required for Cherrytrail/Baytrail Chromebooks.
Note that the driver still has problems but the scripts are fine.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
In function target_link_libraries visibility modifiers have to be
consistent, otherwise we will get error while trying to use modifier,
if it wasn't used in root CMakeLists.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Fixes DMA_ACCESS_EXCLUSIVE flag for getting DMA.
We should rely on number of DMA users rather than
number of DMA channels. DMA channels are incremented
during DAI config, so it can potentially happen long
after DAI creation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This patch adds for HiFi3 xt-xcc compilation for an intrinsics
optimized direct form-II transposed (df2t) filter core version
that executes faster than the generic C version.
Due to HiFi3 instruction set the delay lines are changed from Q3.61
to Q17.47 format. It causes differences in bit-exactness but no
practical audio quality difference to generic C version.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes two similar mistakes from all the s16/s24/s32 dual
sample computing FIR core that was introduced in a previous update.
The FIR processing frames count processed double amount of samples
in buffer that corrupted FIR delay line and also the output write
to component sink buffer swapped two successive samples within one
channel.
The filter cores for s16 and s24 were simplified a bit since they can
use single output write pointer.
The FIR header file used wrong xtensa header file for HiFi2 while
it should have been for hifi3. Though no issues were observed due to
this mistake.
A check for frames count greater than zero was added into the copy()
function for extra safety. Also the return value from
comp_get_copy_limits() is not checked since the function always
returns zero.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fixes locking mechanism of spinlocks.
Current implementation hasn't worked at all,
so there wasn't any synchronization between cores.
I myself have broken it a long time ago.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Spinlocks need to be allocated in uncached memory region
in order to work properly and allow synchronization between
multiple cores. Atomic instructions used in xtensa implementation
don't go through cache automatically.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Moves interrupt_init after init_heap. During interrupt
initialization we need to allocate spinlock, so we need
already initialized memory map.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Moves spinlock initialization for byt and hsw platforms
to earlier stage. Otherwise the output will be undefined,
since we are using the spinlock before initializing it
in platform_init sequence.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Replaces spin_lock_* macros with irq_local_* macros
in many places. Most of the code doesn't need to keep
synchronization between cores. Setting critical section
by disabling local interrupts is enough. Spinlocks should
be used only in the places, where both cores have access.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds irq_local_enable and irq_local_disable macros to disable
and enable all IRQ sources for current core.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit introduces the ingredients required for adding
fuzzing support in SOF. The main ingredients are as follows:
QEMU bridge: This creates the IO bridge to communicate with
the QEMU DSP
Core IA host support for BYT/CHT platforms: Provides the host
support for intializing the platform and communicating with
the QEMU DSP
Main application: The fuzzing application that sets up the
platform and initializes the communication with the QEMU DSP
Currently, running the fuzzer application only sets up the
platform IO bridge for communicating with the QEMU DSP,
boots the FW, parses the topology file and sets up the components
and connections in topology by sending the IPC messages to
the QEMU DSP. The next step is to add the fuzzing component
which will be responsible for sending fuzzed IPC messages
and monitoring the status.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The topology parser in testbench can be re-used for
the other applications like the fuzzer. In order to
accomplish this, this commit does the following:
1. Separate the topology parser into a separate project
(tplg_parser) which implements the callbacks for parsing
all the components in topology.
2. Add support for parsing new components such as host
pcm, dai and mixer
3. Include the topology parser as an external project
in the testbench.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Adds cache operations to alloc functions to get full
synchronized memory map between different cores.
Memory allocations aren't done so often so we can
afford to go through cache and perform so many
wtb/inv operations. This change allows slave cores
for allocation from runtime heap, buffer heaps etc.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Refactors timer a little bit, to make better usage
of timer id values. Right now every timer has also irq
field, which is used to identify which interrupt line
to enable/disable. We don't longer need timer id to represent
also timer irq, so let's set custom ids and simplify
things.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Instead of returning next period, schedule functions should return
state of the executed task. Period of the tasks is set during
initialization and doesn't change dynamically, so it doesn't make
sense to return it. With the new added SOF_TASK_STATE_RESCHEDULE
we can easily decide if the task is completed or maybe need to
be run once again.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Extracts flags to generic task data, so there is no need
for ll_schedule to keep them privately. Also changes the
way they are passed. From now on flags should be set only
during task initialization and not when starting scheduling.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds new period field to task private data to keep
period set during schedule. Tasks shouldn't change
their period dynamically and in fact there is no
such task.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Decreases code of schedule and reschedule functions by
removing small helper methods, which weren't needed.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds cache operations in task init and schedule functions.
It allows to put tasks' private data in cached memory, which
will be needed in the near future with new EDF implementation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes usage from arch_cpu_get_id to cpu_get_id.
We always should go through generic function version.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Extracts check whether the pipeline should be executed
on the current core to separate method.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Function responsible for putting FW notifications into the
queue is shared between all cores. In this function we should
access _ipc object only through uncached memory region to not cause
random data overwrite.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes accesses to the _ipc object to go through uncached
memory region. This way slave cores can safely read shared_ctx
without causing random overwrite of the data.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Moves xrun check in pipeline_trigger after checking
if this pipeline is running on current core. Only owner
of the pipeline should access its data.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds missing comp_dev invalidation before accessing it.
We also need to move core check a little bit further,
since it also uses both comp_dev and pipeline objects.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes previously added workaround for APL GCC compilation.
Some of the coprocessor registers wasn't included in the
overlay. This patch will only work with the updated
xtensa-apl-overlay.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Updates xtensa core headers for byt and cht platforms.
The one previously used had wrong values for these
platforms.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Disables FIR and IIR components for byt and cht
platforms. These are not currently used, so we
can spare some space in IRAM.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This patch copies vector addresses for baytrail platform
from core-isa.h to memory.h. This way we won't overwrite
default xtensa addresses, when updating xtensa headers.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Traces with id's help to read logs,
especially when there are several
pipelines in topology.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Abstracts slave core functions to arch layer. It doesn't
make sense to compile them, if they won't be used.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Fixes very rare race condition, when multiple cores
schedule something in low latency scheduler. We should
allow for timer client to execute one more time after
being cancelled. There won't be any tasks on the list
to process, but at least we will stop everything
gracefully.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes ll_schedule_data allocation function from malloc
to rzalloc. It should be zeroed out in order to prevent
usage of any garbage data after slave core reenable
sequence.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>