瀏覽代碼

[media] uvcvideo: Update uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS devices

Isochronous endpoints on devices with speed == USB_SPEED_WIRELESS can
have a max packet size ranging from 1-3584 bytes.  Add a case to
uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS.  Otherwise endpoints
for those devices will fall to the default case which masks off any
values > 2047.  This causes uvc_init_video to underestimate the
bandwidth available and fail to find a suitable alt setting for high
bandwidth video streams.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Thomas Pugliese 11 年之前
父節點
當前提交
79af67e77f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/media/usb/uvc/uvc_video.c

+ 3 - 0
drivers/media/usb/uvc/uvc_video.c

@@ -1453,6 +1453,9 @@ static unsigned int uvc_endpoint_max_bpi(struct usb_device *dev,
 	case USB_SPEED_HIGH:
 		psize = usb_endpoint_maxp(&ep->desc);
 		return (psize & 0x07ff) * (1 + ((psize >> 11) & 3));
+	case USB_SPEED_WIRELESS:
+		psize = usb_endpoint_maxp(&ep->desc);
+		return psize;
 	default:
 		psize = usb_endpoint_maxp(&ep->desc);
 		return psize & 0x07ff;