diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-06 18:51:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-07 05:14:23 -0400 |
commit | 9e7e474c0963dfd1f60b200160ff9e7cefb32b06 (patch) | |
tree | 76f4f73a05e3000193ca33ab5f8d77df40a8a46a /sound/soc/codecs/ad1980.c | |
parent | c095ba7224d8edc71dcef0d655911399a8bd4a3f (diff) |
ASoC: ad1980: Provide stub DAPM support
Since non-DAPM devices are not going to be supported provide DAPM input
and output widgets and hook them up to the DAIs.
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'sound/soc/codecs/ad1980.c')
-rw-r--r-- | sound/soc/codecs/ad1980.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c index 89fcf7d6e7b8..7257a8885f42 100644 --- a/sound/soc/codecs/ad1980.c +++ b/sound/soc/codecs/ad1980.c | |||
@@ -96,6 +96,44 @@ SOC_ENUM("Capture Source", ad1980_cap_src), | |||
96 | SOC_SINGLE("Mic Boost Switch", AC97_MIC, 6, 1, 0), | 96 | SOC_SINGLE("Mic Boost Switch", AC97_MIC, 6, 1, 0), |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static const struct snd_soc_dapm_widget ad1980_dapm_widgets[] = { | ||
100 | SND_SOC_DAPM_INPUT("MIC1"), | ||
101 | SND_SOC_DAPM_INPUT("MIC2"), | ||
102 | SND_SOC_DAPM_INPUT("CD_L"), | ||
103 | SND_SOC_DAPM_INPUT("CD_R"), | ||
104 | SND_SOC_DAPM_INPUT("AUX_L"), | ||
105 | SND_SOC_DAPM_INPUT("AUX_R"), | ||
106 | SND_SOC_DAPM_INPUT("LINE_IN_L"), | ||
107 | SND_SOC_DAPM_INPUT("LINE_IN_R"), | ||
108 | |||
109 | SND_SOC_DAPM_OUTPUT("LFE_OUT"), | ||
110 | SND_SOC_DAPM_OUTPUT("CENTER_OUT"), | ||
111 | SND_SOC_DAPM_OUTPUT("LINE_OUT_L"), | ||
112 | SND_SOC_DAPM_OUTPUT("LINE_OUT_R"), | ||
113 | SND_SOC_DAPM_OUTPUT("MONO_OUT"), | ||
114 | SND_SOC_DAPM_OUTPUT("HP_OUT_L"), | ||
115 | SND_SOC_DAPM_OUTPUT("HP_OUT_R"), | ||
116 | }; | ||
117 | |||
118 | static const struct snd_soc_dapm_route ad1980_dapm_routes[] = { | ||
119 | { "Capture", NULL, "MIC1" }, | ||
120 | { "Capture", NULL, "MIC2" }, | ||
121 | { "Capture", NULL, "CD_L" }, | ||
122 | { "Capture", NULL, "CD_R" }, | ||
123 | { "Capture", NULL, "AUX_L" }, | ||
124 | { "Capture", NULL, "AUX_R" }, | ||
125 | { "Capture", NULL, "LINE_IN_L" }, | ||
126 | { "Capture", NULL, "LINE_IN_R" }, | ||
127 | |||
128 | { "LFE_OUT", NULL, "Playback" }, | ||
129 | { "CENTER_OUT", NULL, "Playback" }, | ||
130 | { "LINE_OUT_L", NULL, "Playback" }, | ||
131 | { "LINE_OUT_R", NULL, "Playback" }, | ||
132 | { "MONO_OUT", NULL, "Playback" }, | ||
133 | { "HP_OUT_L", NULL, "Playback" }, | ||
134 | { "HP_OUT_R", NULL, "Playback" }, | ||
135 | }; | ||
136 | |||
99 | static unsigned int ac97_read(struct snd_soc_codec *codec, | 137 | static unsigned int ac97_read(struct snd_soc_codec *codec, |
100 | unsigned int reg) | 138 | unsigned int reg) |
101 | { | 139 | { |
@@ -253,6 +291,11 @@ static struct snd_soc_codec_driver soc_codec_dev_ad1980 = { | |||
253 | .reg_cache_step = 2, | 291 | .reg_cache_step = 2, |
254 | .write = ac97_write, | 292 | .write = ac97_write, |
255 | .read = ac97_read, | 293 | .read = ac97_read, |
294 | |||
295 | .dapm_widgets = ad1980_dapm_widgets, | ||
296 | .num_dapm_widgets = ARRAY_SIZE(ad1980_dapm_widgets), | ||
297 | .dapm_routes = ad1980_dapm_routes, | ||
298 | .num_dapm_routes = ARRAY_SIZE(ad1980_dapm_routes), | ||
256 | }; | 299 | }; |
257 | 300 | ||
258 | static int ad1980_probe(struct platform_device *pdev) | 301 | static int ad1980_probe(struct platform_device *pdev) |