summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8782.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-18 21:36:06 +0400
committerMark Brown <broonie@linaro.org>2013-08-18 21:39:49 +0400
commit226059e1cdbb5d747bd008eba114af0b1a4a621e (patch)
tree50f213afc04a3478535af3c42520cbaaf16e5631 /sound/soc/codecs/wm8782.c
parentd4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff)
downloadlinux-226059e1cdbb5d747bd008eba114af0b1a4a621e.tar.xz
ASoC: wm8782: Add DAPM support
In order to make the device easier to hook up to external components in system designs and ensure operation when DAPM support becomes mandatory add DAPM support. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/wm8782.c')
-rw-r--r--sound/soc/codecs/wm8782.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c
index f1fdbf63abb4..8092495605ce 100644
--- a/sound/soc/codecs/wm8782.c
+++ b/sound/soc/codecs/wm8782.c
@@ -26,6 +26,16 @@
#include <sound/initval.h>
#include <sound/soc.h>
+static const struct snd_soc_dapm_widget wm8782_dapm_widgets[] = {
+SND_SOC_DAPM_INPUT("AINL"),
+SND_SOC_DAPM_INPUT("AINR"),
+};
+
+static const struct snd_soc_dapm_route wm8782_dapm_routes[] = {
+ { "Capture", NULL, "AINL" },
+ { "Capture", NULL, "AINR" },
+};
+
static struct snd_soc_dai_driver wm8782_dai = {
.name = "wm8782",
.capture = {
@@ -40,7 +50,12 @@ static struct snd_soc_dai_driver wm8782_dai = {
},
};
-static struct snd_soc_codec_driver soc_codec_dev_wm8782;
+static struct snd_soc_codec_driver soc_codec_dev_wm8782 = {
+ .dapm_widgets = wm8782_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(wm8782_dapm_widgets),
+ .dapm_routes = wm8782_dapm_routes,
+ .num_dapm_routes = ARRAY_SIZE(wm8782_dapm_routes),
+};
static int wm8782_probe(struct platform_device *pdev)
{