Merge tag 'locks-v3.16-2' of git://git.samba.org/jlayton/linux
[linux/fpc-iii.git] / sound / pci / hda / hda_trace.h
blob3a1c63161eb129d71a02203ce9fe3a3b24ec6df4
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM hda
3 #define TRACE_INCLUDE_FILE hda_trace
5 #if !defined(_TRACE_HDA_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_HDA_H
8 #include <linux/tracepoint.h>
10 struct hda_bus;
11 struct hda_codec;
13 DECLARE_EVENT_CLASS(hda_cmd,
15 TP_PROTO(struct hda_codec *codec, unsigned int val),
17 TP_ARGS(codec, val),
19 TP_STRUCT__entry(
20 __field( unsigned int, card )
21 __field( unsigned int, addr )
22 __field( unsigned int, val )
25 TP_fast_assign(
26 __entry->card = (codec)->bus->card->number;
27 __entry->addr = (codec)->addr;
28 __entry->val = (val);
31 TP_printk("[%d:%d] val=%x", __entry->card, __entry->addr, __entry->val)
34 DEFINE_EVENT(hda_cmd, hda_send_cmd,
35 TP_PROTO(struct hda_codec *codec, unsigned int val),
36 TP_ARGS(codec, val)
39 DEFINE_EVENT(hda_cmd, hda_get_response,
40 TP_PROTO(struct hda_codec *codec, unsigned int val),
41 TP_ARGS(codec, val)
44 TRACE_EVENT(hda_bus_reset,
46 TP_PROTO(struct hda_bus *bus),
48 TP_ARGS(bus),
50 TP_STRUCT__entry(
51 __field( unsigned int, card )
54 TP_fast_assign(
55 __entry->card = (bus)->card->number;
58 TP_printk("[%d]", __entry->card)
61 #ifdef CONFIG_PM
62 DECLARE_EVENT_CLASS(hda_power,
64 TP_PROTO(struct hda_codec *codec),
66 TP_ARGS(codec),
68 TP_STRUCT__entry(
69 __field( unsigned int, card )
70 __field( unsigned int, addr )
73 TP_fast_assign(
74 __entry->card = (codec)->bus->card->number;
75 __entry->addr = (codec)->addr;
78 TP_printk("[%d:%d]", __entry->card, __entry->addr)
81 DEFINE_EVENT(hda_power, hda_power_down,
82 TP_PROTO(struct hda_codec *codec),
83 TP_ARGS(codec)
86 DEFINE_EVENT(hda_power, hda_power_up,
87 TP_PROTO(struct hda_codec *codec),
88 TP_ARGS(codec)
91 TRACE_EVENT(hda_power_count,
92 TP_PROTO(struct hda_codec *codec),
93 TP_ARGS(codec),
94 TP_STRUCT__entry(
95 __field( unsigned int, card )
96 __field( unsigned int, addr )
97 __field( int, power_count )
98 __field( int, power_on )
99 __field( int, power_transition )
102 TP_fast_assign(
103 __entry->card = (codec)->bus->card->number;
104 __entry->addr = (codec)->addr;
105 __entry->power_count = (codec)->power_count;
106 __entry->power_on = (codec)->power_on;
107 __entry->power_transition = (codec)->power_transition;
110 TP_printk("[%d:%d] power_count=%d, power_on=%d, power_transition=%d",
111 __entry->card, __entry->addr, __entry->power_count,
112 __entry->power_on, __entry->power_transition)
114 #endif /* CONFIG_PM */
116 TRACE_EVENT(hda_unsol_event,
118 TP_PROTO(struct hda_bus *bus, u32 res, u32 res_ex),
120 TP_ARGS(bus, res, res_ex),
122 TP_STRUCT__entry(
123 __field( unsigned int, card )
124 __field( u32, res )
125 __field( u32, res_ex )
128 TP_fast_assign(
129 __entry->card = (bus)->card->number;
130 __entry->res = res;
131 __entry->res_ex = res_ex;
134 TP_printk("[%d] res=%x, res_ex=%x", __entry->card,
135 __entry->res, __entry->res_ex)
138 #endif /* _TRACE_HDA_H */
140 /* This part must be outside protection */
141 #undef TRACE_INCLUDE_PATH
142 #define TRACE_INCLUDE_PATH .
143 #include <trace/define_trace.h>