Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cris-mirror.git] / include / trace / events / asoc.h
blobccd1a3bdff46e28bdd363822141d55522ca55543
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM asoc
5 #if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_ASOC_H
8 #include <linux/ktime.h>
9 #include <linux/tracepoint.h>
11 #define DAPM_DIRECT "(direct)"
12 #define DAPM_ARROW(dir) (((dir) == SND_SOC_DAPM_DIR_OUT) ? "->" : "<-")
14 struct snd_soc_jack;
15 struct snd_soc_codec;
16 struct snd_soc_card;
17 struct snd_soc_dapm_widget;
18 struct snd_soc_dapm_path;
20 DECLARE_EVENT_CLASS(snd_soc_card,
22 TP_PROTO(struct snd_soc_card *card, int val),
24 TP_ARGS(card, val),
26 TP_STRUCT__entry(
27 __string( name, card->name )
28 __field( int, val )
31 TP_fast_assign(
32 __assign_str(name, card->name);
33 __entry->val = val;
36 TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
39 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
41 TP_PROTO(struct snd_soc_card *card, int val),
43 TP_ARGS(card, val)
47 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
49 TP_PROTO(struct snd_soc_card *card, int val),
51 TP_ARGS(card, val)
55 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
57 TP_PROTO(struct snd_soc_card *card),
59 TP_ARGS(card),
61 TP_STRUCT__entry(
62 __string( name, card->name )
65 TP_fast_assign(
66 __assign_str(name, card->name);
69 TP_printk("card=%s", __get_str(name))
72 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
74 TP_PROTO(struct snd_soc_card *card),
76 TP_ARGS(card)
80 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
82 TP_PROTO(struct snd_soc_card *card),
84 TP_ARGS(card)
88 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
90 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
92 TP_ARGS(w, val),
94 TP_STRUCT__entry(
95 __string( name, w->name )
96 __field( int, val )
99 TP_fast_assign(
100 __assign_str(name, w->name);
101 __entry->val = val;
104 TP_printk("widget=%s val=%d", __get_str(name),
105 (int)__entry->val)
108 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
110 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
112 TP_ARGS(w, val)
116 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
118 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
120 TP_ARGS(w, val)
124 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
126 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
128 TP_ARGS(w, val)
132 TRACE_EVENT(snd_soc_dapm_walk_done,
134 TP_PROTO(struct snd_soc_card *card),
136 TP_ARGS(card),
138 TP_STRUCT__entry(
139 __string( name, card->name )
140 __field( int, power_checks )
141 __field( int, path_checks )
142 __field( int, neighbour_checks )
145 TP_fast_assign(
146 __assign_str(name, card->name);
147 __entry->power_checks = card->dapm_stats.power_checks;
148 __entry->path_checks = card->dapm_stats.path_checks;
149 __entry->neighbour_checks = card->dapm_stats.neighbour_checks;
152 TP_printk("%s: checks %d power, %d path, %d neighbour",
153 __get_str(name), (int)__entry->power_checks,
154 (int)__entry->path_checks, (int)__entry->neighbour_checks)
157 TRACE_EVENT(snd_soc_dapm_path,
159 TP_PROTO(struct snd_soc_dapm_widget *widget,
160 enum snd_soc_dapm_direction dir,
161 struct snd_soc_dapm_path *path),
163 TP_ARGS(widget, dir, path),
165 TP_STRUCT__entry(
166 __string( wname, widget->name )
167 __string( pname, path->name ? path->name : DAPM_DIRECT)
168 __string( pnname, path->node[dir]->name )
169 __field( int, path_node )
170 __field( int, path_connect )
171 __field( int, path_dir )
174 TP_fast_assign(
175 __assign_str(wname, widget->name);
176 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
177 __assign_str(pnname, path->node[dir]->name);
178 __entry->path_connect = path->connect;
179 __entry->path_node = (long)path->node[dir];
180 __entry->path_dir = dir;
183 TP_printk("%c%s %s %s %s %s",
184 (int) __entry->path_node &&
185 (int) __entry->path_connect ? '*' : ' ',
186 __get_str(wname), DAPM_ARROW(__entry->path_dir),
187 __get_str(pname), DAPM_ARROW(__entry->path_dir),
188 __get_str(pnname))
191 TRACE_EVENT(snd_soc_dapm_connected,
193 TP_PROTO(int paths, int stream),
195 TP_ARGS(paths, stream),
197 TP_STRUCT__entry(
198 __field( int, paths )
199 __field( int, stream )
202 TP_fast_assign(
203 __entry->paths = paths;
204 __entry->stream = stream;
207 TP_printk("%s: found %d paths",
208 __entry->stream ? "capture" : "playback", __entry->paths)
211 TRACE_EVENT(snd_soc_jack_irq,
213 TP_PROTO(const char *name),
215 TP_ARGS(name),
217 TP_STRUCT__entry(
218 __string( name, name )
221 TP_fast_assign(
222 __assign_str(name, name);
225 TP_printk("%s", __get_str(name))
228 TRACE_EVENT(snd_soc_jack_report,
230 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
232 TP_ARGS(jack, mask, val),
234 TP_STRUCT__entry(
235 __string( name, jack->jack->id )
236 __field( int, mask )
237 __field( int, val )
240 TP_fast_assign(
241 __assign_str(name, jack->jack->id);
242 __entry->mask = mask;
243 __entry->val = val;
246 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
247 (int)__entry->mask)
250 TRACE_EVENT(snd_soc_jack_notify,
252 TP_PROTO(struct snd_soc_jack *jack, int val),
254 TP_ARGS(jack, val),
256 TP_STRUCT__entry(
257 __string( name, jack->jack->id )
258 __field( int, val )
261 TP_fast_assign(
262 __assign_str(name, jack->jack->id);
263 __entry->val = val;
266 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
269 #endif /* _TRACE_ASOC_H */
271 /* This part must be outside protection */
272 #include <trace/define_trace.h>