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 struct snd_soc_platform
;
21 struct snd_soc_dapm_widget
;
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))
26 #define CODEC_NAME_FIELD component.name
27 #define CODEC_ID_FIELD component.id
29 #define CODEC_NAME_FIELD name
30 #define CODEC_ID_FIELD id
36 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_reg
,
38 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
41 TP_ARGS(codec
, reg
, val
),
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
)
51 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg
, snd_soc_reg_write
,
53 asoc_snd_soc_reg_write
,
55 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
58 TP_ARGS(codec
, reg
, val
)
62 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg
, snd_soc_reg_read
,
64 asoc_snd_soc_reg_read
,
66 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
69 TP_ARGS(codec
, reg
, val
)
73 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
74 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_preg
,
76 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
79 TP_ARGS(platform
, reg
, val
),
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
)
89 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg
, snd_soc_preg_write
,
91 asoc_snd_soc_preg_write
,
93 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
96 TP_ARGS(platform
, reg
, val
)
100 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_preg
, snd_soc_preg_read
,
102 asoc_snd_soc_preg_read
,
104 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
107 TP_ARGS(platform
, reg
, val
)
112 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_card
,
114 TP_PROTO(struct snd_soc_card
*card
, int val
),
119 ctf_string(name
, card
->name
)
120 ctf_integer(int, val
, val
)
124 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card
, snd_soc_bias_level_start
,
126 asoc_snd_soc_bias_level_start
,
128 TP_PROTO(struct snd_soc_card
*card
, int val
),
134 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card
, snd_soc_bias_level_done
,
136 asoc_snd_soc_bias_level_done
,
138 TP_PROTO(struct snd_soc_card
*card
, int val
),
144 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic
,
146 TP_PROTO(struct snd_soc_card
*card
),
151 ctf_string(name
, card
->name
)
155 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic
, snd_soc_dapm_start
,
157 asoc_snd_soc_dapm_start
,
159 TP_PROTO(struct snd_soc_card
*card
),
165 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic
, snd_soc_dapm_done
,
167 asoc_snd_soc_dapm_done
,
169 TP_PROTO(struct snd_soc_card
*card
),
175 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_widget
,
177 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
182 ctf_string(name
, w
->name
)
183 ctf_integer(int, val
, val
)
187 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget
, snd_soc_dapm_widget_power
,
189 asoc_snd_soc_dapm_widget_power
,
191 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
197 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget
, snd_soc_dapm_widget_event_start
,
199 asoc_snd_soc_dapm_widget_event_start
,
201 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
207 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget
, snd_soc_dapm_widget_event_done
,
209 asoc_snd_soc_dapm_widget_event_done
,
211 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
217 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
218 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done
,
220 asoc_snd_soc_dapm_walk_done
,
222 TP_PROTO(struct snd_soc_card
*card
),
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
)
235 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
236 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_output_path
,
238 asoc_snd_soc_dapm_output_path
,
240 TP_PROTO(struct snd_soc_dapm_widget
*widget
,
241 struct snd_soc_dapm_path
*path
),
243 TP_ARGS(widget
, path
),
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
)
254 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_input_path
,
256 asoc_snd_soc_dapm_input_path
,
258 TP_PROTO(struct snd_soc_dapm_widget
*widget
,
259 struct snd_soc_dapm_path
*path
),
261 TP_ARGS(widget
, path
),
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
)
272 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected
,
274 asoc_snd_soc_dapm_connected
,
276 TP_PROTO(int paths
, int stream
),
278 TP_ARGS(paths
, stream
),
281 ctf_integer(int, paths
, paths
)
282 ctf_integer(int, stream
, stream
)
287 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq
,
289 asoc_snd_soc_jack_irq
,
291 TP_PROTO(const char *name
),
296 ctf_string(name
, name
)
300 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report
,
302 asoc_snd_soc_jack_report
,
304 TP_PROTO(struct snd_soc_jack
*jack
, int mask
, int val
),
306 TP_ARGS(jack
, mask
, val
),
309 ctf_string(name
, jack
->jack
->name
)
310 ctf_integer(int, mask
, mask
)
311 ctf_integer(int, val
, val
)
315 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify
,
317 asoc_snd_soc_jack_notify
,
319 TP_PROTO(struct snd_soc_jack
*jack
, int val
),
324 ctf_string(name
, jack
->jack
->name
)
325 ctf_integer(int, val
, val
)
329 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync
,
331 asoc_snd_soc_cache_sync
,
333 TP_PROTO(struct snd_soc_codec
*codec
, const char *type
,
336 TP_ARGS(codec
, type
, status
),
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
)
346 #endif /* LTTNG_TRACE_ASOC_H */
348 /* This part must be outside protection */
349 #include <probes/define_trace.h>