From: bugzilla-daemon@bugzilla.kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 207045] uvcvideo: Realtek USB Camera (0bda:579f) reports wrong dwMaxVideoFrameSize
Date: Wed, 01 Apr 2020 15:31:07 +0000 [thread overview]
Message-ID: <bug-207045-208809-UVQ2hOcQWr@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-207045-208809@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=207045
--- Comment #1 from Julian Meyer (jucmeyer@ucsc.edu) ---
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.
next prev parent reply other threads:[~2020-04-01 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 22:11 [Bug 207045] New: uvcvideo: Realtek USB Camera (0bda:579f) reports wrong dwMaxVideoFrameSize bugzilla-daemon
2020-04-01 15:31 ` bugzilla-daemon [this message]
2020-04-01 22:34 ` [Bug 207045] uvcvideo: Realtek USB Camera (0bda:579f) sends UVC payloads in middle of URB bugzilla-daemon
2020-04-02 2:09 ` [Bug 207045] uvcvideo: properly handle UVC payloads that occur in the middle of bulk URBs bugzilla-daemon
2020-10-27 14:49 ` bugzilla-daemon
2020-11-20 14:50 ` bugzilla-daemon
2020-11-20 16:45 ` bugzilla-daemon
2020-11-25 23:00 ` bugzilla-daemon
2021-01-24 22:30 ` bugzilla-daemon
2021-03-02 14:58 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-207045-208809-UVQ2hOcQWr@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).