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_jack_irq
,
221 TP_PROTO(const char *name
),
226 __string( name
, name
)
230 __assign_str(name
, name
);
233 TP_printk("%s", __get_str(name
))
236 TRACE_EVENT(snd_soc_jack_report
,
238 TP_PROTO(struct snd_soc_jack
*jack
, int mask
, int val
),
240 TP_ARGS(jack
, mask
, val
),
243 __string( name
, jack
->jack
->name
)
249 __assign_str(name
, jack
->jack
->name
);
250 __entry
->mask
= mask
;
254 TP_printk("jack=%s %x/%x", __get_str(name
), (int)__entry
->val
,
258 TRACE_EVENT(snd_soc_jack_notify
,
260 TP_PROTO(struct snd_soc_jack
*jack
, int val
),
265 __string( name
, jack
->jack
->name
)
270 __assign_str(name
, jack
->jack
->name
);
274 TP_printk("jack=%s %x", __get_str(name
), (int)__entry
->val
)
277 TRACE_EVENT(snd_soc_cache_sync
,
279 TP_PROTO(struct snd_soc_codec
*codec
, const char *type
,
282 TP_ARGS(codec
, type
, status
),
285 __string( name
, codec
->name
)
286 __string( status
, status
)
287 __string( type
, type
)
292 __assign_str(name
, codec
->name
);
293 __assign_str(status
, status
);
294 __assign_str(type
, type
);
295 __entry
->id
= codec
->id
;
298 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name
),
299 (int)__entry
->id
, __get_str(type
), __get_str(status
))
302 #endif /* _TRACE_ASOC_H */
304 /* This part must be outside protection */
305 #include <trace/define_trace.h>