aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/si476x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-16 06:54:51 -0400
committerMark Brown <broonie@linaro.org>2013-08-18 11:27:48 -0400
commitac0b82b17894120b21937d0031fd0080b3ee2d83 (patch)
tree4eef203c5a90d6f039cc94ff8d10ee2c57bf1388 /sound/soc/codecs/si476x.c
parentd4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff)
ASoC: si476x: Add DAPM support
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. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Diffstat (limited to 'sound/soc/codecs/si476x.c')
-rw-r--r--sound/soc/codecs/si476x.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/codecs/si476x.c b/sound/soc/codecs/si476x.c
index 73e205c892a0..38f3b105c17d 100644
--- a/sound/soc/codecs/si476x.c
+++ b/sound/soc/codecs/si476x.c
@@ -102,6 +102,16 @@ static int si476x_codec_write(struct snd_soc_codec *codec,
102 return err; 102 return err;
103} 103}
104 104
105static const struct snd_soc_dapm_widget si476x_dapm_widgets[] = {
106SND_SOC_DAPM_OUTPUT("LOUT"),
107SND_SOC_DAPM_OUTPUT("ROUT"),
108};
109
110static const struct snd_soc_dapm_route si476x_dapm_routes[] = {
111 { "Capture", NULL, "LOUT" },
112 { "Capture", NULL, "ROUT" },
113};
114
105static int si476x_codec_set_dai_fmt(struct snd_soc_dai *codec_dai, 115static int si476x_codec_set_dai_fmt(struct snd_soc_dai *codec_dai,
106 unsigned int fmt) 116 unsigned int fmt)
107{ 117{
@@ -260,6 +270,10 @@ static struct snd_soc_codec_driver soc_codec_dev_si476x = {
260 .probe = si476x_codec_probe, 270 .probe = si476x_codec_probe,
261 .read = si476x_codec_read, 271 .read = si476x_codec_read,
262 .write = si476x_codec_write, 272 .write = si476x_codec_write,
273 .dapm_widgets = si476x_dapm_widgets,
274 .num_dapm_widgets = ARRAY_SIZE(si476x_dapm_widgets),
275 .dapm_routes = si476x_dapm_routes,
276 .num_dapm_routes = ARRAY_SIZE(si476x_dapm_routes),
263}; 277};
264 278
265static int si476x_platform_probe(struct platform_device *pdev) 279static int si476x_platform_probe(struct platform_device *pdev)