Skip to contentSkip to conversation

ASoC: ad73311: Add DAPM support

PATCH In review Mark Brown 2 participants 4 messages Aug 7, 2013 – Aug 8, 2013

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/2 ASoC: ad73311: Add DAPM support

From: Mark Brown <[email protected]>

This makes it possible to hook up other devices in boards and is required by removal of support for non-DAPM CODECs in the core.

---
 sound/soc/codecs/ad73311.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
sound/soc/codecs/ad73311.c +21 -1
index b1f2baf..5fac8ad 100644
@@ -23,6 +23,21 @@
 
 #include "ad73311.h"
 
+static const struct snd_soc_dapm_widget ad73311_dapm_widgets[] = {
+SND_SOC_DAPM_INPUT("VINP"),
+SND_SOC_DAPM_INPUT("VINN"),
+SND_SOC_DAPM_OUTPUT("VOUTN"),
+SND_SOC_DAPM_OUTPUT("VOUTP"),
+};
+
+static const struct snd_soc_dapm_route ad73311_dapm_routes[] = {
+	{ "Capture", NULL, "VINP" },
+	{ "Capture", NULL, "VINN" },
+
+	{ "VOUTN", NULL, "Playback" },
+	{ "VOUTP", NULL, "Playback" },
+};
+
 static struct snd_soc_dai_driver ad73311_dai = {
 	.name = "ad73311-hifi",
 	.playback = {
@@ -39,7 +54,12 @@ static struct snd_soc_dai_driver ad73311_dai = {
 		.formats = SNDRV_PCM_FMTBIT_S16_LE, },
 };
 
-static struct snd_soc_codec_driver soc_codec_dev_ad73311;
+static struct snd_soc_codec_driver soc_codec_dev_ad73311 = {
+	.dapm_widgets = ad73311_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(ad73311_dapm_widgets),
+	.dapm_routes = ad73311_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(ad73311_dapm_routes),
+};
 
 static int ad73311_probe(struct platform_device *pdev)
 {
Signature · 1 line
1.8.4.rc1
author maintainer
#1 lore raw

PATCH 2/2 ASoC: ad73311: Add to list of of Analog Devices supported CODECs

From: Mark Brown <[email protected]>

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 83f606f..8048c2b 100644
@@ -595,6 +595,7 @@ S:	Supported
 F:	sound/soc/codecs/adau*
 F:	sound/soc/codecs/adav*
 F:	sound/soc/codecs/ad1*
+F:	sound/soc/codecs/ad7*
 F:	sound/soc/codecs/ssm*
 F:	sound/soc/codecs/sigmadsp.*
 
Signature · 1 line
1.8.4.rc1