2 #define TRACE_SYSTEM asoc
4 #if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/ktime.h>
8 #include <linux/tracepoint.h>
12 struct snd_soc_platform
;
14 struct snd_soc_dapm_widget
;
19 DECLARE_EVENT_CLASS(snd_soc_reg
,
21 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
24 TP_ARGS(codec
, reg
, val
),
27 __string( name
, codec
->name
)
29 __field( unsigned int, reg
)
30 __field( unsigned int, val
)
34 __assign_str(name
, codec
->name
);
35 __entry
->id
= codec
->id
;
40 TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name
),
41 (int)__entry
->id
, (unsigned int)__entry
->reg
,
42 (unsigned int)__entry
->val
)
45 DEFINE_EVENT(snd_soc_reg
, snd_soc_reg_write
,
47 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
50 TP_ARGS(codec
, reg
, val
)
54 DEFINE_EVENT(snd_soc_reg
, snd_soc_reg_read
,
56 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
59 TP_ARGS(codec
, reg
, val
)
63 DECLARE_EVENT_CLASS(snd_soc_preg
,
65 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
68 TP_ARGS(platform
, reg
, val
),
71 __string( name
, platform
->name
)
73 __field( unsigned int, reg
)
74 __field( unsigned int, val
)
78 __assign_str(name
, platform
->name
);
79 __entry
->id
= platform
->id
;
84 TP_printk("platform=%s.%d reg=%x val=%x", __get_str(name
),
85 (int)__entry
->id
, (unsigned int)__entry
->reg
,
86 (unsigned int)__entry
->val
)
89 DEFINE_EVENT(snd_soc_preg
, snd_soc_preg_write
,
91 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
94 TP_ARGS(platform
, reg
, val
)
98 DEFINE_EVENT(snd_soc_preg
, snd_soc_preg_read
,
100 TP_PROTO(struct snd_soc_platform
*platform
, unsigned int reg
,
103 TP_ARGS(platform
, reg
, val
)
107 DECLARE_EVENT_CLASS(snd_soc_card
,
109 TP_PROTO(struct snd_soc_card
*card
, int val
),
114 __string( name
, card
->name
)
119 __assign_str(name
, card
->name
);
123 TP_printk("card=%s val=%d", __get_str(name
), (int)__entry
->val
)
126 DEFINE_EVENT(snd_soc_card
, snd_soc_bias_level_start
,
128 TP_PROTO(struct snd_soc_card
*card
, int val
),
134 DEFINE_EVENT(snd_soc_card
, snd_soc_bias_level_done
,
136 TP_PROTO(struct snd_soc_card
*card
, int val
),
142 DECLARE_EVENT_CLASS(snd_soc_dapm_basic
,
144 TP_PROTO(struct snd_soc_card
*card
),
149 __string( name
, card
->name
)
153 __assign_str(name
, card
->name
);
156 TP_printk("card=%s", __get_str(name
))
159 DEFINE_EVENT(snd_soc_dapm_basic
, snd_soc_dapm_start
,
161 TP_PROTO(struct snd_soc_card
*card
),
167 DEFINE_EVENT(snd_soc_dapm_basic
, snd_soc_dapm_done
,
169 TP_PROTO(struct snd_soc_card
*card
),
175 DECLARE_EVENT_CLASS(snd_soc_dapm_widget
,
177 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
182 __string( name
, w
->name
)
187 __assign_str(name
, w
->name
);
191 TP_printk("widget=%s val=%d", __get_str(name
),
195 DEFINE_EVENT(snd_soc_dapm_widget
, snd_soc_dapm_widget_power
,
197 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
203 DEFINE_EVENT(snd_soc_dapm_widget
, snd_soc_dapm_widget_event_start
,
205 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
211 DEFINE_EVENT(snd_soc_dapm_widget
, snd_soc_dapm_widget_event_done
,
213 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
219 TRACE_EVENT(snd_soc_dapm_walk_done
,
221 TP_PROTO(struct snd_soc_card
*card
),
226 __string( name
, card
->name
)
227 __field( int, power_checks
)
228 __field( int, path_checks
)
229 __field( int, neighbour_checks
)
233 __assign_str(name
, card
->name
);
234 __entry
->power_checks
= card
->dapm_stats
.power_checks
;
235 __entry
->path_checks
= card
->dapm_stats
.path_checks
;
236 __entry
->neighbour_checks
= card
->dapm_stats
.neighbour_checks
;
239 TP_printk("%s: checks %d power, %d path, %d neighbour",
240 __get_str(name
), (int)__entry
->power_checks
,
241 (int)__entry
->path_checks
, (int)__entry
->neighbour_checks
)
244 TRACE_EVENT(snd_soc_jack_irq
,
246 TP_PROTO(const char *name
),
251 __string( name
, name
)
255 __assign_str(name
, name
);
258 TP_printk("%s", __get_str(name
))
261 TRACE_EVENT(snd_soc_jack_report
,
263 TP_PROTO(struct snd_soc_jack
*jack
, int mask
, int val
),
265 TP_ARGS(jack
, mask
, val
),
268 __string( name
, jack
->jack
->name
)
274 __assign_str(name
, jack
->jack
->name
);
275 __entry
->mask
= mask
;
279 TP_printk("jack=%s %x/%x", __get_str(name
), (int)__entry
->val
,
283 TRACE_EVENT(snd_soc_jack_notify
,
285 TP_PROTO(struct snd_soc_jack
*jack
, int val
),
290 __string( name
, jack
->jack
->name
)
295 __assign_str(name
, jack
->jack
->name
);
299 TP_printk("jack=%s %x", __get_str(name
), (int)__entry
->val
)
302 TRACE_EVENT(snd_soc_cache_sync
,
304 TP_PROTO(struct snd_soc_codec
*codec
, const char *type
,
307 TP_ARGS(codec
, type
, status
),
310 __string( name
, codec
->name
)
311 __string( status
, status
)
312 __string( type
, type
)
317 __assign_str(name
, codec
->name
);
318 __assign_str(status
, status
);
319 __assign_str(type
, type
);
320 __entry
->id
= codec
->id
;
323 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name
),
324 (int)__entry
->id
, __get_str(type
), __get_str(status
))
327 #endif /* _TRACE_ASOC_H */
329 /* This part must be outside protection */
330 #include <trace/define_trace.h>