fix a kmap leak in virtio_console
[linux/fpc-iii.git] / include / trace / events / asoc.h
blob03996b2bb04f86bcb4cea7c1aab4971b2d4c310d
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 #define DAPM_DIRECT "(direct)"
12 struct snd_soc_jack;
13 struct snd_soc_codec;
14 struct snd_soc_platform;
15 struct snd_soc_card;
16 struct snd_soc_dapm_widget;
17 struct snd_soc_dapm_path;
20 * Log register events
22 DECLARE_EVENT_CLASS(snd_soc_reg,
24 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
25 unsigned int val),
27 TP_ARGS(codec, reg, val),
29 TP_STRUCT__entry(
30 __string( name, codec->name )
31 __field( int, id )
32 __field( unsigned int, reg )
33 __field( unsigned int, val )
36 TP_fast_assign(
37 __assign_str(name, codec->name);
38 __entry->id = codec->id;
39 __entry->reg = reg;
40 __entry->val = val;
43 TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name),
44 (int)__entry->id, (unsigned int)__entry->reg,
45 (unsigned int)__entry->val)
48 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_write,
50 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
51 unsigned int val),
53 TP_ARGS(codec, reg, val)
57 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read,
59 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
60 unsigned int val),
62 TP_ARGS(codec, reg, val)
66 DECLARE_EVENT_CLASS(snd_soc_preg,
68 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
69 unsigned int val),
71 TP_ARGS(platform, reg, val),
73 TP_STRUCT__entry(
74 __string( name, platform->name )
75 __field( int, id )
76 __field( unsigned int, reg )
77 __field( unsigned int, val )
80 TP_fast_assign(
81 __assign_str(name, platform->name);
82 __entry->id = platform->id;
83 __entry->reg = reg;
84 __entry->val = val;
87 TP_printk("platform=%s.%d reg=%x val=%x", __get_str(name),
88 (int)__entry->id, (unsigned int)__entry->reg,
89 (unsigned int)__entry->val)
92 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_write,
94 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
95 unsigned int val),
97 TP_ARGS(platform, reg, val)
101 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_read,
103 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
104 unsigned int val),
106 TP_ARGS(platform, reg, val)
110 DECLARE_EVENT_CLASS(snd_soc_card,
112 TP_PROTO(struct snd_soc_card *card, int val),
114 TP_ARGS(card, val),
116 TP_STRUCT__entry(
117 __string( name, card->name )
118 __field( int, val )
121 TP_fast_assign(
122 __assign_str(name, card->name);
123 __entry->val = val;
126 TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
129 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
131 TP_PROTO(struct snd_soc_card *card, int val),
133 TP_ARGS(card, val)
137 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
139 TP_PROTO(struct snd_soc_card *card, int val),
141 TP_ARGS(card, val)
145 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
147 TP_PROTO(struct snd_soc_card *card),
149 TP_ARGS(card),
151 TP_STRUCT__entry(
152 __string( name, card->name )
155 TP_fast_assign(
156 __assign_str(name, card->name);
159 TP_printk("card=%s", __get_str(name))
162 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
164 TP_PROTO(struct snd_soc_card *card),
166 TP_ARGS(card)
170 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
172 TP_PROTO(struct snd_soc_card *card),
174 TP_ARGS(card)
178 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
180 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
182 TP_ARGS(w, val),
184 TP_STRUCT__entry(
185 __string( name, w->name )
186 __field( int, val )
189 TP_fast_assign(
190 __assign_str(name, w->name);
191 __entry->val = val;
194 TP_printk("widget=%s val=%d", __get_str(name),
195 (int)__entry->val)
198 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
200 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
202 TP_ARGS(w, val)
206 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
208 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
210 TP_ARGS(w, val)
214 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
216 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
218 TP_ARGS(w, val)
222 TRACE_EVENT(snd_soc_dapm_walk_done,
224 TP_PROTO(struct snd_soc_card *card),
226 TP_ARGS(card),
228 TP_STRUCT__entry(
229 __string( name, card->name )
230 __field( int, power_checks )
231 __field( int, path_checks )
232 __field( int, neighbour_checks )
235 TP_fast_assign(
236 __assign_str(name, card->name);
237 __entry->power_checks = card->dapm_stats.power_checks;
238 __entry->path_checks = card->dapm_stats.path_checks;
239 __entry->neighbour_checks = card->dapm_stats.neighbour_checks;
242 TP_printk("%s: checks %d power, %d path, %d neighbour",
243 __get_str(name), (int)__entry->power_checks,
244 (int)__entry->path_checks, (int)__entry->neighbour_checks)
247 TRACE_EVENT(snd_soc_dapm_output_path,
249 TP_PROTO(struct snd_soc_dapm_widget *widget,
250 struct snd_soc_dapm_path *path),
252 TP_ARGS(widget, path),
254 TP_STRUCT__entry(
255 __string( wname, widget->name )
256 __string( pname, path->name ? path->name : DAPM_DIRECT)
257 __string( psname, path->sink->name )
258 __field( int, path_sink )
259 __field( int, path_connect )
262 TP_fast_assign(
263 __assign_str(wname, widget->name);
264 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
265 __assign_str(psname, path->sink->name);
266 __entry->path_connect = path->connect;
267 __entry->path_sink = (long)path->sink;
270 TP_printk("%c%s -> %s -> %s\n",
271 (int) __entry->path_sink &&
272 (int) __entry->path_connect ? '*' : ' ',
273 __get_str(wname), __get_str(pname), __get_str(psname))
276 TRACE_EVENT(snd_soc_dapm_input_path,
278 TP_PROTO(struct snd_soc_dapm_widget *widget,
279 struct snd_soc_dapm_path *path),
281 TP_ARGS(widget, path),
283 TP_STRUCT__entry(
284 __string( wname, widget->name )
285 __string( pname, path->name ? path->name : DAPM_DIRECT)
286 __string( psname, path->source->name )
287 __field( int, path_source )
288 __field( int, path_connect )
291 TP_fast_assign(
292 __assign_str(wname, widget->name);
293 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
294 __assign_str(psname, path->source->name);
295 __entry->path_connect = path->connect;
296 __entry->path_source = (long)path->source;
299 TP_printk("%c%s <- %s <- %s\n",
300 (int) __entry->path_source &&
301 (int) __entry->path_connect ? '*' : ' ',
302 __get_str(wname), __get_str(pname), __get_str(psname))
305 TRACE_EVENT(snd_soc_dapm_connected,
307 TP_PROTO(int paths, int stream),
309 TP_ARGS(paths, stream),
311 TP_STRUCT__entry(
312 __field( int, paths )
313 __field( int, stream )
316 TP_fast_assign(
317 __entry->paths = paths;
318 __entry->stream = stream;
321 TP_printk("%s: found %d paths\n",
322 __entry->stream ? "capture" : "playback", __entry->paths)
325 TRACE_EVENT(snd_soc_jack_irq,
327 TP_PROTO(const char *name),
329 TP_ARGS(name),
331 TP_STRUCT__entry(
332 __string( name, name )
335 TP_fast_assign(
336 __assign_str(name, name);
339 TP_printk("%s", __get_str(name))
342 TRACE_EVENT(snd_soc_jack_report,
344 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
346 TP_ARGS(jack, mask, val),
348 TP_STRUCT__entry(
349 __string( name, jack->jack->name )
350 __field( int, mask )
351 __field( int, val )
354 TP_fast_assign(
355 __assign_str(name, jack->jack->name);
356 __entry->mask = mask;
357 __entry->val = val;
360 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
361 (int)__entry->mask)
364 TRACE_EVENT(snd_soc_jack_notify,
366 TP_PROTO(struct snd_soc_jack *jack, int val),
368 TP_ARGS(jack, val),
370 TP_STRUCT__entry(
371 __string( name, jack->jack->name )
372 __field( int, val )
375 TP_fast_assign(
376 __assign_str(name, jack->jack->name);
377 __entry->val = val;
380 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
383 TRACE_EVENT(snd_soc_cache_sync,
385 TP_PROTO(struct snd_soc_codec *codec, const char *type,
386 const char *status),
388 TP_ARGS(codec, type, status),
390 TP_STRUCT__entry(
391 __string( name, codec->name )
392 __string( status, status )
393 __string( type, type )
394 __field( int, id )
397 TP_fast_assign(
398 __assign_str(name, codec->name);
399 __assign_str(status, status);
400 __assign_str(type, type);
401 __entry->id = codec->id;
404 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
405 (int)__entry->id, __get_str(type), __get_str(status))
408 #endif /* _TRACE_ASOC_H */
410 /* This part must be outside protection */
411 #include <trace/define_trace.h>