Hi all,
I'm working on a custom board using the AT91SAM9G45 processor and a TLV320AIC26 SPI attached audio codec using I2S format audio. When doing audio playback on the board the left and right channels are occasionally flipped.
I have verified this by generating a custom wav file which has constant data on one channel and an incrementing counter on the other channel. The digitial out from the CPU shows that no data is being lost, but around 1/5 times the audio channels will be flipped. The problem appears to be that the DMA is starting on the wrong edge of the LRCLK.
I have using both SND_SOC_DAIFMT_CBM_CFM (Codec provides clocks) and SND_SOC_DAIFMT_CBS_CFS (CPU provides clocks) but the problem occurs in both situations. I have also tried changing TCMR:CKO to SSC_CKO_TRANSFER and TCMR:START to SSC_START_LOW_RF, but the problem still occurs. I have looked through the PCM/SSC DMA code and cannot find any obvious bugs.
I have checked the errata for the At91SAM9G45 processor (our chip marking is CU-1004-A), but can't find anything which relates directly to the problem we are seeing.
Has anybody else had this problem, or does anybody have any AT91/Atmel hardware that they could test to see if it occurs on other hardware also?
Thanks, ~Ryan