| Takashi Iwai | d66fee5 | 2011-08-02 15:39:31 +0200 | [diff] [blame] | 1 | #undef TRACE_SYSTEM | 
|  | 2 | #define TRACE_SYSTEM hda | 
|  | 3 | #define TRACE_INCLUDE_FILE hda_trace | 
|  | 4 |  | 
|  | 5 | #if !defined(_TRACE_HDA_H) || defined(TRACE_HEADER_MULTI_READ) | 
|  | 6 | #define _TRACE_HDA_H | 
|  | 7 |  | 
|  | 8 | #include <linux/tracepoint.h> | 
|  | 9 |  | 
|  | 10 | struct hda_bus; | 
|  | 11 | struct hda_codec; | 
|  | 12 |  | 
|  | 13 | DECLARE_EVENT_CLASS(hda_cmd, | 
|  | 14 |  | 
|  | 15 | TP_PROTO(struct hda_codec *codec, unsigned int val), | 
|  | 16 |  | 
|  | 17 | TP_ARGS(codec, val), | 
|  | 18 |  | 
|  | 19 | TP_STRUCT__entry( | 
|  | 20 | __field( unsigned int, card ) | 
|  | 21 | __field( unsigned int, addr ) | 
|  | 22 | __field( unsigned int, val ) | 
|  | 23 | ), | 
|  | 24 |  | 
|  | 25 | TP_fast_assign( | 
|  | 26 | __entry->card = (codec)->bus->card->number; | 
|  | 27 | __entry->addr = (codec)->addr; | 
|  | 28 | __entry->val = (val); | 
|  | 29 | ), | 
|  | 30 |  | 
|  | 31 | TP_printk("[%d:%d] val=%x", __entry->card, __entry->addr, __entry->val) | 
|  | 32 | ); | 
|  | 33 |  | 
|  | 34 | DEFINE_EVENT(hda_cmd, hda_send_cmd, | 
|  | 35 | TP_PROTO(struct hda_codec *codec, unsigned int val), | 
|  | 36 | TP_ARGS(codec, val) | 
|  | 37 | ); | 
|  | 38 |  | 
|  | 39 | DEFINE_EVENT(hda_cmd, hda_get_response, | 
|  | 40 | TP_PROTO(struct hda_codec *codec, unsigned int val), | 
|  | 41 | TP_ARGS(codec, val) | 
|  | 42 | ); | 
|  | 43 |  | 
|  | 44 | TRACE_EVENT(hda_bus_reset, | 
|  | 45 |  | 
|  | 46 | TP_PROTO(struct hda_bus *bus), | 
|  | 47 |  | 
|  | 48 | TP_ARGS(bus), | 
|  | 49 |  | 
|  | 50 | TP_STRUCT__entry( | 
|  | 51 | __field( unsigned int, card ) | 
|  | 52 | ), | 
|  | 53 |  | 
|  | 54 | TP_fast_assign( | 
|  | 55 | __entry->card = (bus)->card->number; | 
|  | 56 | ), | 
|  | 57 |  | 
|  | 58 | TP_printk("[%d]", __entry->card) | 
|  | 59 | ); | 
|  | 60 |  | 
|  | 61 | DECLARE_EVENT_CLASS(hda_power, | 
|  | 62 |  | 
|  | 63 | TP_PROTO(struct hda_codec *codec), | 
|  | 64 |  | 
|  | 65 | TP_ARGS(codec), | 
|  | 66 |  | 
|  | 67 | TP_STRUCT__entry( | 
|  | 68 | __field( unsigned int, card ) | 
|  | 69 | __field( unsigned int, addr ) | 
|  | 70 | ), | 
|  | 71 |  | 
|  | 72 | TP_fast_assign( | 
|  | 73 | __entry->card = (codec)->bus->card->number; | 
|  | 74 | __entry->addr = (codec)->addr; | 
|  | 75 | ), | 
|  | 76 |  | 
|  | 77 | TP_printk("[%d:%d]", __entry->card, __entry->addr) | 
|  | 78 | ); | 
|  | 79 |  | 
|  | 80 | DEFINE_EVENT(hda_power, hda_power_down, | 
|  | 81 | TP_PROTO(struct hda_codec *codec), | 
|  | 82 | TP_ARGS(codec) | 
|  | 83 | ); | 
|  | 84 |  | 
|  | 85 | DEFINE_EVENT(hda_power, hda_power_up, | 
|  | 86 | TP_PROTO(struct hda_codec *codec), | 
|  | 87 | TP_ARGS(codec) | 
|  | 88 | ); | 
|  | 89 |  | 
| Takashi Iwai | ecf726f | 2011-08-09 14:22:44 +0200 | [diff] [blame] | 90 | TRACE_EVENT(hda_unsol_event, | 
|  | 91 |  | 
|  | 92 | TP_PROTO(struct hda_bus *bus, u32 res, u32 res_ex), | 
|  | 93 |  | 
|  | 94 | TP_ARGS(bus, res, res_ex), | 
|  | 95 |  | 
|  | 96 | TP_STRUCT__entry( | 
|  | 97 | __field( unsigned int, card ) | 
|  | 98 | __field( u32, res ) | 
|  | 99 | __field( u32, res_ex ) | 
|  | 100 | ), | 
|  | 101 |  | 
|  | 102 | TP_fast_assign( | 
|  | 103 | __entry->card = (bus)->card->number; | 
|  | 104 | __entry->res = res; | 
|  | 105 | __entry->res_ex = res_ex; | 
|  | 106 | ), | 
|  | 107 |  | 
|  | 108 | TP_printk("[%d] res=%x, res_ex=%x", __entry->card, | 
|  | 109 | __entry->res, __entry->res_ex) | 
|  | 110 | ); | 
|  | 111 |  | 
| Takashi Iwai | d66fee5 | 2011-08-02 15:39:31 +0200 | [diff] [blame] | 112 | #endif /* _TRACE_HDA_H */ | 
|  | 113 |  | 
|  | 114 | /* This part must be outside protection */ | 
|  | 115 | #undef TRACE_INCLUDE_PATH | 
|  | 116 | #define TRACE_INCLUDE_PATH . | 
|  | 117 | #include <trace/define_trace.h> |