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>
13 struct snd_soc_dapm_widget
;
18 DECLARE_EVENT_CLASS(snd_soc_reg
,
20 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
23 TP_ARGS(codec
, reg
, val
),
26 __string( name
, codec
->name
)
28 __field( unsigned int, reg
)
29 __field( unsigned int, val
)
33 __assign_str(name
, codec
->name
);
34 __entry
->id
= codec
->id
;
39 TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name
),
40 (int)__entry
->id
, (unsigned int)__entry
->reg
,
41 (unsigned int)__entry
->val
)
44 DEFINE_EVENT(snd_soc_reg
, snd_soc_reg_write
,
46 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
49 TP_ARGS(codec
, reg
, val
)
53 DEFINE_EVENT(snd_soc_reg
, snd_soc_reg_read
,
55 TP_PROTO(struct snd_soc_codec
*codec
, unsigned int reg
,
58 TP_ARGS(codec
, reg
, val
)
62 DECLARE_EVENT_CLASS(snd_soc_card
,
64 TP_PROTO(struct snd_soc_card
*card
, int val
),
69 __string( name
, card
->name
)
74 __assign_str(name
, card
->name
);
78 TP_printk("card=%s val=%d", __get_str(name
), (int)__entry
->val
)
81 DEFINE_EVENT(snd_soc_card
, snd_soc_bias_level_start
,
83 TP_PROTO(struct snd_soc_card
*card
, int val
),
89 DEFINE_EVENT(snd_soc_card
, snd_soc_bias_level_done
,
91 TP_PROTO(struct snd_soc_card
*card
, int val
),
97 DECLARE_EVENT_CLASS(snd_soc_dapm_basic
,
99 TP_PROTO(struct snd_soc_card
*card
),
104 __string( name
, card
->name
)
108 __assign_str(name
, card
->name
);
111 TP_printk("card=%s", __get_str(name
))
114 DEFINE_EVENT(snd_soc_dapm_basic
, snd_soc_dapm_start
,
116 TP_PROTO(struct snd_soc_card
*card
),
122 DEFINE_EVENT(snd_soc_dapm_basic
, snd_soc_dapm_done
,
124 TP_PROTO(struct snd_soc_card
*card
),
130 DECLARE_EVENT_CLASS(snd_soc_dapm_widget
,
132 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
137 __string( name
, w
->name
)
142 __assign_str(name
, w
->name
);
146 TP_printk("widget=%s val=%d", __get_str(name
),
150 DEFINE_EVENT(snd_soc_dapm_widget
, snd_soc_dapm_widget_power
,
152 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
158 DEFINE_EVENT(snd_soc_dapm_widget
, snd_soc_dapm_widget_event_start
,
160 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
166 DEFINE_EVENT(snd_soc_dapm_widget
, snd_soc_dapm_widget_event_done
,
168 TP_PROTO(struct snd_soc_dapm_widget
*w
, int val
),
174 TRACE_EVENT(snd_soc_jack_irq
,
176 TP_PROTO(const char *name
),
181 __string( name
, name
)
185 __assign_str(name
, name
);
188 TP_printk("%s", __get_str(name
))
191 TRACE_EVENT(snd_soc_jack_report
,
193 TP_PROTO(struct snd_soc_jack
*jack
, int mask
, int val
),
195 TP_ARGS(jack
, mask
, val
),
198 __string( name
, jack
->jack
->name
)
204 __assign_str(name
, jack
->jack
->name
);
205 __entry
->mask
= mask
;
209 TP_printk("jack=%s %x/%x", __get_str(name
), (int)__entry
->val
,
213 TRACE_EVENT(snd_soc_jack_notify
,
215 TP_PROTO(struct snd_soc_jack
*jack
, int val
),
220 __string( name
, jack
->jack
->name
)
225 __assign_str(name
, jack
->jack
->name
);
229 TP_printk("jack=%s %x", __get_str(name
), (int)__entry
->val
)
232 TRACE_EVENT(snd_soc_cache_sync
,
234 TP_PROTO(struct snd_soc_codec
*codec
, const char *type
,
237 TP_ARGS(codec
, type
, status
),
240 __string( name
, codec
->name
)
241 __string( status
, status
)
242 __string( type
, type
)
247 __assign_str(name
, codec
->name
);
248 __assign_str(status
, status
);
249 __assign_str(type
, type
);
250 __entry
->id
= codec
->id
;
253 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name
),
254 (int)__entry
->id
, __get_str(type
), __get_str(status
))
257 #endif /* _TRACE_ASOC_H */
259 /* This part must be outside protection */
260 #include <trace/define_trace.h>