Over-Riding Standard Requests; Class Requests - 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
23/110
The function may also return XUD_RES_RST if a bus-reset has been issued onto the
bus by the host and communicated from XUD to Endpoint 0.
Since the USB_StandardRequests() function STALLs an unknown request, the end-
point 0 code must parse the USB_SetupPacket_t structure to handle device specific
requests and then calling USB_StandardRequests() as required. This is described
next.

3.3.2 Over-riding Standard Requests

The USB Audio design "over-rides" some of the requests handled by
USB_StandardRequests() , for example it uses the SET_INTERFACE request to
indicate it if the host is streaming audio to the device. In this case the setup
packet is parsed, the relevant action taken, the USB_StandardRequests() is called
to handle the response to the host etc.

3.3.3 Class Requests

Before making the call to USB_StandardRequests() the setup packet is parsed for
Class requests. These are handled in functions such as AudioClasRequests_2() ,
AudioClassRequests_2 , DFUDeviceRequests() etc depending on the type of re-
quest.
Any device specific requests are handled - in this case Audio Class, MIDI class, DFU
requests etc.
Some of the common Audio Class requests and their associated behaviour will now
be examined.
3.3.3.1 Audio Requests
When the host issues an audio request (e.g. sample rate or volume change),
it sends a command to Endpoint 0. Like all requests this is returned from
USB_GetSetupPacket() . After some parsing (namely as Class Request to an Au-
dio Interface) the request is handled by either the AudioClassRequests_1() or
AudioClassRequests_2() function (based on whether the device is running in Au-
dio Class 1.0 or 2.0 mode).
Note, Audio Class 1.0 Sample rate changes are send to the relevant endpoint,
rather than the interface - this is handled as a special case in he endpoint 0 request
parsing where AudioEndpointRequests_1() is called.
The AudioClassRequests_X() functions parses the request further in order to
ascertain the correct audio operation to execute.
XM0088546.1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents