diff options
Diffstat (limited to 'sound/soc/codecs/cs4271.c')
-rw-r--r-- | sound/soc/codecs/cs4271.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 03036b326732..a20f1bb8f071 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c | |||
@@ -173,6 +173,26 @@ struct cs4271_private { | |||
173 | bool enable_soft_reset; | 173 | bool enable_soft_reset; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static const struct snd_soc_dapm_widget cs4271_dapm_widgets[] = { | ||
177 | SND_SOC_DAPM_INPUT("AINA"), | ||
178 | SND_SOC_DAPM_INPUT("AINB"), | ||
179 | |||
180 | SND_SOC_DAPM_OUTPUT("AOUTA+"), | ||
181 | SND_SOC_DAPM_OUTPUT("AOUTA-"), | ||
182 | SND_SOC_DAPM_OUTPUT("AOUTB+"), | ||
183 | SND_SOC_DAPM_OUTPUT("AOUTB-"), | ||
184 | }; | ||
185 | |||
186 | static const struct snd_soc_dapm_route cs4271_dapm_routes[] = { | ||
187 | { "Capture", NULL, "AINA" }, | ||
188 | { "Capture", NULL, "AINB" }, | ||
189 | |||
190 | { "AOUTA+", NULL, "Playback" }, | ||
191 | { "AOUTA-", NULL, "Playback" }, | ||
192 | { "AOUTB+", NULL, "Playback" }, | ||
193 | { "AOUTB-", NULL, "Playback" }, | ||
194 | }; | ||
195 | |||
176 | /* | 196 | /* |
177 | * @freq is the desired MCLK rate | 197 | * @freq is the desired MCLK rate |
178 | * MCLK rate should (c) be the sample rate, multiplied by one of the | 198 | * MCLK rate should (c) be the sample rate, multiplied by one of the |
@@ -576,8 +596,7 @@ static int cs4271_probe(struct snd_soc_codec *codec) | |||
576 | CS4271_MODE2_MUTECAEQUB, | 596 | CS4271_MODE2_MUTECAEQUB, |
577 | CS4271_MODE2_MUTECAEQUB); | 597 | CS4271_MODE2_MUTECAEQUB); |
578 | 598 | ||
579 | return snd_soc_add_codec_controls(codec, cs4271_snd_controls, | 599 | return 0; |
580 | ARRAY_SIZE(cs4271_snd_controls)); | ||
581 | } | 600 | } |
582 | 601 | ||
583 | static int cs4271_remove(struct snd_soc_codec *codec) | 602 | static int cs4271_remove(struct snd_soc_codec *codec) |
@@ -596,6 +615,13 @@ static struct snd_soc_codec_driver soc_codec_dev_cs4271 = { | |||
596 | .remove = cs4271_remove, | 615 | .remove = cs4271_remove, |
597 | .suspend = cs4271_soc_suspend, | 616 | .suspend = cs4271_soc_suspend, |
598 | .resume = cs4271_soc_resume, | 617 | .resume = cs4271_soc_resume, |
618 | |||
619 | .controls = cs4271_snd_controls, | ||
620 | .num_controls = ARRAY_SIZE(cs4271_snd_controls), | ||
621 | .dapm_widgets = cs4271_dapm_widgets, | ||
622 | .num_dapm_widgets = ARRAY_SIZE(cs4271_dapm_widgets), | ||
623 | .dapm_routes = cs4271_dapm_routes, | ||
624 | .num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes), | ||
599 | }; | 625 | }; |
600 | 626 | ||
601 | #if defined(CONFIG_SPI_MASTER) | 627 | #if defined(CONFIG_SPI_MASTER) |