aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/wm8903.c20
-rw-r--r--sound/soc/codecs/wm8903.h19
2 files changed, 6 insertions, 33 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 02de5ae42d63..b9843f72c455 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1014,7 +1014,7 @@ static int wm8903_add_widgets(struct snd_soc_codec *codec)
1014static int wm8903_set_bias_level(struct snd_soc_codec *codec, 1014static int wm8903_set_bias_level(struct snd_soc_codec *codec,
1015 enum snd_soc_bias_level level) 1015 enum snd_soc_bias_level level)
1016{ 1016{
1017 u16 reg, reg2; 1017 u16 reg;
1018 1018
1019 switch (level) { 1019 switch (level) {
1020 case SND_SOC_BIAS_ON: 1020 case SND_SOC_BIAS_ON:
@@ -1038,23 +1038,15 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,
1038 wm8903_run_sequence(codec, 0); 1038 wm8903_run_sequence(codec, 0);
1039 wm8903_sync_reg_cache(codec, codec->reg_cache); 1039 wm8903_sync_reg_cache(codec, codec->reg_cache);
1040 1040
1041 /* Enable low impedence charge pump output */
1042 reg = snd_soc_read(codec,
1043 WM8903_CONTROL_INTERFACE_TEST_1);
1044 snd_soc_write(codec, WM8903_CONTROL_INTERFACE_TEST_1,
1045 reg | WM8903_TEST_KEY);
1046 reg2 = snd_soc_read(codec, WM8903_CHARGE_PUMP_TEST_1);
1047 snd_soc_write(codec, WM8903_CHARGE_PUMP_TEST_1,
1048 reg2 | WM8903_CP_SW_KELVIN_MODE_MASK);
1049 snd_soc_write(codec, WM8903_CONTROL_INTERFACE_TEST_1,
1050 reg);
1051
1052 /* By default no bypass paths are enabled so 1041 /* By default no bypass paths are enabled so
1053 * enable Class W support. 1042 * enable Class W support.
1054 */ 1043 */
1055 dev_dbg(codec->dev, "Enabling Class W\n"); 1044 dev_dbg(codec->dev, "Enabling Class W\n");
1056 snd_soc_write(codec, WM8903_CLASS_W_0, reg | 1045 snd_soc_update_bits(codec, WM8903_CLASS_W_0,
1057 WM8903_CP_DYN_FREQ | WM8903_CP_DYN_V); 1046 WM8903_CP_DYN_FREQ |
1047 WM8903_CP_DYN_V,
1048 WM8903_CP_DYN_FREQ |
1049 WM8903_CP_DYN_V);
1058 } 1050 }
1059 1051
1060 reg = snd_soc_read(codec, WM8903_VMID_CONTROL_0); 1052 reg = snd_soc_read(codec, WM8903_VMID_CONTROL_0);
diff --git a/sound/soc/codecs/wm8903.h b/sound/soc/codecs/wm8903.h
index e47b8c8be921..5f23d3ca45f8 100644
--- a/sound/soc/codecs/wm8903.h
+++ b/sound/soc/codecs/wm8903.h
@@ -94,8 +94,6 @@ extern int wm8903_mic_detect(struct snd_soc_codec *codec,
94#define WM8903_INTERRUPT_STATUS_1_MASK 0x7A 94#define WM8903_INTERRUPT_STATUS_1_MASK 0x7A
95#define WM8903_INTERRUPT_POLARITY_1 0x7B 95#define WM8903_INTERRUPT_POLARITY_1 0x7B
96#define WM8903_INTERRUPT_CONTROL 0x7E 96#define WM8903_INTERRUPT_CONTROL 0x7E
97#define WM8903_CONTROL_INTERFACE_TEST_1 0x81
98#define WM8903_CHARGE_PUMP_TEST_1 0x95
99#define WM8903_CLOCK_RATE_TEST_4 0xA4 97#define WM8903_CLOCK_RATE_TEST_4 0xA4
100#define WM8903_ANALOGUE_OUTPUT_BIAS_0 0xAC 98#define WM8903_ANALOGUE_OUTPUT_BIAS_0 0xAC
101 99
@@ -1202,23 +1200,6 @@ extern int wm8903_mic_detect(struct snd_soc_codec *codec,
1202#define WM8903_IRQ_POL_WIDTH 1 /* IRQ_POL */ 1200#define WM8903_IRQ_POL_WIDTH 1 /* IRQ_POL */
1203 1201
1204/* 1202/*
1205 * R129 (0x81) - Control Interface Test 1
1206 */
1207#define WM8903_USER_KEY 0x0002 /* USER_KEY */
1208#define WM8903_USER_KEY_MASK 0x0002 /* USER_KEY */
1209#define WM8903_USER_KEY_SHIFT 1 /* USER_KEY */
1210#define WM8903_USER_KEY_WIDTH 1 /* USER_KEY */
1211#define WM8903_TEST_KEY 0x0001 /* TEST_KEY */
1212#define WM8903_TEST_KEY_MASK 0x0001 /* TEST_KEY */
1213#define WM8903_TEST_KEY_SHIFT 0 /* TEST_KEY */
1214#define WM8903_TEST_KEY_WIDTH 1 /* TEST_KEY */
1215
1216/*
1217 * R149 (0x95) - Charge Pump Test 1
1218 */
1219#define WM8903_CP_SW_KELVIN_MODE_MASK 0x0006 /* CP_SW_KELVIN_MODE - [2:1] */
1220#define WM8903_CP_SW_KELVIN_MODE_SHIFT 1 /* CP_SW_KELVIN_MODE - [2:1] */
1221#define WM8903_CP_SW_KELVIN_MODE_WIDTH 2 /* CP_SW_KELVIN_MODE - [2:1] */
1222 1203
1223/* 1204/*
1224 * R164 (0xA4) - Clock Rate Test 4 1205 * R164 (0xA4) - Clock Rate Test 4