This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mcasp overrun/underrun error occur when hard disk read/write large block data

Hi:

   SDK  is  EZSDK-5.02 and PSP is linux-2.6.37-psp04.00.00.12. The platform is CA8168.

   I  write  the Mcasp  driver according to the davinci-pcm.c.  The mcasp  run in arm  by EDMA.  I  use  TDM  format, 8 bits samples, 32 slots.

   In the begining, the mcasp work good.  The overrun or underrun occur  when hard disk read/write large block data.  The voice  become noise.

   No EDMA error occur, only overrun/underrun occur.

  I modify the priority  of  EDMA  queue, but it  has no effect.

  The hard disk  read/write not by EDMA.  I wonder that hard disk can effect mcasp.

  I suspect some kind of race condition is resulting in underrun/overrun  error, but  I am not able to pin point the root cause.

  • Hi,

    You mentioned that you modified the EDMA queue for the audio driver. Which queue did to try out? Did you try increasing the FIFO depth used in the McASP driver?

    Regards,

    Vaibhav

  • Hi,

    I   increase  the  FIFO depth   with  64(max  value),but  the  error  still  occur.  The error occur  more quickly  than  FIFO depth with 1. 

    The McASP0 and McASP1  are used.  When  requesting  EDMA  channel, priority  of  EDMA  queue  is  configured:

     asp0_tx_channel = edma_alloc_channel(tx_channel, NULL, NULL,EVENTQ_0);

    "EVENTQ_0"  is the priority  of  asp0_tx_channel,and EVENTQ_1/EVENTQ_2/EVENTQ_3  have the same result.

    The  hard disk  buffer is 256K bytes  formerly. If  decreasing  buffer  to  64K bytes  and  FIFO depth with 1,  no error  occur.

  • Hi,

    Did your problem get solved? I am getting Bufffer Underrun error for AIC. I have checked the EMDA Queue ID for Audio. It is EVNETQ_2. I modified this to EVENTQ_1 and this Buffer Underrun error is reduced somewhat. Can you tell how to remove this completely?

    Komal

  • Hi,

       I am sorry.  I  have  not   solved the problem  completely.  I  init  the Mcasp  and EDMA  when  the underruun/overrun  error  occur.  But  this way  will  effect  the voice .  If  the error occur    frequently, the voice  become bad.  

       My  problem is that  error  occur  when  DSP  is  loaded or  hard disk  read/write  large block of data.  

       Is it  a  CPU bug?

  • Hi, tiger.

    I have the same problem, can you fix the problem?

    can you share the resolution?

    Thanks very much. Waiting for your good news.