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

From: Mark Brown <broonie@linaro.org>

Provide DAPM for the device, ensuring operation with DAPM required by the
core and making it easier to hook up external hardware to it.

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

diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
index 51b1866..651ce09 100644
--- a/sound/soc/codecs/pcm1681.c
+++ b/sound/soc/codecs/pcm1681.c
@@ -206,6 +206,28 @@ static const struct snd_soc_dai_ops pcm1681_dai_ops = {
 	.digital_mute	= pcm1681_digital_mute,
 };
 
+static const struct snd_soc_dapm_widget pcm1681_dapm_widgets[] = {
+SND_SOC_DAPM_OUTPUT("VOUT1"),
+SND_SOC_DAPM_OUTPUT("VOUT2"),
+SND_SOC_DAPM_OUTPUT("VOUT3"),
+SND_SOC_DAPM_OUTPUT("VOUT4"),
+SND_SOC_DAPM_OUTPUT("VOUT5"),
+SND_SOC_DAPM_OUTPUT("VOUT6"),
+SND_SOC_DAPM_OUTPUT("VOUT7"),
+SND_SOC_DAPM_OUTPUT("VOUT8"),
+};
+
+static const struct snd_soc_dapm_route pcm1681_dapm_routes[] = {
+	{ "VOUT1", NULL, "Playback" },
+	{ "VOUT2", NULL, "Playback" },
+	{ "VOUT3", NULL, "Playback" },
+	{ "VOUT4", NULL, "Playback" },
+	{ "VOUT5", NULL, "Playback" },
+	{ "VOUT6", NULL, "Playback" },
+	{ "VOUT7", NULL, "Playback" },
+	{ "VOUT8", NULL, "Playback" },
+};
+
 static const DECLARE_TLV_DB_SCALE(pcm1681_dac_tlv, -6350, 50, 1);
 
 static const struct snd_kcontrol_new pcm1681_controls[] = {
@@ -258,6 +280,10 @@ static const struct regmap_config pcm1681_regmap = {
 static struct snd_soc_codec_driver soc_codec_dev_pcm1681 = {
 	.controls		= pcm1681_controls,
 	.num_controls		= ARRAY_SIZE(pcm1681_controls),
+	.dapm_widgets		= pcm1681_dapm_widgets,
+	.num_dapm_widgets	= ARRAY_SIZE(pcm1681_dapm_widgets),
+	.dapm_routes		= pcm1681_dapm_routes,
+	.num_dapm_routes	= ARRAY_SIZE(pcm1681_dapm_routes),
 };
 
 static const struct i2c_device_id pcm1681_i2c_id[] = {
-- 
1.8.4.rc2

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-13 17:31 [PATCH] ASoC: pcm1681: 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.