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.

how to processing 1ms (8 samples) tdm data to AER

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Hi,

I saw the AER required to get 10ms samples from tdm bus and then process it then send back to tdm bus. i have a application that process tdm samples based 1ms, so, my question is how i can processing that, in other words, how i can put AER to my application? use a buffer, but does the buffer will infecting my application or not?

I have a OMAP-L138 EVM board, but i just want use it's ARM core for AER (context A8), my application is Asterisk http://www.asterisk.org/, the AER will connect to Dahdi, as the Dahdi is based 1ms for the tdm samples.

Thank you 

  • What processor and software are you asking about?
  • Hi Biser,

    I have a OMAP-L138 EVM board, but i just want use it's ARM core for AER (context A8), my application is Asterisk, it is asterisk http://www.asterisk.org/, the AER will connect to Dahdi, as the Dahdi is based 1ms for the tdm samples.

    Thank you

  • You are in the wrong forum then. I am moving this thread to the correct location.
  • Hi Biser,

    sorry for that and thank you.

  • Hi TieXue,

    Please provide the clear information to solve or support your issue.

    1. What is AER and its purpose? 

    2. Please define the tdm sample rates?

    3. What is the size of buffer?

    4. How this AER interfaced with OMAPL-138?

  • Hi Rajasekaran,

    Here is answer

    1. the AER is Acoustic Echo Cancellation/Removal, here is TI link for that http://software-dl.ti.com/libs/aer/latest/index_FDS.html

    2. the TDM sample rates is 1ms, mean 8 samples with 8KHZ sync and 2.048MHZ TDM bus

    3. i am not sure how much the size for 1ms adapte to 10ms AER

    4. I connected mcbsp of L138 chip

    Thank you.

  • Hi TieXue,

    Thanks for your post.

    There are possibilities to adjust the sample rate by configuring McBSP Transmit and Receive FIFO Buffers through peripheral configuration port. So, You can reduce the sample rate from 10ms to 1ms samples from TDM bus, process and send it back with same 1ms sample rate to TDM bus. This can be achieved by configuring McBSP FIFO Tx and Rx buffer data  registers.

    McBSP FIFO Data Registers

    RBUF - McBSP FIFO Receive Buffer

    XBUF - McBSP FIFO Transmit Buffer

    Basically Transmit & Receive FIFO Buffers allow the McBSP to operate at a higher sample rate by making it more tolerant to DMA latency. If internal clock source is used, the CLKGDV field of the Sample Rate Generator Register (SRGR) must always be set to a value of 1 or greater.

    Please find all the above details in the OMAPL138 datasheet link as below:

    http://www.ti.com/lit/ds/symlink/omap-l138.pdf

    Kindly check Section 5.16 McBSP peripheral register description & its usage in the above link.

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------
    Please click the
    Verify Answer button on this post if it answers your question.
    ------------------------------------------------------------------------------------------------
     

  • A few comments:

    1. Sampling rate is determined by A/D, D/A conversion, not by the size of frame buffers in McBSP.
    2. The size of McBSP buffers would determine your frame rate, or better said duration in this case (1ms or 10ms).
    3. The number of samples in the frame buffer would depend on the sampling rate (8kHz or 16kHz).
    4. AER software operates on 10ms because of the internal structure (using block-FFT for updates and frequency domain NLP).
    5. No matter what frame size you use on TDM side you have to use double buffering for the 10ms send-in buffer you provide to AER.
    6. You can use any frame size/duration/rate in McBSP, but if it is not 10ms, you need to buffer it on the way in until you get enough samples (send-in buffer) to pass to the AER software. On the way out, you need to empty the 10ms buffer (receive-out) provided by the AER, making sure it is in sync with the send-in buffer, by copying/saving receive-out buffer samples (1ms segments) each time you get the send-in 1ms segments. You put those sync'ed samples into the receive-out-sync buffer (10ms as well) so you can provide it once your send-in buffer is full (you give them both to aerSendIn() function). This way AER adaptive filter will be able to converge.
    7. When implementing synchronization of send/receive buffers you should use the same frame sync for both send and receive. For example, you may sync on send and when you process that ISR you should handle both send and receive 1ms segments (do the sync by copying into receive-out-sync, fill the send-in buffer, etc.) If using DMA, some of these things may happen automatically. However, the receive-out-sync buffer you may have to manually fill in the ISR. The ISR should be clocked from your A/D, D/A clock to prevent clock slips. That is, your frame sync has to originate from the same clock you are driving your A/D, D/A. If you do not have A/D, D/A, but some digitla audio interface, you use the clock from that audio interface.
    8. The send-in and receive-out (10ms buffers) should be double buffers to prevent overwriting them while AER is using them. If you do static memory management, you can just copy pointers so you do not copy data...

    I hope this clarifies how you can make TDM side to operate.

    Regards,
    Bogdan

  • Hi Bogdan,

    Thank you very much, now i got a overview for how to interface my codec with AER.

    Best regards,