ASoC: McASP: Fix receive clock polarity in DAIFMT_NB_NF mode.
authorMarek Belisko <marek.belisko@gmail.com>
Fri, 3 May 2013 05:37:36 +0000 (07:37 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 3 May 2013 08:29:59 +0000 (09:29 +0100)
According documentation bit ACLKRPOL is set to 0 (receiver samples data
on falling edge) and when set to 1 (receiver samples data on rising edge).

I2S data are always sampled on falling edge and valid during rising edge
of bit clock. So in case of capture data transmitter sample data on falling
edge and macsp must read then on rising edge.

Signed-off-by: Marek Belisko <marek.belisko@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/davinci/davinci-mcasp.c

index 9acb72c5f65c92085513e13189dfc7280acf91e9..660d00e7f6f26bf9698c7f9bea204d9fe9c1b774 100644 (file)
@@ -566,7 +566,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
                mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
                mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
 
-               mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
+               mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
                mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
                break;