ASoC: DaVinci: Add a DAI format to McASP driver
authorChaithrika U S <chaithrika@ti.com>
Tue, 11 Aug 2009 20:59:12 +0000 (16:59 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 13 Aug 2009 21:19:35 +0000 (22:19 +0100)
The patch adds a DAI format: Codec bit clock master and frame sync slave,
to the driver.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/davinci/davinci-mcasp.c

index e672f431323dbfa7ec0e5a632fdaf6fa5bf2b0f6..eca22d7829d22744d1a57f797a3740ff1d8af96d 100644 (file)
@@ -443,6 +443,16 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
 
                mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, (0x7 << 26));
                break;
+       case SND_SOC_DAIFMT_CBM_CFS:
+               /* codec is clock master and frame slave */
+               mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE);
+               mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE);
+
+               mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE);
+               mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE);
+
+               mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, (0x2d << 26));
+               break;
        case SND_SOC_DAIFMT_CBM_CFM:
                /* codec is clock and frame master */
                mcasp_clr_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE);