xref: /openbmc/linux/sound/pci/hda/hda_intel_trace.h (revision 1edd0337)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM hda_intel
4 #define TRACE_INCLUDE_FILE hda_intel_trace
5 
6 #if !defined(_TRACE_HDA_INTEL_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_HDA_INTEL_H
8 
9 #include <linux/tracepoint.h>
10 
11 DECLARE_EVENT_CLASS(hda_pm,
12 	TP_PROTO(struct azx *chip),
13 
14 	TP_ARGS(chip),
15 
16 	TP_STRUCT__entry(
17 		__field(int, dev_index)
18 	),
19 
20 	TP_fast_assign(
21 		__entry->dev_index = (chip)->dev_index;
22 	),
23 
24 	TP_printk("card index: %d", __entry->dev_index)
25 );
26 
27 DEFINE_EVENT(hda_pm, azx_suspend,
28 	TP_PROTO(struct azx *chip),
29 	TP_ARGS(chip)
30 );
31 
32 DEFINE_EVENT(hda_pm, azx_resume,
33 	TP_PROTO(struct azx *chip),
34 	TP_ARGS(chip)
35 );
36 
37 #ifdef CONFIG_PM
38 DEFINE_EVENT(hda_pm, azx_runtime_suspend,
39 	TP_PROTO(struct azx *chip),
40 	TP_ARGS(chip)
41 );
42 
43 DEFINE_EVENT(hda_pm, azx_runtime_resume,
44 	TP_PROTO(struct azx *chip),
45 	TP_ARGS(chip)
46 );
47 #endif
48 
49 #endif /* _TRACE_HDA_INTEL_H */
50 
51 /* This part must be outside protection */
52 #undef TRACE_INCLUDE_PATH
53 #define TRACE_INCLUDE_PATH .
54 #include <trace/define_trace.h>
55