[Bug 207045] uvcvideo: Realtek USB Camera (0bda:579f) reports wrong dwMaxVideoFrameSize

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=207045

--- Comment #1 from Julian Meyer (jucmeyer@xxxxxxxx) ---
Narrowing this issue further, it seems that if the max video frame size is less
than the max video transfer size, it works, but if it's over the max video
transfer size, it does not work:

WORKING (low res)
-------

bmHint                         0x01
bFormatIndex                      1
bFrameIndex                       3
dwFrameInterval              333333
wKeyFrameRate                     0
wPFrameRate                       0
wCompQuality                      0
wCompWindowSize                   0
wDelay                           32
dwMaxVideoFrameSize           50688
dwMaxPayloadTransferSize     129024


NOT WORKING (high res)
-----------
bmHint                         0x01
bFormatIndex                      1
bFrameIndex                       1
dwFrameInterval              333333
wKeyFrameRate                     0
wPFrameRate                       0
wCompQuality                      0
wCompWindowSize                   0
wDelay                           32
dwMaxVideoFrameSize          614400
dwMaxPayloadTransferSize     119296

In the non-working case, first, I see this in the log when it gets set up:

[41790.164920] uvcvideo: Allocated 5 URB buffers of 32x512 bytes each.

I'm not sure why it's 5, but we know that each URB buffer is 16384 bytes large
and then I see this message in the log a bunch:

[41790.355807] uvcvideo: payload size is: 131072, max is: 119296

My guess here is that it's sending dwMaxVideoFrameSize and assuming that is the
dwMaxPayloadTransferSize. So, it tries to send 614400 in a single payload (not
sure about the terminology here), but the buffer is only 119296 bytes large.

This means that it would not work if the max video frame size is greater than
the max payload transfer size (buffer "overflows" and UVC assumes it's the end
of the frame), but it would work if the maxVideoFrameSize is smaller than
dwMaxPayloadTransferSize.

Also, it makes sense because if I run it at a high resolution, the bottom 1/3
of the picture is cut off/corrupted whereas the top part is just fine. In this
case, dwMaxVideoFrameSize is probably about 30% larger than
dwMaxPayloadTransferSize.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux