diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-05 07:25:19 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-05 09:10:20 -0400 |
commit | c8fdc1b56611faa7b38eab6b99da5e20113661ff (patch) | |
tree | c6731ed9ed104135d1bb4e7120773cb81fc672f5 /sound/soc/codecs/wm8994.c | |
parent | a1c85ec03738421668becb973f35fe6e1501c6e6 (diff) |
ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variants
Ensure that all the actions get taken at appropriate times by calling the
_PRE and _POST events for the aifNclk_ev functions explicitly.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 993639d694ce..6d3a8654654a 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -1190,17 +1190,19 @@ static int late_enable_ev(struct snd_soc_dapm_widget *w, | |||
1190 | switch (event) { | 1190 | switch (event) { |
1191 | case SND_SOC_DAPM_PRE_PMU: | 1191 | case SND_SOC_DAPM_PRE_PMU: |
1192 | if (wm8994->aif1clk_enable) { | 1192 | if (wm8994->aif1clk_enable) { |
1193 | aif1clk_ev(w, kcontrol, event); | 1193 | aif1clk_ev(w, kcontrol, SND_SOC_DAPM_PRE_PMU); |
1194 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1194 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, |
1195 | WM8994_AIF1CLK_ENA_MASK, | 1195 | WM8994_AIF1CLK_ENA_MASK, |
1196 | WM8994_AIF1CLK_ENA); | 1196 | WM8994_AIF1CLK_ENA); |
1197 | aif1clk_ev(w, kcontrol, SND_SOC_DAPM_POST_PMU); | ||
1197 | wm8994->aif1clk_enable = 0; | 1198 | wm8994->aif1clk_enable = 0; |
1198 | } | 1199 | } |
1199 | if (wm8994->aif2clk_enable) { | 1200 | if (wm8994->aif2clk_enable) { |
1200 | aif2clk_ev(w, kcontrol, event); | 1201 | aif2clk_ev(w, kcontrol, SND_SOC_DAPM_PRE_PMU); |
1201 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1202 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, |
1202 | WM8994_AIF2CLK_ENA_MASK, | 1203 | WM8994_AIF2CLK_ENA_MASK, |
1203 | WM8994_AIF2CLK_ENA); | 1204 | WM8994_AIF2CLK_ENA); |
1205 | aif2clk_ev(w, kcontrol, SND_SOC_DAPM_POST_PMU); | ||
1204 | wm8994->aif2clk_enable = 0; | 1206 | wm8994->aif2clk_enable = 0; |
1205 | } | 1207 | } |
1206 | break; | 1208 | break; |
@@ -1221,15 +1223,17 @@ static int late_disable_ev(struct snd_soc_dapm_widget *w, | |||
1221 | switch (event) { | 1223 | switch (event) { |
1222 | case SND_SOC_DAPM_POST_PMD: | 1224 | case SND_SOC_DAPM_POST_PMD: |
1223 | if (wm8994->aif1clk_disable) { | 1225 | if (wm8994->aif1clk_disable) { |
1226 | aif1clk_ev(w, kcontrol, SND_SOC_DAPM_PRE_PMD); | ||
1224 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1227 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, |
1225 | WM8994_AIF1CLK_ENA_MASK, 0); | 1228 | WM8994_AIF1CLK_ENA_MASK, 0); |
1226 | aif1clk_ev(w, kcontrol, event); | 1229 | aif1clk_ev(w, kcontrol, SND_SOC_DAPM_POST_PMD); |
1227 | wm8994->aif1clk_disable = 0; | 1230 | wm8994->aif1clk_disable = 0; |
1228 | } | 1231 | } |
1229 | if (wm8994->aif2clk_disable) { | 1232 | if (wm8994->aif2clk_disable) { |
1233 | aif2clk_ev(w, kcontrol, SND_SOC_DAPM_PRE_PMD); | ||
1230 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1234 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, |
1231 | WM8994_AIF2CLK_ENA_MASK, 0); | 1235 | WM8994_AIF2CLK_ENA_MASK, 0); |
1232 | aif2clk_ev(w, kcontrol, event); | 1236 | aif2clk_ev(w, kcontrol, SND_SOC_DAPM_POST_PMD); |
1233 | wm8994->aif2clk_disable = 0; | 1237 | wm8994->aif2clk_disable = 0; |
1234 | } | 1238 | } |
1235 | break; | 1239 | break; |