summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorSebastian Reichel <sre@kernel.org>2014-04-28 16:07:22 +0200
committerMark Brown <broonie@linaro.org>2014-05-01 10:56:45 -0700
commit3ca041ed04734c1709460184f985f5451a813d69 (patch)
tree49e48b52a78cce6a918d213b53cd591229c6d1e0 /include/sound
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
downloadop-kernel-dev-3ca041ed04734c1709460184f985f5451a813d69.zip
op-kernel-dev-3ca041ed04734c1709460184f985f5451a813d69.tar.gz
ASoC: dt: Allow Aux Codecs to be specified using DT
This patch adds support for specifying auxiliary codecs and codec configuration via device tree phandles. This change adds new fields to snd_soc_aux_dev and snd_soc_codec_conf and adds support for the changes to SoC core methods. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 0b83168..d371ae1 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -931,7 +931,12 @@ struct snd_soc_dai_link {
};
struct snd_soc_codec_conf {
+ /*
+ * specify device either by device name, or by
+ * DT/OF node, but not both.
+ */
const char *dev_name;
+ const struct device_node *of_node;
/*
* optional map of kcontrol, widget and path name prefixes that are
@@ -942,7 +947,13 @@ struct snd_soc_codec_conf {
struct snd_soc_aux_dev {
const char *name; /* Codec name */
- const char *codec_name; /* for multi-codec */
+
+ /*
+ * specify multi-codec either by device name, or by
+ * DT/OF node, but not both.
+ */
+ const char *codec_name;
+ const struct device_node *codec_of_node;
/* codec/machine specific init - e.g. add machine controls */
int (*init)(struct snd_soc_dapm_context *dapm);
OpenPOWER on IntegriCloud