diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-03-01 06:47:10 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-01 18:27:07 -0500 |
commit | 04d286819ba499839d04cbf847f2ea28d5cf4296 (patch) | |
tree | 0ae223a383118b03ddb6d037b79ce2eb65666c06 /sound | |
parent | a3cff81ac19ace1ce5ba3fc88e46aea2cb4ebe1a (diff) |
ASoC: WM8994: Ensure late enable events are processed for the ADCs
Ensure that the ADCs are provided with a clock as the previous patch
"ASoC: WM8994: Improve playback robustness" did not handle this case
properly.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 9e91525eddaa..4afbe3b2e443 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -1096,6 +1096,13 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, | |||
1096 | return 0; | 1096 | return 0; |
1097 | } | 1097 | } |
1098 | 1098 | ||
1099 | static int adc_mux_ev(struct snd_soc_dapm_widget *w, | ||
1100 | struct snd_kcontrol *kcontrol, int event) | ||
1101 | { | ||
1102 | late_enable_ev(w, kcontrol, event); | ||
1103 | return 0; | ||
1104 | } | ||
1105 | |||
1099 | static int dac_ev(struct snd_soc_dapm_widget *w, | 1106 | static int dac_ev(struct snd_soc_dapm_widget *w, |
1100 | struct snd_kcontrol *kcontrol, int event) | 1107 | struct snd_kcontrol *kcontrol, int event) |
1101 | { | 1108 | { |
@@ -1416,6 +1423,18 @@ SND_SOC_DAPM_DAC("DAC1L", NULL, WM8994_POWER_MANAGEMENT_5, 1, 0), | |||
1416 | SND_SOC_DAPM_DAC("DAC1R", NULL, WM8994_POWER_MANAGEMENT_5, 0, 0), | 1423 | SND_SOC_DAPM_DAC("DAC1R", NULL, WM8994_POWER_MANAGEMENT_5, 0, 0), |
1417 | }; | 1424 | }; |
1418 | 1425 | ||
1426 | static const struct snd_soc_dapm_widget wm8994_adc_revd_widgets[] = { | ||
1427 | SND_SOC_DAPM_MUX_E("ADCL Mux", WM8994_POWER_MANAGEMENT_4, 1, 0, &adcl_mux, | ||
1428 | adc_mux_ev, SND_SOC_DAPM_PRE_PMU), | ||
1429 | SND_SOC_DAPM_MUX_E("ADCR Mux", WM8994_POWER_MANAGEMENT_4, 0, 0, &adcr_mux, | ||
1430 | adc_mux_ev, SND_SOC_DAPM_PRE_PMU), | ||
1431 | }; | ||
1432 | |||
1433 | static const struct snd_soc_dapm_widget wm8994_adc_widgets[] = { | ||
1434 | SND_SOC_DAPM_MUX("ADCL Mux", WM8994_POWER_MANAGEMENT_4, 1, 0, &adcl_mux), | ||
1435 | SND_SOC_DAPM_MUX("ADCR Mux", WM8994_POWER_MANAGEMENT_4, 0, 0, &adcr_mux), | ||
1436 | }; | ||
1437 | |||
1419 | static const struct snd_soc_dapm_widget wm8994_dapm_widgets[] = { | 1438 | static const struct snd_soc_dapm_widget wm8994_dapm_widgets[] = { |
1420 | SND_SOC_DAPM_INPUT("DMIC1DAT"), | 1439 | SND_SOC_DAPM_INPUT("DMIC1DAT"), |
1421 | SND_SOC_DAPM_INPUT("DMIC2DAT"), | 1440 | SND_SOC_DAPM_INPUT("DMIC2DAT"), |
@@ -1510,9 +1529,6 @@ SND_SOC_DAPM_ADC("DMIC1R", NULL, WM8994_POWER_MANAGEMENT_4, 2, 0), | |||
1510 | SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 1, 0), | 1529 | SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 1, 0), |
1511 | SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0), | 1530 | SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0), |
1512 | 1531 | ||
1513 | SND_SOC_DAPM_MUX("ADCL Mux", WM8994_POWER_MANAGEMENT_4, 1, 0, &adcl_mux), | ||
1514 | SND_SOC_DAPM_MUX("ADCR Mux", WM8994_POWER_MANAGEMENT_4, 0, 0, &adcr_mux), | ||
1515 | |||
1516 | SND_SOC_DAPM_MUX("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux), | 1532 | SND_SOC_DAPM_MUX("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux), |
1517 | SND_SOC_DAPM_MUX("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux), | 1533 | SND_SOC_DAPM_MUX("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux), |
1518 | 1534 | ||
@@ -3293,11 +3309,15 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3293 | if (wm8994->revision < 4) { | 3309 | if (wm8994->revision < 4) { |
3294 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_revd_widgets, | 3310 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_revd_widgets, |
3295 | ARRAY_SIZE(wm8994_lateclk_revd_widgets)); | 3311 | ARRAY_SIZE(wm8994_lateclk_revd_widgets)); |
3312 | snd_soc_dapm_new_controls(dapm, wm8994_adc_revd_widgets, | ||
3313 | ARRAY_SIZE(wm8994_adc_revd_widgets)); | ||
3296 | snd_soc_dapm_new_controls(dapm, wm8994_dac_revd_widgets, | 3314 | snd_soc_dapm_new_controls(dapm, wm8994_dac_revd_widgets, |
3297 | ARRAY_SIZE(wm8994_dac_revd_widgets)); | 3315 | ARRAY_SIZE(wm8994_dac_revd_widgets)); |
3298 | } else { | 3316 | } else { |
3299 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_widgets, | 3317 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_widgets, |
3300 | ARRAY_SIZE(wm8994_lateclk_widgets)); | 3318 | ARRAY_SIZE(wm8994_lateclk_widgets)); |
3319 | snd_soc_dapm_new_controls(dapm, wm8994_adc_widgets, | ||
3320 | ARRAY_SIZE(wm8994_adc_widgets)); | ||
3301 | snd_soc_dapm_new_controls(dapm, wm8994_dac_widgets, | 3321 | snd_soc_dapm_new_controls(dapm, wm8994_dac_widgets, |
3302 | ARRAY_SIZE(wm8994_dac_widgets)); | 3322 | ARRAY_SIZE(wm8994_dac_widgets)); |
3303 | } | 3323 | } |