[Sound-open-firmware] [RFC PATCH v2 25/29] Change macro definition and trace calling for mux.
yan.wang at linux.intel.com
yan.wang at linux.intel.com
Thu May 10 13:32:05 CEST 2018
From: Yan Wang <yan.wang at linux.intel.com>
It will use MUX trace class and component DMA trace API.
For trace calling of mux_new(), NULL will be passed into trace
API because comp_dev hasn't been initialized.
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/audio/mux.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/audio/mux.c b/src/audio/mux.c
index e96c467..c85fb2e 100644
--- a/src/audio/mux.c
+++ b/src/audio/mux.c
@@ -36,13 +36,22 @@
#include <sof/audio/component.h>
/* tracing */
-#define trace_mux(__e) trace_event(TRACE_CLASS_MUX, __e)
-#define trace_mux_error(__e) trace_error(TRACE_CLASS_MUX, __e)
-#define tracev_mux(__e) tracev_event(TRACE_CLASS_MUX, __e)
+#define trace_mux(cd, __e) \
+ trace_comp_event(cd, NORMAL_LEVEL, TRACE_CLASS_MUX, __e)
+#define tracev_mux(cd, __e) \
+ trace_comp_event(cd, VERBOSE_LEVEL, TRACE_CLASS_MUX, __e)
+#define trace_mux_error(cd, __e) \
+ trace_comp_event_atomic(cd, ERROR_LEVEL, TRACE_CLASS_MUX, __e)
+#define trace_mux_value(cd, x) \
+ trace_comp_value(cd, NORMAL_LEVEL, x)
+#define tracev_mux_value(cd, x) \
+ trace_comp_value(cd, VERBOSE_LEVEL, x)
+#define trace_mux_error_value(cd, x) \
+ trace_comp_value_atomic(cd, ERROR_LEVEL, x)
static struct comp_dev *mux_new(struct sof_ipc_comp *comp)
{
- trace_mux("new");
+ trace_mux(NULL, "new");
return NULL;
}
--
2.14.3
More information about the Sound-open-firmware
mailing list