aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-03 13:33:02 -0500
committerMark Brown <broonie@kernel.org>2014-11-04 06:49:48 -0500
commit4539441690cd31ae7d42e6f080033911a1788440 (patch)
tree73698afb3b66d8a59f0bc527991cf7779f135d63
parentecf0015161b2220879fcd41c030761b4eb561b95 (diff)
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>
-rw-r--r--sound/soc/pxa/mioa701_wm9713.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 595eee341e90..a6b2be20cc0b 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -127,15 +127,12 @@ static const struct snd_soc_dapm_route audio_map[] = {
127static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) 127static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
128{ 128{
129 struct snd_soc_codec *codec = rtd->codec; 129 struct snd_soc_codec *codec = rtd->codec;
130 unsigned short reg;
131 130
132 /* Prepare GPIO8 for rear speaker amplifier */ 131 /* Prepare GPIO8 for rear speaker amplifier */
133 reg = codec->driver->read(codec, AC97_GPIO_CFG); 132 snd_soc_update_bits(codec, AC97_GPIO_CFG, 0x100, 0x100);
134 codec->driver->write(codec, AC97_GPIO_CFG, reg | 0x0100);
135 133
136 /* Prepare MIC input */ 134 /* Prepare MIC input */
137 reg = codec->driver->read(codec, AC97_3D_CONTROL); 135 snd_soc_update_bits(codec, AC97_3D_CONTROL, 0xc000, 0xc000);
138 codec->driver->write(codec, AC97_3D_CONTROL, reg | 0xc000);
139 136
140 return 0; 137 return 0;
141} 138}