aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-10 13:09:42 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-11 18:11:21 -0500
commitd60d6c3b65fa2156ec95d96f73e34cdb0c586458 (patch)
tree927fecb5b0947117929715993dfa3c2ef20287b9 /sound/soc/codecs
parent5f2f38904019bbffb107767c55d9e781c94941ef (diff)
ASoC: wm_hubs: Clamp inputs to VMID while we ramp
Reduces the amount of time taken to stabilise them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/wm8993.h9
-rw-r--r--sound/soc/codecs/wm_hubs.c10
2 files changed, 19 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8993.h b/sound/soc/codecs/wm8993.h
index 2184617b9611..4478b40c86e3 100644
--- a/sound/soc/codecs/wm8993.h
+++ b/sound/soc/codecs/wm8993.h
@@ -31,6 +31,7 @@
31#define WM8993_GPIO_CTRL_1 0x12 31#define WM8993_GPIO_CTRL_1 0x12
32#define WM8993_GPIO1 0x13 32#define WM8993_GPIO1 0x13
33#define WM8993_IRQ_DEBOUNCE 0x14 33#define WM8993_IRQ_DEBOUNCE 0x14
34#define WM8993_INPUTS_CLAMP_REG 0x15
34#define WM8993_GPIOCTRL_2 0x16 35#define WM8993_GPIOCTRL_2 0x16
35#define WM8993_GPIO_POL 0x17 36#define WM8993_GPIO_POL 0x17
36#define WM8993_LEFT_LINE_INPUT_1_2_VOLUME 0x18 37#define WM8993_LEFT_LINE_INPUT_1_2_VOLUME 0x18
@@ -656,6 +657,14 @@
656#define WM8993_GPIO1_DB_WIDTH 1 /* GPIO1_DB */ 657#define WM8993_GPIO1_DB_WIDTH 1 /* GPIO1_DB */
657 658
658/* 659/*
660 * R21 (0x15) - Inputs Clamp
661 */
662#define WM8993_INPUTS_CLAMP 0x0040 /* INPUTS_CLAMP */
663#define WM8993_INPUTS_CLAMP_MASK 0x0040 /* INPUTS_CLAMP */
664#define WM8993_INPUTS_CLAMP_SHIFT 7 /* INPUTS_CLAMP */
665#define WM8993_INPUTS_CLAMP_WIDTH 1 /* INPUTS_CLAMP */
666
667/*
659 * R22 (0x16) - GPIOCTRL 2 668 * R22 (0x16) - GPIOCTRL 2
660 */ 669 */
661#define WM8993_IM_JD2_EINT 0x2000 /* IM_JD2_EINT */ 670#define WM8993_IM_JD2_EINT 0x2000 /* IM_JD2_EINT */
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index f7650c5cc5c2..9742c666cd0a 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -1040,6 +1040,12 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
1040 int val; 1040 int val;
1041 1041
1042 switch (level) { 1042 switch (level) {
1043 case SND_SOC_BIAS_STANDBY:
1044 /* Clamp the inputs to VMID while we ramp to charge caps */
1045 snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG,
1046 WM8993_INPUTS_CLAMP, WM8993_INPUTS_CLAMP);
1047 break;
1048
1043 case SND_SOC_BIAS_ON: 1049 case SND_SOC_BIAS_ON:
1044 /* Turn off any unneded single ended outputs */ 1050 /* Turn off any unneded single ended outputs */
1045 val = 0; 1051 val = 0;
@@ -1067,6 +1073,10 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
1067 !hubs->lineout2n_ena && !hubs->lineout2p_ena) 1073 !hubs->lineout2n_ena && !hubs->lineout2p_ena)
1068 snd_soc_update_bits(codec, WM8993_ANTIPOP1, 1074 snd_soc_update_bits(codec, WM8993_ANTIPOP1,
1069 WM8993_LINEOUT_VMID_BUF_ENA, 0); 1075 WM8993_LINEOUT_VMID_BUF_ENA, 0);
1076
1077 /* Remove the input clamps */
1078 snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG,
1079 WM8993_INPUTS_CLAMP, 0);
1070 break; 1080 break;
1071 1081
1072 default: 1082 default: