Commit | Line | Data |
---|---|---|
b283666f PW |
1 | #undef TRACE_SYSTEM |
2 | #define TRACE_SYSTEM asoc | |
3 | ||
3bc29f0a MD |
4 | #if !defined(LTTNG_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ) |
5 | #define LTTNG_TRACE_ASOC_H | |
b283666f | 6 | |
6ec43db8 | 7 | #include <probes/lttng-tracepoint-event.h> |
b283666f | 8 | #include <linux/ktime.h> |
b283666f PW |
9 | #include <linux/version.h> |
10 | ||
7c68b363 AG |
11 | #define DAPM_DIRECT "(direct)" |
12 | ||
b283666f PW |
13 | #ifndef _TRACE_ASOC_DEF |
14 | #define _TRACE_ASOC_DEF | |
15 | struct snd_soc_jack; | |
4d0e0310 | 16 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) |
b283666f | 17 | struct snd_soc_codec; |
4d0e0310 | 18 | #endif |
e0407e48 MJ |
19 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \ |
20 | LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)) | |
b283666f PW |
21 | struct snd_soc_platform; |
22 | #endif | |
23 | struct snd_soc_card; | |
24 | struct snd_soc_dapm_widget; | |
83be3f4f MJ |
25 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) |
26 | struct snd_soc_dapm_path; | |
27 | #endif | |
b283666f PW |
28 | #endif |
29 | ||
5f9ff4e2 MJ |
30 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) \ |
31 | || LTTNG_RHEL_KERNEL_RANGE(3,10,0,514,0,0, 3,11,0,0,0,0)) | |
7df57eb5 NK |
32 | #define CODEC_NAME_FIELD component.name |
33 | #define CODEC_ID_FIELD component.id | |
34 | #else | |
35 | #define CODEC_NAME_FIELD name | |
36 | #define CODEC_ID_FIELD id | |
37 | #endif | |
38 | ||
e0407e48 | 39 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)) |
b283666f PW |
40 | /* |
41 | * Log register events | |
42 | */ | |
7c9c39d2 | 43 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_reg, |
b283666f PW |
44 | |
45 | TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, | |
46 | unsigned int val), | |
47 | ||
48 | TP_ARGS(codec, reg, val), | |
49 | ||
f127e61e MD |
50 | TP_FIELDS( |
51 | ctf_string(name, codec->CODEC_NAME_FIELD) | |
52 | ctf_integer(int, id, codec->CODEC_ID_FIELD) | |
53 | ctf_integer(unsigned int, reg, reg) | |
54 | ctf_integer(unsigned int, val, val) | |
55 | ) | |
b283666f PW |
56 | ) |
57 | ||
7c9c39d2 MD |
58 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_write, |
59 | ||
60 | asoc_snd_soc_reg_write, | |
b283666f PW |
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 | ||
7c9c39d2 MD |
69 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_read, |
70 | ||
71 | asoc_snd_soc_reg_read, | |
b283666f PW |
72 | |
73 | TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, | |
74 | unsigned int val), | |
75 | ||
76 | TP_ARGS(codec, reg, val) | |
77 | ||
78 | ) | |
e0407e48 | 79 | #endif |
b283666f | 80 | |
e0407e48 MJ |
81 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \ |
82 | LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)) | |
7c9c39d2 | 83 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_preg, |
b283666f PW |
84 | |
85 | TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, | |
86 | unsigned int val), | |
87 | ||
88 | TP_ARGS(platform, reg, val), | |
89 | ||
f127e61e MD |
90 | TP_FIELDS( |
91 | ctf_string(name, platform->CODEC_NAME_FIELD) | |
92 | ctf_integer(int, id, platform->CODEC_ID_FIELD) | |
93 | ctf_integer(unsigned int, reg, reg) | |
94 | ctf_integer(unsigned int, val, val) | |
95 | ) | |
b283666f PW |
96 | ) |
97 | ||
7c9c39d2 MD |
98 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg, snd_soc_preg_write, |
99 | ||
100 | asoc_snd_soc_preg_write, | |
b283666f PW |
101 | |
102 | TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, | |
103 | unsigned int val), | |
104 | ||
105 | TP_ARGS(platform, reg, val) | |
106 | ||
107 | ) | |
108 | ||
7c9c39d2 MD |
109 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg, snd_soc_preg_read, |
110 | ||
111 | asoc_snd_soc_preg_read, | |
b283666f PW |
112 | |
113 | TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, | |
114 | unsigned int val), | |
115 | ||
116 | TP_ARGS(platform, reg, val) | |
117 | ||
118 | ) | |
119 | #endif | |
120 | ||
7c9c39d2 | 121 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_card, |
b283666f PW |
122 | |
123 | TP_PROTO(struct snd_soc_card *card, int val), | |
124 | ||
125 | TP_ARGS(card, val), | |
126 | ||
f127e61e MD |
127 | TP_FIELDS( |
128 | ctf_string(name, card->name) | |
129 | ctf_integer(int, val, val) | |
130 | ) | |
b283666f PW |
131 | ) |
132 | ||
7c9c39d2 MD |
133 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_start, |
134 | ||
135 | asoc_snd_soc_bias_level_start, | |
b283666f PW |
136 | |
137 | TP_PROTO(struct snd_soc_card *card, int val), | |
138 | ||
139 | TP_ARGS(card, val) | |
140 | ||
141 | ) | |
142 | ||
7c9c39d2 MD |
143 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_done, |
144 | ||
145 | asoc_snd_soc_bias_level_done, | |
b283666f PW |
146 | |
147 | TP_PROTO(struct snd_soc_card *card, int val), | |
148 | ||
149 | TP_ARGS(card, val) | |
150 | ||
151 | ) | |
152 | ||
7c9c39d2 | 153 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic, |
b283666f PW |
154 | |
155 | TP_PROTO(struct snd_soc_card *card), | |
156 | ||
157 | TP_ARGS(card), | |
158 | ||
f127e61e MD |
159 | TP_FIELDS( |
160 | ctf_string(name, card->name) | |
161 | ) | |
b283666f PW |
162 | ) |
163 | ||
7c9c39d2 MD |
164 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_start, |
165 | ||
166 | asoc_snd_soc_dapm_start, | |
b283666f PW |
167 | |
168 | TP_PROTO(struct snd_soc_card *card), | |
169 | ||
170 | TP_ARGS(card) | |
171 | ||
172 | ) | |
173 | ||
7c9c39d2 MD |
174 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_done, |
175 | ||
176 | asoc_snd_soc_dapm_done, | |
b283666f PW |
177 | |
178 | TP_PROTO(struct snd_soc_card *card), | |
179 | ||
180 | TP_ARGS(card) | |
181 | ||
182 | ) | |
183 | ||
7c9c39d2 | 184 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_widget, |
b283666f PW |
185 | |
186 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
187 | ||
188 | TP_ARGS(w, val), | |
189 | ||
f127e61e MD |
190 | TP_FIELDS( |
191 | ctf_string(name, w->name) | |
192 | ctf_integer(int, val, val) | |
193 | ) | |
b283666f PW |
194 | ) |
195 | ||
7c9c39d2 MD |
196 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_power, |
197 | ||
198 | asoc_snd_soc_dapm_widget_power, | |
b283666f PW |
199 | |
200 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
201 | ||
202 | TP_ARGS(w, val) | |
203 | ||
204 | ) | |
205 | ||
7c9c39d2 MD |
206 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_event_start, |
207 | ||
208 | asoc_snd_soc_dapm_widget_event_start, | |
b283666f PW |
209 | |
210 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
211 | ||
212 | TP_ARGS(w, val) | |
213 | ||
214 | ) | |
215 | ||
7c9c39d2 MD |
216 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_event_done, |
217 | ||
218 | asoc_snd_soc_dapm_widget_event_done, | |
b283666f PW |
219 | |
220 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
221 | ||
222 | TP_ARGS(w, val) | |
223 | ||
224 | ) | |
225 | ||
226 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) | |
7c9c39d2 MD |
227 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done, |
228 | ||
229 | asoc_snd_soc_dapm_walk_done, | |
b283666f PW |
230 | |
231 | TP_PROTO(struct snd_soc_card *card), | |
232 | ||
233 | TP_ARGS(card), | |
234 | ||
f127e61e MD |
235 | TP_FIELDS( |
236 | ctf_string(name, card->name) | |
237 | ctf_integer(int, power_checks, card->dapm_stats.power_checks) | |
238 | ctf_integer(int, path_checks, card->dapm_stats.path_checks) | |
239 | ctf_integer(int, neighbour_checks, card->dapm_stats.neighbour_checks) | |
240 | ) | |
b283666f PW |
241 | ) |
242 | #endif | |
243 | ||
83be3f4f MJ |
244 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) |
245 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_path, | |
246 | ||
247 | asoc_snd_soc_dapm_path, | |
248 | ||
249 | TP_PROTO(struct snd_soc_dapm_widget *widget, | |
250 | enum snd_soc_dapm_direction dir, | |
251 | struct snd_soc_dapm_path *path), | |
252 | ||
253 | TP_ARGS(widget, dir, path), | |
254 | ||
255 | TP_FIELDS( | |
256 | ctf_string(wname, widget->name) | |
257 | ctf_string(pname, path->name ? path->name : DAPM_DIRECT) | |
258 | ctf_string(pnname, path->node[dir]->name) | |
259 | ctf_integer(int, path_node, (long) path->node[dir]) | |
260 | ctf_integer(int, path_connect, path->connect) | |
261 | ctf_integer(int, path_dir, dir) | |
262 | ) | |
263 | ) | |
264 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) | |
7c9c39d2 MD |
265 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_output_path, |
266 | ||
267 | asoc_snd_soc_dapm_output_path, | |
7c68b363 AG |
268 | |
269 | TP_PROTO(struct snd_soc_dapm_widget *widget, | |
270 | struct snd_soc_dapm_path *path), | |
271 | ||
272 | TP_ARGS(widget, path), | |
273 | ||
f127e61e MD |
274 | TP_FIELDS( |
275 | ctf_string(wname, widget->name) | |
276 | ctf_string(pname, path->name ? path->name : DAPM_DIRECT) | |
277 | ctf_string(psname, path->sink->name) | |
278 | ctf_integer(int, path_sink, (long) path->sink) | |
279 | ctf_integer(int, path_connect, path->connect) | |
280 | ) | |
7c68b363 AG |
281 | ) |
282 | ||
7c9c39d2 MD |
283 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_input_path, |
284 | ||
285 | asoc_snd_soc_dapm_input_path, | |
7c68b363 AG |
286 | |
287 | TP_PROTO(struct snd_soc_dapm_widget *widget, | |
288 | struct snd_soc_dapm_path *path), | |
289 | ||
290 | TP_ARGS(widget, path), | |
291 | ||
f127e61e MD |
292 | TP_FIELDS( |
293 | ctf_string(wname, widget->name) | |
294 | ctf_string(pname,path->name ? path->name : DAPM_DIRECT) | |
295 | ctf_string(psname, path->source->name) | |
296 | ctf_integer(int, path_source, (long) path->source) | |
297 | ctf_integer(int, path_connect, path->connect) | |
298 | ) | |
7c68b363 | 299 | ) |
83be3f4f | 300 | #endif |
7c68b363 | 301 | |
83be3f4f | 302 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) |
7c9c39d2 MD |
303 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected, |
304 | ||
305 | asoc_snd_soc_dapm_connected, | |
7c68b363 AG |
306 | |
307 | TP_PROTO(int paths, int stream), | |
308 | ||
309 | TP_ARGS(paths, stream), | |
310 | ||
f127e61e MD |
311 | TP_FIELDS( |
312 | ctf_integer(int, paths, paths) | |
313 | ctf_integer(int, stream, stream) | |
314 | ) | |
7c68b363 AG |
315 | ) |
316 | #endif | |
317 | ||
7c9c39d2 MD |
318 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq, |
319 | ||
320 | asoc_snd_soc_jack_irq, | |
b283666f PW |
321 | |
322 | TP_PROTO(const char *name), | |
323 | ||
324 | TP_ARGS(name), | |
325 | ||
f127e61e MD |
326 | TP_FIELDS( |
327 | ctf_string(name, name) | |
328 | ) | |
b283666f PW |
329 | ) |
330 | ||
ecd86863 MJ |
331 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) |
332 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report, | |
333 | ||
334 | asoc_snd_soc_jack_report, | |
335 | ||
336 | TP_PROTO(struct snd_soc_jack *jack, int mask, int val), | |
337 | ||
338 | TP_ARGS(jack, mask, val), | |
339 | ||
340 | TP_FIELDS( | |
341 | ctf_string(name, jack->jack->id) | |
342 | ctf_integer(int, mask, mask) | |
343 | ctf_integer(int, val, val) | |
344 | ) | |
345 | ) | |
346 | ||
347 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify, | |
348 | ||
349 | asoc_snd_soc_jack_notify, | |
350 | ||
351 | TP_PROTO(struct snd_soc_jack *jack, int val), | |
352 | ||
353 | TP_ARGS(jack, val), | |
354 | ||
355 | TP_FIELDS( | |
356 | ctf_string(name, jack->jack->id) | |
357 | ctf_integer(int, val, val) | |
358 | ) | |
359 | ) | |
360 | #else | |
7c9c39d2 MD |
361 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report, |
362 | ||
363 | asoc_snd_soc_jack_report, | |
b283666f PW |
364 | |
365 | TP_PROTO(struct snd_soc_jack *jack, int mask, int val), | |
366 | ||
367 | TP_ARGS(jack, mask, val), | |
368 | ||
f127e61e MD |
369 | TP_FIELDS( |
370 | ctf_string(name, jack->jack->name) | |
371 | ctf_integer(int, mask, mask) | |
372 | ctf_integer(int, val, val) | |
373 | ) | |
b283666f PW |
374 | ) |
375 | ||
7c9c39d2 MD |
376 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify, |
377 | ||
378 | asoc_snd_soc_jack_notify, | |
b283666f PW |
379 | |
380 | TP_PROTO(struct snd_soc_jack *jack, int val), | |
381 | ||
382 | TP_ARGS(jack, val), | |
383 | ||
f127e61e MD |
384 | TP_FIELDS( |
385 | ctf_string(name, jack->jack->name) | |
386 | ctf_integer(int, val, val) | |
387 | ) | |
b283666f | 388 | ) |
ecd86863 | 389 | #endif |
b283666f | 390 | |
4d0e0310 | 391 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) |
7c9c39d2 MD |
392 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync, |
393 | ||
394 | asoc_snd_soc_cache_sync, | |
b283666f PW |
395 | |
396 | TP_PROTO(struct snd_soc_codec *codec, const char *type, | |
397 | const char *status), | |
398 | ||
399 | TP_ARGS(codec, type, status), | |
400 | ||
f127e61e MD |
401 | TP_FIELDS( |
402 | ctf_string(name, codec->CODEC_NAME_FIELD) | |
403 | ctf_string(status, status) | |
404 | ctf_string(type, type) | |
405 | ctf_integer(int, id, codec->CODEC_ID_FIELD) | |
406 | ) | |
b283666f | 407 | ) |
4d0e0310 | 408 | #endif |
b283666f | 409 | |
3bc29f0a | 410 | #endif /* LTTNG_TRACE_ASOC_H */ |
b283666f PW |
411 | |
412 | /* This part must be outside protection */ | |
6ec43db8 | 413 | #include <probes/define_trace.h> |