Skip to content

Commit

Permalink
ASoC: wm8737: Fixup setting VMID Impedance control register
Browse files Browse the repository at this point in the history
According to the datasheet:
R10 (0Ah) VMID Impedance Control

BIT 3:2 VMIDSEL DEFAULT 00

DESCRIPTION: VMID impedance selection control
00: 75kΩ output
01: 300kΩ output
10: 2.5kΩ output

WM8737_VMIDSEL_MASK is 0xC (VMIDSEL - [3:2]),
so it needs to left shift WM8737_VMIDSEL_SHIFT bits for setting these bits.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
  • Loading branch information
Axel Lin authored and Mark Brown committed May 13, 2015
1 parent b787f68 commit 14ba3ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/codecs/wm8737.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ static int wm8737_set_bias_level(struct snd_soc_codec *codec,

/* Fast VMID ramp at 2*2.5k */
snd_soc_update_bits(codec, WM8737_MISC_BIAS_CONTROL,
WM8737_VMIDSEL_MASK, 0x4);
WM8737_VMIDSEL_MASK,
2 << WM8737_VMIDSEL_SHIFT);

/* Bring VMID up */
snd_soc_update_bits(codec, WM8737_POWER_MANAGEMENT,
Expand All @@ -497,7 +498,8 @@ static int wm8737_set_bias_level(struct snd_soc_codec *codec,

/* VMID at 2*300k */
snd_soc_update_bits(codec, WM8737_MISC_BIAS_CONTROL,
WM8737_VMIDSEL_MASK, 2);
WM8737_VMIDSEL_MASK,
1 << WM8737_VMIDSEL_SHIFT);

break;

Expand Down

0 comments on commit 14ba3ec

Please sign in to comment.