This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

usb webcam can't work on DM365

Hello :

I have a problem with usb webcam working on dm365.
I load usbcore and musb_hdrc modules first, then I plug in the usb webcam.
After that I load the usb webccam driver module gspca.ko, I got the following messages:

/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: USB GSPCA cam
era found.(ZC3XX)
/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_prob
e:4275] Camera type JPEG
/home/pencil722/獢/DM365/useful/gspcav1-20071224/Vimicro/zc3xx.h: [zc3xx_con
fig:669] Find Sensor HV7131R(c)
/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_getc
apability:1249] maxw 640 maxh 480 minw 160 minh 120
usbcore: registered new driver gspca
/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: gspca driver
01.00.20 registered

I think this message means the usb webcam devices is working with the driver.
And I can see the /dev/video.
But When I ran the DVSDK sample code encode, I got the following error message:

/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: init isoc: us
b_submit_urb(0) ret -28
/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [gspca_set_is
oc_ep:945] ISO EndPoint found 0x81 AlternateSet 6
/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: init isoc: us
b_submit_urb(0) ret -28
/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [gspca_set_is
oc_ep:945] ISO EndPoint found 0x81 AlternateSet 5
/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca50x_move
_data:1611] ISOC data error: [1] len=0, status=-18

/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca50x_move
_data:1611] ISOC data error: [2] len=0, status=-18

I don't know what happened? Is the sample code wrong? Or the driver can't work for dm365?
can anyone help solving the problems.

Peter. 

22 Replies

  • Genius 9460 points

    Peter,

    The error -28 shows NOSPC which points that dm365 is finding a matching endpoint for camera. This could be due to,

    1. Endpoint packet size not set to camera's requirement (could be 1K). For this you can see the driver/usb/musb/musb_core.c

    and fifo config _2_. You might need to modify one RX endpoint packet size to 1K. (Please make sure that the total size is less than (4096-64))

    2. All endpoint have been used by hubs and other devices. For this you can enable interrupt endpoint scheduling at drivers->USB support->Inventra MUSB

    Regards,
    Ajay

     

     

    If my reply answers your question then please click on the green button "Verify Answer"

  • In reply to Ajay:

    Ajay:

    Thanks for your reply.

    I have try the two ways you suggested, I fix some errors but I got other error messages.
    When I enable interrupt endpoint scheduling, I didn't see the error "init isoc: usb_submit_urb(0) ret -28".
    Then I edit the driver/usb/musb/musb_core.c as following:

    /* mode 2 - fits in 4KB */
    static struct fifo_cfg __initdata mode_2_cfg[] = {
    { .hw_ep_num = 1, .style = FIFO_TX,   .maxpacket = 256, },
    { .hw_ep_num = 1, .style = FIFO_RX,   .maxpacket = 256, },
    { .hw_ep_num = 2, .style = FIFO_TX,   .maxpacket = 512, },
    { .hw_ep_num = 2, .style = FIFO_RX,   .maxpacket = 512, },
    { .hw_ep_num = 3, .style = FIFO_TX,   .maxpacket = 1024, },
    { .hw_ep_num = 3, .style = FIFO_RX,   .maxpacket = 1024, },
    { .hw_ep_num = 4, .style = FIFO_RXTX, .maxpacket = 256, },
    };

    After this changed, I got other error messages:

    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_set_
    light_freq:1932] Sensor currently not support light frequency banding filters.
    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [gspca_set_is
    oc_ep:945] ISO EndPoint found 0x81 AlternateSet 7
    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: init isoc: us
    b_submit_urb(0) ret -90
    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_open
    :1996]  DEALLOC error on init_Isoc

    Cannot open '/dev/video0': 90, Message too long

    (/dev/video exists after I load the driver module)
    These error messages seems to be related with the fifo space.
    I want to set them to 1024 as you suggested, but it seems not work.

    By the way, the steps I did are :
    1. insmod usbcore.ko
    2. insmod musb_hdrc,ko mode_default=1
    3. insmod gspca.ko

    Can you find what is the problem or what steps I did wrong?

    regards,
    Peter

  • Genius 9460 points

    In reply to Peter Chen14428:

    Your camera seems to work only with high bandwidth isochronous interfaces only which is not available on DM365 platform. Can you send output of "cat /proc/bus/usb/devices" to confirm this?

    OR connect the camera to linux PC and send output of "lsusb -v".

    If this is the cause of the error then you need to use a camera which work with non-high bandwidth iso endpoints.

    Regards,

    Ajay

    If my reply answers your question then please click on the green button "Verify Answer"

  • In reply to Ajay:

    Ajay,

    Thanks for your reply.

    I try to check my usb webcam which work with high bandwidth isochronous or non-high bandwidth iso endpoints,
    but I can't distinguish from the messages.
    Here is the messages come from the dm365 and PC.
    dm365:

    T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
    D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
    P:  Vendor=046d ProdID=08af Rev= 1.00
    C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS= 128 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    I:  If#= 0 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS= 192 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    I:  If#= 0 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS= 256 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    I:  If#= 0 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS= 384 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    I:  If#= 0 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS= 512 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    I:  If#= 0 Alt= 6 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS= 768 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
    I:  If#= 0 Alt= 7 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=gspca
    E:  Ad=81(I) Atr=01(Isoc) MxPS=1023 Ivl=1ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

    PC:

    Bus 003 Device 014: ID 046d:08af Logitech, Inc. QuickCam Easy/Cool
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.10
      bDeviceClass          255 Vendor Specific Class
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      idVendor           0x046d Logitech, Inc.
      idProduct          0x08af QuickCam Easy/Cool
      bcdDevice            1.00
      iManufacturer           0
      iProduct                0
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength          193
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xa0
          (Bus Powered)
          Remote Wakeup
        MaxPower              100mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0000  1x 0 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       1
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0080  1x 128 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       2
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x00c0  1x 192 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       3
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0100  1x 256 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       4
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0180  1x 384 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       5
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       6
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0300  1x 768 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       7
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol    255 Vendor Specific Protocol
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            1
              Transfer Type            Isochronous
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x03ff  1x 1023 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval              10
    Device Status:     0x0000
      (Bus Powered)

    Can you tell me how to get the information about bandwidth speed?

    regards,

    Peter

  • Genius 9460 points

    In reply to Peter Chen14428:

    This camera works on non highbandwidth endpoints. You can see value of wMaxPacketSize and if its <= 1024 then it's non high bandwidth but if is more than 1024 then that would require high bandwidth endpoints.

    Ajay  

    If my reply answers your question then please click on the green button "Verify Answer"

  • Genius 9460 points

    In reply to Ajay:

    now we need to see why you are getting below error,

    Cannot open '/dev/video0': 90, Message too long

    Can you check if video0 is the mode which gets created after attaching the camera ?

    -Ajay

    If my reply answers your question then please click on the green button "Verify Answer"

  • In reply to Ajay:

    Ajay,

    I check the /dev/video0 gets created after attaching the camera.
    Following is my checking process:

    Before attaching the camera and load the module:
    I cat the "/dev/video0",and get the messages:
    cat: video0: No such file or directory

    After attaching the camera and load the module:
    I cat the "/dev/video0" again,and I get the messages:
    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_set_
    light_freq:1932] Sensor currently not support light frequency banding filters.
    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [gspca_set_is
    oc_ep:945] ISO EndPoint found 0x81 AlternateSet 7
    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: init isoc: us
    b_submit_urb(0) ret -90
    /home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_open
    :1996]  DEALLOC error on init_Isoc

    cat: video0: Message too long

    During the process I did, I think the /dev/video0 gets created afte attaching the camera.

    Is there something with symbo llink (something like this)?

    Can you find where the problem?

    regards,

    Peter

  • Genius 9460 points

    In reply to Peter Chen14428:

    Peter,

    Please provide more details of kernel version used ?

    Regards,
    Ajay

    If my reply answers your question then please click on the green button "Verify Answer"

  • In reply to Ajay:

    Ajay,

    The kernel version I used is linux-2.6.18_pro500 which I got from the TI's website.

    The messages I got from dm365 board are:

    Linux version 2.6.18_pro500-davinci_evm-arm_v5t_le (pencil722@lab745-desktop) (g
    cc ? 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30))

    regards,

    Peter

  • Genius 9460 points

    In reply to Peter Chen14428:

     

    Peter,

    I am not sure if Webcam is supported in v2.6.18 version of kernel. There have been major changes after 2.6.18 in musb driver and it can be found in linus's tree.

    Now there seems to be two option for you,

    1. Move to latest kernel OR

    2. Back port all the musb driver patches to v2.6.18.

    You might have access to release notes/user guide for v2.6.18_pro500 which you can refer to confirm if WebCam is supported.

    Regards,

    Ajay

    If my reply answers your question then please click on the green button "Verify Answer"

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.