2 #define TRACE_SYSTEM asoc
4 #if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/ktime.h>
8 #include <linux/tracepoint.h>
10 #define DAPM_DIRECT "(direct)"
11 #define DAPM_ARROW(dir) (((dir) == SND_SOC_DAPM_DIR_OUT) ? "->" : "<-")
16 struct snd_soc_dapm_widget;
17 struct snd_soc_dapm_path;
19 DECLARE_EVENT_CLASS(snd_soc_card,
21 TP_PROTO(struct snd_soc_card *card, int val),
26 __string( name, card->name )
31 __assign_str(name, card->name);
35 TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
38 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
40 TP_PROTO(struct snd_soc_card *card, int val),
46 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
48 TP_PROTO(struct snd_soc_card *card, int val),
54 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
56 TP_PROTO(struct snd_soc_card *card),
61 __string( name, card->name )
65 __assign_str(name, card->name);
68 TP_printk("card=%s", __get_str(name))
71 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
73 TP_PROTO(struct snd_soc_card *card),
79 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
81 TP_PROTO(struct snd_soc_card *card),
87 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
89 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
94 __string( name, w->name )
99 __assign_str(name, w->name);
103 TP_printk("widget=%s val=%d", __get_str(name),
107 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
109 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
115 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
117 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
123 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
125 TP_PROTO(struct snd_soc_dapm_widget *w, int val),
131 TRACE_EVENT(snd_soc_dapm_walk_done,
133 TP_PROTO(struct snd_soc_card *card),
138 __string( name, card->name )
139 __field( int, power_checks )
140 __field( int, path_checks )
141 __field( int, neighbour_checks )
145 __assign_str(name, card->name);
146 __entry->power_checks = card->dapm_stats.power_checks;
147 __entry->path_checks = card->dapm_stats.path_checks;
148 __entry->neighbour_checks = card->dapm_stats.neighbour_checks;
151 TP_printk("%s: checks %d power, %d path, %d neighbour",
152 __get_str(name), (int)__entry->power_checks,
153 (int)__entry->path_checks, (int)__entry->neighbour_checks)
156 TRACE_EVENT(snd_soc_dapm_path,
158 TP_PROTO(struct snd_soc_dapm_widget *widget,
159 enum snd_soc_dapm_direction dir,
160 struct snd_soc_dapm_path *path),
162 TP_ARGS(widget, dir, path),
165 __string( wname, widget->name )
166 __string( pname, path->name ? path->name : DAPM_DIRECT)
167 __string( pnname, path->node[dir]->name )
168 __field( int, path_node )
169 __field( int, path_connect )
170 __field( int, path_dir )
174 __assign_str(wname, widget->name);
175 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
176 __assign_str(pnname, path->node[dir]->name);
177 __entry->path_connect = path->connect;
178 __entry->path_node = (long)path->node[dir];
179 __entry->path_dir = dir;
182 TP_printk("%c%s %s %s %s %s",
183 (int) __entry->path_node &&
184 (int) __entry->path_connect ? '*' : ' ',
185 __get_str(wname), DAPM_ARROW(__entry->path_dir),
186 __get_str(pname), DAPM_ARROW(__entry->path_dir),
190 TRACE_EVENT(snd_soc_dapm_connected,
192 TP_PROTO(int paths, int stream),
194 TP_ARGS(paths, stream),
197 __field( int, paths )
198 __field( int, stream )
202 __entry->paths = paths;
203 __entry->stream = stream;
206 TP_printk("%s: found %d paths",
207 __entry->stream ? "capture" : "playback", __entry->paths)
210 TRACE_EVENT(snd_soc_jack_irq,
212 TP_PROTO(const char *name),
217 __string( name, name )
221 __assign_str(name, name);
224 TP_printk("%s", __get_str(name))
227 TRACE_EVENT(snd_soc_jack_report,
229 TP_PROTO(struct snd_soc_jack *jack, int mask, int val),
231 TP_ARGS(jack, mask, val),
234 __string( name, jack->jack->name )
240 __assign_str(name, jack->jack->name);
241 __entry->mask = mask;
245 TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
249 TRACE_EVENT(snd_soc_jack_notify,
251 TP_PROTO(struct snd_soc_jack *jack, int val),
256 __string( name, jack->jack->name )
261 __assign_str(name, jack->jack->name);
265 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
268 #endif /* _TRACE_ASOC_H */
270 /* This part must be outside protection */
271 #include <trace/define_trace.h>