2011-08-09 06:21:15 BF537 SPORT ASoC TDM under Linux (PCM4204)
Joachim Eastwood (NORWAY)
I am trying to interface the BFin SPORT to a PCM4204, 4ch ADC in TDM slave mode.
My setup is running both the SPORT and the ADC as a slave. The MCLK, BCLK and FSYNC is generated on a external CPLD/PLL.
Using AD193X driver as a base I have written a very simple driver for the PCM4204. All PCM4204 settings are GPIO controlled. The sample rate is 32kHz.
When I test my driver and hardware using arecord I see some strang things. Using the -d switch on arecord I specify a duration of 10 seconds. But some times arecord uses 15 seconds to record 10 seconds. The data recorded looks fine in a wave-editor but the when the recording takes 15s my 1kHz test tone becomes 1.5kHz. But this not always happen, sometimes arecord uses 10s and my 1kHz is actually 1kHz.
So it seems that sometimes the SPORT or DMA looses 1/3 of the data(?).
Does anyone have any idea of what may be happening or have seen something similar?