]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: ak4642: simultaneous playback/recorde support
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 12 Oct 2010 04:39:25 +0000 (13:39 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 12 Oct 2010 09:59:11 +0000 (10:59 +0100)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/ak4642.c

index a95ff4f9f42c857e02ebc8cc57298b6d06be7830..009068f57375ac96a6b84dc8df33a1b53ccf2640 100644 (file)
@@ -220,7 +220,7 @@ static int ak4642_dai_startup(struct snd_pcm_substream *substream,
                ak4642_write(codec, 0x0e, 0x19);
                ak4642_write(codec, 0x09, 0x91);
                ak4642_write(codec, 0x0c, 0x91);
-               ak4642_write(codec, 0x00, 0x64);
+               snd_soc_update_bits(codec, 0x00, 0x64, 0x64);
                snd_soc_update_bits(codec, PW_MGMT2, PMHP_MASK, PMHP);
                snd_soc_update_bits(codec, PW_MGMT2, HPMTN,     HPMTN);
        } else {
@@ -242,7 +242,7 @@ static int ak4642_dai_startup(struct snd_pcm_substream *substream,
                ak4642_write(codec, 0x08, 0xe1);
                ak4642_write(codec, 0x0b, 0x00);
                ak4642_write(codec, 0x07, 0x21);
-               ak4642_write(codec, 0x00, 0x41);
+               snd_soc_update_bits(codec, 0x00, 0x41, 0x41);
                ak4642_write(codec, 0x10, 0x01);
        }
 
@@ -259,12 +259,12 @@ static void ak4642_dai_shutdown(struct snd_pcm_substream *substream,
                /* stop headphone output */
                snd_soc_update_bits(codec, PW_MGMT2, HPMTN,     0);
                snd_soc_update_bits(codec, PW_MGMT2, PMHP_MASK, 0);
-               ak4642_write(codec, 0x00, 0x40);
+               snd_soc_update_bits(codec, 0x00, 0x64, 0x40);
                ak4642_write(codec, 0x0e, 0x11);
                ak4642_write(codec, 0x0f, 0x08);
        } else {
                /* stop stereo input */
-               ak4642_write(codec, 0x00, 0x40);
+               snd_soc_update_bits(codec, 0x00, 0x41, 0x40);
                ak4642_write(codec, 0x10, 0x00);
                ak4642_write(codec, 0x07, 0x01);
        }