ASoC: fsl_ssi: adjust set DAI format in AC'97 mode
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Wed, 5 Aug 2015 15:29:02 +0000 (17:29 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 14 Aug 2015 19:22:27 +0000 (20:22 +0100)
Adjust set DAI format function in fsl_ssi driver
so it doesn't fail and clears RXDIR in AC'97 mode.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c

index e79dc162006e83585c8db4f4d9cf2c6449b82d2d..f03d57eb784cea1831fea0e24a2f9b8d763abbff 100644 (file)
@@ -900,14 +900,16 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev,
                scr &= ~CCSR_SSI_SCR_SYS_CLK_EN;
                break;
        default:
-               return -EINVAL;
+               if (!fsl_ssi_is_ac97(ssi_private))
+                       return -EINVAL;
        }
 
        stcr |= strcr;
        srcr |= strcr;
 
-       if (ssi_private->cpu_dai_drv.symmetric_rates) {
-               /* Need to clear RXDIR when using SYNC mode */
+       if (ssi_private->cpu_dai_drv.symmetric_rates
+                       || fsl_ssi_is_ac97(ssi_private)) {
+               /* Need to clear RXDIR when using SYNC or AC97 mode */
                srcr &= ~CCSR_SSI_SRCR_RXDIR;
                scr |= CCSR_SSI_SCR_SYN;
        }