ASoC: ak4642: prevent un-necessary changes to SG_SL1
authorPhil Edworthy <phil.edworthy@renesas.com>
Fri, 1 Nov 2013 06:06:17 +0000 (23:06 -0700)
committerMark Brown <broonie@linaro.org>
Fri, 1 Nov 2013 06:45:33 +0000 (23:45 -0700)
If you record the sound during playback,
the playback sound becomes silent.
Modify so that the codec driver does not clear
SG_SL1::DACL bit which is controlled under widget

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
sound/soc/codecs/ak4642.c

index 2d037870970221b2c2a87f4f96cac4886d606cb9..687565d08d9c2c856fdea679cd98367b71a8022a 100644 (file)
@@ -257,7 +257,7 @@ static int ak4642_dai_startup(struct snd_pcm_substream *substream,
                 * This operation came from example code of
                 * "ASAHI KASEI AK4642" (japanese) manual p94.
                 */
-               snd_soc_write(codec, SG_SL1, PMMP | MGAIN0);
+               snd_soc_update_bits(codec, SG_SL1, PMMP | MGAIN0, PMMP | MGAIN0);
                snd_soc_write(codec, TIMER, ZTM(0x3) | WTM(0x3));
                snd_soc_write(codec, ALC_CTL1, ALC | LMTH0);
                snd_soc_update_bits(codec, PW_MGMT1, PMADL, PMADL);