APL/CNL Fix: Only send position once after copy DMA trace data on APL/CNL.

Firmware side should not send position in every trace_work() is called.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
This commit is contained in:
Yan Wang 2018-03-30 18:59:48 +08:00 committed by Liam Girdwood
parent f09093a9a6
commit 9f28604c3d
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,7 @@ struct dma_trace_data {
struct dma_sg_config config;
struct dma_trace_buf dmatb;
struct dma_copy dc;
uint32_t old_host_offset;
uint32_t host_offset;
uint32_t overflow;
uint32_t messages;

View File

@ -64,7 +64,10 @@ static uint64_t trace_work(void *data, uint64_t delay)
* This function will be called once every 500ms at least even
* if no new trace is filled.
*/
ipc_dma_trace_send_position();
if (d->old_host_offset != d->host_offset) {
ipc_dma_trace_send_position();
d->old_host_offset = d->host_offset;
}
#endif
/* any data to copy ? */