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.

Possible EDMA conflict between H.264 VENC and CQ93VC

Other Parts Discussed in Thread: TVP5158

Dear All, 

   I think I am experiencing a DMA conflict between the DM365 internal voice codec CQ93VC and the HDVICP or the VICP.

When I run H264 VENC and AEC I see DMA Event Missed Error events on DMA channels 2 and 3, used by voice codec.   
After a while the audio is damaged (robot like voice). 

If I disable H264 VENC or AEC, DMA errors does not happen.

I recompiled the kernel in order to be sure that the DMA channels for the voice codec are reserved and I also released some channel I don't use.

#define DM365_DMACH2EVENT_MAP0        0x0000003Cu //default: 0xCC00303Cu
#define DM365_DMACH2EVENT_MAP1        0x80000F00u //default:  0x80000F00u

I suppose that the H.264 encoder exploits the same channels of the audio codec.

I am looking for a way (maybe with the EDMA3 module) to prevent the H.264 and AEC encoder to use these channels.

I am using DVSDK2. 
The H.264 encoder is the latest 2.10.0.6. 
The applications also exploits resizer, AEC, and TVP5158 capture through mcvip driver (DVR reference framework)
The voice code registers before and after the issue appears are the same. 


Any idea or suggestion will be extremely appreciated.

  • Dear Peregrinus,

    I have a same problem like you.

    I'm using DVSDK 4.02 and H.264 encoder 2.20.00.01 on my custom DM365 board.
    Because my DVSDK version is different, I can't do any more.

    Did you solve this problem?
    If you solve it, can you tell me the way?

    Regards,

    Hyunho

  • Hi Hyunho,

       yes it seems that the problem was solved.

    I doubled the size of the audio frames in order to have less DMA transfers and I also incresed the clock of the DDR from 216 MHz to 270MHz.

    Both these changes, tested individually, seem to reduce the event missed events and the problem with voice codec does not appear anymore.

    My assumption is that the AEC uses a high DDR bandwidth. 

    By precaution, I  also reduced by two the AEC tail length from 128 to 64 ms, it seems to be enough for echo cancellation. 

    Hope this helps,

    Mario

  • Dear Mario,

    Thank you for your reply.

    At first, I changed dram clock (243MHz --> 270MHz) by changing UBL.
    There is no noise for longer time than before. But, after almost 1 hour, the noise appeared.
    I'll try more accoding to your advices.

    Best regards,

    Hyunho

  • Dear Hyunho, 

        do you keep the audio channel continuosly opened for almost 1 hour, after that you experienced the noise?

    I never tested my system for a time as long as in your test, since my application typically exploit the audio channel for a few minutes. I any case I will test it with longer intervals. 

    Please, let me know about your progress. 

    Thank you, 

    Mario

  • Dear Mario,

    Yes.
    My system is continuosly encoding video(H.264) and voice(internal voice codec) for it's power-on.
    My problem is exactly following,
    "When my system is encoding the large image size(720p) h.264 with voice, the noise is occurred after 10 minutes or more.
    In case of smaller size than 720p, the noise is not occurred."

    I have applied CQ93VC codec  patch on DVSDK 4.02  following article,
    http://e2e.ti.com/support/embedded/linux/f/354/t/83687.aspx?pi24527

    At page 2 middle of this article, Mr shechuss told the noise (just like my problem).
    And he may not solve the problem. (at the end of the article he mentioned your another article :) )

    Best regards,

    Hyunho

  • Dear Mario,

    I found the cause of the noise.
    When the noise occurred, the Rx FIFO of voice codec is overflowed.
    In my thought, once RxFIFO overflowed, many gabage data may be added at voice buffer.
    At that time, I have cleared RxFIFO then the noise is disappreared.
    So I added new voice codec ISR to flush RxFIFO if it is overflowed.
    This ISR drop 15~16 data in RxFIFO, it make very short noise (16/8000 sec at 8kz sampling).
    After clearing RxFIFO, there is no noise for a few minutes.
    This way may not be correct, but it is acceptable in my case.

    I don't know why the RxFIFO is overflewd exactly.
    I guess the casue of RxFIFO overflowd as followings.
    - voice codec RxFIFO is small
    - voice codec event processing EDMA may be not perfect
    - dram bandwidth is not enough at some moment

    Best regards,

    Hyunho

  • Dear Hyunho, 

       it looks great!! Extolment for your work. But I am not completely sure the problem you addressed is the same I experienced. At that time I checked carefully the voice codec registers and I didn't found the fifo overflow. What I found were DMA Event Missed Error events on DMA channels 2 and 3, used by voice codec (look at the EDMA event missed register). When the H.264 encoder was off the DMA missed events did not occours.

    In any case I am checking again...

  • Dear Hyunho,

    I have a same problem.

    When the noise occurred, the Rx FIFO of voice codec is overflowed("Interrupt status for Read FIFO overflow error" and "Interrupt status for Read FIFO underrun error").  

    I would like to ask how to "clearing RxFIFO" and how to "added new voice codec ISR"?

    Best regards,

    Lodge