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