Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283824
b: refs/heads/master
c: 500fa30
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Nov 29, 2011
1 parent f2d266a commit 84f31b8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 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: 9b8f5695a155308a4e0355a29747961bec9757c0
refs/heads/master: 500fa30ed5795a1d8e8539d0cd81f73b34f831a3
40 changes: 39 additions & 1 deletion trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -2025,6 +2025,18 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
break;

case SND_SOC_BIAS_PREPARE:
/* MICBIAS into regulating mode */
switch (control->type) {
case WM8958:
case WM1811:
snd_soc_update_bits(codec, WM8958_MICBIAS1,
WM8958_MICB1_MODE, 0);
snd_soc_update_bits(codec, WM8958_MICBIAS2,
WM8958_MICB2_MODE, 0);
break;
default:
break;
}
break;

case SND_SOC_BIAS_STANDBY:
Expand Down Expand Up @@ -2077,7 +2089,20 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
WM8994_LINEOUT2_DISCH);
}


/* MICBIAS into bypass mode on newer devices */
switch (control->type) {
case WM8958:
case WM1811:
snd_soc_update_bits(codec, WM8958_MICBIAS1,
WM8958_MICB1_MODE,
WM8958_MICB1_MODE);
snd_soc_update_bits(codec, WM8958_MICBIAS2,
WM8958_MICB2_MODE,
WM8958_MICB2_MODE);
break;
default:
break;
}
break;

case SND_SOC_BIAS_OFF:
Expand Down Expand Up @@ -3371,6 +3396,19 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
break;
}

/* Put MICBIAS into bypass mode by default on newer devices */
switch (control->type) {
case WM8958:
case WM1811:
snd_soc_update_bits(codec, WM8958_MICBIAS1,
WM8958_MICB1_MODE, WM8958_MICB1_MODE);
snd_soc_update_bits(codec, WM8958_MICBIAS2,
WM8958_MICB2_MODE, WM8958_MICB2_MODE);
break;
default:
break;
}

wm8994_update_class_w(codec);

wm8994_handle_pdata(wm8994);
Expand Down

0 comments on commit 84f31b8

Please sign in to comment.