Fix: update sched instrumentation for kernel 4.12
[lttng-modules.git] / instrumentation / events / lttng-module / asoc.h
CommitLineData
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
15struct snd_soc_jack;
16struct snd_soc_codec;
17#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
18struct snd_soc_platform;
19#endif
20struct snd_soc_card;
21struct snd_soc_dapm_widget;
22#endif
23
f61eb285
MJ
24#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) \
25 || LTTNG_RHEL_KERNEL_RANGE(3,10,0,514,0,0, 3,11,0,0,0,0))
7df57eb5
NK
26#define CODEC_NAME_FIELD component.name
27#define CODEC_ID_FIELD component.id
28#else
29#define CODEC_NAME_FIELD name
30#define CODEC_ID_FIELD id
31#endif
32
b283666f
PW
33/*
34 * Log register events
35 */
7c9c39d2 36LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_reg,
b283666f
PW
37
38 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
39 unsigned int val),
40
41 TP_ARGS(codec, reg, val),
42
f127e61e
MD
43 TP_FIELDS(
44 ctf_string(name, codec->CODEC_NAME_FIELD)
45 ctf_integer(int, id, codec->CODEC_ID_FIELD)
46 ctf_integer(unsigned int, reg, reg)
47 ctf_integer(unsigned int, val, val)
48 )
b283666f
PW
49)
50
7c9c39d2
MD
51LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_write,
52
53 asoc_snd_soc_reg_write,
b283666f
PW
54
55 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
56 unsigned int val),
57
58 TP_ARGS(codec, reg, val)
59
60)
61
7c9c39d2
MD
62LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_read,
63
64 asoc_snd_soc_reg_read,
b283666f
PW
65
66 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
67 unsigned int val),
68
69 TP_ARGS(codec, reg, val)
70
71)
72
73#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
7c9c39d2 74LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_preg,
b283666f
PW
75
76 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
77 unsigned int val),
78
79 TP_ARGS(platform, reg, val),
80
f127e61e
MD
81 TP_FIELDS(
82 ctf_string(name, platform->CODEC_NAME_FIELD)
83 ctf_integer(int, id, platform->CODEC_ID_FIELD)
84 ctf_integer(unsigned int, reg, reg)
85 ctf_integer(unsigned int, val, val)
86 )
b283666f
PW
87)
88
7c9c39d2
MD
89LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg, snd_soc_preg_write,
90
91 asoc_snd_soc_preg_write,
b283666f
PW
92
93 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
94 unsigned int val),
95
96 TP_ARGS(platform, reg, val)
97
98)
99
7c9c39d2
MD
100LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg, snd_soc_preg_read,
101
102 asoc_snd_soc_preg_read,
b283666f
PW
103
104 TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
105 unsigned int val),
106
107 TP_ARGS(platform, reg, val)
108
109)
110#endif
111
7c9c39d2 112LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_card,
b283666f
PW
113
114 TP_PROTO(struct snd_soc_card *card, int val),
115
116 TP_ARGS(card, val),
117
f127e61e
MD
118 TP_FIELDS(
119 ctf_string(name, card->name)
120 ctf_integer(int, val, val)
121 )
b283666f
PW
122)
123
7c9c39d2
MD
124LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_start,
125
126 asoc_snd_soc_bias_level_start,
b283666f
PW
127
128 TP_PROTO(struct snd_soc_card *card, int val),
129
130 TP_ARGS(card, val)
131
132)
133
7c9c39d2
MD
134LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_done,
135
136 asoc_snd_soc_bias_level_done,
b283666f
PW
137
138 TP_PROTO(struct snd_soc_card *card, int val),
139
140 TP_ARGS(card, val)
141
142)
143
7c9c39d2 144LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic,
b283666f
PW
145
146 TP_PROTO(struct snd_soc_card *card),
147
148 TP_ARGS(card),
149
f127e61e
MD
150 TP_FIELDS(
151 ctf_string(name, card->name)
152 )
b283666f
PW
153)
154
7c9c39d2
MD
155LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_start,
156
157 asoc_snd_soc_dapm_start,
b283666f
PW
158
159 TP_PROTO(struct snd_soc_card *card),
160
161 TP_ARGS(card)
162
163)
164
7c9c39d2
MD
165LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_done,
166
167 asoc_snd_soc_dapm_done,
b283666f
PW
168
169 TP_PROTO(struct snd_soc_card *card),
170
171 TP_ARGS(card)
172
173)
174
7c9c39d2 175LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_widget,
b283666f
PW
176
177 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
178
179 TP_ARGS(w, val),
180
f127e61e
MD
181 TP_FIELDS(
182 ctf_string(name, w->name)
183 ctf_integer(int, val, val)
184 )
b283666f
PW
185)
186
7c9c39d2
MD
187LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_power,
188
189 asoc_snd_soc_dapm_widget_power,
b283666f
PW
190
191 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
192
193 TP_ARGS(w, val)
194
195)
196
7c9c39d2
MD
197LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
198
199 asoc_snd_soc_dapm_widget_event_start,
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_done,
208
209 asoc_snd_soc_dapm_widget_event_done,
b283666f
PW
210
211 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
212
213 TP_ARGS(w, val)
214
215)
216
217#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
7c9c39d2
MD
218LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done,
219
220 asoc_snd_soc_dapm_walk_done,
b283666f
PW
221
222 TP_PROTO(struct snd_soc_card *card),
223
224 TP_ARGS(card),
225
f127e61e
MD
226 TP_FIELDS(
227 ctf_string(name, card->name)
228 ctf_integer(int, power_checks, card->dapm_stats.power_checks)
229 ctf_integer(int, path_checks, card->dapm_stats.path_checks)
230 ctf_integer(int, neighbour_checks, card->dapm_stats.neighbour_checks)
231 )
b283666f
PW
232)
233#endif
234
7c68b363 235#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
7c9c39d2
MD
236LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_output_path,
237
238 asoc_snd_soc_dapm_output_path,
7c68b363
AG
239
240 TP_PROTO(struct snd_soc_dapm_widget *widget,
241 struct snd_soc_dapm_path *path),
242
243 TP_ARGS(widget, path),
244
f127e61e
MD
245 TP_FIELDS(
246 ctf_string(wname, widget->name)
247 ctf_string(pname, path->name ? path->name : DAPM_DIRECT)
248 ctf_string(psname, path->sink->name)
249 ctf_integer(int, path_sink, (long) path->sink)
250 ctf_integer(int, path_connect, path->connect)
251 )
7c68b363
AG
252)
253
7c9c39d2
MD
254LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_input_path,
255
256 asoc_snd_soc_dapm_input_path,
7c68b363
AG
257
258 TP_PROTO(struct snd_soc_dapm_widget *widget,
259 struct snd_soc_dapm_path *path),
260
261 TP_ARGS(widget, path),
262
f127e61e
MD
263 TP_FIELDS(
264 ctf_string(wname, widget->name)
265 ctf_string(pname,path->name ? path->name : DAPM_DIRECT)
266 ctf_string(psname, path->source->name)
267 ctf_integer(int, path_source, (long) path->source)
268 ctf_integer(int, path_connect, path->connect)
269 )
7c68b363
AG
270)
271
7c9c39d2
MD
272LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected,
273
274 asoc_snd_soc_dapm_connected,
7c68b363
AG
275
276 TP_PROTO(int paths, int stream),
277
278 TP_ARGS(paths, stream),
279
f127e61e
MD
280 TP_FIELDS(
281 ctf_integer(int, paths, paths)
282 ctf_integer(int, stream, stream)
283 )
7c68b363
AG
284)
285#endif
286
7c9c39d2
MD
287LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq,
288
289 asoc_snd_soc_jack_irq,
b283666f
PW
290
291 TP_PROTO(const char *name),
292
293 TP_ARGS(name),
294
f127e61e
MD
295 TP_FIELDS(
296 ctf_string(name, name)
297 )
b283666f
PW
298)
299
7c9c39d2
MD
300LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report,
301
302 asoc_snd_soc_jack_report,
b283666f
PW
303
304 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
305
306 TP_ARGS(jack, mask, val),
307
f127e61e
MD
308 TP_FIELDS(
309 ctf_string(name, jack->jack->name)
310 ctf_integer(int, mask, mask)
311 ctf_integer(int, val, val)
312 )
b283666f
PW
313)
314
7c9c39d2
MD
315LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify,
316
317 asoc_snd_soc_jack_notify,
b283666f
PW
318
319 TP_PROTO(struct snd_soc_jack *jack, int val),
320
321 TP_ARGS(jack, val),
322
f127e61e
MD
323 TP_FIELDS(
324 ctf_string(name, jack->jack->name)
325 ctf_integer(int, val, val)
326 )
b283666f
PW
327)
328
7c9c39d2
MD
329LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync,
330
331 asoc_snd_soc_cache_sync,
b283666f
PW
332
333 TP_PROTO(struct snd_soc_codec *codec, const char *type,
334 const char *status),
335
336 TP_ARGS(codec, type, status),
337
f127e61e
MD
338 TP_FIELDS(
339 ctf_string(name, codec->CODEC_NAME_FIELD)
340 ctf_string(status, status)
341 ctf_string(type, type)
342 ctf_integer(int, id, codec->CODEC_ID_FIELD)
343 )
b283666f
PW
344)
345
3bc29f0a 346#endif /* LTTNG_TRACE_ASOC_H */
b283666f
PW
347
348/* This part must be outside protection */
6ec43db8 349#include <probes/define_trace.h>
This page took 0.047097 seconds and 4 git commands to generate.