提交 4807063f 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

[media] uvcvideo: Fix alternate setting selection

The alternate setting number is not equal to the alternate setting index
in the interface alternate settings table. Use the alternate setting
number from the interface descriptor when calling usb_set_interface().
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMing Lei <ming.lei@canonical.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 c854a48a
......@@ -1598,7 +1598,7 @@ static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags)
psize = le16_to_cpu(ep->desc.wMaxPacketSize);
psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3));
if (psize >= bandwidth && psize <= best_psize) {
altsetting = i;
altsetting = alts->desc.bAlternateSetting;
best_psize = psize;
best_ep = ep;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册