diff options
author | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-11-13 22:11:14 +0000 |
---|---|---|
committer | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-11-13 22:11:14 +0000 |
commit | 67420a0bf6dd027538d6c98fc4bba9a05dc34efa (patch) | |
tree | ca2a1f8a52bc3458d826641197f2e3b532c2fa0e /sys/src | |
parent | 57f250ad421537aa6bfdd9a82500fa9fd9cb366e (diff) |
nusb/cam: take max payload transfer size into account when selecting for bandwidth
This fixed frames (usually) filled with green color because
of the wrong alt settings used before.
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/nusb/cam/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/nusb/cam/video.c b/sys/src/cmd/nusb/cam/video.c index 2fafb7f04..bd971dc0e 100644 --- a/sys/src/cmd/nusb/cam/video.c +++ b/sys/src/cmd/nusb/cam/video.c @@ -213,7 +213,7 @@ selbw(Cam *c, ProbeControl *pc, Ep *ep) if(ep->iface->id != c->iface->id) continue; bw1 = ep->maxpkt * ep->ntds * 8 * 1000 * 8; - if(bw1 >= bw) { + if(bw1 >= bw && GET4(c->pc.dwMaxPayloadTransferSize) <= ep->maxpkt*ep->ntds) { if(mink == nil || bw1 < minbw){ mink = ep; minbw = bw1; |