Linux 3.12.39
[linux/fpc-iii.git] / include / trace / events / asoc.h
blob5fc2dcdd21cddcadc15daa9dc3e62dde7b41b5d2
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;
19 * Log register events
21 DECLARE_EVENT_CLASS(snd_soc_reg,
23 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
24 unsigned int val),
26 TP_ARGS(codec, reg, val),
28 TP_STRUCT__entry(
29 __string( name, codec->name )
30 __field( int, id )
31 __field( unsigned int, reg )
32 __field( unsigned int, val )
35 TP_fast_assign(
36 __assign_str(name, codec->name);
37 __entry->id = codec->id;
38 __entry->reg = reg;
39 __entry->val = val;
42 TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name),
43 (int)__entry->id, (unsigned int)__entry->reg,
44 (unsigned int)__entry->val)
47 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_write,
49 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
50 unsigned int val),
52 TP_ARGS(codec, reg, val)
56 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read,
58 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
59 unsigned int val),
61 TP_ARGS(codec, reg, val)
65 DECLARE_EVENT_CLASS(snd_soc_preg,
67 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
68 unsigned int val),
70 TP_ARGS(platform, reg, val),
72 TP_STRUCT__entry(
73 __string( name, platform->name )
74 __field( int, id )
75 __field( unsigned int, reg )
76 __field( unsigned int, val )
79 TP_fast_assign(
80 __assign_str(name, platform->name);
81 __entry->id = platform->id;
82 __entry->reg = reg;
83 __entry->val = val;
86 TP_printk("platform=%s.%d reg=%x val=%x", __get_str(name),
87 (int)__entry->id, (unsigned int)__entry->reg,
88 (unsigned int)__entry->val)
91 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_write,
93 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
94 unsigned int val),
96 TP_ARGS(platform, reg, val)
100 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_read,
102 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
103 unsigned int val),
105 TP_ARGS(platform, reg, val)
109 DECLARE_EVENT_CLASS(snd_soc_card,
111 TP_PROTO(struct snd_soc_card *card, int val),
113 TP_ARGS(card, val),
115 TP_STRUCT__entry(
116 __string( name, card->name )
117 __field( int, val )
120 TP_fast_assign(
121 __assign_str(name, card->name);
122 __entry->val = val;
125 TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
128 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
130 TP_PROTO(struct snd_soc_card *card, int val),
132 TP_ARGS(card, val)
136 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
138 TP_PROTO(struct snd_soc_card *card, int val),
140 TP_ARGS(card, val)
144 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
146 TP_PROTO(struct snd_soc_card *card),
148 TP_ARGS(card),
150 TP_STRUCT__entry(
151 __string( name, card->name )
154 TP_fast_assign(
155 __assign_str(name, card->name);
158 TP_printk("card=%s", __get_str(name))
161 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
163 TP_PROTO(struct snd_soc_card *card),
165 TP_ARGS(card)
169 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
171 TP_PROTO(struct snd_soc_card *card),
173 TP_ARGS(card)
177 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
179 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
181 TP_ARGS(w, val),
183 TP_STRUCT__entry(
184 __string( name, w->name )
185 __field( int, val )
188 TP_fast_assign(
189 __assign_str(name, w->name);
190 __entry->val = val;
193 TP_printk("widget=%s val=%d", __get_str(name),
194 (int)__entry->val)
197 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
199 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
201 TP_ARGS(w, val)
205 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
207 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
209 TP_ARGS(w, val)
213 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
215 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
217 TP_ARGS(w, val)
221 TRACE_EVENT(snd_soc_dapm_walk_done,
223 TP_PROTO(struct snd_soc_card *card),
225 TP_ARGS(card),
227 TP_STRUCT__entry(
228 __string( name, card->name )
229 __field( int, power_checks )
230 __field( int, path_checks )
231 __field( int, neighbour_checks )
234 TP_fast_assign(
235 __assign_str(name, card->name);
236 __entry->power_checks = card->dapm_stats.power_checks;
237 __entry->path_checks = card->dapm_stats.path_checks;
238 __entry->neighbour_checks = card->dapm_stats.neighbour_checks;
241 TP_printk("%s: checks %d power, %d path, %d neighbour",
242 __get_str(name), (int)__entry->power_checks,
243 (int)__entry->path_checks, (int)__entry->neighbour_checks)
246 TRACE_EVENT(snd_soc_dapm_output_path,
248 TP_PROTO(struct snd_soc_dapm_widget *widget,
249 struct snd_soc_dapm_path *path),
251 TP_ARGS(widget, path),
253 TP_STRUCT__entry(
254 __string( wname, widget->name )
255 __string( pname, path->name ? path->name : DAPM_DIRECT)
256 __string( psname, path->sink->name )
257 __field( int, path_sink )
258 __field( int, path_connect )
261 TP_fast_assign(
262 __assign_str(wname, widget->name);
263 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
264 __assign_str(psname, path->sink->name);
265 __entry->path_connect = path->connect;
266 __entry->path_sink = (long)path->sink;
269 TP_printk("%c%s -> %s -> %s\n",
270 (int) __entry->path_sink &&
271 (int) __entry->path_connect ? '*' : ' ',
272 __get_str(wname), __get_str(pname), __get_str(psname))
275 TRACE_EVENT(snd_soc_dapm_input_path,
277 TP_PROTO(struct snd_soc_dapm_widget *widget,
278 struct snd_soc_dapm_path *path),
280 TP_ARGS(widget, path),
282 TP_STRUCT__entry(
283 __string( wname, widget->name )
284 __string( pname, path->name ? path->name : DAPM_DIRECT)
285 __string( psname, path->source->name )
286 __field( int, path_source )
287 __field( int, path_connect )
290 TP_fast_assign(
291 __assign_str(wname, widget->name);
292 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
293 __assign_str(psname, path->source->name);
294 __entry->path_connect = path->connect;
295 __entry->path_source = (long)path->source;
298 TP_printk("%c%s <- %s <- %s\n",
299 (int) __entry->path_source &&
300 (int) __entry->path_connect ? '*' : ' ',
301 __get_str(wname), __get_str(pname), __get_str(psname))
304 TRACE_EVENT(snd_soc_dapm_connected,
306 TP_PROTO(int paths, int stream),
308 TP_ARGS(paths, stream),
310 TP_STRUCT__entry(
311 __field( int, paths )
312 __field( int, stream )
315 TP_fast_assign(
316 __entry->paths = paths;
317 __entry->stream = stream;
320 TP_printk("%s: found %d paths\n",
321 __entry->stream ? "capture" : "playback", __entry->paths)
324 TRACE_EVENT(snd_soc_jack_irq,
326 TP_PROTO(const char *name),
328 TP_ARGS(name),
330 TP_STRUCT__entry(
331 __string( name, name )
334 TP_fast_assign(
335 __assign_str(name, name);
338 TP_printk("%s", __get_str(name))
341 TRACE_EVENT(snd_soc_jack_report,
343 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
345 TP_ARGS(jack, mask, val),
347 TP_STRUCT__entry(
348 __string( name, jack->jack->name )
349 __field( int, mask )
350 __field( int, val )
353 TP_fast_assign(
354 __assign_str(name, jack->jack->name);
355 __entry->mask = mask;
356 __entry->val = val;
359 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
360 (int)__entry->mask)
363 TRACE_EVENT(snd_soc_jack_notify,
365 TP_PROTO(struct snd_soc_jack *jack, int val),
367 TP_ARGS(jack, val),
369 TP_STRUCT__entry(
370 __string( name, jack->jack->name )
371 __field( int, val )
374 TP_fast_assign(
375 __assign_str(name, jack->jack->name);
376 __entry->val = val;
379 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
382 TRACE_EVENT(snd_soc_cache_sync,
384 TP_PROTO(struct snd_soc_codec *codec, const char *type,
385 const char *status),
387 TP_ARGS(codec, type, status),
389 TP_STRUCT__entry(
390 __string( name, codec->name )
391 __string( status, status )
392 __string( type, type )
393 __field( int, id )
396 TP_fast_assign(
397 __assign_str(name, codec->name);
398 __assign_str(status, status);
399 __assign_str(type, type);
400 __entry->id = codec->id;
403 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
404 (int)__entry->id, __get_str(type), __get_str(status))
407 #endif /* _TRACE_ASOC_H */
409 /* This part must be outside protection */
410 #include <trace/define_trace.h>