Add kernel probes for supplementary subsystems
[lttng-modules.git] / instrumentation / events / lttng-module / asoc.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM asoc
3
4 #if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_ASOC_H
6
7 #include <linux/ktime.h>
8 #include <linux/tracepoint.h>
9 #include <linux/version.h>
10
11 #ifndef _TRACE_ASOC_DEF
12 #define _TRACE_ASOC_DEF
13 struct snd_soc_jack;
14 struct snd_soc_codec;
15 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
16 struct snd_soc_platform;
17 #endif
18 struct snd_soc_card;
19 struct snd_soc_dapm_widget;
20 #endif
21
22 /*
23 * Log register events
24 */
25 DECLARE_EVENT_CLASS(snd_soc_reg,
26
27 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
28 unsigned int val),
29
30 TP_ARGS(codec, reg, val),
31
32 TP_STRUCT__entry(
33 __string( name, codec->name )
34 __field( int, id )
35 __field( unsigned int, reg )
36 __field( unsigned int, val )
37 ),
38
39 TP_fast_assign(
40 tp_strcpy(name, codec->name);
41 tp_assign(id, codec->id);
42 tp_assign(reg, reg);
43 tp_assign(val, val);
44 ),
45
46 TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name),
47 (int)__entry->id, (unsigned int)__entry->reg,
48 (unsigned int)__entry->val)
49 )
50
51 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_write,
52
53 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
54 unsigned int val),
55
56 TP_ARGS(codec, reg, val)
57
58 )
59
60 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read,
61
62 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
63 unsigned int val),
64
65 TP_ARGS(codec, reg, val)
66
67 )
68
69 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
70 DECLARE_EVENT_CLASS(snd_soc_preg,
71
72 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
73 unsigned int val),
74
75 TP_ARGS(platform, reg, val),
76
77 TP_STRUCT__entry(
78 __string( name, platform->name )
79 __field( int, id )
80 __field( unsigned int, reg )
81 __field( unsigned int, val )
82 ),
83
84 TP_fast_assign(
85 tp_strcpy(name, platform->name);
86 tp_assign(id, platform->id);
87 tp_assign(reg, reg);
88 tp_assign(val, val);
89 ),
90
91 TP_printk("platform=%s.%d reg=%x val=%x", __get_str(name),
92 (int)__entry->id, (unsigned int)__entry->reg,
93 (unsigned int)__entry->val)
94 )
95
96 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_write,
97
98 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
99 unsigned int val),
100
101 TP_ARGS(platform, reg, val)
102
103 )
104
105 DEFINE_EVENT(snd_soc_preg, snd_soc_preg_read,
106
107 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
108 unsigned int val),
109
110 TP_ARGS(platform, reg, val)
111
112 )
113 #endif
114
115 DECLARE_EVENT_CLASS(snd_soc_card,
116
117 TP_PROTO(struct snd_soc_card *card, int val),
118
119 TP_ARGS(card, val),
120
121 TP_STRUCT__entry(
122 __string( name, card->name )
123 __field( int, val )
124 ),
125
126 TP_fast_assign(
127 tp_strcpy(name, card->name);
128 tp_assign(val, val);
129 ),
130
131 TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
132 )
133
134 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
135
136 TP_PROTO(struct snd_soc_card *card, int val),
137
138 TP_ARGS(card, val)
139
140 )
141
142 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
143
144 TP_PROTO(struct snd_soc_card *card, int val),
145
146 TP_ARGS(card, val)
147
148 )
149
150 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
151
152 TP_PROTO(struct snd_soc_card *card),
153
154 TP_ARGS(card),
155
156 TP_STRUCT__entry(
157 __string( name, card->name )
158 ),
159
160 TP_fast_assign(
161 tp_strcpy(name, card->name);
162 ),
163
164 TP_printk("card=%s", __get_str(name))
165 )
166
167 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
168
169 TP_PROTO(struct snd_soc_card *card),
170
171 TP_ARGS(card)
172
173 )
174
175 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
176
177 TP_PROTO(struct snd_soc_card *card),
178
179 TP_ARGS(card)
180
181 )
182
183 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
184
185 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
186
187 TP_ARGS(w, val),
188
189 TP_STRUCT__entry(
190 __string( name, w->name )
191 __field( int, val )
192 ),
193
194 TP_fast_assign(
195 tp_strcpy(name, w->name);
196 tp_assign(val, val);
197 ),
198
199 TP_printk("widget=%s val=%d", __get_str(name),
200 (int)__entry->val)
201 )
202
203 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
204
205 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
206
207 TP_ARGS(w, val)
208
209 )
210
211 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
212
213 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
214
215 TP_ARGS(w, val)
216
217 )
218
219 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
220
221 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
222
223 TP_ARGS(w, val)
224
225 )
226
227 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
228 TRACE_EVENT(snd_soc_dapm_walk_done,
229
230 TP_PROTO(struct snd_soc_card *card),
231
232 TP_ARGS(card),
233
234 TP_STRUCT__entry(
235 __string( name, card->name )
236 __field( int, power_checks )
237 __field( int, path_checks )
238 __field( int, neighbour_checks )
239 ),
240
241 TP_fast_assign(
242 tp_strcpy(name, card->name);
243 tp_assign(power_checks, card->dapm_stats.power_checks);
244 tp_assign(path_checks, card->dapm_stats.path_checks);
245 tp_assign(neighbour_checks, card->dapm_stats.neighbour_checks);
246 ),
247
248 TP_printk("%s: checks %d power, %d path, %d neighbour",
249 __get_str(name), (int)__entry->power_checks,
250 (int)__entry->path_checks, (int)__entry->neighbour_checks)
251 )
252 #endif
253
254 TRACE_EVENT(snd_soc_jack_irq,
255
256 TP_PROTO(const char *name),
257
258 TP_ARGS(name),
259
260 TP_STRUCT__entry(
261 __string( name, name )
262 ),
263
264 TP_fast_assign(
265 tp_strcpy(name, name);
266 ),
267
268 TP_printk("%s", __get_str(name))
269 )
270
271 TRACE_EVENT(snd_soc_jack_report,
272
273 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
274
275 TP_ARGS(jack, mask, val),
276
277 TP_STRUCT__entry(
278 __string( name, jack->jack->name )
279 __field( int, mask )
280 __field( int, val )
281 ),
282
283 TP_fast_assign(
284 tp_strcpy(name, jack->jack->name);
285 tp_assign(mask, mask);
286 tp_assign(val, val);
287 ),
288
289 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
290 (int)__entry->mask)
291 )
292
293 TRACE_EVENT(snd_soc_jack_notify,
294
295 TP_PROTO(struct snd_soc_jack *jack, int val),
296
297 TP_ARGS(jack, val),
298
299 TP_STRUCT__entry(
300 __string( name, jack->jack->name )
301 __field( int, val )
302 ),
303
304 TP_fast_assign(
305 tp_strcpy(name, jack->jack->name);
306 tp_assign(val, val);
307 ),
308
309 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
310 )
311
312 TRACE_EVENT(snd_soc_cache_sync,
313
314 TP_PROTO(struct snd_soc_codec *codec, const char *type,
315 const char *status),
316
317 TP_ARGS(codec, type, status),
318
319 TP_STRUCT__entry(
320 __string( name, codec->name )
321 __string( status, status )
322 __string( type, type )
323 __field( int, id )
324 ),
325
326 TP_fast_assign(
327 tp_strcpy(name, codec->name);
328 tp_strcpy(status, status);
329 tp_strcpy(type, type);
330 tp_assign(id, codec->id);
331 ),
332
333 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
334 (int)__entry->id, __get_str(type), __get_str(status))
335 )
336
337 #endif /* _TRACE_ASOC_H */
338
339 /* This part must be outside protection */
340 #include "../../../probes/define_trace.h"
This page took 0.035298 seconds and 4 git commands to generate.