diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-04 00:07:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-11 14:54:31 +0000 |
commit | 84e909303dbd3c8d882f152c17d1319f2873e147 (patch) | |
tree | 6ee9db7f42423282bbe9b17233eff20b8cddacbc /include/trace/events/asoc.h | |
parent | a8b1d34f3ee1bc139ac5fbe3f84f6d16c90136bb (diff) | |
download | blackbird-op-linux-84e909303dbd3c8d882f152c17d1319f2873e147.tar.gz blackbird-op-linux-84e909303dbd3c8d882f152c17d1319f2873e147.zip |
ASoC: Add DAPM trace events
Trace events for DAPM allow us to monitor the performance and behaviour
of DAPM with logging which can be built into the kernel permanantly, is
more suited to automated analysis and display and less likely to suffer
interference from other logging activity.
Currently trace events are generated for:
- Start and stop of DAPM processing
- Start and stop of bias level changes
- Power decisions for widgets
- Widget event execution start and stop
giving some view as to what is happening and where latencies occur.
Actual changes in widget power can be seen via the register write trace in
soc-core.
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.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index 93c3371daaca..9978856d5897 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h @@ -8,6 +8,8 @@ #include <linux/tracepoint.h> struct snd_soc_codec; +struct snd_soc_card; +struct snd_soc_dapm_widget; /* * Log register events @@ -56,7 +58,117 @@ DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read, ); +DECLARE_EVENT_CLASS(snd_soc_card, + TP_PROTO(struct snd_soc_card *card, int val), + + TP_ARGS(card, val), + + TP_STRUCT__entry( + __string( name, card->name ) + __field( int, val ) + ), + + TP_fast_assign( + __assign_str(name, card->name); + __entry->val = val; + ), + + TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val) +); + +DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start, + + TP_PROTO(struct snd_soc_card *card, int val), + + TP_ARGS(card, val) + +); + +DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done, + + TP_PROTO(struct snd_soc_card *card, int val), + + TP_ARGS(card, val) + +); + +DECLARE_EVENT_CLASS(snd_soc_dapm_basic, + + TP_PROTO(struct snd_soc_card *card), + + TP_ARGS(card), + + TP_STRUCT__entry( + __string( name, card->name ) + ), + + TP_fast_assign( + __assign_str(name, card->name); + ), + + TP_printk("card=%s", __get_str(name)) +); + +DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start, + + TP_PROTO(struct snd_soc_card *card), + + TP_ARGS(card) + +); + +DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done, + + TP_PROTO(struct snd_soc_card *card), + + TP_ARGS(card) + +); + +DECLARE_EVENT_CLASS(snd_soc_dapm_widget, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + + TP_ARGS(w, val), + + TP_STRUCT__entry( + __string( name, w->name ) + __field( int, val ) + ), + + TP_fast_assign( + __assign_str(name, w->name); + __entry->val = val; + ), + + TP_printk("widget=%s val=%d", __get_str(name), + (int)__entry->val) +); + +DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + + TP_ARGS(w, val) + +); + +DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + + TP_ARGS(w, val) + +); + +DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + + TP_ARGS(w, val) + +); #endif /* _TRACE_ASOC_H */ |