I wonder about an obvious error/misdocumentation in the MCASP driver/hardware:
In the linux driver, sound/soc/davinci/davinci-mcasp.c, function davinci_mcasp_set_dai_fmt.
in the register DAVINCI_MCASP_ACLKXCTL_REG, the bits ACLKXPOL and ACLKRPOL are set according to the
data format SND_SOC_DAIFMT_xxx. ACLKRPOL is set to the opposite value of ACLKXPOL.
This is consistent with the usual hardware requirement, that a data bit is output at the starting edge of the bit clock, and the incomming data is sampled with the opposite edge of the bit clock (in the middle of the bit).
However, in the Technical Reference Manual, Chapter 22.4.1, Registers ACLKXCTL and ACLKRCTL, Bit 7 = CLKRP/CLKXP, the description is so that both bits must be set TO THE SAME value.
I suspect that a wrong clock edge programming for the receiver would mostly not result in a transmission error, because the data bit will be sampled on the end of the bit period, and maybe will be still valid (but at the absolute edge of the timing window).
So my question is: is there an error in the documention, and the linux driver author has doing the "right thing" without doccumenting the errata, or is the documentation correct and the linux driver author made a mistake?
regards
Wolfgang