diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-11 07:29:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-18 13:27:40 -0400 |
commit | 782fbaba36731d46820f3a4f358a7b46a9cd795c (patch) | |
tree | eb359f1b582e9e5f705fa35a364c03d1685bad3a | |
parent | d4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff) |
ASoC: cs4270: Add DAPM support
This makes it possible to hook the device into a more complex board and
ensures it will continue to work with non-DAPM support removed from the
core.
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/codecs/cs4270.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 8e4779812b96..83c835d9fd88 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -139,6 +139,22 @@ struct cs4270_private { | |||
139 | struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)]; | 139 | struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)]; |
140 | }; | 140 | }; |
141 | 141 | ||
142 | static const struct snd_soc_dapm_widget cs4270_dapm_widgets[] = { | ||
143 | SND_SOC_DAPM_INPUT("AINL"), | ||
144 | SND_SOC_DAPM_INPUT("AINR"), | ||
145 | |||
146 | SND_SOC_DAPM_OUTPUT("AOUTL"), | ||
147 | SND_SOC_DAPM_OUTPUT("AOUTR"), | ||
148 | }; | ||
149 | |||
150 | static const struct snd_soc_dapm_route cs4270_dapm_routes[] = { | ||
151 | { "Capture", NULL, "AINA" }, | ||
152 | { "Capture", NULL, "AINB" }, | ||
153 | |||
154 | { "AOUTA", NULL, "Playback" }, | ||
155 | { "AOUTB", NULL, "Playback" }, | ||
156 | }; | ||
157 | |||
142 | /** | 158 | /** |
143 | * struct cs4270_mode_ratios - clock ratio tables | 159 | * struct cs4270_mode_ratios - clock ratio tables |
144 | * @ratio: the ratio of MCLK to the sample rate | 160 | * @ratio: the ratio of MCLK to the sample rate |
@@ -612,6 +628,10 @@ static const struct snd_soc_codec_driver soc_codec_device_cs4270 = { | |||
612 | 628 | ||
613 | .controls = cs4270_snd_controls, | 629 | .controls = cs4270_snd_controls, |
614 | .num_controls = ARRAY_SIZE(cs4270_snd_controls), | 630 | .num_controls = ARRAY_SIZE(cs4270_snd_controls), |
631 | .dapm_widgets = cs4270_dapm_widgets, | ||
632 | .num_dapm_widgets = ARRAY_SIZE(cs4270_dapm_widgets), | ||
633 | .dapm_routes = cs4270_dapm_routes, | ||
634 | .num_dapm_routes = ARRAY_SIZE(cs4270_dapm_routes), | ||
615 | }; | 635 | }; |
616 | 636 | ||
617 | /* | 637 | /* |