Hi Forum Team,
I'm working on RT1024 and try to make USB work "in bought directions" as a speaker and microphone. I have used preset Audio 2.0 unified (bear metal). Unfortunately I receive only "kUSB_DeviceAudioEventStreamSendResponse" in USB_DeviceInterface0AudioControlCallback function. When I make some debugging I see that in USB_DeviceAudioStreamEndpointsInit only "USB_DeviceAudioIsochronousIn" is called in. I can't figure out how to setup endpoints to make it work.
if ((USB_ENDPOINT_ISOCHRONOUS == (epInitStruct.transferType & USB_DESCRIPTOR_ENDPOINT_ATTRIBUTE_TYPE_MASK)) &&
(USB_IN == ((epInitStruct.endpointAddress & USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK) >>
USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_SHIFT)))
{
epCallback.callbackFn = USB_DeviceAudioIsochronousIn;
}
else
{
epCallback.callbackFn = USB_DeviceAudioIsochronousOut;
}
HI @asarbs ,
To enable both input and output audio, you must use two interface descriptor and a interface association descriptor in g_UsbDeviceConfigurationDescriptor[], one interface descriptor for input and one for output.
You can refer to both the dev_audio_generator and dev_audio_speaker examples in SDK.
Regards,
Jing
Was there any progress on this? I have the same issue.