Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233942
b: refs/heads/master
c: a3cff81
h: refs/heads/master
v: v3
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Mar 1, 2011
1 parent b74c24e commit 59b3bfa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ee845acba58549578d03a46ed307c0a56c7f777
refs/heads/master: a3cff81ac19ace1ce5ba3fc88e46aea2cb4ebe1a
25 changes: 19 additions & 6 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ struct wm8994_priv {

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)
Expand Down Expand Up @@ -1015,14 +1018,18 @@ static int late_enable_ev(struct snd_soc_dapm_widget *w,

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;
}

Expand All @@ -1037,15 +1044,15 @@ static int late_disable_ev(struct snd_soc_dapm_widget *w,

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;
}
Expand All @@ -1063,6 +1070,9 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
case SND_SOC_DAPM_PRE_PMU:
wm8994->aif1clk_enable = 1;
break;
case SND_SOC_DAPM_POST_PMD:
wm8994->aif1clk_disable = 1;
break;
}

return 0;
Expand All @@ -1078,6 +1088,9 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w,
case SND_SOC_DAPM_PRE_PMU:
wm8994->aif2clk_enable = 1;
break;
case SND_SOC_DAPM_POST_PMD:
wm8994->aif2clk_disable = 1;
break;
}

return 0;
Expand Down

0 comments on commit 59b3bfa

Please sign in to comment.