How do I set the usb audio code up for usb asynchronous transfers.
Do I just have to change bmAttributes
USB_ENDPOINT_TYPE_ISOCHRONOUS,
to
USB_ENDPOINT_SYNC_ASYNCHRONOUS
or is it more complexed than that.
The terms, Asynchronous / Synchronous / Adaptive on USB audio class mean the synchronization type. It suggests the place where the original sampling clock sits on.
- Asynchronous: the sampling clock is generated on the device side. - Synchronous: the clock derives from USB SOF by PLL - Adaptive: the clock is generated on the host side.
For Asynchronous Sink (output) device, like a speaker, the device has to notify to host on its sampling clock, to synchronize the host. For this purpose, a feedback endpoint (isoc IN) is associated to the isoc OUT endpoint of the audio stream, like above QB9
For Asynchronous Source (input) device, like a microphone, The sampling rate on the device is shown as the number of the samples in each isoc packet on the audio stream. The number is relative to the SOF frequency. Therefore, any feedback endpoint is not required.
Tsuneo