From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thomas Pugliese <thomas.pugliese@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] uvc: update uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS devices
Date: Mon, 27 Jan 2014 00:12:59 +0100 [thread overview]
Message-ID: <8041079.da1zLPkO88@avalon> (raw)
In-Reply-To: <1390598248-343-1-git-send-email-thomas.pugliese@gmail.com>
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@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;
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-01-26 23:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8041079.da1zLPkO88@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=thomas.pugliese@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox