diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-29 03:21:09 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-13 11:37:52 -0400 |
commit | b70a51bab9c64d2cabf7c052ebb3f5db2801fd05 (patch) | |
tree | 25ce58fdcae4e03c12f6da2c11fdec8462c0a5d0 /sound/soc/codecs/wm8994.c | |
parent | 889ebae537f5cd3adfd149160b8092217de3cff0 (diff) |
ASoC: Use late enable handling for direct voice, speaker and headphone
This ensures appropriate clocking for bypass paths to speaker and
headphone and direct voice paths on affected revisions.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 0cd36f08f9d1..3fd7422df408 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -1146,13 +1146,33 @@ SND_SOC_DAPM_PGA_E("Late DAC2L Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, | |||
1146 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), | 1146 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), |
1147 | SND_SOC_DAPM_PGA_E("Late DAC2R Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, | 1147 | SND_SOC_DAPM_PGA_E("Late DAC2R Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, |
1148 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), | 1148 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), |
1149 | SND_SOC_DAPM_PGA_E("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0, | ||
1150 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), | ||
1151 | |||
1152 | SND_SOC_DAPM_MIXER_E("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, | ||
1153 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer), | ||
1154 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), | ||
1155 | SND_SOC_DAPM_MIXER_E("SPKR", WM8994_POWER_MANAGEMENT_3, 9, 0, | ||
1156 | right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer), | ||
1157 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), | ||
1158 | SND_SOC_DAPM_MUX_E("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux, | ||
1159 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), | ||
1160 | SND_SOC_DAPM_MUX_E("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux, | ||
1161 | late_enable_ev, SND_SOC_DAPM_PRE_PMU), | ||
1149 | 1162 | ||
1150 | SND_SOC_DAPM_POST("Late Disable PGA", late_disable_ev) | 1163 | SND_SOC_DAPM_POST("Late Disable PGA", late_disable_ev) |
1151 | }; | 1164 | }; |
1152 | 1165 | ||
1153 | static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { | 1166 | static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { |
1154 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), | 1167 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), |
1155 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0) | 1168 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0), |
1169 | SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), | ||
1170 | SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, | ||
1171 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), | ||
1172 | SND_SOC_DAPM_MIXER("SPKR", WM8994_POWER_MANAGEMENT_3, 9, 0, | ||
1173 | right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)), | ||
1174 | SND_SOC_DAPM_MUX("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux), | ||
1175 | SND_SOC_DAPM_MUX("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux), | ||
1156 | }; | 1176 | }; |
1157 | 1177 | ||
1158 | static const struct snd_soc_dapm_widget wm8994_dac_revd_widgets[] = { | 1178 | static const struct snd_soc_dapm_widget wm8994_dac_revd_widgets[] = { |
@@ -1283,14 +1303,6 @@ SND_SOC_DAPM_ADC("DMIC1R", NULL, WM8994_POWER_MANAGEMENT_4, 2, 0), | |||
1283 | SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 1, 0), | 1303 | SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 1, 0), |
1284 | SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0), | 1304 | SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0), |
1285 | 1305 | ||
1286 | SND_SOC_DAPM_MUX("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux), | ||
1287 | SND_SOC_DAPM_MUX("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux), | ||
1288 | |||
1289 | SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, | ||
1290 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), | ||
1291 | SND_SOC_DAPM_MIXER("SPKR", WM8994_POWER_MANAGEMENT_3, 9, 0, | ||
1292 | right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)), | ||
1293 | |||
1294 | SND_SOC_DAPM_POST("Debug log", post_ev), | 1306 | SND_SOC_DAPM_POST("Debug log", post_ev), |
1295 | }; | 1307 | }; |
1296 | 1308 | ||