Re: [PATCH] uvc: update uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

Thank you for the patch.

On Friday 24 January 2014 15:17:28 Thomas Pugliese wrote:
> 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.

I'm not too familiar with wireless USB, but shouldn't the value be multiplied 
by bMaxBurst from the endpoint companion descriptor ? Superspeed devices 
provide the multiplied value in their endpoint companion descriptor's 
wBytesPerInterval field, but there's no such field for wireless devices.

Out of curiosity, which device have you tested this with ?

> Signed-off-by: Thomas Pugliese <thomas.pugliese@xxxxxxxxx>
> ---
>  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;

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux