ASoC: davinci-mcasp: Support for LEFT_J format
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 4 Apr 2014 11:31:46 +0000 (14:31 +0300)
committerMark Brown <broonie@linaro.org>
Mon, 14 Apr 2014 16:24:24 +0000 (17:24 +0100)
Configuration for LEFT_J format.

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

index d4d640004bed759a2ce0127c415e6c9e3c04ef6b..2b6722024fbda2c91c0561d1f6482ce743e01b16 100644 (file)
@@ -302,6 +302,13 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
                /* FS need to be inverted */
                inv_fs = true;
                break;
+       case SND_SOC_DAIFMT_LEFT_J:
+               /* configure a full-word SYNC pulse (LRCLK) */
+               mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXDUR);
+               mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRDUR);
+               /* No delay after FS */
+               data_delay = 0;
+               break;
        default:
                ret = -EINVAL;
                goto out;