include: replace linux/module.h with "struct module" wherever possible
[linux-2.6/next.git] / include / trace / events / asoc.h
blob603f5a0f0365019eb758d2d2aec492a1b8f89b6c
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM asoc
4 #if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_ASOC_H
7 #include <linux/ktime.h>
8 #include <linux/tracepoint.h>
10 struct snd_soc_jack;
11 struct snd_soc_codec;
12 struct snd_soc_platform;
13 struct snd_soc_card;
14 struct snd_soc_dapm_widget;
17 * Log register events
19 DECLARE_EVENT_CLASS(snd_soc_reg,
21 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
22 unsigned int val),
24 TP_ARGS(codec, reg, val),
26 TP_STRUCT__entry(
27 __string( name, codec->name )
28 __field( int, id )
29 __field( unsigned int, reg )
30 __field( unsigned int, val )
33 TP_fast_assign(
34 __assign_str(name, codec->name);
35 __entry->id = codec->id;
36 __entry->reg = reg;
37 __entry->val = val;
40 TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name),
41 (int)__entry->id, (unsigned int)__entry->reg,
42 (unsigned int)__entry->val)
45 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_write,
47 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
48 unsigned int val),
50 TP_ARGS(codec, reg, val)
54 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read,
56 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
57 unsigned int val),
59 TP_ARGS(codec, reg, val)
63 DECLARE_EVENT_CLASS(snd_soc_preg,
65 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
66 unsigned int val),
68 TP_ARGS(platform, reg, val),
70 TP_STRUCT__entry(
71 __string( name, platform->name )
72 __field( int, id )
73 __field( unsigned int, reg )
74 __field( unsigned int, val )
77 TP_fast_assign(
78 __assign_str(name, platform->name);
79 __entry->id = platform->id;
80 __entry->reg = reg;
81 __entry->val = val;
84 TP_printk("platform=%s.%d reg=%x val=%x", __get_str(name),
85 (int)__entry->id, (unsigned int)__entry->reg,
86 (unsigned int)__entry->val)
89 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_write,
91 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
92 unsigned int val),
94 TP_ARGS(platform, reg, val)
98 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_read,
100 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
101 unsigned int val),
103 TP_ARGS(platform, reg, val)
107 DECLARE_EVENT_CLASS(snd_soc_card,
109 TP_PROTO(struct snd_soc_card *card, int val),
111 TP_ARGS(card, val),
113 TP_STRUCT__entry(
114 __string( name, card->name )
115 __field( int, val )
118 TP_fast_assign(
119 __assign_str(name, card->name);
120 __entry->val = val;
123 TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
126 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
128 TP_PROTO(struct snd_soc_card *card, int val),
130 TP_ARGS(card, val)
134 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
136 TP_PROTO(struct snd_soc_card *card, int val),
138 TP_ARGS(card, val)
142 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
144 TP_PROTO(struct snd_soc_card *card),
146 TP_ARGS(card),
148 TP_STRUCT__entry(
149 __string( name, card->name )
152 TP_fast_assign(
153 __assign_str(name, card->name);
156 TP_printk("card=%s", __get_str(name))
159 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
161 TP_PROTO(struct snd_soc_card *card),
163 TP_ARGS(card)
167 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
169 TP_PROTO(struct snd_soc_card *card),
171 TP_ARGS(card)
175 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
177 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
179 TP_ARGS(w, val),
181 TP_STRUCT__entry(
182 __string( name, w->name )
183 __field( int, val )
186 TP_fast_assign(
187 __assign_str(name, w->name);
188 __entry->val = val;
191 TP_printk("widget=%s val=%d", __get_str(name),
192 (int)__entry->val)
195 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
197 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
199 TP_ARGS(w, val)
203 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
205 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
207 TP_ARGS(w, val)
211 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
213 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
215 TP_ARGS(w, val)
219 TRACE_EVENT(snd_soc_jack_irq,
221 TP_PROTO(const char *name),
223 TP_ARGS(name),
225 TP_STRUCT__entry(
226 __string( name, name )
229 TP_fast_assign(
230 __assign_str(name, name);
233 TP_printk("%s", __get_str(name))
236 TRACE_EVENT(snd_soc_jack_report,
238 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
240 TP_ARGS(jack, mask, val),
242 TP_STRUCT__entry(
243 __string( name, jack->jack->name )
244 __field( int, mask )
245 __field( int, val )
248 TP_fast_assign(
249 __assign_str(name, jack->jack->name);
250 __entry->mask = mask;
251 __entry->val = val;
254 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
255 (int)__entry->mask)
258 TRACE_EVENT(snd_soc_jack_notify,
260 TP_PROTO(struct snd_soc_jack *jack, int val),
262 TP_ARGS(jack, val),
264 TP_STRUCT__entry(
265 __string( name, jack->jack->name )
266 __field( int, val )
269 TP_fast_assign(
270 __assign_str(name, jack->jack->name);
271 __entry->val = val;
274 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
277 TRACE_EVENT(snd_soc_cache_sync,
279 TP_PROTO(struct snd_soc_codec *codec, const char *type,
280 const char *status),
282 TP_ARGS(codec, type, status),
284 TP_STRUCT__entry(
285 __string( name, codec->name )
286 __string( status, status )
287 __string( type, type )
288 __field( int, id )
291 TP_fast_assign(
292 __assign_str(name, codec->name);
293 __assign_str(status, status);
294 __assign_str(type, type);
295 __entry->id = codec->id;
298 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
299 (int)__entry->id, __get_str(type), __get_str(status))
302 #endif /* _TRACE_ASOC_H */
304 /* This part must be outside protection */
305 #include <trace/define_trace.h>