diff options
Diffstat (limited to 'drivers/media/usb/uvc/uvc_video.c')
| -rw-r--r-- | drivers/media/usb/uvc/uvc_video.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index 20ccc9d315dc..f839654ea436 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c | |||
| @@ -119,6 +119,14 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, | |||
| 119 | ctrl->dwMaxVideoFrameSize = | 119 | ctrl->dwMaxVideoFrameSize = |
| 120 | frame->dwMaxVideoFrameBufferSize; | 120 | frame->dwMaxVideoFrameBufferSize; |
| 121 | 121 | ||
| 122 | /* The "TOSHIBA Web Camera - 5M" Chicony device (04f2:b50b) seems to | ||
| 123 | * compute the bandwidth on 16 bits and erroneously sign-extend it to | ||
| 124 | * 32 bits, resulting in a huge bandwidth value. Detect and fix that | ||
| 125 | * condition by setting the 16 MSBs to 0 when they're all equal to 1. | ||
| 126 | */ | ||
| 127 | if ((ctrl->dwMaxPayloadTransferSize & 0xffff0000) == 0xffff0000) | ||
| 128 | ctrl->dwMaxPayloadTransferSize &= ~0xffff0000; | ||
| 129 | |||
| 122 | if (!(format->flags & UVC_FMT_FLAG_COMPRESSED) && | 130 | if (!(format->flags & UVC_FMT_FLAG_COMPRESSED) && |
| 123 | stream->dev->quirks & UVC_QUIRK_FIX_BANDWIDTH && | 131 | stream->dev->quirks & UVC_QUIRK_FIX_BANDWIDTH && |
| 124 | stream->intf->num_altsetting > 1) { | 132 | stream->intf->num_altsetting > 1) { |
