alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: ak4104: Add stub DAPM support
@ 2013-08-07 18:07 Mark Brown
  2013-08-07 18:07 ` [PATCH 2/2] ASoC: ak4104: Manage TXE using DAPM Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2013-08-07 18:07 UTC (permalink / raw)
  To: Daniel Mack, Liam Girdwood; +Cc: alsa-devel, linaro-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

This makes it easer to integrate the device with other on-board components
and ensures correct operation following removal of support for non-DAPM
CODECs.

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

diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c
index c7cfdf9..9a7c89b 100644
--- a/sound/soc/codecs/ak4104.c
+++ b/sound/soc/codecs/ak4104.c
@@ -51,6 +51,14 @@ struct ak4104_private {
 	struct regmap *regmap;
 };
 
+static const struct snd_soc_dapm_widget ak4104_dapm_widgets[] = {
+SND_SOC_DAPM_OUTPUT("TX"),
+};
+
+static const struct snd_soc_dapm_route ak4104_dapm_routes[] = {
+	{ "TX", NULL, "Playback" },
+};
+
 static int ak4104_set_dai_fmt(struct snd_soc_dai *codec_dai,
 			      unsigned int format)
 {
@@ -214,6 +222,11 @@ static int ak4104_remove(struct snd_soc_codec *codec)
 static struct snd_soc_codec_driver soc_codec_device_ak4104 = {
 	.probe =	ak4104_probe,
 	.remove =	ak4104_remove,
+
+	.dapm_widgets = ak4104_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(ak4104_dapm_widgets),
+	.dapm_routes = ak4104_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(ak4104_dapm_routes),
 };
 
 static const struct regmap_config ak4104_regmap = {
-- 
1.8.4.rc1

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07 18:07 [PATCH 1/2] ASoC: ak4104: Add stub DAPM support Mark Brown
2013-08-07 18:07 ` [PATCH 2/2] ASoC: ak4104: Manage TXE using DAPM Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).