aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/asoc.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-05 07:22:46 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-06 09:13:42 -0500
commit3028eb8c51d968b9e7b44a9786a4e521e37afb13 (patch)
treea55b75b799209c2d850082eedcc3395e3b82b8de /include/trace/events/asoc.h
parent1badabd980da3bc09933c14970017067940ecd57 (diff)
ASoC: Add trace events for jack detection
As jack detection can trigger DAPM and the latency in debouncing can create confusing windows in operation provide some trace events which will hopefully help in diagnostics. The soc-jack core traces all reports that it gets and the resulting notifications to upper layers. An event for jack IRQs is also provided for instrumentation of debounce, and used in the GPIO jack code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/trace/events/asoc.h')
-rw-r--r--include/trace/events/asoc.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 9978856d5897..186e84db4b54 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -7,6 +7,7 @@
7#include <linux/ktime.h> 7#include <linux/ktime.h>
8#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
9 9
10struct snd_soc_jack;
10struct snd_soc_codec; 11struct snd_soc_codec;
11struct snd_soc_card; 12struct snd_soc_card;
12struct snd_soc_dapm_widget; 13struct snd_soc_dapm_widget;
@@ -170,6 +171,64 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
170 171
171); 172);
172 173
174TRACE_EVENT(snd_soc_jack_irq,
175
176 TP_PROTO(const char *name),
177
178 TP_ARGS(name),
179
180 TP_STRUCT__entry(
181 __string( name, name )
182 ),
183
184 TP_fast_assign(
185 __assign_str(name, name);
186 ),
187
188 TP_printk("%s", __get_str(name))
189);
190
191TRACE_EVENT(snd_soc_jack_report,
192
193 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
194
195 TP_ARGS(jack, mask, val),
196
197 TP_STRUCT__entry(
198 __string( name, jack->jack->name )
199 __field( int, mask )
200 __field( int, val )
201 ),
202
203 TP_fast_assign(
204 __assign_str(name, jack->jack->name);
205 __entry->mask = mask;
206 __entry->val = val;
207 ),
208
209 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
210 (int)__entry->mask)
211);
212
213TRACE_EVENT(snd_soc_jack_notify,
214
215 TP_PROTO(struct snd_soc_jack *jack, int val),
216
217 TP_ARGS(jack, val),
218
219 TP_STRUCT__entry(
220 __string( name, jack->jack->name )
221 __field( int, val )
222 ),
223
224 TP_fast_assign(
225 __assign_str(name, jack->jack->name);
226 __entry->val = val;
227 ),
228
229 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
230);
231
173#endif /* _TRACE_ASOC_H */ 232#endif /* _TRACE_ASOC_H */
174 233
175/* This part must be outside protection */ 234/* This part must be outside protection */