ASoC: mioa701_wm9713: Don't opencode CODEC register access

Properly use snd_soc_update_bits() instead of manually calling the CODEC
driver's read and write callbacks. The later will stop working once the
wm9713 driver has been converted to regmap.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Lars-Peter Clausen 2014-11-03 19:33:02 +01:00 committed by Mark Brown
parent ecf0015161
commit 4539441690
1 changed files with 2 additions and 5 deletions

View File

@ -127,15 +127,12 @@ static const struct snd_soc_dapm_route audio_map[] = {
static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
unsigned short reg;
/* Prepare GPIO8 for rear speaker amplifier */ /* Prepare GPIO8 for rear speaker amplifier */
reg = codec->driver->read(codec, AC97_GPIO_CFG); snd_soc_update_bits(codec, AC97_GPIO_CFG, 0x100, 0x100);
codec->driver->write(codec, AC97_GPIO_CFG, reg | 0x0100);
/* Prepare MIC input */ /* Prepare MIC input */
reg = codec->driver->read(codec, AC97_3D_CONTROL); snd_soc_update_bits(codec, AC97_3D_CONTROL, 0xc000, 0xc000);
codec->driver->write(codec, AC97_3D_CONTROL, reg | 0xc000);
return 0; return 0;
} }