From e865c08c5e5a395912dd7259a5e477e579856e17 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 10 Feb 2012 18:09:42 +0000 Subject: [PATCH] --- yaml --- r: 293338 b: refs/heads/master c: d60d6c3b65fa2156ec95d96f73e34cdb0c586458 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/wm8993.h | 9 +++++++++ trunk/sound/soc/codecs/wm_hubs.c | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 506eb7d7f6a4..e00b37f1fdc0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f2f38904019bbffb107767c55d9e781c94941ef +refs/heads/master: d60d6c3b65fa2156ec95d96f73e34cdb0c586458 diff --git a/trunk/sound/soc/codecs/wm8993.h b/trunk/sound/soc/codecs/wm8993.h index 2184617b9611..4478b40c86e3 100644 --- a/trunk/sound/soc/codecs/wm8993.h +++ b/trunk/sound/soc/codecs/wm8993.h @@ -31,6 +31,7 @@ #define WM8993_GPIO_CTRL_1 0x12 #define WM8993_GPIO1 0x13 #define WM8993_IRQ_DEBOUNCE 0x14 +#define WM8993_INPUTS_CLAMP_REG 0x15 #define WM8993_GPIOCTRL_2 0x16 #define WM8993_GPIO_POL 0x17 #define WM8993_LEFT_LINE_INPUT_1_2_VOLUME 0x18 @@ -655,6 +656,14 @@ #define WM8993_GPIO1_DB_SHIFT 0 /* GPIO1_DB */ #define WM8993_GPIO1_DB_WIDTH 1 /* GPIO1_DB */ +/* + * R21 (0x15) - Inputs Clamp + */ +#define WM8993_INPUTS_CLAMP 0x0040 /* INPUTS_CLAMP */ +#define WM8993_INPUTS_CLAMP_MASK 0x0040 /* INPUTS_CLAMP */ +#define WM8993_INPUTS_CLAMP_SHIFT 7 /* INPUTS_CLAMP */ +#define WM8993_INPUTS_CLAMP_WIDTH 1 /* INPUTS_CLAMP */ + /* * R22 (0x16) - GPIOCTRL 2 */ diff --git a/trunk/sound/soc/codecs/wm_hubs.c b/trunk/sound/soc/codecs/wm_hubs.c index f7650c5cc5c2..9742c666cd0a 100644 --- a/trunk/sound/soc/codecs/wm_hubs.c +++ b/trunk/sound/soc/codecs/wm_hubs.c @@ -1040,6 +1040,12 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, int val; switch (level) { + case SND_SOC_BIAS_STANDBY: + /* Clamp the inputs to VMID while we ramp to charge caps */ + snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG, + WM8993_INPUTS_CLAMP, WM8993_INPUTS_CLAMP); + break; + case SND_SOC_BIAS_ON: /* Turn off any unneded single ended outputs */ val = 0; @@ -1067,6 +1073,10 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, !hubs->lineout2n_ena && !hubs->lineout2p_ena) snd_soc_update_bits(codec, WM8993_ANTIPOP1, WM8993_LINEOUT_VMID_BUF_ENA, 0); + + /* Remove the input clamps */ + snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG, + WM8993_INPUTS_CLAMP, 0); break; default: