diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-20 17:39:45 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-02-01 18:35:46 +0000 |
commit | 3ed7074c4cc0de5ba77e180e5d96c23ef96859f0 (patch) | |
tree | f9a08d09b5ccc96664f385c5c74860802c40e213 /sound/soc/codecs/wm8993.c | |
parent | 2f1ff6614cb5938e5c5760358752d92deb67fb63 (diff) | |
download | linux-3ed7074c4cc0de5ba77e180e5d96c23ef96859f0.tar.bz2 |
ASoC: Improved wm_hubs headphone handling
Perform DC servo offset calibration using a series update sequence
rather than startup update sequence, tuning the configuration of the
WM8993 DC servo to make best use of this.
Also introduce currently unused data allowing us to correct for
any systematic errors in the DC servo calibration results and an
alternative startup path for the headphone output which performs
better with some chip revisions. The alternative setup sequence is
enabled for WM8993.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8993.c')
-rw-r--r-- | sound/soc/codecs/wm8993.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 828d8174d5b7..bacfc2f20d70 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c @@ -213,6 +213,7 @@ static struct { }; struct wm8993_priv { + struct wm_hubs_data hubs_data; u16 reg_cache[WM8993_REGISTER_COUNT]; struct wm8993_platform_data pdata; struct snd_soc_codec codec; @@ -997,6 +998,11 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_STANDBY: if (codec->bias_level == SND_SOC_BIAS_OFF) { + /* Tune DC servo configuration */ + snd_soc_write(codec, 0x44, 3); + snd_soc_write(codec, 0x56, 3); + snd_soc_write(codec, 0x44, 0); + /* Bring up VMID with fast soft start */ snd_soc_update_bits(codec, WM8993_ANTIPOP2, WM8993_STARTUP_BIAS_ENA | @@ -1591,6 +1597,8 @@ static int wm8993_i2c_probe(struct i2c_client *i2c, codec->num_dai = 1; codec->private_data = wm8993; + wm8993->hubs_data.hp_startup_mode = 1; + memcpy(wm8993->reg_cache, wm8993_reg_defaults, sizeof(wm8993->reg_cache)); |