2013-05-03 05:37:51

by Belisko Marek

[permalink] [raw]
Subject: [PATCH] ASoC: McASP: Fix receive clock polarity in DAIFMT_NB_NF mode.

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 <[email protected]>
---
sound/soc/davinci/davinci-mcasp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 849a187..c46112e 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -568,7 +568,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;

--
1.7.9.5


2013-05-03 08:30:57

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: McASP: Fix receive clock polarity in DAIFMT_NB_NF mode.

On Fri, May 03, 2013 at 07:37:36AM +0200, Marek Belisko wrote:
> 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).

Applied, thanks.


Attachments:
(No filename) (232.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments