Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270891
b: refs/heads/master
c: a6785d7
h: refs/heads/master
i:
  270889: f1e81c7
  270887: 2335201
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Oct 17, 2011
1 parent c752eba commit de86bbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 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: 29c6a01df8de1329303da09ca9793e9f65608216
refs/heads/master: a6785d7df8d2790d99a4788a612764a92fb9f498
22 changes: 9 additions & 13 deletions trunk/sound/soc/codecs/wm8580.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,7 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
/* Always disable the PLL - it is not safe to leave it running
* while reprogramming it.
*/
reg = snd_soc_read(codec, WM8580_PWRDN2);
snd_soc_write(codec, WM8580_PWRDN2, reg | pwr_mask);
snd_soc_update_bits(codec, WM8580_PWRDN2, pwr_mask, pwr_mask);

if (!freq_in || !freq_out)
return 0;
Expand All @@ -449,8 +448,7 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
snd_soc_write(codec, WM8580_PLLA4 + offset, reg);

/* All done, turn it on */
reg = snd_soc_read(codec, WM8580_PWRDN2);
snd_soc_write(codec, WM8580_PWRDN2, reg & ~pwr_mask);
snd_soc_update_bits(codec, WM8580_PWRDN2, pwr_mask, 0);

return 0;
}
Expand Down Expand Up @@ -748,7 +746,6 @@ static int wm8580_digital_mute(struct snd_soc_dai *codec_dai, int mute)
static int wm8580_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
u16 reg;
switch (level) {
case SND_SOC_BIAS_ON:
case SND_SOC_BIAS_PREPARE:
Expand All @@ -757,20 +754,19 @@ static int wm8580_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_STANDBY:
if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
/* Power up and get individual control of the DACs */
reg = snd_soc_read(codec, WM8580_PWRDN1);
reg &= ~(WM8580_PWRDN1_PWDN | WM8580_PWRDN1_ALLDACPD);
snd_soc_write(codec, WM8580_PWRDN1, reg);
snd_soc_update_bits(codec, WM8580_PWRDN1,
WM8580_PWRDN1_PWDN |
WM8580_PWRDN1_ALLDACPD, 0);

/* Make VMID high impedance */
reg = snd_soc_read(codec, WM8580_ADC_CONTROL1);
reg &= ~0x100;
snd_soc_write(codec, WM8580_ADC_CONTROL1, reg);
snd_soc_update_bits(codec, WM8580_ADC_CONTROL1,
0x100, 0);
}
break;

case SND_SOC_BIAS_OFF:
reg = snd_soc_read(codec, WM8580_PWRDN1);
snd_soc_write(codec, WM8580_PWRDN1, reg | WM8580_PWRDN1_PWDN);
snd_soc_update_bits(codec, WM8580_PWRDN1,
WM8580_PWRDN1_PWDN, WM8580_PWRDN1_PWDN);
break;
}
codec->dapm.bias_level = level;
Expand Down

0 comments on commit de86bbc

Please sign in to comment.