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>
Adds check in dw-dma to make sure the channel is in fact
in active state before doing anything.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
On exceptions and panics, the code will reach panic_rewind. That
function will, among the other things it needs to do to dump the info,
will also dump the exception cause (exccause register). This means that
normally coredumps from panics and those from exceptions are
indistinguishable.
In this commit I reserve the maximum value for exccause (63) to signify
that the dump actually came from a panic instead of a hardware
exception. The easiest way I could see that would not duplicate code is
to simply set the exccause register to this reserved value (otherwise it
could be undefined, as it's not initialized at boot).
I also update the core dumper tool to use 63 as the value reserved for
panics instead of 0 (which is IllegalInstructionCause, a valid hardware
exception).
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Before the commit the C exception handler table was declared empty
(suspiciously). This also caused my own tests to fail to call the panic
code whenever an exception occurred.
This commit fixes this by actually declaring the slots themselves and
initializing them to xtos_p_none, and also setting the correct size
(64 * 4 instead of 0).
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
This patch changes size of single HP buffer block
from 0x180 to 0x100. Smaller blocks scale better
allowing for performance improvements and more
efficient memory usage.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch increases HPSRAM buffer size. This
additional space is needed for KWD functionality.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch switches KPB into RUN state after
prepare. This is expected state once KPB
was properly initialized.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Draining task can take a long time depending
on various params. This patch disables system
agent which raises DSP PANIC in case firmware
is hanged. However draining task can look to
system agent in exactly the same manner thus
we disable it right before draining task and
reenable after draining is done.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch adds a check if history depth request is
bigger than history buffer size. If so refuse to drain.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch updates function kpb_copy_samples() which
copies samples from KPB source buffer to sink buffer
to support 24b & 32b samples.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch updates function kpb_drain_samples() which
copies samples from history buffer to host buffer
to support 24b & 32b samples.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch checks if real time stream provided new data
while we were draining. If so we need to continue
draining that new data which are wainiting in history
buffer.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch takes care of changing kpb buffer if last
drained size made read pointer equal to buffer
end address. This is important since in slow draining
cases we might need to update history size by real
time stream and therefore continue draining.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch limit the speed of draining to the speed
of host reads. We fill half of the host buffer and
give a time of one period to read it.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch adds a check in draining task for reset
request. If it happened while we were draining then
draining task shall me carefully terminated.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch stops selector copy before draining starts.
This is temporary change as driver should take care of
it.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patches moves the switch of KPB state from RUN
to DRAINING at the time draining task starts.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch checks if host period size and well as
host buffer size are sane and can be used for draining
calculations.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patchs logs requested draining length in
milliseconds in kpb_init_draining() procedure.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch introduces and calulates draining intervals
as well as bytes limit per interval. It is all needed
to synchronize firmware draining speed with host read
speed. Basically in one period we fill half of host
buffer and give host some time (period_interval)
to read the data.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This change dma-copy type from blocking to
normal. This is because blocking mode slows down
draining considerably and from safety standpoint
we cover it by period-interval now.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch covers calculations of history depth
based on sample container size rather than sample
width itself.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch enables draining task to know how
much data was buffered since draining task
has been started.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch adds timeout to buffering. So now
if we are stuck in buffering due to i.e
pointers corruption we can detect that, log
error message and leave that procedure.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch reworks kpb_copy() adding
explicit state handling. Improves redability and
function performance. This way we don't need to
search for things that are not needed at the time.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch takes care of secure reset.
Now we check in what state KPB currently is.
If this state involves some ongoing work
like draining or buffering then KPB will
register reset request and terminate this
job gracefully.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>