Hello all,
I'm hoping I can find an expert in USB Audio here.
I'm working on developing some USB Audio device firmware for Atmel's UC3 series of microcontrollers. What I'd like to do is create an audio device that supports a variable number of channels, 16-bit and 24-bit samples, and several selectable sample rates. To start off, I've used the Atmel Software Framework, which has much of the basic USB audio functionality baked right in. However, I've had trouble getting multiple sample rates and sample sizes to work by just modifying the USB descriptors.
Looking at the code already provided, I suspect I will need to implement some GET and SET requests for the CUR and RANGE attributes. Reading through the audio 2.0 specification, it looks like you can set multiple sets of ranges in the [MIN,MAX,RES] format by simply placing them in an array, and indicating how long the array is at the start. However, from the implementation examples I've seen, it looks like MIN, MAX, and RES GET/SET requests are all handled separately - the bRequest value for CUR is 0x01 (SET) and 0x81 (GET), while the three range components are split into 0x02,0x03,0x04, for SET MIN,MAX, and RES respectively; and 0x82, 0x83, 0x84 for the GET MIN,MAX,RES, respectively.
So then, if I have multiple RANGE arrays, say [8000Hz, 8000Hz, 0]; [16000Hz, 48000Hz, 16000Hz], and [96000Hz, 192000Hz, 96000Hz] as the [MIN,MAX,RES] trio, how do I format the packet to include all three pairs so that the host knows about all of the available sample rates, if MIN MAX and RES are all separate requests?
Secondly, if I've defined two alternate AudioStreaming interfaces for the 16-bit and 24-bit sample formats, and set up endpoint bandwidth appropriately for each, what else would be required to have both formats available and selectable at once to the host?
FYI, these are being developed for a High-Speed bus.
Thanks,
Alex