DSPRelated.com
Forums

McBsp and DMA synchronization

Started by iewil2000 October 22, 2007
Dear group,

McBsp receives L&R channel of audio. It sends out a REVT to DMA to
enable DMA's transfer. It has worked well for a while. But when I
require the DMA alwasy start from audio sample of left channel, I don't
have any means to do that. McBsp don't have "left channel REVT", it
sends REVT for each recieving word.

I appreciate any input.

Wei
I solved the problem with:

1. Set McBsp to read 32 bit instead of 16 bit. So the DRR2 has left
channel and DRR1 has right channel. McBsp issues an EVENT to DMA only
after received both left and right channel.
2. Configure DMA as double indexing both on source and destination.
An EVENT from McBsp triggers a trasmission of a frame. DMA reads DRR2
first and then DRR1 second, as two element of one frame. DMA writes
to bufferL and bufferR with double indexing to seperate left and
right channel.

Wei
--- In c..., "iewil2000" wrote:
>
> Dear group,
>
> McBsp receives L&R channel of audio. It sends out a REVT to DMA to
> enable DMA's transfer. It has worked well for a while. But when I
> require the DMA alwasy start from audio sample of left channel, I
don't
> have any means to do that. McBsp don't have "left channel REVT", it
> sends REVT for each recieving word.
>
> I appreciate any input.
>
> Wei
>
Wei-

> I solved the problem with:
>
> 1. Set McBsp to read 32 bit instead of 16 bit. So the DRR2 has left
> channel and DRR1 has right channel. McBsp issues an EVENT to DMA only
> after received both left and right channel.
> 2. Configure DMA as double indexing both on source and destination.
> An EVENT from McBsp triggers a trasmission of a frame. DMA reads DRR2
> first and then DRR1 second, as two element of one frame. DMA writes
> to bufferL and bufferR with double indexing to seperate left and
> right channel.

Not only is that a slick software solution, but seems very efficient also -- cuts down on internal mem bus bandwidth.

-Jeff

> --- In c..., "iewil2000" wrote:
>>
>> Dear group,
>>
>> McBsp receives L&R channel of audio. It sends out a REVT to DMA to
>> enable DMA's transfer. It has worked well for a while. But when I
>> require the DMA alwasy start from audio sample of left channel, I
> don't
>> have any means to do that. McBsp don't have "left channel REVT", it
>> sends REVT for each recieving word.
>>
>> I appreciate any input.
>>
>> Wei
>