[Sound-open-firmware] [PATCH] APL/CNL Fix: Only send position once after copy DMA trace data on APL/CNL.
yan.wang at linux.intel.com
yan.wang at linux.intel.com
Fri Mar 30 12:59:48 CEST 2018
From: Yan Wang <yan.wang at linux.intel.com>
Firmware side should not send position in every trace_work() is called.
Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
---
Test with:
Mininow max rt5651 and APL UP^2 nocodec and CNL nocodec
SOF 1.1-stable: 98d3a838cb397e91d6c032cf9b39d3748102803e
SOF-Tool 1.1-stable: 78ad1ccce5ac689680adc32f8136f5bf551b0f7c
https://github.com/plbossart/sound/tree/topic/sof-v4.14:
c33cfed51fff5eb156dcf70ba849e6ffb3008377
---
src/include/reef/dma-trace.h | 1 +
src/lib/dma-trace.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/include/reef/dma-trace.h b/src/include/reef/dma-trace.h
index bf6e3f3..c5982d2 100644
--- a/src/include/reef/dma-trace.h
+++ b/src/include/reef/dma-trace.h
@@ -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;
diff --git a/src/lib/dma-trace.c b/src/lib/dma-trace.c
index d9adb6d..d7ad3d2 100644
--- a/src/lib/dma-trace.c
+++ b/src/lib/dma-trace.c
@@ -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 ? */
--
2.14.3
More information about the Sound-open-firmware
mailing list