summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-09-10 17:39:56 -0700
committerMark Brown <broonie@linaro.org>2013-09-17 13:07:13 +0100
commitcb470087669a3fab1958fec79dd7db280b33f178 (patch)
tree695f7c4d498fcff11d28285c1f5ea1642d903a81 /include/sound
parentd191bd8de8c61619563f2b19f1fdcc0944ff1a72 (diff)
downloadop-kernel-dev-cb470087669a3fab1958fec79dd7db280b33f178.zip
op-kernel-dev-cb470087669a3fab1958fec79dd7db280b33f178.tar.gz
ASoC: add .of_xlate_dai_name on snd_soc_component_driver
ASoC sound driver requires CPU/CODEC drivers for probing, and each CPU/CODEC has some DAI on it. Then, "dai name matching" have been used to identify CPU-CODEC DAI pair on ASoC. But, the "dai port number matching" is now required from DeviceTree. The solution of this issue is to replace the dai port number into dai name. Now, CPU/CODEC are based on struct snd_soc_component, and it can care above as common issue. This patch adds .of_xlate_dai_name callback interface on struct snd_soc_component_driver, and snd_soc_of_get_dai_name() which is using .of_xlate_dai_name. Then, #sound-dai-cells which enables DAI specifier is required on CPU/CODEC device tree properties. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9a81e2e..1dd7dc5 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -13,6 +13,7 @@
#ifndef __LINUX_SND_SOC_H
#define __LINUX_SND_SOC_H
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/notifier.h>
@@ -673,6 +674,11 @@ struct snd_soc_cache_ops {
/* component interface */
struct snd_soc_component_driver {
const char *name;
+
+ /* DT */
+ int (*of_xlate_dai_name)(struct snd_soc_component *component,
+ struct of_phandle_args *args,
+ const char **dai_name);
};
struct snd_soc_component {
@@ -1206,6 +1212,8 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
const char *propname);
unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
const char *prefix);
+int snd_soc_of_get_dai_name(struct device_node *of_node,
+ const char **dai_name);
#include <sound/soc-dai.h>
OpenPOWER on IntegriCloud