aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ads117x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-07 13:24:09 -0400
committerMark Brown <broonie@linaro.org>2013-08-07 14:18:08 -0400
commit45a14a8b50465a6ce61005f7fe9f3fd5c06823d5 (patch)
treeda364fca26a75943769c5e5c1a5c35a78d8a4f07 /sound/soc/codecs/ads117x.c
parentc095ba7224d8edc71dcef0d655911399a8bd4a3f (diff)
ASoC: ads711x: Add DAPM support
This makes it easier to hook into boards and ensures the driver continues to work with support for non-DAPM CODECs removed. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/ads117x.c')
-rw-r--r--sound/soc/codecs/ads117x.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c
index 506d474c4d22..8f388edff586 100644
--- a/sound/soc/codecs/ads117x.c
+++ b/sound/soc/codecs/ads117x.c
@@ -23,6 +23,28 @@
23#define ADS117X_RATES (SNDRV_PCM_RATE_8000_48000) 23#define ADS117X_RATES (SNDRV_PCM_RATE_8000_48000)
24#define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE) 24#define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
25 25
26static const struct snd_soc_dapm_widget ads117x_dapm_widgets[] = {
27SND_SOC_DAPM_INPUT("Input1"),
28SND_SOC_DAPM_INPUT("Input2"),
29SND_SOC_DAPM_INPUT("Input3"),
30SND_SOC_DAPM_INPUT("Input4"),
31SND_SOC_DAPM_INPUT("Input5"),
32SND_SOC_DAPM_INPUT("Input6"),
33SND_SOC_DAPM_INPUT("Input7"),
34SND_SOC_DAPM_INPUT("Input8"),
35};
36
37static const struct snd_soc_dapm_route ads117x_dapm_routes[] = {
38 { "Capture", NULL, "Input1" },
39 { "Capture", NULL, "Input2" },
40 { "Capture", NULL, "Input3" },
41 { "Capture", NULL, "Input4" },
42 { "Capture", NULL, "Input5" },
43 { "Capture", NULL, "Input6" },
44 { "Capture", NULL, "Input7" },
45 { "Capture", NULL, "Input8" },
46};
47
26static struct snd_soc_dai_driver ads117x_dai = { 48static struct snd_soc_dai_driver ads117x_dai = {
27/* ADC */ 49/* ADC */
28 .name = "ads117x-hifi", 50 .name = "ads117x-hifi",
@@ -34,7 +56,12 @@ static struct snd_soc_dai_driver ads117x_dai = {
34 .formats = ADS117X_FORMATS,}, 56 .formats = ADS117X_FORMATS,},
35}; 57};
36 58
37static struct snd_soc_codec_driver soc_codec_dev_ads117x; 59static struct snd_soc_codec_driver soc_codec_dev_ads117x = {
60 .dapm_widgets = ads117x_dapm_widgets,
61 .num_dapm_widgets = ARRAY_SIZE(ads117x_dapm_widgets),
62 .dapm_routes = ads117x_dapm_routes,
63 .num_dapm_routes = ARRAY_SIZE(ads117x_dapm_routes),
64};
38 65
39static int ads117x_probe(struct platform_device *pdev) 66static int ads117x_probe(struct platform_device *pdev)
40{ 67{