License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[GitHub/MotorolaMobilityLLC/kernel-slsi.git] / sound / pci / hda / hda_controller_trace.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
18486508
LY
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM hda_controller
4#define TRACE_INCLUDE_FILE hda_controller_trace
5
6#if !defined(_TRACE_HDA_CONTROLLER_H) || defined(TRACE_HEADER_MULTI_READ)
7#define _TRACE_HDA_CONTROLLER_H
8
9#include <linux/tracepoint.h>
10
11struct azx;
12struct azx_dev;
13
14TRACE_EVENT(azx_pcm_trigger,
15
16 TP_PROTO(struct azx *chip, struct azx_dev *dev, int cmd),
17
18 TP_ARGS(chip, dev, cmd),
19
20 TP_STRUCT__entry(
21 __field( int, card )
22 __field( int, idx )
23 __field( int, cmd )
24 ),
25
26 TP_fast_assign(
27 __entry->card = (chip)->card->number;
28 __entry->idx = (dev)->core.index;
29 __entry->cmd = cmd;
30 ),
31
32 TP_printk("[%d:%d] cmd=%d", __entry->card, __entry->idx, __entry->cmd)
33);
34
35TRACE_EVENT(azx_get_position,
36
37 TP_PROTO(struct azx *chip, struct azx_dev *dev, unsigned int pos, unsigned int delay),
38
39 TP_ARGS(chip, dev, pos, delay),
40
41 TP_STRUCT__entry(
42 __field( int, card )
43 __field( int, idx )
44 __field( unsigned int, pos )
45 __field( unsigned int, delay )
46 ),
47
48 TP_fast_assign(
49 __entry->card = (chip)->card->number;
50 __entry->idx = (dev)->core.index;
51 __entry->pos = pos;
52 __entry->delay = delay;
53 ),
54
55 TP_printk("[%d:%d] pos=%u, delay=%u", __entry->card, __entry->idx, __entry->pos, __entry->delay)
56);
57
58DECLARE_EVENT_CLASS(azx_pcm,
59 TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
60
61 TP_ARGS(chip, azx_dev),
62
63 TP_STRUCT__entry(
64 __field( unsigned char, stream_tag )
65 ),
66
67 TP_fast_assign(
68 __entry->stream_tag = (azx_dev)->core.stream_tag;
69 ),
70
71 TP_printk("stream_tag: %d", __entry->stream_tag)
72);
73
74DEFINE_EVENT(azx_pcm, azx_pcm_open,
75 TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
76 TP_ARGS(chip, azx_dev)
77);
78
79DEFINE_EVENT(azx_pcm, azx_pcm_close,
80 TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
81 TP_ARGS(chip, azx_dev)
82);
83
84DEFINE_EVENT(azx_pcm, azx_pcm_hw_params,
85 TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
86 TP_ARGS(chip, azx_dev)
87);
88
89DEFINE_EVENT(azx_pcm, azx_pcm_prepare,
90 TP_PROTO(struct azx *chip, struct azx_dev *azx_dev),
91 TP_ARGS(chip, azx_dev)
92);
93
94#endif /* _TRACE_HDA_CONTROLLER_H */
95
96/* This part must be outside protection */
97#undef TRACE_INCLUDE_PATH
98#define TRACE_INCLUDE_PATH .
99#include <trace/define_trace.h>