All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm8727: Add DAPM support
@ 2013-08-18 17:38 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2013-08-18 17:38 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, linaro-kernel, patches, Mark Brown

From: Mark Brown <broonie@linaro.org>

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>
---
 sound/soc/codecs/wm8727.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm8727.c b/sound/soc/codecs/wm8727.c
index 462f5e4..7b1a6d5 100644
--- a/sound/soc/codecs/wm8727.c
+++ b/sound/soc/codecs/wm8727.c
@@ -23,6 +23,16 @@
 #include <sound/initval.h>
 #include <sound/soc.h>
 
+static const struct snd_soc_dapm_widget wm8727_dapm_widgets[] = {
+SND_SOC_DAPM_OUTPUT("VOUTL"),
+SND_SOC_DAPM_OUTPUT("VOUTR"),
+};
+
+static const struct snd_soc_dapm_route wm8727_dapm_routes[] = {
+	{ "VOUTL", NULL, "Playback" },
+	{ "VOUTR", NULL, "Playback" },
+};
+
 /*
  * Note this is a simple chip with no configuration interface, sample rate is
  * determined automatically by examining the Master clock and Bit clock ratios
@@ -43,7 +53,12 @@ static struct snd_soc_dai_driver wm8727_dai = {
 		},
 };
 
-static struct snd_soc_codec_driver soc_codec_dev_wm8727;
+static struct snd_soc_codec_driver soc_codec_dev_wm8727 = {
+	.dapm_widgets = wm8727_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(wm8727_dapm_widgets),
+	.dapm_routes = wm8727_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(wm8727_dapm_routes),
+};
 
 static int wm8727_probe(struct platform_device *pdev)
 {
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-18 17:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-18 17:38 [PATCH] ASoC: wm8727: Add DAPM support Mark Brown

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.