2 #define TRACE_SYSTEM asoc
4 #if !defined(LTTNG_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_ASOC_H
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/ktime.h>
9 #include <linux/version.h>
11 #define DAPM_DIRECT "(direct)"
13 #ifndef _TRACE_ASOC_DEF
14 #define _TRACE_ASOC_DEF
17 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \
18 LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))
19 struct snd_soc_platform
;
22 struct snd_soc_dapm_widget
;
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
30 #define CODEC_NAME_FIELD name
31 #define CODEC_ID_FIELD id
34 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))
38 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_reg
,
40 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
43 TP_ARGS(codec
, reg
, val
),
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
)
53 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg
, snd_soc_reg_write
,
55 asoc_snd_soc_reg_write
,
57 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
60 TP_ARGS(codec
, reg
, val
)
64 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg
, snd_soc_reg_read
,
66 asoc_snd_soc_reg_read
,
68 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
71 TP_ARGS(codec
, reg
, val
)
76 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \
77 LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))
78 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_preg
,
80 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
83 TP_ARGS(platform
, reg
, val
),
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
)
93 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg
, snd_soc_preg_write
,
95 asoc_snd_soc_preg_write
,
97 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
100 TP_ARGS(platform
, reg
, val
)
104 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg
, snd_soc_preg_read
,
106 asoc_snd_soc_preg_read
,
108 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
111 TP_ARGS(platform
, reg
, val
)
116 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_card
,
118 TP_PROTO(struct snd_soc_card
*card
, int val
),
123 ctf_string(name
, card
->name
)
124 ctf_integer(int, val
, val
)
128 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card
, snd_soc_bias_level_start
,
130 asoc_snd_soc_bias_level_start
,
132 TP_PROTO(struct snd_soc_card
*card
, int val
),
138 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card
, snd_soc_bias_level_done
,
140 asoc_snd_soc_bias_level_done
,
142 TP_PROTO(struct snd_soc_card
*card
, int val
),
148 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic
,
150 TP_PROTO(struct snd_soc_card
*card
),
155 ctf_string(name
, card
->name
)
159 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic
, snd_soc_dapm_start
,
161 asoc_snd_soc_dapm_start
,
163 TP_PROTO(struct snd_soc_card
*card
),
169 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic
, snd_soc_dapm_done
,
171 asoc_snd_soc_dapm_done
,
173 TP_PROTO(struct snd_soc_card
*card
),
179 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_widget
,
181 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
186 ctf_string(name
, w
->name
)
187 ctf_integer(int, val
, val
)
191 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget
, snd_soc_dapm_widget_power
,
193 asoc_snd_soc_dapm_widget_power
,
195 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
201 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget
, snd_soc_dapm_widget_event_start
,
203 asoc_snd_soc_dapm_widget_event_start
,
205 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
211 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget
, snd_soc_dapm_widget_event_done
,
213 asoc_snd_soc_dapm_widget_event_done
,
215 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
221 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
222 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done
,
224 asoc_snd_soc_dapm_walk_done
,
226 TP_PROTO(struct snd_soc_card
*card
),
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
)
239 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
240 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_output_path
,
242 asoc_snd_soc_dapm_output_path
,
244 TP_PROTO(struct snd_soc_dapm_widget
*widget
,
245 struct snd_soc_dapm_path
*path
),
247 TP_ARGS(widget
, path
),
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
)
258 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_input_path
,
260 asoc_snd_soc_dapm_input_path
,
262 TP_PROTO(struct snd_soc_dapm_widget
*widget
,
263 struct snd_soc_dapm_path
*path
),
265 TP_ARGS(widget
, path
),
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
)
276 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected
,
278 asoc_snd_soc_dapm_connected
,
280 TP_PROTO(int paths
, int stream
),
282 TP_ARGS(paths
, stream
),
285 ctf_integer(int, paths
, paths
)
286 ctf_integer(int, stream
, stream
)
291 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq
,
293 asoc_snd_soc_jack_irq
,
295 TP_PROTO(const char *name
),
300 ctf_string(name
, name
)
304 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report
,
306 asoc_snd_soc_jack_report
,
308 TP_PROTO(struct snd_soc_jack
*jack
, int mask
, int val
),
310 TP_ARGS(jack
, mask
, val
),
313 ctf_string(name
, jack
->jack
->name
)
314 ctf_integer(int, mask
, mask
)
315 ctf_integer(int, val
, val
)
319 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify
,
321 asoc_snd_soc_jack_notify
,
323 TP_PROTO(struct snd_soc_jack
*jack
, int val
),
328 ctf_string(name
, jack
->jack
->name
)
329 ctf_integer(int, val
, val
)
333 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync
,
335 asoc_snd_soc_cache_sync
,
337 TP_PROTO(struct snd_soc_codec
*codec
, const char *type
,
340 TP_ARGS(codec
, type
, status
),
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
)
350 #endif /* LTTNG_TRACE_ASOC_H */
352 /* This part must be outside protection */
353 #include <probes/define_trace.h>