diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-09 12:42:56 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-09 17:50:03 -0500 |
commit | 2c8be5a26e42cfc4906c4daa8a5a5c82610ddb3d (patch) | |
tree | 9c4e98a996220b1eb948b27524a5309a7e074d60 /sound/soc/codecs/wm8903.c | |
parent | 13a9983eb197254dffd9ea63a2d5f12c54eb651c (diff) |
ASoC: Dynamically manage CLK_SYS in WM8903
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 9793775d5798..389d2e8088f2 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -860,10 +860,18 @@ SND_SOC_DAPM_PGA("Right Speaker PGA", WM8903_POWER_MANAGEMENT_5, 0, 0, | |||
860 | SND_SOC_DAPM_SUPPLY("Charge Pump", WM8903_CHARGE_PUMP_0, 0, 0, | 860 | SND_SOC_DAPM_SUPPLY("Charge Pump", WM8903_CHARGE_PUMP_0, 0, 0, |
861 | wm8903_cp_event, SND_SOC_DAPM_POST_PMU), | 861 | wm8903_cp_event, SND_SOC_DAPM_POST_PMU), |
862 | SND_SOC_DAPM_SUPPLY("CLK_DSP", WM8903_CLOCK_RATES_2, 1, 0, NULL, 0), | 862 | SND_SOC_DAPM_SUPPLY("CLK_DSP", WM8903_CLOCK_RATES_2, 1, 0, NULL, 0), |
863 | SND_SOC_DAPM_SUPPLY("CLK_SYS", WM8903_CLOCK_RATES_2, 2, 0, NULL, 0), | ||
863 | }; | 864 | }; |
864 | 865 | ||
865 | static const struct snd_soc_dapm_route intercon[] = { | 866 | static const struct snd_soc_dapm_route intercon[] = { |
866 | 867 | ||
868 | { "CLK_DSP", NULL, "CLK_SYS" }, | ||
869 | { "Mic Bias", NULL, "CLK_SYS" }, | ||
870 | { "HPL_DCS", NULL, "CLK_SYS" }, | ||
871 | { "HPR_DCS", NULL, "CLK_SYS" }, | ||
872 | { "LINEOUTL_DCS", NULL, "CLK_SYS" }, | ||
873 | { "LINEOUTR_DCS", NULL, "CLK_SYS" }, | ||
874 | |||
867 | { "Left Input Mux", "IN1L", "IN1L" }, | 875 | { "Left Input Mux", "IN1L", "IN1L" }, |
868 | { "Left Input Mux", "IN2L", "IN2L" }, | 876 | { "Left Input Mux", "IN2L", "IN2L" }, |
869 | { "Left Input Mux", "IN3L", "IN3L" }, | 877 | { "Left Input Mux", "IN3L", "IN3L" }, |
@@ -1059,10 +1067,11 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec, | |||
1059 | break; | 1067 | break; |
1060 | 1068 | ||
1061 | case SND_SOC_BIAS_OFF: | 1069 | case SND_SOC_BIAS_OFF: |
1070 | snd_soc_update_bits(codec, WM8903_CLOCK_RATES_2, | ||
1071 | WM8903_CLK_SYS_ENA, WM8903_CLK_SYS_ENA); | ||
1062 | wm8903_run_sequence(codec, 32); | 1072 | wm8903_run_sequence(codec, 32); |
1063 | reg = snd_soc_read(codec, WM8903_CLOCK_RATES_2); | 1073 | snd_soc_update_bits(codec, WM8903_CLOCK_RATES_2, |
1064 | reg &= ~WM8903_CLK_SYS_ENA; | 1074 | WM8903_CLK_SYS_ENA, 0); |
1065 | snd_soc_write(codec, WM8903_CLOCK_RATES_2, reg); | ||
1066 | break; | 1075 | break; |
1067 | } | 1076 | } |
1068 | 1077 | ||