All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: ad73311: Add DAPM support
@ 2013-08-07 17:01 Mark Brown
  2013-08-07 17:01 ` [PATCH 2/2] ASoC: ad73311: Add to list of of Analog Devices supported CODECs Mark Brown
  2013-08-08 11:55 ` [PATCH 1/2] ASoC: ad73311: Add DAPM support Lars-Peter Clausen
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2013-08-07 17:01 UTC (permalink / raw)
  To: Lars-Peter Clausen, Liam Girdwood; +Cc: alsa-devel, linaro-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

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.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 sound/soc/codecs/ad73311.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/ad73311.c b/sound/soc/codecs/ad73311.c
index b1f2baf..5fac8ad 100644
--- a/sound/soc/codecs/ad73311.c
+++ b/sound/soc/codecs/ad73311.c
@@ -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)
 {
-- 
1.8.4.rc1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-08 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07 17:01 [PATCH 1/2] ASoC: ad73311: Add DAPM support Mark Brown
2013-08-07 17:01 ` [PATCH 2/2] ASoC: ad73311: Add to list of of Analog Devices supported CODECs Mark Brown
2013-08-08 11:56   ` Lars-Peter Clausen
2013-08-08 11:55 ` [PATCH 1/2] ASoC: ad73311: Add DAPM support Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.