2011/2/4 Will Kelleher <[email protected]>:
> Hi,
>
> I also recently backported the UVC gadget (g_webcam) from 2.6.36 to
> 2.6.32.  Where did you encounter this error?

The module loads fine, except for the following message in dmesg output
   INFO(cdev, "Unable to allocate streaming EP\n");

I had to set the wMawPacketSize to 512 in the following struct for the endpoint
allocation to work :

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(512),
        .bInterval              = 1,
};


> I'm able to load the
> module and the DM365 is detected as a UVC device by a Windows host,
> but then I am unable to add DirectShow filters to the device.  Perhaps
> the root cause is similar?

With the current gadget driver, all "class specific" control message
on endpoint 0
are redirected to userspace. So you need cooperation from userspace on
the gadget side
to answer these requests. I will look into it today.

>
> Thanks,
>
> Will Kelleher
> Nuvixa, Inc.
>
>
>
> On Fri, Feb 4, 2011 at 7:41 AM, jean-philippe francois
> <[email protected]> wrote:
>> 2011/2/4 B, Ravi <[email protected]>:
>>>
>>>> >> 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, },
>>>
>> Thank you, I can see that more recent kernel have the possibility
>> to specify this config in platform_data, which is great !
>>
>>> 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
>>
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to