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