Hi Laurent, Thank you for the reply. The webcam is linux based and I am using the UVC gadget driver of linux kernel 2.6.10. In this kernel I don't see any example doing UVC bulk transfer. It is working perfectly with ISOC. Can you please let me know, if there is any example code that does UVC bulk transfer ? I couldn't find it any.
The uvc specification is not clear enough to distinguish ISOC and BULK transfer atleast from my understanding. While doing ISOC transfer, we have an alternate Interface Setting, when we get a SET_INTERFACE we start transferring the UVC header first alone to start the transfer. There after each IN token from host will carry the frames if any, otherwise header alone goes. In case of BULK, with alternate settings, the host machine hangs. SET_INTERFACE (alternateSetting set 1), Why is it like that? So I removed alternate settings and till enumeration it is proper. Then After I get VS_PROBE_COMMIT from the host, I start transferring exactly same like ISOC, but I don't see any video on the host and no more proceedings from here. The data is not going from the FIFO, hence I am not getting any more TX interrupt from my device. I am attaching my devices descriptor as well as host side logs. Please find the attachment. Please let me know, is there any link talk about BULK transfer or example. Thanks & Regards, Ramesh. On Wed, Nov 11, 2009 at 5:13 AM, Laurent Pinchart < laurent.pinch...@ideasonboard.com> wrote: > Hi Ramesh, > > On Tuesday 10 November 2009 17:03:50 Ramesh Rajagopal wrote: > > Hi, > > I am trying to implement UVC bulk tranfer for my webcam. I am getting > some > > difficulties. > > If anybody has already tried, Can you please send me the enumeration > > details.? > > Are you developing a webcam ? Is it Linux-based ? If so, are you using the > UVC > gadget driver I've posted to the linux-usb mailing list some time ago ? > > You will find sample USB descriptors for a bulk device attached to this e- > mail. > > > Does this same as ISOC transfer or is it different, If so, Please give me > > those details. > > What about reading the UVC spec ? > > -- > Regards, > > Laurent Pinchart >
Bus 002 Device 044: ID 1984:0001 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1984 idProduct 0x0001 bcdDevice 2.16 iManufacturer 1 Bison iProduct 2 Bison Video iSerial 3 A1AP20B00112 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 636 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 2 Bison Video bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 5 Bison Video Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 5 Bison Video VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 39 dwClockFrequency 24.000000MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength 17 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 5 Bison Video wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 2 bmControls 0x00000000 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 3 iTerminal 5 Bison Video Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 7 Bison Video VideoStreaming Interface Descriptor: bLength 15 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 2 wTotalLength 555 bEndPointAddress 131 bmInfo 0 bTerminalLink 4 bStillCaptureMethod 0 bTriggerSupport 0 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 11 bmaControls( 1) 11 VideoStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 6 (FORMAT_MJPEG) bFormatIndex 1 bNumFrameDescriptors 8 bFlags 1 Fixed-size samples: Yes bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 1 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 1 bmCapabilities 0x00 Still image unsupported wWidth 640 wHeight 480 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 2 bmCapabilities 0x00 Still image unsupported wWidth 160 wHeight 120 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 3 bmCapabilities 0x00 Still image unsupported wWidth 352 wHeight 288 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 4 bmCapabilities 0x00 Still image unsupported wWidth 768 wHeight 448 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 5 bmCapabilities 0x00 Still image unsupported wWidth 512 wHeight 288 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 6 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 240 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 7 bmCapabilities 0x00 Still image unsupported wWidth 1024 wHeight 576 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 8 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 720 dwMinBitRate 65000000 dwMaxBitRate 65000000 dwMaxVideoFrameBufferSize 307200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 0 (Unspecified) bTransferCharacteristics 0 (Unspecified) bMatrixCoefficients 0 (Unspecified) VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 2 bNumFrameDescriptors 5 guidFormat {59555932-0000-1000-8000-00aa00389b71} bBitsPerPixel 16 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 1 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x00 Still image unsupported wWidth 352 wHeight 288 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x00 Still image unsupported wWidth 160 wHeight 120 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 38400 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 3 bmCapabilities 0x00 Still image unsupported wWidth 512 wHeight 288 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 294912 dwDefaultFrameInterval 400000 bFrameIntervalType 2 dwFrameInterval( 0) 400000 dwFrameInterval( 1) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 4 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 180 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 115200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 5 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 240 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 0 (Unspecified) bTransferCharacteristics 0 (Unspecified) bMatrixCoefficients 0 (Unspecified) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered)
Script started on Wednesday 11 November 2009 04:34:48 PM IST <6>[24280.548538] usb 2-3: new high speed USB device using ehci_hcd and address 44 <6>[24280.842397] usb 2-3: configuration #1 chosen from 1 choice <7>[24280.864670] uvcvideo: Probing generic UVC device 3 <7>[24280.864753] uvcvideo: Found format MJPEG. <7>[24280.864772] uvcvideo: - 640x480 (30.0 fps) <7>[24280.864787] uvcvideo: - 160x120 (30.0 fps) <7>[24280.864800] uvcvideo: - 352x288 (30.0 fps) <7>[24280.864813] uvcvideo: - 768x448 (30.0 fps) <7>[24280.864826] uvcvideo: - 512x288 (30.0 fps) <7>[24280.864838] uvcvideo: - 320x240 (30.0 fps) <7>[24280.864852] uvcvideo: - 1024x576 (30.0 fps) <7>[24280.864865] uvcvideo: - 1280x720 (30.0 fps) <7>[24280.864880] uvcvideo: Found format YUV 4:2:2 (YUYV). <7>[24280.864894] uvcvideo: - 352x288 (30.0 fps) <7>[24280.864908] uvcvideo: - 160x120 (30.0 fps) <7>[24280.864920] uvcvideo: - 512x288 (25.0 fps) <7>[24280.864933] uvcvideo: - 320x180 (30.0 fps) <7>[24280.864946] uvcvideo: - 320x240 (30.0 fps) <6>[24280.895911] uvcvideo: Found UVC 1.00 device Bison Video (1984:0001) <7>[24280.895933] uvcvideo: Scanning UVC chain: OT 4 <- IT 3 <6>[24280.895941] uvcvideo: Found a valid video chain (3 -> 4). <7>[24280.915635] uvcvideo: UVC device initialized. <7>[24280.959475] uvcvideo: uvc_v4l2_open <7>[24280.959496] uvcvideo: uvc_v4l2_ioctl <4>[24280.959504] VIDIOC_QUERYCAP<7>uvcvideo: uvc_v4l2_release <7>[24392.704013] uvcvideo: uvc_v4l2_open <7>[24392.704013] uvcvideo: uvc_v4l2_ioctl <4>[24392.704013] VIDIOC_QUERYCAP<7>uvcvideo: uvc_v4l2_ioctl <4>[24392.704013] VIDIOC_ENUM_FMT<7>uvcvideo: uvc_v4l2_ioctl <4>[24392.704013] VIDIOC_ENUM_FMT<7>uvcvideo: uvc_v4l2_ioctl <4>[24392.704013] VIDIOC_ENUM_FMT<7>uvcvideo: uvc_v4l2_ioctl <4>[24392.704013] VIDIOC_S_FMT<7>uvcvideo: Trying format 0x47504a4d (MJPG): 640x480. <7>[24392.704013] uvcvideo: Using default frame interval 33333.3 us (30.0 fps). <7>[24392.776509] uvcvideo: uvc_v4l2_ioctl <4>[24392.776509] VIDIOC_S_PARM<7>uvcvideo: Setting frame interval to 1/30 (333333). <7>[24392.840506] uvcvideo: uvc_v4l2_ioctl <4>[24392.840506] VIDIOC_G_PARM<7>uvcvideo: uvc_v4l2_ioctl <4>[24392.840736] VIDIOC_REQBUFS<7>uvcvideo: uvc_v4l2_ioctl <4>[24392.841355] VIDIOC_QUERYBUF<7>uvcvideo: uvc_v4l2_mmap <7>[24392.841622] uvcvideo: uvc_v4l2_ioctl <4>[24392.841634] VIDIOC_QUERYBUF<7>uvcvideo: uvc_v4l2_mmap <7>[24392.841828] uvcvideo: uvc_v4l2_ioctl <4>[24392.841840] VIDIOC_QUERYBUF<7>uvcvideo: uvc_v4l2_mmap <7>[24392.842101] uvcvideo: uvc_v4l2_ioctl <4>[24392.842112] VIDIOC_QUERYBUF<7>uvcvideo: uvc_v4l2_mmap <7>[24392.842305] uvcvideo: uvc_v4l2_ioctl <4>[24392.842317] VIDIOC_QBUF<7>uvcvideo: Queuing buffer 0. <7>[24392.842340] uvcvideo: uvc_v4l2_ioctl <4>[24392.842351] VIDIOC_QBUF<7>uvcvideo: Queuing buffer 1. <7>[24392.842370] uvcvideo: uvc_v4l2_ioctl <4>[24392.842380] VIDIOC_QBUF<7>uvcvideo: Queuing buffer 2. <7>[24392.842399] uvcvideo: uvc_v4l2_ioctl <4>[24392.842409] VIDIOC_QBUF<7>uvcvideo: Queuing buffer 3. <7>[24393.085678] uvcvideo: uvc_v4l2_ioctl <4>[24393.085693] VIDIOC_STREAMON<7>uvcvideo: uvc_v4l2_ioctl <4>[24393.105306] VIDIOC_DQBUF^C Script done on Wednesday 11 November 2009 04:37:43 PM IST
_______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel