spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / include / trace / events / asoc.h
blobab26f8aa3c781819ca442268acf5b9f81ff8d6c7
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_dapm_walk_done,
221 TP_PROTO(struct snd_soc_card *card),
223 TP_ARGS(card),
225 TP_STRUCT__entry(
226 __string( name, card->name )
227 __field( int, power_checks )
228 __field( int, path_checks )
229 __field( int, neighbour_checks )
232 TP_fast_assign(
233 __assign_str(name, card->name);
234 __entry->power_checks = card->dapm_stats.power_checks;
235 __entry->path_checks = card->dapm_stats.path_checks;
236 __entry->neighbour_checks = card->dapm_stats.neighbour_checks;
239 TP_printk("%s: checks %d power, %d path, %d neighbour",
240 __get_str(name), (int)__entry->power_checks,
241 (int)__entry->path_checks, (int)__entry->neighbour_checks)
244 TRACE_EVENT(snd_soc_jack_irq,
246 TP_PROTO(const char *name),
248 TP_ARGS(name),
250 TP_STRUCT__entry(
251 __string( name, name )
254 TP_fast_assign(
255 __assign_str(name, name);
258 TP_printk("%s", __get_str(name))
261 TRACE_EVENT(snd_soc_jack_report,
263 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
265 TP_ARGS(jack, mask, val),
267 TP_STRUCT__entry(
268 __string( name, jack->jack->name )
269 __field( int, mask )
270 __field( int, val )
273 TP_fast_assign(
274 __assign_str(name, jack->jack->name);
275 __entry->mask = mask;
276 __entry->val = val;
279 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
280 (int)__entry->mask)
283 TRACE_EVENT(snd_soc_jack_notify,
285 TP_PROTO(struct snd_soc_jack *jack, int val),
287 TP_ARGS(jack, val),
289 TP_STRUCT__entry(
290 __string( name, jack->jack->name )
291 __field( int, val )
294 TP_fast_assign(
295 __assign_str(name, jack->jack->name);
296 __entry->val = val;
299 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
302 TRACE_EVENT(snd_soc_cache_sync,
304 TP_PROTO(struct snd_soc_codec *codec, const char *type,
305 const char *status),
307 TP_ARGS(codec, type, status),
309 TP_STRUCT__entry(
310 __string( name, codec->name )
311 __string( status, status )
312 __string( type, type )
313 __field( int, id )
316 TP_fast_assign(
317 __assign_str(name, codec->name);
318 __assign_str(status, status);
319 __assign_str(type, type);
320 __entry->id = codec->id;
323 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
324 (int)__entry->id, __get_str(type), __get_str(status))
327 #endif /* _TRACE_ASOC_H */
329 /* This part must be outside protection */
330 #include <trace/define_trace.h>