mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
ASoC: Convert WM8903 bias management to use snd_soc_update_bits()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
c5b6a9feae
commit
66daaa59d5
@ -1139,15 +1139,13 @@ static int wm8903_add_widgets(struct snd_soc_codec *codec)
|
|||||||
static int wm8903_set_bias_level(struct snd_soc_codec *codec,
|
static int wm8903_set_bias_level(struct snd_soc_codec *codec,
|
||||||
enum snd_soc_bias_level level)
|
enum snd_soc_bias_level level)
|
||||||
{
|
{
|
||||||
u16 reg;
|
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case SND_SOC_BIAS_ON:
|
case SND_SOC_BIAS_ON:
|
||||||
|
break;
|
||||||
case SND_SOC_BIAS_PREPARE:
|
case SND_SOC_BIAS_PREPARE:
|
||||||
reg = snd_soc_read(codec, WM8903_VMID_CONTROL_0);
|
snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0,
|
||||||
reg &= ~(WM8903_VMID_RES_MASK);
|
WM8903_VMID_RES_MASK,
|
||||||
reg |= WM8903_VMID_RES_50K;
|
WM8903_VMID_RES_50K);
|
||||||
snd_soc_write(codec, WM8903_VMID_CONTROL_0, reg);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SND_SOC_BIAS_STANDBY:
|
case SND_SOC_BIAS_STANDBY:
|
||||||
@ -1174,10 +1172,9 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,
|
|||||||
WM8903_CP_DYN_V);
|
WM8903_CP_DYN_V);
|
||||||
}
|
}
|
||||||
|
|
||||||
reg = snd_soc_read(codec, WM8903_VMID_CONTROL_0);
|
snd_soc_update_bits(codec, WM8903_VMID_CONTROL_0,
|
||||||
reg &= ~(WM8903_VMID_RES_MASK);
|
WM8903_VMID_RES_MASK,
|
||||||
reg |= WM8903_VMID_RES_250K;
|
WM8903_VMID_RES_250K);
|
||||||
snd_soc_write(codec, WM8903_VMID_CONTROL_0, reg);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SND_SOC_BIAS_OFF:
|
case SND_SOC_BIAS_OFF:
|
||||||
|
Loading…
Reference in New Issue
Block a user