hda_controller_trace.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM hda_controller
  3. #define TRACE_INCLUDE_FILE hda_controller_trace
  4. #if !defined(_TRACE_HDA_CONTROLLER_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_HDA_CONTROLLER_H
  6. #include <linux/tracepoint.h>
  7. struct azx;
  8. struct azx_dev;
  9. TRACE_EVENT(azx_pcm_trigger,
  10. TP_PROTO(struct azx *chip, struct azx_dev *dev, int cmd),
  11. TP_ARGS(chip, dev, cmd),
  12. TP_STRUCT__entry(
  13. __field( int, card )
  14. __field( int, idx )
  15. __field( int, cmd )
  16. ),
  17. TP_fast_assign(
  18. __entry->card = (chip)->card->number;
  19. __entry->idx = (dev)->core.index;
  20. __entry->cmd = cmd;
  21. ),
  22. TP_printk("[%d:%d] cmd=%d", __entry->card, __entry->idx, __entry->cmd)
  23. );
  24. TRACE_EVENT(azx_get_position,
  25. TP_PROTO(struct azx *chip, struct azx_dev *dev, unsigned int pos, unsigned int delay),
  26. TP_ARGS(chip, dev, pos, delay),
  27. TP_STRUCT__entry(
  28. __field( int, card )
  29. __field( int, idx )
  30. __field( unsigned int, pos )
  31. __field( unsigned int, delay )
  32. ),
  33. TP_fast_assign(
  34. __entry->card = (chip)->card->number;
  35. __entry->idx = (dev)->core.index;
  36. __entry->pos = pos;
  37. __entry->delay = delay;
  38. ),
  39. TP_printk("[%d:%d] pos=%u, delay=%u", __entry->card, __entry->idx, __entry->pos, __entry->delay)
  40. );
  41. DECLARE_EVENT_CLASS(azx_pcm,
  42. TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
  43. TP_ARGS(chip, azx_dev),
  44. TP_STRUCT__entry(
  45. __field( unsigned char, stream_tag )
  46. ),
  47. TP_fast_assign(
  48. __entry->stream_tag = (azx_dev)->core.stream_tag;
  49. ),
  50. TP_printk("stream_tag: %d", __entry->stream_tag)
  51. );
  52. DEFINE_EVENT(azx_pcm, azx_pcm_open,
  53. TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
  54. TP_ARGS(chip, azx_dev)
  55. );
  56. DEFINE_EVENT(azx_pcm, azx_pcm_close,
  57. TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
  58. TP_ARGS(chip, azx_dev)
  59. );
  60. DEFINE_EVENT(azx_pcm, azx_pcm_hw_params,
  61. TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
  62. TP_ARGS(chip, azx_dev)
  63. );
  64. DEFINE_EVENT(azx_pcm, azx_pcm_prepare,
  65. TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
  66. TP_ARGS(chip, azx_dev)
  67. );
  68. #endif /* _TRACE_HDA_CONTROLLER_H */
  69. /* This part must be outside protection */
  70. #undef TRACE_INCLUDE_PATH
  71. #define TRACE_INCLUDE_PATH .
  72. #include <trace/define_trace.h>