aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-07-24 15:59:42 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:18:24 -0400
commitdcde0098348d1ab3029bd1a3ad413d9e98313242 (patch)
tree9e4442656e9c592e7f71f1ebee7c606830e1037c /include/sound
parent5515bb26e57bc0c74c46389ec8a826e5cbb090fe (diff)
Subject: [PATCH 068/104] 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>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 122e7a24ab3..0f67cf6383d 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -310,6 +310,7 @@ struct snd_soc_dapm_path;
310struct snd_soc_dapm_pin; 310struct snd_soc_dapm_pin;
311struct snd_soc_dapm_route; 311struct snd_soc_dapm_route;
312struct snd_soc_dapm_context; 312struct snd_soc_dapm_context;
313struct snd_soc_dapm_widget_list;
313 314
314int dapm_reg_event(struct snd_soc_dapm_widget *w, 315int dapm_reg_event(struct snd_soc_dapm_widget *w,
315 struct snd_kcontrol *kcontrol, int event); 316 struct snd_kcontrol *kcontrol, int event);
@@ -375,6 +376,13 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
375int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, 376int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
376 const char *pin); 377 const char *pin);
377 378
379/* dapm path query */
380int snd_soc_dapm_get_connected_widgets_type(struct snd_soc_dapm_context *dapm,
381 const char *stream_name, struct snd_soc_dapm_widget_list **list,
382 int stream, enum snd_soc_dapm_type type);
383int snd_soc_dapm_get_connected_widgets_name(struct snd_soc_dapm_context *dapm,
384 const char *name, struct snd_soc_dapm_widget_list **list, int stream);
385
378/* dapm widget types */ 386/* dapm widget types */
379enum snd_soc_dapm_type { 387enum snd_soc_dapm_type {
380 snd_soc_dapm_input = 0, /* input pin */ 388 snd_soc_dapm_input = 0, /* input pin */
@@ -432,6 +440,8 @@ struct snd_soc_dapm_path {
432 u32 connect:1; /* source and sink widgets are connected */ 440 u32 connect:1; /* source and sink widgets are connected */
433 u32 walked:1; /* path has been walked */ 441 u32 walked:1; /* path has been walked */
434 u32 weak:1; /* path ignored for power management */ 442 u32 weak:1; /* path ignored for power management */
443 u32 length:6; /* path length - used by route checker */
444
435 445
436 int (*connected)(struct snd_soc_dapm_widget *source, 446 int (*connected)(struct snd_soc_dapm_widget *source,
437 struct snd_soc_dapm_widget *sink); 447 struct snd_soc_dapm_widget *sink);
@@ -456,6 +466,8 @@ struct snd_soc_dapm_widget {
456 unsigned char shift; /* bits to shift */ 466 unsigned char shift; /* bits to shift */
457 unsigned int saved_value; /* widget saved value */ 467 unsigned int saved_value; /* widget saved value */
458 unsigned int value; /* widget current value */ 468 unsigned int value; /* widget current value */
469 unsigned int path_idx;
470 unsigned int hops;
459 unsigned int mask; /* non-shifted mask */ 471 unsigned int mask; /* non-shifted mask */
460 unsigned int on_val; /* on state value */ 472 unsigned int on_val; /* on state value */
461 unsigned int off_val; /* off state value */ 473 unsigned int off_val; /* off state value */
@@ -520,6 +532,8 @@ struct snd_soc_dapm_context {
520 532
521 int (*stream_event)(struct snd_soc_dapm_context *dapm); 533 int (*stream_event)(struct snd_soc_dapm_context *dapm);
522 534
535 int num_valid_paths; /* valid paths for route checker */
536
523#ifdef CONFIG_DEBUG_FS 537#ifdef CONFIG_DEBUG_FS
524 struct dentry *debugfs_dapm; 538 struct dentry *debugfs_dapm;
525#endif 539#endif