RT10xx enabling sync mode - USB descriptor issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT10xx enabling sync mode - USB descriptor issue

Jump to solution
462 Views
mrecoskie
Contributor III

Hi,

For the dev_composite_hid_audio_unified_freertos example, if I enable sync mode (USB_DEVICE_AUDIO_USE_SYNC_MODE = 1) and make the appropriate adjustment to make it compile.  (I realize that the RT1064 clock needs removal as CTimer is not available.) 

The USB device is not detected in Linux.  It seems like the USB decriptor has issue.  

 

If I use the speaker only example it works so it seems that the recorder endpoint is the source of the problem.  Does anyone know what is wrong in this case?  

 

Thanks

 

Mark

 

0 Kudos
1 Solution
448 Views
mrecoskie
Contributor III

For those interested - I found the omission.

In usb_device_descriptor.c in the function 'USB_DeviceSetSpeed' around line 1511 the max packet size and interval are not set for the recording endpoints when the SYNC_MODE define is set to 1.  Patch below.

 

#if defined(USB_DEVICE_AUDIO_USE_SYNC_MODE) && (USB_DEVICE_AUDIO_USE_SYNC_MODE > 0U)

            g_UsbDeviceAudioSpeakerEndpoints[0].maxPacketSize = (HS_ISO_OUT_ENDP_PACKET_SIZE);

            g_UsbDeviceAudioSpeakerEndpoints[0].interval      = (HS_ISO_OUT_ENDP_INTERVAL);




            /* ADDED */

            +g_UsbDeviceAudioRecorderEndpoints[0].maxPacketSize = HS_ISO_IN_ENDP_PACKET_SIZE;

            +g_UsbDeviceAudioRecorderEndpoints[0].interval      = HS_ISO_IN_ENDP_INTERVAL;




#else

View solution in original post

0 Kudos
1 Reply
449 Views
mrecoskie
Contributor III

For those interested - I found the omission.

In usb_device_descriptor.c in the function 'USB_DeviceSetSpeed' around line 1511 the max packet size and interval are not set for the recording endpoints when the SYNC_MODE define is set to 1.  Patch below.

 

#if defined(USB_DEVICE_AUDIO_USE_SYNC_MODE) && (USB_DEVICE_AUDIO_USE_SYNC_MODE > 0U)

            g_UsbDeviceAudioSpeakerEndpoints[0].maxPacketSize = (HS_ISO_OUT_ENDP_PACKET_SIZE);

            g_UsbDeviceAudioSpeakerEndpoints[0].interval      = (HS_ISO_OUT_ENDP_INTERVAL);




            /* ADDED */

            +g_UsbDeviceAudioRecorderEndpoints[0].maxPacketSize = HS_ISO_IN_ENDP_PACKET_SIZE;

            +g_UsbDeviceAudioRecorderEndpoints[0].interval      = HS_ISO_IN_ENDP_INTERVAL;




#else

0 Kudos