diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-07 13:24:09 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-07 14:18:08 -0400 |
commit | 45a14a8b50465a6ce61005f7fe9f3fd5c06823d5 (patch) | |
tree | da364fca26a75943769c5e5c1a5c35a78d8a4f07 /sound/soc/codecs/ads117x.c | |
parent | c095ba7224d8edc71dcef0d655911399a8bd4a3f (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.c | 29 |
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 | ||
26 | static const struct snd_soc_dapm_widget ads117x_dapm_widgets[] = { | ||
27 | SND_SOC_DAPM_INPUT("Input1"), | ||
28 | SND_SOC_DAPM_INPUT("Input2"), | ||
29 | SND_SOC_DAPM_INPUT("Input3"), | ||
30 | SND_SOC_DAPM_INPUT("Input4"), | ||
31 | SND_SOC_DAPM_INPUT("Input5"), | ||
32 | SND_SOC_DAPM_INPUT("Input6"), | ||
33 | SND_SOC_DAPM_INPUT("Input7"), | ||
34 | SND_SOC_DAPM_INPUT("Input8"), | ||
35 | }; | ||
36 | |||
37 | static 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 | |||
26 | static struct snd_soc_dai_driver ads117x_dai = { | 48 | static 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 | ||
37 | static struct snd_soc_codec_driver soc_codec_dev_ads117x; | 59 | static 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 | ||
39 | static int ads117x_probe(struct platform_device *pdev) | 66 | static int ads117x_probe(struct platform_device *pdev) |
40 | { | 67 | { |