[alsa-devel] [PATCH] ASoC: ak4613: don't overwrite CTRL2 register

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Nov 17 09:28:56 CET 2015


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

Current code set DFS settings on CTRL2 register, but it overwrite
default settings. This patch fixup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/codecs/ak4613.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index dab1276..62c08a6 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -70,6 +70,7 @@
 #define FMT_MASK	(0xf8)
 
 /* CTRL2 */
+#define DFS_MASK		(3 << 2)
 #define DFS_NORMAL_SPEED	(0 << 2)
 #define DFS_DOUBLE_SPEED	(1 << 2)
 #define DFS_QUAD_SPEED		(2 << 2)
@@ -361,7 +362,7 @@ static int ak4613_dai_hw_params(struct snd_pcm_substream *substream,
 	fmt_ctrl = AUDIO_IFACE_TO_VAL(iface);
 
 	snd_soc_update_bits(codec, CTRL1, FMT_MASK, fmt_ctrl);
-	snd_soc_write(codec, CTRL2, ctrl2);
+	snd_soc_update_bits(codec, CTRL2, DFS_MASK, ctrl2);
 
 	snd_soc_write(codec, ICTRL, priv->ic);
 	snd_soc_write(codec, OCTRL, priv->oc);
-- 
1.9.1



More information about the Alsa-devel mailing list