Hi. I'm working on a HS USB audio class 2 app based on the AT32UC3A364.
I'm getting USB data to and from a host PC but now I want use the USB DMA to handle micro frames. No problems to set it up and get data to / from the host. My question has to do with how to handle DMA'ing to and from a circular buffer.
The code that actually moves samples to/from i2s uses a circular buffer. The DMA transfers are only able to write to a linear address range - no wrap. Furthermore, the number of samples received from the host and hence transferred via DMA can change every packet. i.e. 80 bytes, 96 bytes, 80 bytes etc.
I've considered setting up a linked-list transfer scenario when the current DMA transfer would wrap past the end of the circular buffer. Before undertaking this I just thought I'd see if anyone had any insight / observations?
Thanks very much for any insight!