tech-multimedia archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: uvideo webcam on big-endian systems



Jeremy Morse wrote:

> The most likely place for a problem to occur is in uvideo.c, where
> control data gets packed/unpacked to/from structs that go to USB.
>
> Could you recompile with options UVIDEO_DEBUG and VIDEO_DEBUG, then
> send the relevant portions of dmesg? Those tend to dump a lot of
> descriptor data, which might reveal any fields that haven't been
> correctly swapped.

Ok. Here comes the debug output when attaching the webcam:

---8<---
uvideo0 at uhub3 port 1 configuration 1 interface 0
: Sonix Technology Co., Ltd. USB 2.0 Camera, rev 2.00/1.00, addr 2
uvideo_attach:   non uvc descriptor len=9 type=0x02
uvideo_attach:   non uvc descriptor len=8 type=0x0b
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x00
bAlternateSetting=0x00 bNumEndpoints=0x01 bInterfaceClass=0x0e
bInterfaceSubClass=0x01 bInterfaceProtocol=0x00 iInterface=0x05
uvideo_attach:   VC Interface Header: Len=13 Type=0x24 Subtype=0x01
bcdUVC=256 wTotalLength=103 dwClockFrequency=15000000 bInCollection=1
uvideo_attach:   VC Output Terminal: Len=9 Type=0x24 Subtype=0x03
bTerminalID=2 wTerminalType=101 bAssocTerminal=0 bSourceID=5 iTerminal=0
uvideo_attach:   VC Extension Unit: Len=26 Type=0x24 Subtype=0x06 bUnitID=4
guidExtensionCode=28F03370-6311-4A2E-BA2C-6890EB334016 bNumControls=8
bNrInPins=1 baSourceIDs=3 bControlSize=1 bmControls=00001111 iExtension=0
uvideo_attach:   VC Extension Unit: Len=26 Type=0x24 Subtype=0x06 bUnitID=5
guidExtensionCode=2812AE3F-BCD7-4E11-A357-6F1EDEF7D61D bNumControls=8
bNrInPins=1 baSourceIDs=4 bControlSize=1 bmControls=11111111 iExtension=0
uvideo_attach:   VC Camera Terminal: Len=18 Type=0x24 Subtype=0x02
bTerminalID=1 wTerminalType=201 bAssocTerminal=0 iTerminal=0
wObjectiveFocalLengthMin/Max=0/0 wOcularFocalLength=0 bControlSize=3
bmControls=00000000-00000000-00000100
uvideo_attach:   VC Processing Unit: Len=11 Type=0x24 Subtype=0x05 bUnitID=3
bSourceID=1 wMaxMultiplier=0 bControlSize=2 bmControls=00000101-00111111
iProcessing=0 bmVideoStandards=00000111
uvideo_attach:   VC Endpoint: Len=7 Type=0x05 bEndpointAddress=0x83
bmAttributes=00000011 wMaxPacketSize=16 bInterval=6
uvideo_attach:   VC Interrupt Endpoint: Len=5 Type=0x25 Subtype=0x03
wMaxTransferSize=16 
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01
bAlternateSetting=0x00 bNumEndpoints=0x00 bInterfaceClass=0x0e
bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Interface Input Header: Len=14 Type=0x24 Subtype=0x01
bNumFormats=1 wTotalLength=323 bEndpointAddress=129 bmInfo=0
bTerminalLink=2 bStillCaptureMethod=2 bTriggerSupport=1 bTriggerUsage=1
bControlSize=1 00000000
uvideo_attach:   VS Format Uncompressed: Len=27 Type=0x24 Subtype=0x04
bFormatIndex=1 bNumFrameDescriptors=5 32595559-00-10-8000-00AA00389B71
bBitsPerPixel=16 bDefaultFrameIndex=1 bAspectRatioX=0 bAspectRatioY=0
bmInterlaceFlags=0x00 bCopyProtect=0
uvideo_attach:   VS Frame Uncompressed: Len=50 Type=0x24 Subtype=0x05
bFrameIndex=1 bmCapabilities=0x00 wWidth=640 wHeight=480
dwMinBitRate=3072000 dwMaxBitRate=18432000 dwMaxVideoFrameBufferSize=614400
dwDefaultFrameInterval=333333 bFrameIntervalType=6
uvideo_attach:   VS Frame Uncompressed: Len=50 Type=0x24 Subtype=0x05
bFrameIndex=2 bmCapabilities=0x00 wWidth=352 wHeight=288
dwMinBitRate=1013760 dwMaxBitRate=6082560 dwMaxVideoFrameBufferSize=202752
dwDefaultFrameInterval=333333 bFrameIntervalType=6
uvideo_attach:   VS Frame Uncompressed: Len=50 Type=0x24 Subtype=0x05
bFrameIndex=3 bmCapabilities=0x00 wWidth=320 wHeight=240
dwMinBitRate=768000 dwMaxBitRate=4608000 dwMaxVideoFrameBufferSize=153600
dwDefaultFrameInterval=333333 bFrameIntervalType=6
uvideo_attach:   VS Frame Uncompressed: Len=50 Type=0x24 Subtype=0x05
bFrameIndex=4 bmCapabilities=0x00 wWidth=176 wHeight=144
dwMinBitRate=253440 dwMaxBitRate=1520640 dwMaxVideoFrameBufferSize=50688
dwDefaultFrameInterval=333333 bFrameIntervalType=6
uvideo_attach:   VS Frame Uncompressed: Len=50 Type=0x24 Subtype=0x05
bFrameIndex=5 bmCapabilities=0x00 wWidth=160 wHeight=120
dwMinBitRate=192000 dwMaxBitRate=1152000 dwMaxVideoFrameBufferSize=38400
dwDefaultFrameInterval=333333 bFrameIntervalType=6
uvideo_attach:   VS unknown cs interface: len=26 type=0x24 subtype=0x03
uvideo_attach:   VS unknown cs interface: len=6 type=0x24 subtype=0x0d
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01
bAlternateSetting=0x01 bNumEndpoints=0x01 bInterfaceClass=0x0e
bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81
bmAttributes=00000101 wMaxPacketSize=128 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01
bAlternateSetting=0x02 bNumEndpoints=0x01 bInterfaceClass=0x0e
bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81
bmAttributes=00000101 wMaxPacketSize=256 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01
bAlternateSetting=0x03 bNumEndpoints=0x01 bInterfaceClass=0x0e
bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81
bmAttributes=00000101 wMaxPacketSize=800 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01
bAlternateSetting=0x04 bNumEndpoints=0x01 bInterfaceClass=0x0e
bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81
bmAttributes=00000101 wMaxPacketSize=2848 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01
bAlternateSetting=0x05 bNumEndpoints=0x01 bInterfaceClass=0x0e
bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81
bmAttributes=00000101 wMaxPacketSize=4896 bInterval=1
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01
bAlternateSetting=0x06 bNumEndpoints=0x01 bInterfaceClass=0x0e
bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Endpoint: Len=7 Type=0x05 bEndpointAddress=0x81
bmAttributes=00000101 wMaxPacketSize=5120 bInterval=1
uvideo_stream_init: probelen=34
uvideo: Adding pixel format 1
uvideo: found format (index 1) type 1 size 640x480 size 614400 stride 1280
interval 333333
^ picking this one
uvideo: found format (index 2) type 1 size 352x288 size 202752 stride 704
interval 333333
uvideo: found format (index 3) type 1 size 320x240 size 153600 stride 640
interval 333333
uvideo: found format (index 4) type 1 size 176x144 size 50688 stride 352
interval 333333
uvideo: found format (index 5) type 1 size 160x120 size 38400 stride 320
interval 333333
uvideo: unimplemented VS CS descriptor len=26 type=0x24 subtype=0x03
uvideo: unimplemented VS CS descriptor len=6 type=0x24 subtype=0x0d
uvideo_attach: ISOC stream *
video_match: hw=0x526520
video0 at uvideo0video_print: pnp is NULL
: Sonix Technology Co., Ltd. USB 2.0 Camera, rev 2.00/1.00, addr 2
video_attach: sc=0xd54b7c08 hwif=0x526520
uvideo_attach: attached video driver at 0xd54bec08
---8<---


And this happens while streaming video (or green stripes ;)
---8<---
videoopen
videoopen: flags=0x3 sc=0xd54b7c08 parent=0xd54b9d10
uvideo_open: sc=0xd54acb08
uvideo_set_format: sc=0xd54acb08
uvideo_set_format: committing to format: bmHint=0x0000 bFormatIndex=1
bFrameIndex=1 dwFrameInterval=333333 wKeyFrameRate=0 wPFrameRate=0
wCompQuality=0 wCompWindowSize=0 wDelay=55701 dwMaxVideoFrameSize=614400
dwMaxPayloadTransferSize=3072 dwClockFrequency=349928768 bmFramingInfo=0x34
bPreferedVersion=4 bMinVersion=228 bMaxVersion=236
uvideo_set_format: pixeltype is 1
uvideo_set_format: sc=0xd54acb08
uvideo_set_format: committing to format: bmHint=0x0000 bFormatIndex=1
bFrameIndex=1 dwFrameInterval=333333 wKeyFrameRate=0 wPFrameRate=0
wCompQuality=0 wCompWindowSize=0 wDelay=55701 dwMaxVideoFrameSize=614400
dwMaxPayloadTransferSize=3072 dwClockFrequency=349928768 bmFramingInfo=0x34
bPreferedVersion=4 bMinVersion=228 bMaxVersion=236
uvideo_set_format: pixeltype is 1
video: unknown v4l2 pixel format 842094169
uvideo_set_format: sc=0xd54acb08
uvideo: uvideo_stream_guess_format couldn't find 640x480 format 0
uvideo_set_format: sc=0xd54acb08
uvideo: uvideo_stream_guess_format couldn't find 640x480 format 6
uvideo_set_format: sc=0xd54acb08
uvideo: uvideo_stream_guess_format couldn't find 640x480 format 8
uvideo_set_format: sc=0xd54acb08
uvideo_set_format: committing to format: bmHint=0x0000 bFormatIndex=1
bFrameIndex=1 dwFrameInterval=333333 wKeyFrameRate=0 wPFrameRate=0
wCompQuality=0 wCompWindowSize=0 wDelay=55701 dwMaxVideoFrameSize=614400
dwMaxPayloadTransferSize=3072 dwClockFrequency=349928768 bmFramingInfo=0x34
bPreferedVersion=4 bMinVersion=228 bMaxVersion=236
uvideo_set_format: pixeltype is 1
uvideo_stream_start_xfer: choosing alternate interface 6 wMaxPacketSize=3072
bInterval=1
uvideo_stream_start_xfer: nframes=200
---8<---

-- 
Frank Wille



Home | Main Index | Thread Index | Old Index