diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-02 15:39:31 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-04 17:02:37 +0200 |
commit | d66fee5d65d947da32783ab0c32511ffe55ff5f3 (patch) | |
tree | 7c924a588a9f3683e7ae26ff4f80077ad2d964eb /sound/pci/hda/hda_trace.h | |
parent | c3540b81ee707bc8a7a83e850adf5feb3b84c04d (diff) |
ALSA: hda - Add basic tracepoints
Add a few tracepoints to HD-audio driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_trace.h')
-rw-r--r-- | sound/pci/hda/hda_trace.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_trace.h b/sound/pci/hda/hda_trace.h new file mode 100644 index 000000000000..b446cfcf60de --- /dev/null +++ b/sound/pci/hda/hda_trace.h @@ -0,0 +1,95 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM hda +#define TRACE_INCLUDE_FILE hda_trace + +#if !defined(_TRACE_HDA_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_HDA_H + +#include <linux/tracepoint.h> + +struct hda_bus; +struct hda_codec; + +DECLARE_EVENT_CLASS(hda_cmd, + + TP_PROTO(struct hda_codec *codec, unsigned int val), + + TP_ARGS(codec, val), + + TP_STRUCT__entry( + __field( unsigned int, card ) + __field( unsigned int, addr ) + __field( unsigned int, val ) + ), + + TP_fast_assign( + __entry->card = (codec)->bus->card->number; + __entry->addr = (codec)->addr; + __entry->val = (val); + ), + + TP_printk("[%d:%d] val=%x", __entry->card, __entry->addr, __entry->val) +); + +DEFINE_EVENT(hda_cmd, hda_send_cmd, + TP_PROTO(struct hda_codec *codec, unsigned int val), + TP_ARGS(codec, val) +); + +DEFINE_EVENT(hda_cmd, hda_get_response, + TP_PROTO(struct hda_codec *codec, unsigned int val), + TP_ARGS(codec, val) +); + +TRACE_EVENT(hda_bus_reset, + + TP_PROTO(struct hda_bus *bus), + + TP_ARGS(bus), + + TP_STRUCT__entry( + __field( unsigned int, card ) + ), + + TP_fast_assign( + __entry->card = (bus)->card->number; + ), + + TP_printk("[%d]", __entry->card) +); + +DECLARE_EVENT_CLASS(hda_power, + + TP_PROTO(struct hda_codec *codec), + + TP_ARGS(codec), + + TP_STRUCT__entry( + __field( unsigned int, card ) + __field( unsigned int, addr ) + ), + + TP_fast_assign( + __entry->card = (codec)->bus->card->number; + __entry->addr = (codec)->addr; + ), + + TP_printk("[%d:%d]", __entry->card, __entry->addr) +); + +DEFINE_EVENT(hda_power, hda_power_down, + TP_PROTO(struct hda_codec *codec), + TP_ARGS(codec) +); + +DEFINE_EVENT(hda_power, hda_power_up, + TP_PROTO(struct hda_codec *codec), + TP_ARGS(codec) +); + +#endif /* _TRACE_HDA_H */ + +/* This part must be outside protection */ +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . +#include <trace/define_trace.h> |