Commit 8bc3c2c2 authored by Mark Brown's avatar Mark Brown

ASoC: Tune performance of WM8958 revision A

Update some of the default configuration for the device to improve
the performance.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent dd31b310
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#define WM8994_LDO_1 0x3B #define WM8994_LDO_1 0x3B
#define WM8994_LDO_2 0x3C #define WM8994_LDO_2 0x3C
#define WM8994_CHARGE_PUMP_1 0x4C #define WM8994_CHARGE_PUMP_1 0x4C
#define WM8958_CHARGE_PUMP_2 0x4D
#define WM8994_CLASS_W_1 0x51 #define WM8994_CLASS_W_1 0x51
#define WM8994_DC_SERVO_1 0x54 #define WM8994_DC_SERVO_1 0x54
#define WM8994_DC_SERVO_2 0x55 #define WM8994_DC_SERVO_2 0x55
...@@ -1925,6 +1926,14 @@ ...@@ -1925,6 +1926,14 @@
#define WM8994_CP_ENA_SHIFT 15 /* CP_ENA */ #define WM8994_CP_ENA_SHIFT 15 /* CP_ENA */
#define WM8994_CP_ENA_WIDTH 1 /* CP_ENA */ #define WM8994_CP_ENA_WIDTH 1 /* CP_ENA */
/*
* R77 (0x4D) - Charge Pump (2)
*/
#define WM8958_CP_DISCH 0x8000 /* CP_DISCH */
#define WM8958_CP_DISCH_MASK 0x8000 /* CP_DISCH */
#define WM8958_CP_DISCH_SHIFT 15 /* CP_DISCH */
#define WM8958_CP_DISCH_WIDTH 1 /* CP_DISCH */
/* /*
* R81 (0x51) - Class W (1) * R81 (0x51) - Class W (1)
*/ */
......
...@@ -1858,16 +1858,34 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec, ...@@ -1858,16 +1858,34 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
pm_runtime_get_sync(codec->dev); pm_runtime_get_sync(codec->dev);
/* Tweak DC servo and DSP configuration for switch (control->type) {
* improved performance. */ case WM8994:
if (control->type == WM8994 && wm8994->revision < 4) { if (wm8994->revision < 4) {
/* Tweak DC servo and DSP configuration for /* Tweak DC servo and DSP
* improved performance. */ * configuration for improved
* performance. */
snd_soc_write(codec, 0x102, 0x3); snd_soc_write(codec, 0x102, 0x3);
snd_soc_write(codec, 0x56, 0x3); snd_soc_write(codec, 0x56, 0x3);
snd_soc_write(codec, 0x817, 0); snd_soc_write(codec, 0x817, 0);
snd_soc_write(codec, 0x102, 0); snd_soc_write(codec, 0x102, 0);
} }
break;
case WM8958:
if (wm8994->revision == 0) {
/* Optimise performance for rev A */
snd_soc_write(codec, 0x102, 0x3);
snd_soc_write(codec, 0xcb, 0x81);
snd_soc_write(codec, 0x817, 0);
snd_soc_write(codec, 0x102, 0);
snd_soc_update_bits(codec,
WM8958_CHARGE_PUMP_2,
WM8958_CP_DISCH,
WM8958_CP_DISCH);
}
break;
}
/* Discharge LINEOUT1 & 2 */ /* Discharge LINEOUT1 & 2 */
snd_soc_update_bits(codec, WM8994_ANTIPOP_1, snd_soc_update_bits(codec, WM8994_ANTIPOP_1,
......
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