1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM hda_controller
4 #define TRACE_INCLUDE_FILE hda_controller_trace
6 #if !defined(_TRACE_HDA_CONTROLLER_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_HDA_CONTROLLER_H
9 #include <linux/tracepoint.h>
14 TRACE_EVENT(azx_pcm_trigger
,
16 TP_PROTO(struct azx
*chip
, struct azx_dev
*dev
, int cmd
),
18 TP_ARGS(chip
, dev
, cmd
),
27 __entry
->card
= (chip
)->card
->number
;
28 __entry
->idx
= (dev
)->core
.index
;
32 TP_printk("[%d:%d] cmd=%d", __entry
->card
, __entry
->idx
, __entry
->cmd
)
35 TRACE_EVENT(azx_get_position
,
37 TP_PROTO(struct azx
*chip
, struct azx_dev
*dev
, unsigned int pos
, unsigned int delay
),
39 TP_ARGS(chip
, dev
, pos
, delay
),
44 __field( unsigned int, pos
)
45 __field( unsigned int, delay
)
49 __entry
->card
= (chip
)->card
->number
;
50 __entry
->idx
= (dev
)->core
.index
;
52 __entry
->delay
= delay
;
55 TP_printk("[%d:%d] pos=%u, delay=%u", __entry
->card
, __entry
->idx
, __entry
->pos
, __entry
->delay
)
58 DECLARE_EVENT_CLASS(azx_pcm
,
59 TP_PROTO(struct azx
*chip
, struct azx_dev
*azx_dev
),
61 TP_ARGS(chip
, azx_dev
),
64 __field( unsigned char, stream_tag
)
68 __entry
->stream_tag
= (azx_dev
)->core
.stream_tag
;
71 TP_printk("stream_tag: %d", __entry
->stream_tag
)
74 DEFINE_EVENT(azx_pcm
, azx_pcm_open
,
75 TP_PROTO(struct azx
*chip
, struct azx_dev
*azx_dev
),
76 TP_ARGS(chip
, azx_dev
)
79 DEFINE_EVENT(azx_pcm
, azx_pcm_close
,
80 TP_PROTO(struct azx
*chip
, struct azx_dev
*azx_dev
),
81 TP_ARGS(chip
, azx_dev
)
84 DEFINE_EVENT(azx_pcm
, azx_pcm_hw_params
,
85 TP_PROTO(struct azx
*chip
, struct azx_dev
*azx_dev
),
86 TP_ARGS(chip
, azx_dev
)
89 DEFINE_EVENT(azx_pcm
, azx_pcm_prepare
,
90 TP_PROTO(struct azx
*chip
, struct azx_dev
*azx_dev
),
91 TP_ARGS(chip
, azx_dev
)
94 #endif /* _TRACE_HDA_CONTROLLER_H */
96 /* This part must be outside protection */
97 #undef TRACE_INCLUDE_PATH
98 #define TRACE_INCLUDE_PATH .
99 #include <trace/define_trace.h>