aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/asoc.h
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2012-04-18 06:41:11 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-18 13:23:00 -0400
commitec2e3031b65f23f66840b5c89c4b83076831a435 (patch)
treeb85d6a5590fc0eaa3a5e7ca1a67e97b673629e65 /include/trace/events/asoc.h
parent0cbe4b36b075e80f3149a91ef640bc7930aa94c7 (diff)
ASoC: dapm: Add API call to query valid DAPM paths
In preparation for ASoC DSP support. Add a DAPM API call to determine whether a DAPM audio path is valid between source and sink widgets. This also takes into account all kcontrol mux and mixer settings in between the source and sink widgets to validate the audio path. This will be used by the DSP core to determine the runtime DAI mappings between FE and BE DAIs in order to run PCM operations. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/trace/events/asoc.h')
-rw-r--r--include/trace/events/asoc.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index ab26f8aa3c78..6d8efb1cc8ce 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -7,6 +7,8 @@
7#include <linux/ktime.h> 7#include <linux/ktime.h>
8#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
9 9
10#define DAPM_DIRECT "(direct)"
11
10struct snd_soc_jack; 12struct snd_soc_jack;
11struct snd_soc_codec; 13struct snd_soc_codec;
12struct snd_soc_platform; 14struct snd_soc_platform;
@@ -241,6 +243,84 @@ TRACE_EVENT(snd_soc_dapm_walk_done,
241 (int)__entry->path_checks, (int)__entry->neighbour_checks) 243 (int)__entry->path_checks, (int)__entry->neighbour_checks)
242); 244);
243 245
246TRACE_EVENT(snd_soc_dapm_output_path,
247
248 TP_PROTO(struct snd_soc_dapm_widget *widget,
249 struct snd_soc_dapm_path *path),
250
251 TP_ARGS(widget, path),
252
253 TP_STRUCT__entry(
254 __string( wname, widget->name )
255 __string( pname, path->name ? path->name : DAPM_DIRECT)
256 __string( psname, path->sink->name )
257 __field( int, path_sink )
258 __field( int, path_connect )
259 ),
260
261 TP_fast_assign(
262 __assign_str(wname, widget->name);
263 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
264 __assign_str(psname, path->sink->name);
265 __entry->path_connect = path->connect;
266 __entry->path_sink = (int)path->sink;
267 ),
268
269 TP_printk("%c%s -> %s -> %s\n",
270 (int) __entry->path_sink &&
271 (int) __entry->path_connect ? '*' : ' ',
272 __get_str(wname), __get_str(pname), __get_str(psname))
273);
274
275TRACE_EVENT(snd_soc_dapm_input_path,
276
277 TP_PROTO(struct snd_soc_dapm_widget *widget,
278 struct snd_soc_dapm_path *path),
279
280 TP_ARGS(widget, path),
281
282 TP_STRUCT__entry(
283 __string( wname, widget->name )
284 __string( pname, path->name ? path->name : DAPM_DIRECT)
285 __string( psname, path->source->name )
286 __field( int, path_source )
287 __field( int, path_connect )
288 ),
289
290 TP_fast_assign(
291 __assign_str(wname, widget->name);
292 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
293 __assign_str(psname, path->source->name);
294 __entry->path_connect = path->connect;
295 __entry->path_source = (int)path->source;
296 ),
297
298 TP_printk("%c%s <- %s <- %s\n",
299 (int) __entry->path_source &&
300 (int) __entry->path_connect ? '*' : ' ',
301 __get_str(wname), __get_str(pname), __get_str(psname))
302);
303
304TRACE_EVENT(snd_soc_dapm_connected,
305
306 TP_PROTO(int paths, int stream),
307
308 TP_ARGS(paths, stream),
309
310 TP_STRUCT__entry(
311 __field( int, paths )
312 __field( int, stream )
313 ),
314
315 TP_fast_assign(
316 __entry->paths = paths;
317 __entry->stream = stream;
318 ),
319
320 TP_printk("%s: found %d paths\n",
321 __entry->stream ? "capture" : "playback", __entry->paths)
322);
323
244TRACE_EVENT(snd_soc_jack_irq, 324TRACE_EVENT(snd_soc_jack_irq,
245 325
246 TP_PROTO(const char *name), 326 TP_PROTO(const char *name),