dependencies are incorrect due to kernel changes
also add 6s delay after insert to let userspace complete its tasks and
go back to idle
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
In C casts between "void *" and any other pointers aren't needed.
Remove several occurrances.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of jumping out of a loop with a "goto" use break and test
the loop exit reason.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Replace multiple occurrances of assignment sequences like
a |= x1;
a |= x2;
with a simpler
a |= x1 | x2;
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove several occurrances of redundant variable initialisations
and remove some trivial variables, that are only initialised
and used once without ever being changed.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Simplify the DW DMA driver by using channel and LLI pointers instead
of repeating the same pattern multiple times within functions.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Refactor the whole pipeline component:
- one method to handle both upstream and downstream walk
across the pipeline graph,
- code deduplication,
- cuts pipeline implementation size by half.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Refactors pipeline complete function to work with pipelines,
which don't have scheduling component, but are just connected
to the pipeline with one.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Fixes previous change for ASYNC tasks.
By mistake it didn't take into account provided timeout.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
In dw_dma_start() .lli_current cannot be NULL. If it were NULL, lines
following the check, would cause a NULL-pointer dereference. Remove
the superfluous check.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use different build folder for gcc and xcc build.
Will auto selected if ROM build is not supported for the platform,
thus make -a -r can work.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
The system-runtime zone on CAVS system is suitable for DMA, add the
capability to heap descriptors.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Currently only the runtime zone has several heaps with different
capabilities on some systems. So that if a memory allocation request
is made from that zone, a suitable heap is selected. Additionally,
if the request cannot be satisfied from the runtime heap, an attempt
is made to satisfy it from the buffer heap. The other two zones -
system and system-runtime - have per-core heaps with identical
capabilities. If the request to one of those zones cannot be
satisfied from it, no attempt is made to allocate memory from a
different zone. Supposedly because of this determinism no capability
check is performed. This is wrong, since if capabilities don't match
it should be assumed, that the obtained memory will not be suitable
for the designated purpose. This patch adds the missing checks.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The block allocation algorithm, as implemented in _balloc(), is first
trying to find a single free memory block to satisfy the request. If
that fails it is then trying to allocate several blocks in a
sequence. That part is implemented wrongly. It can end up allocating
multiple such block sequences, and not using but leaking them
instead. This patch first simplifies the search for a single suitable
buffer, then fixes the leakage.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
In _balloc() if no heap was found, no need to jump to a location in
the function, where a potentially successful allocation is still
being processed, jump directly to the unlock-and-return point.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
bzero() doesn't check its pointer argument for NULL, the caller has
to avoid such calls.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If we found a busy block among the potential sequence of blocks, that
we were trying to allocate, no need to retry the attempt from the
next starting block, unless it was the first block, that was busy. It
is enough to resume searching from the next block after the busy one.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>