hda_controller_trace.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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>