1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM hda
5 #if !defined(__HDAC_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
9 #include <linux/device.h>
10 #include <sound/hdaudio.h>
13 #define HDAC_MSG_MAX 500
19 TRACE_EVENT(hda_send_cmd,
20 TP_PROTO(struct hdac_bus *bus, unsigned int cmd),
23 __string(name, dev_name((bus)->dev))
27 __assign_str(name, dev_name((bus)->dev));
30 TP_printk("[%s:%d] val=0x%08x", __get_str(name), __entry->cmd >> 28, __entry->cmd)
33 TRACE_EVENT(hda_get_response,
34 TP_PROTO(struct hdac_bus *bus, unsigned int addr, unsigned int res),
35 TP_ARGS(bus, addr, res),
37 __string(name, dev_name((bus)->dev))
42 __assign_str(name, dev_name((bus)->dev));
46 TP_printk("[%s:%d] val=0x%08x", __get_str(name), __entry->addr, __entry->res)
49 TRACE_EVENT(hda_unsol_event,
50 TP_PROTO(struct hdac_bus *bus, u32 res, u32 res_ex),
51 TP_ARGS(bus, res, res_ex),
53 __string(name, dev_name((bus)->dev))
58 __assign_str(name, dev_name((bus)->dev));
60 __entry->res_ex = res_ex;
62 TP_printk("[%s:%d] res=0x%08x, res_ex=0x%08x", __get_str(name),
63 __entry->res_ex & 0x0f, __entry->res, __entry->res_ex)
66 DECLARE_EVENT_CLASS(hdac_stream,
67 TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
69 TP_ARGS(bus, azx_dev),
72 __field(unsigned char, stream_tag)
76 __entry->stream_tag = (azx_dev)->stream_tag;
79 TP_printk("stream_tag: %d", __entry->stream_tag)
82 DEFINE_EVENT(hdac_stream, snd_hdac_stream_start,
83 TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
87 DEFINE_EVENT(hdac_stream, snd_hdac_stream_stop,
88 TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
92 #endif /* __HDAC_TRACE_H */
94 /* This part must be outside protection */
95 #undef TRACE_INCLUDE_PATH
96 #define TRACE_INCLUDE_PATH .
98 #undef TRACE_INCLUDE_FILE
99 #define TRACE_INCLUDE_FILE trace
101 #include <trace/define_trace.h>