All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] uvc: update uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS devices
@ 2014-01-24 21:17 Thomas Pugliese
  2014-01-26 23:12 ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Pugliese @ 2014-01-24 21:17 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, Thomas Pugliese

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>
---
 drivers/media/usb/uvc/uvc_video.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 898c208..103cd4e 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/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;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-04-17 21:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24 21:17 [PATCH] uvc: update uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS devices Thomas Pugliese
2014-01-26 23:12 ` Laurent Pinchart
2014-01-27 15:54   ` Thomas Pugliese
2014-01-27 21:49     ` Laurent Pinchart
2014-04-15  2:07       ` Thomas Pugliese
2014-04-15 15:16         ` Laurent Pinchart
2014-04-15 21:45           ` Thomas Pugliese
2014-04-16 11:06             ` Laurent Pinchart
2014-04-16 17:29               ` Thomas Pugliese
2014-04-17 14:34                 ` Laurent Pinchart
2014-04-17 14:53                   ` Thomas Pugliese
2014-04-17 21:59                     ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.