uClinux and AD73311 CODEC - audio delay impairments

Hi Everybody...


I have a weird problem (well - I think its weird!!)


I am using a BF537 with a AD73311 CODEC under uClinux 2011R1. There IS a reason I am still using the old build related to other drivers and my existing codebase.


The audio from the CODEC is set up to talk in 20 ms buffers through the DMA driver, the AD73311 driver and the SPORT. However, somewhere in that chain the audio gets changed into a 40 ms window with two 20 ms "packets" sorta like this:


_______|XXXX|________________________________|XXXX|_________________________|XXXX|_________.....     What's desired

              <------------------------  20 ms  -------------------------->



_______|XXXX||XXXX|_________________________________________________________|XXXX||XXXX|___....   What's happening

             <--------------------------------------------------------------   40 ms  ----------------------------------------->


Same audio stream - nothing gets dropped! No distortion!! But the DANG thing delays the audio by an additional 20 ms. And this happens on both the incoming and outgoing buffers. I am trying to use this mechanism to provide user "comfort sidetone" but the sidetone latency turns out to be more like 80 ms than 40 ms. Grrrrr. No comfort at all!!


And - strangely, the uClinux 2009R1.1 version I used before did NOT exhibit this strangeness. Albeit I was using an AD1836 CODEC like in the STAMP.


I am looking at uClinux 2013R1 now to see if the weird "double bump" effect is still there. If not - I have to port all my other code to the new O/S (painful but not the end of the world). If its still there - HELP!!


Has anyone seen anything like this before?? Can you point me in the right direction - which driver? config? stupidity on my part??!



Many Thanks or Wise AD Universe...