Currently we support maximum of 32 children irqs, so limit the irq mask to not overflow the children irq array.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
When DMA host buffer is wrapped, host DMA copy need more time to
finish copying.
So previous implementation will output old trace when DMA host buffer
is wrapped because positions update is sent before DMA copying finished.
Now trace_work() will always update previous position and avoid this.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Add a new component API for performing atomic stream state change
operations. This leave the cmd API for non atomic usage.
This patch also does some renaming to use _trigger() instead of _cmd().
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Tested-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch introduces a new macro that can be used to enable sending
all trace messages to mbox alongside the local trace buffer.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch modifies the _trace_error function names to a more generic
name _trace_event_mbox() and updates users.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch adds a new trace_flush() feature to flush
the last remaining trace messages during panic.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
We have wrong logic in reschedule, we always reschedule the trace_work
once the buffer is half full and new trace coming. We will delay the old
schedule before the old scheduled trace_work is finally run.
Thus the trace_work will like the carrot in front of the DSP as the donkey,
the DSP will never run the trace_work that scheduled in the furture
while we are in busy state and lots of trace are coming continuously.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Reviewed-by: Zhigang Wu <zhigang.wu@linux.intel.com>
Reviewed-by: Yan Wang <yan.wang@linux.intel.com>
Tested-by: Zhigang Wu <zhigang.wu@linux.intel.com>
When pipeline processing the command, we have to turn off the IRQs.
If not, the DMA IRQ will interrupt the pipeline state set process,
when pipeline is scheduled, the states inconsistence will cause xrun.
Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
This patch adds a new trace feature to send any error states/values
after the trace messages to mbox and modifes users of trace_value()
to use trace_error_value().
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
IPCX and IPCD are 32bit wide and should only be used for doorbell on
HSW and BDW. Payload should be in mailbox.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
"chan_size" is used for calculation of DMA register offset.
It must be set otherwise only the first channel is available.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
This patch adds list of tasks per each irq level and fixes the problem,
where scheduler tried to schedule the same task two times.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This patch reverts hardcoding TFT and RFT values to 8.
They are now properly calculated below.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
We change ssp settings in order to properly transmit and receive data:
1. Use frame end padding instead of dummy stop bits.
This way alignment bits will be transmitted at the end of whole frame instead of every slot.
2. Disable receive without transmit mode.
3. Do not change the source for MCLK.
4. DSP_A format shouldn't have start delay.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
The version information is generated using git tags and needs to be
numerical for version.h usage.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
At the end of the DMA, we need to set the channel status into
parapre, otherwise next dma start will fail.
This will fix CNL pause resume issues.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
DMA trace itself uses DMA copying which will cause some DMA copying
related traces are called recursively.
So use tracev to avoid this.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
text_offset was added to an immutable ROM structure that would break
some tools and cause instability. Fix this by creating a new structure
for rimage manifest data that can be modified without breaking the ROM
ABI.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
DMA based trace is the standard default trace method. mailbox trace is
no longer supported.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
After enable DMA trace on APL, original HEAP_SYSTEM_SIZE is not
enough and will cause allocation failure.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Previously TFT and RFT are set to 0s which means we are using
threshold level 1, where interrupt asserts for every valid bits
of each slot(e.g. for s16_le capture, interrupts assert for
each 16 bits), but DMAC will treat it as notification of one
full sample(e.g. 32 bits for s16_le stereo) and read those all
bits, this will lead to capture with double speed at format
s16_le stereo.
Here add handle for FIFO trigger Threshold level, set them to
bytes for each full sample(active_slots * valid_bits / 8), and
the issue is fixed.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add dma_trace_init_complete() calling on APL/CNL platform.
And use DMA_HOST_IN_DMAC as PLATFORM_TRACE_DMAC for DMA trace copying.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
The host DMA has the different config method:
1. Get DMA channel based on stream tag.
2. Prepare DMA elem list based on local DMA trace buffer which make
sure that one trace record data can be transferred at least.
3. Need start DMA on firmware side before trigger start on kernel side.
4. Because no DMA callback in host DMA, add position update
calling at the end of trace_work().
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Get DMA channel based on stream tag when use host DMA.
Need also call different API in dma_copy_to_host_nowait().
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
At the end of the DMA, we need to set the channel status into
parapre, otherwise next dma start will fail.
This will fix APL pause resume issues.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
--
Test with:
Mininow max rt5651 and GP-MRB nocodec
SOF master: 728f1ff3e3
SOF-Tool master: 5b5bbe31e6https://github.com/plbossart/sound/tree/topic/sof-v4.14:
fe5e29155127a717ba5ae454b4bdde99afa67723
This patch fixes the bug with volume ramp down which causes volume
to underflow causing unspecified behaviour.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>