aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-12-21 12:40:59 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-22 06:00:21 -0500
commit5a5049637cf08c4c17805be679c19544bb27fb92 (patch)
tree3519d679c700f79bdfddc8d2779801415ea83b18 /include/sound/soc.h
parent82150101df27c0f3d315b597081b9fa0e23cd002 (diff)
ASoC: Allow DAI links to be specified using device tree nodes
DAI link endpoints and platform (DMA) devices are currently specified by name. When instantiating sound cards from device tree, it may be more convenient to refer to these devices by phandle in the device tree, and for code to describe DAI links using the "struct device_node *" ("of_node") those phandles map to. This change adds new fields to snd_soc_dai_link which can "name" devices using of_node, enhances soc_bind_dai_link() to allow binding based on of_node, and enhances snd_soc_register_card() to ensure that illegal combinations of name and of_node are not used. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index db8acd299043..8391b0ec217e 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -231,6 +231,7 @@ enum snd_soc_bias_level {
231 SND_SOC_BIAS_ON = 3, 231 SND_SOC_BIAS_ON = 3,
232}; 232};
233 233
234struct device_node;
234struct snd_jack; 235struct snd_jack;
235struct snd_soc_card; 236struct snd_soc_card;
236struct snd_soc_pcm_stream; 237struct snd_soc_pcm_stream;
@@ -703,8 +704,11 @@ struct snd_soc_dai_link {
703 const char *name; /* Codec name */ 704 const char *name; /* Codec name */
704 const char *stream_name; /* Stream name */ 705 const char *stream_name; /* Stream name */
705 const char *codec_name; /* for multi-codec */ 706 const char *codec_name; /* for multi-codec */
707 const struct device_node *codec_of_node;
706 const char *platform_name; /* for multi-platform */ 708 const char *platform_name; /* for multi-platform */
709 const struct device_node *platform_of_node;
707 const char *cpu_dai_name; 710 const char *cpu_dai_name;
711 const struct device_node *cpu_dai_of_node;
708 const char *codec_dai_name; 712 const char *codec_dai_name;
709 713
710 unsigned int dai_fmt; /* format to set on init */ 714 unsigned int dai_fmt; /* format to set on init */