How to use DMA, for wave file data transfer to interface AUDIO SGTL CODEC with K70

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use DMA, for wave file data transfer to interface AUDIO SGTL CODEC with K70

641 Views
deepakbhagat
Contributor II

I was able to communicated with with AUDIO SGTL CODEC with K70 through i2s. It was found that there is considerable use of cpu while playing the audio wave file so can I get help on how i can use DMA to optimize the use of cpu time.

Labels (1)
0 Kudos
1 Reply

379 Views
egoodii
Senior Contributor III

I don't know what variant (Rev 1.x or Rev 2.x) I2S you are dealing with, but I suspect their DMA operations are at least 'very similar'.  You will find my Rev 1.x setup here:

https://community.freescale.com/message/82190#82190

That is particularly set up to interleave/de-interleave six 16-bit audio channels from consecutive linear ping-pong buffers to their respective CoDecs thru I2S network mode.  I believe the 'defines' there allow for reasonable customization (except whatever I missed!).  The DMA minor-loop/major-loop format, with sophisticated counter-manipulation capabilities at each level, in conjunction with 'half loop' interrupts, allows this unattended data handling.