unsigned int aif1clk_enable:1;
unsigned int aif2clk_enable:1;
+
+ unsigned int aif1clk_disable:1;
+ unsigned int aif2clk_disable:1;
};
static int wm8994_readable(unsigned int reg)
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- if (wm8994->aif1clk_enable)
+ if (wm8994->aif1clk_enable) {
snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
WM8994_AIF1CLK_ENA_MASK,
WM8994_AIF1CLK_ENA);
- if (wm8994->aif2clk_enable)
+ wm8994->aif1clk_enable = 0;
+ }
+ if (wm8994->aif2clk_enable) {
snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
WM8994_AIF2CLK_ENA_MASK,
WM8994_AIF2CLK_ENA);
+ wm8994->aif2clk_enable = 0;
+ }
break;
}
switch (event) {
case SND_SOC_DAPM_POST_PMD:
- if (wm8994->aif1clk_enable) {
+ if (wm8994->aif1clk_disable) {
snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
WM8994_AIF1CLK_ENA_MASK, 0);
- wm8994->aif1clk_enable = 0;
+ wm8994->aif1clk_disable = 0;
}
- if (wm8994->aif2clk_enable) {
+ if (wm8994->aif2clk_disable) {
snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
WM8994_AIF2CLK_ENA_MASK, 0);
- wm8994->aif2clk_enable = 0;
+ wm8994->aif2clk_disable = 0;
}
break;
}
case SND_SOC_DAPM_PRE_PMU:
wm8994->aif1clk_enable = 1;
break;
+ case SND_SOC_DAPM_POST_PMD:
+ wm8994->aif1clk_disable = 1;
+ break;
}
return 0;
case SND_SOC_DAPM_PRE_PMU:
wm8994->aif2clk_enable = 1;
break;
+ case SND_SOC_DAPM_POST_PMD:
+ wm8994->aif2clk_disable = 1;
+ break;
}
return 0;