mfd: ab3500: world-writable debugfs register-* files
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / trace / events / asoc.h
blobae973d2e27a11fa30ee926f8a72ed6b66b8138d1
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM asoc
4 #if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_ASOC_H
7 #include <linux/ktime.h>
8 #include <linux/tracepoint.h>
10 struct snd_soc_jack;
11 struct snd_soc_codec;
12 struct snd_soc_card;
13 struct snd_soc_dapm_widget;
16 * Log register events
18 DECLARE_EVENT_CLASS(snd_soc_reg,
20 TP_PROTO(struct snd_soc_codec *codec, unsigned int reg,
21 unsigned int val),
23 TP_ARGS(codec, reg, val),
25 TP_STRUCT__entry(
26 __string( name, codec->name )
27 __field( int, id )
28 __field( unsigned int, reg )
29 __field( unsigned int, val )
32 TP_fast_assign(
33 __assign_str(name, codec->name);
34 __entry->id = codec->id;
35 __entry->reg = reg;
36 __entry->val = val;
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,
47 unsigned int val),
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,
56 unsigned int val),
58 TP_ARGS(codec, reg, val)
62 DECLARE_EVENT_CLASS(snd_soc_card,
64 TP_PROTO(struct snd_soc_card *card, int val),
66 TP_ARGS(card, val),
68 TP_STRUCT__entry(
69 __string( name, card->name )
70 __field( int, val )
73 TP_fast_assign(
74 __assign_str(name, card->name);
75 __entry->val = val;
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),
85 TP_ARGS(card, val)
89 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
91 TP_PROTO(struct snd_soc_card *card, int val),
93 TP_ARGS(card, val)
97 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
99 TP_PROTO(struct snd_soc_card *card),
101 TP_ARGS(card),
103 TP_STRUCT__entry(
104 __string( name, card->name )
107 TP_fast_assign(
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),
118 TP_ARGS(card)
122 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
124 TP_PROTO(struct snd_soc_card *card),
126 TP_ARGS(card)
130 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
132 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
134 TP_ARGS(w, val),
136 TP_STRUCT__entry(
137 __string( name, w->name )
138 __field( int, val )
141 TP_fast_assign(
142 __assign_str(name, w->name);
143 __entry->val = val;
146 TP_printk("widget=%s val=%d", __get_str(name),
147 (int)__entry->val)
150 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
152 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
154 TP_ARGS(w, 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),
162 TP_ARGS(w, 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),
170 TP_ARGS(w, val)
174 TRACE_EVENT(snd_soc_jack_irq,
176 TP_PROTO(const char *name),
178 TP_ARGS(name),
180 TP_STRUCT__entry(
181 __string( name, name )
184 TP_fast_assign(
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),
197 TP_STRUCT__entry(
198 __string( name, jack->jack->name )
199 __field( int, mask )
200 __field( int, val )
203 TP_fast_assign(
204 __assign_str(name, jack->jack->name);
205 __entry->mask = mask;
206 __entry->val = val;
209 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
210 (int)__entry->mask)
213 TRACE_EVENT(snd_soc_jack_notify,
215 TP_PROTO(struct snd_soc_jack *jack, int val),
217 TP_ARGS(jack, val),
219 TP_STRUCT__entry(
220 __string( name, jack->jack->name )
221 __field( int, val )
224 TP_fast_assign(
225 __assign_str(name, jack->jack->name);
226 __entry->val = val;
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,
235 const char *status),
237 TP_ARGS(codec, type, status),
239 TP_STRUCT__entry(
240 __string( name, codec->name )
241 __string( status, status )
242 __string( type, type )
243 __field( int, id )
246 TP_fast_assign(
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>