Jump to content

Recommended Posts

Posted

I configured my opi to work as a composite usb gadget (mouse and rndis). Everything works, but the actual refresh rate of the mouse was 250 Hz. I tried to configure bInterval, which is responsible for the device update frequency, this could only be done by rebuilding the kernel with bInterval changes in the high-speed descriptor structures from 4 to 1 in the file drivers/usb/gadget/function/f_hid.c. It had an effect. But the frequency only rose to 500 Hz. I tried to find what could limit this, I looked in drivers/usb/dwc2/gadget.c and also in composite.c but I couldn’t find anything. Now I don’t know where to look next or i missed sth..

 

drivers/usb/gadget/function/f_hid.c

/* High-Speed Support */

static struct usb_endpoint_descriptor hidg_hs_in_ep_desc = {
	.bLength		= USB_DT_ENDPOINT_SIZE,
	.bDescriptorType	= USB_DT_ENDPOINT,
	.bEndpointAddress	= USB_DIR_IN,
	.bmAttributes		= USB_ENDPOINT_XFER_INT,
	/*.wMaxPacketSize	= DYNAMIC */
	.bInterval		= 4, /* FIXME: Add this field in the <<< changed to 1
				      * HID gadget configuration?
				      * (struct hidg_func_descriptor)
				      */
};

static struct usb_endpoint_descriptor hidg_hs_out_ep_desc = {
	.bLength		= USB_DT_ENDPOINT_SIZE,
	.bDescriptorType	= USB_DT_ENDPOINT,
	.bEndpointAddress	= USB_DIR_OUT,
	.bmAttributes		= USB_ENDPOINT_XFER_INT,
	/*.wMaxPacketSize	= DYNAMIC */
	.bInterval		= 4, /* FIXME: Add this field in the <<< changed to 1
				      * HID gadget configuration?
				      * (struct hidg_func_descriptor)
				      */
};

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines