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 | |
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')
-rw-r--r-- | sound/soc/codecs/wm8993.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 30 | ||||
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 3 |
3 files changed, 22 insertions, 13 deletions
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 03af7ada985d..6e85b8869af7 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c | |||
@@ -876,7 +876,7 @@ SND_SOC_DAPM_MIXER("SPKL", WM8993_POWER_MANAGEMENT_3, 8, 0, | |||
876 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), | 876 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), |
877 | SND_SOC_DAPM_MIXER("SPKR", WM8993_POWER_MANAGEMENT_3, 9, 0, | 877 | SND_SOC_DAPM_MIXER("SPKR", WM8993_POWER_MANAGEMENT_3, 9, 0, |
878 | right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)), | 878 | right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)), |
879 | 879 | SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), | |
880 | }; | 880 | }; |
881 | 881 | ||
882 | static const struct snd_soc_dapm_route routes[] = { | 882 | static const struct snd_soc_dapm_route routes[] = { |
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 | ||
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 2d6c88b68a14..7e60e2279671 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -598,9 +598,6 @@ SND_SOC_DAPM_MIXER("IN2L PGA", WM8993_POWER_MANAGEMENT_2, 7, 0, | |||
598 | SND_SOC_DAPM_MIXER("IN2R PGA", WM8993_POWER_MANAGEMENT_2, 5, 0, | 598 | SND_SOC_DAPM_MIXER("IN2R PGA", WM8993_POWER_MANAGEMENT_2, 5, 0, |
599 | in2r_pga, ARRAY_SIZE(in2r_pga)), | 599 | in2r_pga, ARRAY_SIZE(in2r_pga)), |
600 | 600 | ||
601 | /* Dummy widgets to represent differential paths */ | ||
602 | SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), | ||
603 | |||
604 | SND_SOC_DAPM_MIXER("MIXINL", WM8993_POWER_MANAGEMENT_2, 9, 0, | 601 | SND_SOC_DAPM_MIXER("MIXINL", WM8993_POWER_MANAGEMENT_2, 9, 0, |
605 | mixinl, ARRAY_SIZE(mixinl)), | 602 | mixinl, ARRAY_SIZE(mixinl)), |
606 | SND_SOC_DAPM_MIXER("MIXINR", WM8993_POWER_MANAGEMENT_2, 8, 0, | 603 | SND_SOC_DAPM_MIXER("MIXINR", WM8993_POWER_MANAGEMENT_2, 8, 0, |