Commit d60d6c3b authored by Mark Brown's avatar Mark Brown

ASoC: wm_hubs: Clamp inputs to VMID while we ramp

Reduces the amount of time taken to stabilise them.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5f2f3890
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define WM8993_GPIO_CTRL_1 0x12 #define WM8993_GPIO_CTRL_1 0x12
#define WM8993_GPIO1 0x13 #define WM8993_GPIO1 0x13
#define WM8993_IRQ_DEBOUNCE 0x14 #define WM8993_IRQ_DEBOUNCE 0x14
#define WM8993_INPUTS_CLAMP_REG 0x15
#define WM8993_GPIOCTRL_2 0x16 #define WM8993_GPIOCTRL_2 0x16
#define WM8993_GPIO_POL 0x17 #define WM8993_GPIO_POL 0x17
#define WM8993_LEFT_LINE_INPUT_1_2_VOLUME 0x18 #define WM8993_LEFT_LINE_INPUT_1_2_VOLUME 0x18
...@@ -655,6 +656,14 @@ ...@@ -655,6 +656,14 @@
#define WM8993_GPIO1_DB_SHIFT 0 /* GPIO1_DB */ #define WM8993_GPIO1_DB_SHIFT 0 /* GPIO1_DB */
#define WM8993_GPIO1_DB_WIDTH 1 /* 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 * R22 (0x16) - GPIOCTRL 2
*/ */
......
...@@ -1040,6 +1040,12 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, ...@@ -1040,6 +1040,12 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
int val; int val;
switch (level) { 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: case SND_SOC_BIAS_ON:
/* Turn off any unneded single ended outputs */ /* Turn off any unneded single ended outputs */
val = 0; val = 0;
...@@ -1067,6 +1073,10 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, ...@@ -1067,6 +1073,10 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
!hubs->lineout2n_ena && !hubs->lineout2p_ena) !hubs->lineout2n_ena && !hubs->lineout2p_ena)
snd_soc_update_bits(codec, WM8993_ANTIPOP1, snd_soc_update_bits(codec, WM8993_ANTIPOP1,
WM8993_LINEOUT_VMID_BUF_ENA, 0); WM8993_LINEOUT_VMID_BUF_ENA, 0);
/* Remove the input clamps */
snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG,
WM8993_INPUTS_CLAMP, 0);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment