Hi Caleb
The USB audio document is at
https://www.utasker.com/docs/uTasker/uTaskerUSB_Audio.pdfAudio has been used in MIC -> speaker configurations and dual-microphone (without speaker) configurations - connected to ADC/DAC or codec (SAI like). It has been used on FS and HS controllers on the Kinetis parts (HS USB is compatible in the i.MX Rt parts).
It hasn't been used as a part of a composite device and I also have a problem when trying to build with USB-CDC and Audio enabled - it is necessary to disable CDC (then if finds SAMPLING_FREQUECY in usb_audio_descriptors.h).
As with any USB class the first thing that needs to be done for the required configuration is to set up the buffer descriptors - I have attached one for the 2 microphone case, whereby yours will be a lot more complicated (although you may have this already).
The main operation is to source and sink the isochronous buffers (as illustrated in the audio document) - when multiple such source and sinks are in operation these have to be done in parallel but each is effectively the same basic operation.
As noted above there are references for ADC/DAC and also SAI (on Kinetis) but each design will be different so the idea needs to be adapted to the actual interface(s) in question to implement the actual HW requirements.
Note that audio uses different types of synchronisation and the references use a PLL in SW approach and not an interrupt feedback channel. The best synchronisation technique also needs to be defined for the task in hand.
The HS USB controller in the i.MX RT 106x supports 8 endpoints (one for control and so 7 for the class interfaces) so the first thing to check is that this is adequate for the configuration, whereby IN and OUT can be shared on a single physical endpoint. Isochronous mode has been worked with at maximum speed (on HS controller) so the fundamentals are in place.
The references show general operation and so will not be directly suitable for your complex case with multiple interfaces so there would be work involved to:
- configure the descriptors and then configure the interfaces (endpoints) to match
- configure and attach the input/outputs accordingly (that is feeding output isochronous buffers attached to the endpoints and consuming received isochronous data) - typically this interrupt driver or, better, DMA driven and synchronised to the USB audio rate
- implement any synchronisation techniques required for the system or individual channels
- add any particular controls (like enabling/disabling/muting) for each of the channels
The USB drivers can handle the fundamental operations and there is a class reference that should essentially enable basic operation to be checked (but not necessarily hooked into a source/sink device of choice) so it will take extra work to configure and subsequently implement the full details of your quite complicated requirement.
Regards
Mark