I've written a new codec driver and tested it on an EVM for a TI Davinci ARM processor. It appeared to be working there. However, now I'm trying to debug buffer under-runs in my embedded system. I've inserted a debugging trace in the function davinci_pcm_pointer() in davinci-pdm.c to print out the value of asp_count. What I'm seeing is that when I first start playing an audio file, the value of asp_count increments very slowly. After some time, the value of asp_count start incrementing by the period size and I start seeing the debugging trace "davinci-pcm: audio_set_dma_params_play ...". Is this behavior expected?
If I enable XRUN DEBUG and set the value to 5, then I occasionally see the message "PCM: hw_ptr skipping! (pos=17153, delta=23938, period=512, jdelta=0/49/0, hw_ptr=17279/17279)" where delta is always high. The comments in pcm_lib.c indicate that delta should be small or zero. What does a large value indicate?
Thanks,
David