> >> Hi,
> >>
> >> I have backported the UVC gadget patch by laurent pinchart on a custom
> >> DM365 board.
> >> It fails to allocate the required endpoints :
> >>
> >>       ep = usb_ep_autoconfig(cdev->gadget, &uvc_streaming_ep);
> >>       if (!ep) {
> >>               INFO(cdev, "Unable to allocate streaming EP\n");
> >>               goto error;
> >>       }
> >>
> >> I can see the message "Unable to allocate streaming EP" in the log.
> >> How can I debug / fix this ?
> >>
> >> The mass storage gadget is working fine.
> >>
> >> Here is the failing endpoint descriptor :
> >>
> >> static struct usb_endpoint_descriptor uvc_streaming_ep = {
> >>       .bLength                = USB_DT_ENDPOINT_SIZE,
> >>       .bDescriptorType        = USB_DT_ENDPOINT,
> >>       .bEndpointAddress       = USB_DIR_IN,
> >>       .bmAttributes           = USB_ENDPOINT_XFER_ISOC,
> >>       .wMaxPacketSize         = cpu_to_le16(1024),
> >>       .bInterval              = 1,
> >> };
> >>
> >
> > The above endpoint requires endpoint fifo size to be 1024. Check with
> the fifo table entries in musb_core.c file and update as per requirement.
> >
> 
> So I can either change the fifo_mode module paramete to pick another
> config, or
> change the endpoint config to use a smaller packet size ?
> 

If the UVC driver requirement may be 1024 bytes packet size, then you cannot 
change, what you can do is change the current fifo-mode 
configuration sizes as per your device requirements. 

For example :
/* mode 4 - fits in 4KB */
static struct musb_fifo_cfg __devinitdata mode_4_cfg[] = {
{ .hw_ep_num =  1, .style = FIFO_TX,   .maxpacket = 512, },
{ .hw_ep_num =  1, .style = FIFO_RX,   .maxpacket = 512, },
{ .hw_ep_num =  2, .style = FIFO_TX,   .maxpacket = 1024, },
{ .hw_ep_num =  2, .style = FIFO_RX,   .maxpacket = 1024, },
{ .hw_ep_num =  3, .style = FIFO_TX,   .maxpacket = 256, },
{ .hw_ep_num =  3, .style = FIFO_RX,   .maxpacket = 256, },

Ravi

> >> Jean-Philippe François
> >> _______________________________________________
> >> Davinci-linux-open-source mailing list
> >> [email protected]
> >> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> >
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to