summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2009-08-19 18:24:20 -0500
committerJustin Waters <justin.waters@timesys.com>2009-10-13 11:05:23 -0400
commitae2c5664c0c945b03d9faea56de171cec1b03160 (patch)
treea50573c6c1d92869adf2ed16e2d36eaef87135fc
parentbb15969be7389887c5cd706748bf7fada444b832 (diff)
ENGR00115754 sgtl5000: power mic bias earlier
Turn on mic bias earlier to make sure mic bias has time to ramp up before record starts. Avoid audio artifacts. Signed-off-by: Alan Tull <r80115@freescale.com>
-rw-r--r--sound/soc/codecs/sgtl5000.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index cb63cdd69bca..3742c0242deb 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -670,6 +670,11 @@ static int sgtl5000_set_bias_level(struct snd_soc_codec *codec,
if (codec->bias_level == SND_SOC_BIAS_ON)
break;
+ reg = sgtl5000_read(codec, SGTL5000_CHIP_MIC_CTRL);
+ reg &= ~SGTL5000_BIAS_R_MASK;
+ reg |= SGTL5000_BIAS_R_4k << SGTL5000_BIAS_R_SHIFT;
+ sgtl5000_write(codec, SGTL5000_CHIP_MIC_CTRL, reg);
+
/* must power up hp/line out before vag & dac to
avoid pops. */
reg = sgtl5000_read(codec, SGTL5000_CHIP_ANA_POWER);
@@ -679,11 +684,6 @@ static int sgtl5000_set_bias_level(struct snd_soc_codec *codec,
sgtl5000_write(codec, SGTL5000_CHIP_ANA_POWER, reg);
msleep(400);
- reg = sgtl5000_read(codec, SGTL5000_CHIP_MIC_CTRL);
- reg &= ~SGTL5000_BIAS_R_MASK;
- reg |= SGTL5000_BIAS_R_4k << SGTL5000_BIAS_R_SHIFT;
- sgtl5000_write(codec, SGTL5000_CHIP_MIC_CTRL, reg);
-
break;
case SND_SOC_BIAS_PREPARE: /* partial On */