Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+19
+9
sound/soc/codecs/wm8993.h
··· 31 31 #define WM8993_GPIO_CTRL_1 0x12 32 32 #define WM8993_GPIO1 0x13 33 33 #define WM8993_IRQ_DEBOUNCE 0x14 34 + #define WM8993_INPUTS_CLAMP_REG 0x15 34 35 #define WM8993_GPIOCTRL_2 0x16 35 36 #define WM8993_GPIO_POL 0x17 36 37 #define WM8993_LEFT_LINE_INPUT_1_2_VOLUME 0x18 ··· 655 654 #define WM8993_GPIO1_DB_MASK 0x0001 /* GPIO1_DB */ 656 655 #define WM8993_GPIO1_DB_SHIFT 0 /* GPIO1_DB */ 657 656 #define WM8993_GPIO1_DB_WIDTH 1 /* GPIO1_DB */ 657 + 658 + /* 659 + * R21 (0x15) - Inputs Clamp 660 + */ 661 + #define WM8993_INPUTS_CLAMP 0x0040 /* INPUTS_CLAMP */ 662 + #define WM8993_INPUTS_CLAMP_MASK 0x0040 /* INPUTS_CLAMP */ 663 + #define WM8993_INPUTS_CLAMP_SHIFT 7 /* INPUTS_CLAMP */ 664 + #define WM8993_INPUTS_CLAMP_WIDTH 1 /* INPUTS_CLAMP */ 658 665 659 666 /* 660 667 * R22 (0x16) - GPIOCTRL 2
+10
sound/soc/codecs/wm_hubs.c
··· 1040 1040 int val; 1041 1041 1042 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 1049 case SND_SOC_BIAS_ON: 1044 1050 /* Turn off any unneded single ended outputs */ 1045 1051 val = 0; ··· 1073 1067 !hubs->lineout2n_ena && !hubs->lineout2p_ena) 1074 1068 snd_soc_update_bits(codec, WM8993_ANTIPOP1, 1075 1069 WM8993_LINEOUT_VMID_BUF_ENA, 0); 1070 + 1071 + /* Remove the input clamps */ 1072 + snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG, 1073 + WM8993_INPUTS_CLAMP, 0); 1076 1074 break; 1077 1075 1078 1076 default: