Decoupler; Audio Buffering Scheme; Decoupler/Audio Core Interaction - XMOS xCORE-200 Multi-channel Audio board Design Manual

Usb audio
Hide thumbs Also See for xCORE-200 Multi-channel Audio board:
Table of Contents

Advertisement

USB Audio Design Guide

3.4.2 Decoupler

The decoupler supplies the USB buffering core with buffers to transmit/receive
audio data to/from the host. It marshals these buffers into FIFOs. The data from
the FIFOs are then sent over XC channels to other parts of the system as they need
it. This core also determines the size of each packet of audio sent to the host (thus
matching the audio rate to the USB packet rate). The decoupler is implemented in
the file decouple.xc .
3.4.3 Audio Buffering Scheme
This scheme is executed by co-operation between the buffering core, the decouple
core and the XUD library.
For data going from the device to the host the following scheme is used:
1. The decouple core receives samples from the audio core and puts them into a
FIFO. This FIFO is split into packets when data is entered into it. Packets are
stored in a format consisting of their length in bytes followed by the data.
2. When the buffer cores needs a buffer to send to the XUD core (after sending the
previous buffer), the decouple core is signalled (via a shared memory flag).
3. Upon this signal from the buffering core, the decouple core passes the next
packet from the FIFO to the buffer core. It also signals to the XUD library that
the buffer core is able to send a packet.
4. When the buffer core has sent this buffer, it signals to the decouple that the
buffer has been sent and the decouple core moves the read pointer of the FIFO.
For data going from the host to the device the following scheme is used:
1. The decouple core passes a pointer to the buffering core pointing into a FIFO of
data and signals to the XUD library that the buffering core is ready to receive.
2. The buffering core then reads a USB packet into the FIFO and signals to the
decoupler that the packet has been read.
3. Upon receiving this signal the decoupler core updates the write pointer of the
FIFO and provides a new pointer to the buffering core to fill.
4. Upon request from the audio core, the decoupler core sends samples to the
audio core by reading samples out of the FIFO.

3.4.4 Decoupler/Audio Core interaction

To meet timing requirements of the audio system, the decoupler core must respond
to requests from the audio system to send/receive samples immediately. An
interrupt handler is set up in the decoupler core to do this. The interrupt handler
is implemented in the function handle_audio_request .
XM0088546.1
25/110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents