[Sound-open-firmware] [RFC PATCH v2 01/29] Define IPC message type and data structure for trace level.

yan.wang at linux.intel.com yan.wang at linux.intel.com
Fri May 11 08:35:43 CEST 2018


From: Yan Wang <yan.wang at linux.intel.com>

For supporting trace level control based different modules, need
define one new IPC message type and data structure to transfer trace
levels of different global DMA trace type or component id from
kernel driver to SOF side.

Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
---
Test with:
CNL nocodec
SOF master: c1f2682c210201bbbc96fce7b382b25b90d19775
SOF-Tool master: 86fe688a2b4f68a1ce87e0951686be12a00f1a3c
https://github.com/plbossart/sound/tree/topic/sof-v4.14:
d09db67c5a9d6dfc85f700669fa2e43c678c8d51
---
 src/include/uapi/ipc.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/src/include/uapi/ipc.h b/src/include/uapi/ipc.h
index b32376d..8495f16 100644
--- a/src/include/uapi/ipc.h
+++ b/src/include/uapi/ipc.h
@@ -124,6 +124,7 @@
 /* trace and debug */
 #define SOF_IPC_TRACE_DMA_PARAMS		SOF_CMD_TYPE(0x001)
 #define SOF_IPC_TRACE_DMA_POSITION		SOF_CMD_TYPE(0x002)
+#define SOF_IPC_TRACE_DMA_LEVELS		SOF_CMD_TYPE(0x003)
 
 /* Get message component id */
 #define SOF_IPC_MESSAGE_ID(x)			(x & 0xffff)
@@ -917,6 +918,30 @@ struct sof_ipc_dma_trace_posn {
 	uint32_t messages;	/* total trace messages */
 }  __attribute__((packed));
 
+/* DMA trace level type */
+enum sof_dma_trace_level_type {
+	SOF_DMA_TRACE_LEVEL_IRQ = 0,
+	SOF_DMA_TRACE_LEVEL_IPC,
+	SOF_DMA_TRACE_LEVEL_DMA,
+	SOF_DMA_TRACE_LEVEL_SSP,
+	SOF_DMA_TRACE_LEVEL_WAIT,
+	SOF_DMA_TRACE_LEVEL_LOCK,
+	SOF_DMA_TRACE_LEVEL_MEM,
+	SOF_DMA_TRACE_LEVEL_SA,
+	SOF_DMA_TRACE_LEVEL_DMIC,
+	SOF_DMA_TRACE_LEVEL_SCH,
+	SOF_DMA_TRACE_LEVEL_VALUE,
+	SOF_DMA_TRACE_LEVEL_END,
+};
+
+/* DMA for Trace level info - SOF_IPC_DEBUG_DMA_LEVELS */
+struct sof_ipc_dma_trace_levels {
+	struct sof_ipc_hdr hdr;
+	uint32_t type;
+	int32_t comp_id;
+	uint32_t level;
+}  __attribute__((packed));
+
 /*
  * Architecture specific debug
  */
-- 
2.14.3



More information about the Sound-open-firmware mailing list