Browse Source

ASoC: davinci-mcasp: Support for LEFT_J format

Configuration for LEFT_J format.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Peter Ujfalusi 11 years ago
parent
commit
423761e0ca
1 changed files with 7 additions and 0 deletions
  1. 7 0
      sound/soc/davinci/davinci-mcasp.c

+ 7 - 0
sound/soc/davinci/davinci-mcasp.c

@@ -302,6 +302,13 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
 		/* FS need to be inverted */
 		/* FS need to be inverted */
 		inv_fs = true;
 		inv_fs = true;
 		break;
 		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:
 	default:
 		ret = -EINVAL;
 		ret = -EINVAL;
 		goto out;
 		goto out;