ALSA: ASoC: TWL4030 codec - fix 256*Fs clock
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 5 Nov 2008 21:51:05 +0000 (23:51 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 6 Nov 2008 11:27:30 +0000 (11:27 +0000)
According to TRM, 256*Fs clock output should be enabled
when TWL4030 is in slave mode, not master.
This allows sound to work on OMAP3 Pandora, which uses
256*Fs clock.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/twl4030.c

index ee2f0d37765c3c582450f6fd0537caa3e963aa10..90f3b4decbab9cfe3c11446b275e6b01a6c46443 100644 (file)
@@ -469,11 +469,11 @@ static int twl4030_set_dai_fmt(struct snd_soc_dai *codec_dai,
        switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
        case SND_SOC_DAIFMT_CBM_CFM:
                format &= ~(TWL4030_AIF_SLAVE_EN);
-               format |= TWL4030_CLK256FS_EN;
+               format &= ~(TWL4030_CLK256FS_EN);
                break;
        case SND_SOC_DAIFMT_CBS_CFS:
-               format &= ~(TWL4030_CLK256FS_EN);
                format |= TWL4030_AIF_SLAVE_EN;
+               format |= TWL4030_CLK256FS_EN;
                break;
        default:
                return -EINVAL;