Skip to contentSkip to conversation

ASoC: si476x: Add DAPM support

PATCH New Mark Brown 1 participant 1 message Aug 16, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 ASoC: si476x: Add DAPM support

From: Mark Brown <[email protected]>

This ensures the driver continues to work with DAPM mandatory and makes it easier to connect the device up to other components in the subsystem.

---
 sound/soc/codecs/si476x.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
sound/soc/codecs/si476x.c +14 -0
index 73e205c..38f3b10 100644
@@ -102,6 +102,16 @@ static int si476x_codec_write(struct snd_soc_codec *codec,
 	return err;
 }
 
+static const struct snd_soc_dapm_widget si476x_dapm_widgets[] = {
+SND_SOC_DAPM_OUTPUT("LOUT"),
+SND_SOC_DAPM_OUTPUT("ROUT"),
+};
+
+static const struct snd_soc_dapm_route si476x_dapm_routes[] = {
+	{ "Capture", NULL, "LOUT" },
+	{ "Capture", NULL, "ROUT" },
+};
+
 static int si476x_codec_set_dai_fmt(struct snd_soc_dai *codec_dai,
 				    unsigned int fmt)
 {
@@ -260,6 +270,10 @@ static struct snd_soc_codec_driver soc_codec_dev_si476x = {
 	.probe  = si476x_codec_probe,
 	.read   = si476x_codec_read,
 	.write  = si476x_codec_write,
+	.dapm_widgets = si476x_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(si476x_dapm_widgets),
+	.dapm_routes = si476x_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(si476x_dapm_routes),
 };
 
 static int si476x_platform_probe(struct platform_device *pdev)
Signature · 1 line
1.8.4.rc2