The DAI and host components states must be preserved during pause so that
when normal pipeline positions are used on resume. i.e. pause just looks
like a very long pipeline schedule.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The circular trace buffer can overflow if too much trace data is sent
before it can schedule a DMA copy to flush the data. This overflow
causes the avail bytes counter to be greater than the buffer size and
means the DMA copy is rescheduled until avail is 0 (repeating old data).
Fix this by resetting avail to 0 when we overflow.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The DAI and host components states must be preserved during pause so that
when normal pipeline positions are used on resume. i.e. pause just looks
like a very long pipeline schedule.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Fix so that dump stack does not overwrite any debug data and does not
read past the end of the stack.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Initialise the SA during platform init and then notify SA of idle in the
main audio loop.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add a simple system monitoring agent that can detect when FW does not
execute correctly. The assumption is that FW will always idle from time
to time and this idling can be monitored by the SA. The FW wont idle if
it's thrashing, continually interrupted, continually running work or
continually rescheduling a task.
The SA will emit trace and panic if idle is not entered for a specific time
period.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Fix so that dump stack does not overwrite any debug data and does not
read past the end of the stack.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This patch changes the condition for limiting the smallest gain to
eliminate a never executed code part when VOL_MIN is defined as zero. The
variable v is unsigned integer so less than zero is not possible.
The functionality is not modified by this patch.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch changes the condition for limiting the smallest gain to
eliminate a never executed code part when VOL_MIN is defined as zero. The
variable v is unsigned integer so less than zero is not possible.
The functionality is not modified by this patch.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This variable is set by the return value of dma_copy_to_host_nowait().
Unsigned type will mislead error checking.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
This variable is set by the return value of dma_copy_to_host_nowait().
Unsigned type will mislead error checking.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Add a debug option that can detect deadlock and panic(). The deadlock
detection attempts to acquire a lock several times before giving up
and causing a panic() taht dumps the deadlock details.
Signed-off-by: Liam Girdwwod <liam.r.girdwood@linux.intel.com>
Add a debug option that can detect deadlock and panic(). The deadlock
detection attempts to acquire a lock several times before giving up
and causing a panic() taht dumps the deadlock details.
Signed-off-by: Liam Girdwwod <liam.r.girdwood@linux.intel.com>
Add message count and overflow detection to the trace position output
so that kernel and userspace can detect the trace buffer has overflowed.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Currently the trace initialisation must be performed after DMAC init
has completed. This means we miss the trace output from any platform
device initialisation.
Split the DMA trace initialisation into two parts so the trace buffer
is allocated early on and can accept messages meaning we dont miss any
device initialisation trace.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
For memory to memory copy(burst_elems initialized to be 0),
we set msize to default value 3, that is 2 ^ 3 = 8 items for
each burst transaction.
For DMA copying which related to peripheral device(source or
destination), we will use the configured burst_elems, which
usually means the number of data items, e.g. slot number for
SSP dai fifos.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We should set burst_elems for dma peripheral dev copy, for
dai/ssp, it should be set to valid slot number, otherwise,
the dma may copy in wrong burst size and data will run with
wrong speed.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We need configure different burst_elems for different dma copy, so
here introduce it to dma_sg_element struct.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We may need to generate capture only or playback only PCMs.
Add these macros to help generate them.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
We have 5 critical arguments in the test generator but only used 3 for
the naming, this will make some files be overwritten.
Refine the name method to let these 5 arguments show in the tplg name.
Also we decide the pipe type in one of the argument, test-ssp.m4 and
test-src-ssp.m4 are almost the same, just remove one.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Move testing pipelines into a test directory and reuse test scaffolding
so that they can be used to test multiple components on multiple target
with multiples configs.
Test topology scafolding are now pre-processed using a script to generate
the ALSA conf format with the various changes for each test case.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Commit 0a1a9bbc492e4eb22173ed57c7f5499c8f106289 discovered a bug in
the direction of AIF widgets in relation to PCMs. AIF widgets are codec
centric in ASoC so topology must align.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1. Widget N_PCMC type should be "aif_in", not "aif_out".
2. Widget W_DAI_IN data should be "N_DAI_IN", not "N_DAI_OUT".
Signed-off-by: Xiuli Pan <xiuli.pan@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
The timeout of work_reschedule_default() cannot be too short to finish
work queue rescheduling. Otherwise, the work will be rescheduled wrong
into the next timer loop.
Also change macro name of DMA trace time interval for reading easily.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
The volume component can change the sink data format depending on sink
component/pipeline topology configuration. This change is set locally,
but not to the host params that are passed downstream.
Fix this so that downstream components can check params match their
topology configuration.
Tested with test-passthrough-48k-vol-ssp2 and reef-byt-rt5651
topology files. Note that there are quite a few underflows likely added by
recent changes, more work needed to identify what goes on.
(first fix for prepare() from Liam, additional update for the params()
case by Pierre)
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>