]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: davinci-mcasp: Add support for CBS_CFM mode
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 12 Feb 2015 14:41:26 +0000 (16:41 +0200)
committerMark Brown <broonie@kernel.org>
Sat, 14 Feb 2015 04:27:03 +0000 (13:27 +0900)
Support for setups where codec is bitclock slave and frame master.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/davinci/davinci-mcasp.c

index de3b155a50116f4e533c8f22e0fc6b933e8040ae..031c1fb44ae72bb218b8d8804fd8bce740830927 100644 (file)
@@ -441,6 +441,18 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
                mcasp_set_bits(mcasp, DAVINCI_MCASP_PDIR_REG, AFSX | AFSR);
                mcasp->bclk_master = 1;
                break;
+       case SND_SOC_DAIFMT_CBS_CFM:
+               /* codec is clock slave and frame master */
+               mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE);
+               mcasp_clr_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, AFSXE);
+
+               mcasp_set_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE);
+               mcasp_clr_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, AFSRE);
+
+               mcasp_set_bits(mcasp, DAVINCI_MCASP_PDIR_REG, ACLKX | ACLKR);
+               mcasp_clr_bits(mcasp, DAVINCI_MCASP_PDIR_REG, AFSX | AFSR);
+               mcasp->bclk_master = 1;
+               break;
        case SND_SOC_DAIFMT_CBM_CFS:
                /* codec is clock master and frame slave */
                mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE);