RT10xx enabling sync mode - USB descriptor issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RT10xx enabling sync mode - USB descriptor issue

跳至解决方案
713 次查看
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 项奖励
回复
1 解答
699 次查看
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 项奖励
回复
1 回复
700 次查看
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 项奖励
回复