[alsa-devel] davinci-pcm debug
Ben Gardiner
bengardiner at nanometrics.ca
Tue Sep 27 17:51:03 CEST 2011
Hi David,
On Thu, Sep 15, 2011 at 7:04 PM, David Pettit
<David.Pettit at globalstar.com> wrote:
> 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?
We had also experienced strange pointer increments here when using a
mainline version of the davinci-pcm driver. Commit
52e2c5d38ea6f13a19c29da7ba5183e6fac55400 'ASoC: davinci-pcm: convert
to BATCH mode' remedied the problem for us. I recommend you give it a
try.
Best Regards,
Ben Gardiner
---
Nanometrics Inc.
http://www.nanometrics.ca
More information about the Alsa-devel
mailing list