Commit | Line | Data |
---|---|---|
b7cdc182 | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
b283666f PW |
2 | #undef TRACE_SYSTEM |
3 | #define TRACE_SYSTEM asoc | |
4 | ||
3bc29f0a MD |
5 | #if !defined(LTTNG_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ) |
6 | #define LTTNG_TRACE_ASOC_H | |
b283666f | 7 | |
3b4aafcb | 8 | #include <lttng/tracepoint-event.h> |
b283666f | 9 | #include <linux/ktime.h> |
5f4c791e | 10 | #include <lttng/kernel-version.h> |
b283666f | 11 | |
7c68b363 AG |
12 | #define DAPM_DIRECT "(direct)" |
13 | ||
b283666f PW |
14 | #ifndef _TRACE_ASOC_DEF |
15 | #define _TRACE_ASOC_DEF | |
16 | struct snd_soc_jack; | |
b283666f PW |
17 | struct snd_soc_card; |
18 | struct snd_soc_dapm_widget; | |
83be3f4f MJ |
19 | struct snd_soc_dapm_path; |
20 | #endif | |
b283666f | 21 | |
7c9c39d2 | 22 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_card, |
b283666f PW |
23 | |
24 | TP_PROTO(struct snd_soc_card *card, int val), | |
25 | ||
26 | TP_ARGS(card, val), | |
27 | ||
f127e61e MD |
28 | TP_FIELDS( |
29 | ctf_string(name, card->name) | |
30 | ctf_integer(int, val, val) | |
31 | ) | |
b283666f PW |
32 | ) |
33 | ||
7c9c39d2 MD |
34 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_start, |
35 | ||
36 | asoc_snd_soc_bias_level_start, | |
b283666f PW |
37 | |
38 | TP_PROTO(struct snd_soc_card *card, int val), | |
39 | ||
40 | TP_ARGS(card, val) | |
41 | ||
42 | ) | |
43 | ||
7c9c39d2 MD |
44 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_done, |
45 | ||
46 | asoc_snd_soc_bias_level_done, | |
b283666f PW |
47 | |
48 | TP_PROTO(struct snd_soc_card *card, int val), | |
49 | ||
50 | TP_ARGS(card, val) | |
51 | ||
52 | ) | |
53 | ||
fec007d9 KS |
54 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,9,0)) |
55 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic, | |
56 | ||
57 | TP_PROTO(struct snd_soc_card *card, int event), | |
58 | ||
59 | TP_ARGS(card, event), | |
60 | ||
61 | TP_FIELDS( | |
62 | ctf_string(name, card->name) | |
63 | ctf_integer(int, event, event) | |
64 | ) | |
65 | ) | |
66 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_start, | |
67 | ||
68 | asoc_snd_soc_dapm_start, | |
69 | ||
70 | TP_PROTO(struct snd_soc_card *card, int event), | |
71 | ||
72 | TP_ARGS(card, event) | |
73 | ||
74 | ) | |
75 | ||
76 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_done, | |
77 | ||
78 | asoc_snd_soc_dapm_done, | |
79 | ||
80 | TP_PROTO(struct snd_soc_card *card, int event), | |
81 | ||
82 | TP_ARGS(card, event) | |
83 | ||
84 | ) | |
85 | #else | |
7c9c39d2 | 86 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic, |
b283666f PW |
87 | |
88 | TP_PROTO(struct snd_soc_card *card), | |
89 | ||
90 | TP_ARGS(card), | |
91 | ||
f127e61e MD |
92 | TP_FIELDS( |
93 | ctf_string(name, card->name) | |
94 | ) | |
b283666f PW |
95 | ) |
96 | ||
7c9c39d2 MD |
97 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_start, |
98 | ||
99 | asoc_snd_soc_dapm_start, | |
b283666f PW |
100 | |
101 | TP_PROTO(struct snd_soc_card *card), | |
102 | ||
103 | TP_ARGS(card) | |
104 | ||
105 | ) | |
106 | ||
7c9c39d2 MD |
107 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_done, |
108 | ||
109 | asoc_snd_soc_dapm_done, | |
b283666f PW |
110 | |
111 | TP_PROTO(struct snd_soc_card *card), | |
112 | ||
113 | TP_ARGS(card) | |
114 | ||
115 | ) | |
fec007d9 | 116 | #endif |
b283666f | 117 | |
7c9c39d2 | 118 | LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_widget, |
b283666f PW |
119 | |
120 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
121 | ||
122 | TP_ARGS(w, val), | |
123 | ||
f127e61e MD |
124 | TP_FIELDS( |
125 | ctf_string(name, w->name) | |
126 | ctf_integer(int, val, val) | |
127 | ) | |
b283666f PW |
128 | ) |
129 | ||
7c9c39d2 MD |
130 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_power, |
131 | ||
132 | asoc_snd_soc_dapm_widget_power, | |
b283666f PW |
133 | |
134 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
135 | ||
136 | TP_ARGS(w, val) | |
137 | ||
138 | ) | |
139 | ||
7c9c39d2 MD |
140 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_event_start, |
141 | ||
142 | asoc_snd_soc_dapm_widget_event_start, | |
b283666f PW |
143 | |
144 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
145 | ||
146 | TP_ARGS(w, val) | |
147 | ||
148 | ) | |
149 | ||
7c9c39d2 MD |
150 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widget_event_done, |
151 | ||
152 | asoc_snd_soc_dapm_widget_event_done, | |
b283666f PW |
153 | |
154 | TP_PROTO(struct snd_soc_dapm_widget *w, int val), | |
155 | ||
156 | TP_ARGS(w, val) | |
157 | ||
158 | ) | |
159 | ||
7c9c39d2 MD |
160 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done, |
161 | ||
162 | asoc_snd_soc_dapm_walk_done, | |
b283666f PW |
163 | |
164 | TP_PROTO(struct snd_soc_card *card), | |
165 | ||
166 | TP_ARGS(card), | |
167 | ||
f127e61e MD |
168 | TP_FIELDS( |
169 | ctf_string(name, card->name) | |
170 | ctf_integer(int, power_checks, card->dapm_stats.power_checks) | |
171 | ctf_integer(int, path_checks, card->dapm_stats.path_checks) | |
172 | ctf_integer(int, neighbour_checks, card->dapm_stats.neighbour_checks) | |
173 | ) | |
b283666f | 174 | ) |
b283666f | 175 | |
83be3f4f MJ |
176 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_path, |
177 | ||
178 | asoc_snd_soc_dapm_path, | |
179 | ||
180 | TP_PROTO(struct snd_soc_dapm_widget *widget, | |
181 | enum snd_soc_dapm_direction dir, | |
182 | struct snd_soc_dapm_path *path), | |
183 | ||
184 | TP_ARGS(widget, dir, path), | |
185 | ||
186 | TP_FIELDS( | |
187 | ctf_string(wname, widget->name) | |
188 | ctf_string(pname, path->name ? path->name : DAPM_DIRECT) | |
189 | ctf_string(pnname, path->node[dir]->name) | |
190 | ctf_integer(int, path_node, (long) path->node[dir]) | |
191 | ctf_integer(int, path_connect, path->connect) | |
192 | ctf_integer(int, path_dir, dir) | |
193 | ) | |
194 | ) | |
7c68b363 | 195 | |
7c9c39d2 MD |
196 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected, |
197 | ||
198 | asoc_snd_soc_dapm_connected, | |
7c68b363 AG |
199 | |
200 | TP_PROTO(int paths, int stream), | |
201 | ||
202 | TP_ARGS(paths, stream), | |
203 | ||
f127e61e MD |
204 | TP_FIELDS( |
205 | ctf_integer(int, paths, paths) | |
206 | ctf_integer(int, stream, stream) | |
207 | ) | |
7c68b363 | 208 | ) |
7c68b363 | 209 | |
7c9c39d2 MD |
210 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq, |
211 | ||
212 | asoc_snd_soc_jack_irq, | |
b283666f PW |
213 | |
214 | TP_PROTO(const char *name), | |
215 | ||
216 | TP_ARGS(name), | |
217 | ||
f127e61e MD |
218 | TP_FIELDS( |
219 | ctf_string(name, name) | |
220 | ) | |
b283666f PW |
221 | ) |
222 | ||
ecd86863 MJ |
223 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report, |
224 | ||
225 | asoc_snd_soc_jack_report, | |
226 | ||
227 | TP_PROTO(struct snd_soc_jack *jack, int mask, int val), | |
228 | ||
229 | TP_ARGS(jack, mask, val), | |
230 | ||
231 | TP_FIELDS( | |
232 | ctf_string(name, jack->jack->id) | |
233 | ctf_integer(int, mask, mask) | |
234 | ctf_integer(int, val, val) | |
235 | ) | |
236 | ) | |
237 | ||
238 | LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify, | |
239 | ||
240 | asoc_snd_soc_jack_notify, | |
241 | ||
242 | TP_PROTO(struct snd_soc_jack *jack, int val), | |
243 | ||
244 | TP_ARGS(jack, val), | |
245 | ||
246 | TP_FIELDS( | |
247 | ctf_string(name, jack->jack->id) | |
248 | ctf_integer(int, val, val) | |
249 | ) | |
250 | ) | |
b283666f | 251 | |
3bc29f0a | 252 | #endif /* LTTNG_TRACE_ASOC_H */ |
b283666f PW |
253 | |
254 | /* This part must be outside protection */ | |
3b4aafcb | 255 | #include <lttng/define_trace.h> |