RT10xx enabling sync mode - USB descriptor issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RT10xx enabling sync mode - USB descriptor issue

ソリューションへジャンプ
557件の閲覧回数
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 解決策
543件の閲覧回数
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 返信
544件の閲覧回数
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 件の賞賛
返信