Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230327
b: refs/heads/master
c: 8bc3c2c
h: refs/heads/master
i:
  230325: 3ada12a
  230323: 3e07b63
  230319: dbbc05f
v: v3
  • Loading branch information
Mark Brown committed Dec 2, 2010
1 parent 45f7a2a commit c0a00bd
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd31b310b9104327fb6bf7d2fe3b0f0f6fde4dd7
refs/heads/master: 8bc3c2c207dc82d47ffc6ef7b788e04ea637d3f1
9 changes: 9 additions & 0 deletions trunk/include/linux/mfd/wm8994/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#define WM8994_LDO_1 0x3B
#define WM8994_LDO_2 0x3C
#define WM8994_CHARGE_PUMP_1 0x4C
#define WM8958_CHARGE_PUMP_2 0x4D
#define WM8994_CLASS_W_1 0x51
#define WM8994_DC_SERVO_1 0x54
#define WM8994_DC_SERVO_2 0x55
Expand Down Expand Up @@ -1925,6 +1926,14 @@
#define WM8994_CP_ENA_SHIFT 15 /* 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)
*/
Expand Down
36 changes: 27 additions & 9 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,15 +1858,33 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
pm_runtime_get_sync(codec->dev);

/* Tweak DC servo and DSP configuration for
* improved performance. */
if (control->type == WM8994 && wm8994->revision < 4) {
/* Tweak DC servo and DSP configuration for
* improved performance. */
snd_soc_write(codec, 0x102, 0x3);
snd_soc_write(codec, 0x56, 0x3);
snd_soc_write(codec, 0x817, 0);
snd_soc_write(codec, 0x102, 0);
switch (control->type) {
case WM8994:
if (wm8994->revision < 4) {
/* Tweak DC servo and DSP
* configuration for improved
* performance. */
snd_soc_write(codec, 0x102, 0x3);
snd_soc_write(codec, 0x56, 0x3);
snd_soc_write(codec, 0x817, 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 */
Expand Down

0 comments on commit c0a00bd

Please sign in to comment.