mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-21 13:00:44 +09:00
gspca - main: Fix a regression with the PS3 Eye webcam
commit f43402fa55 upstream.
When audio is present, some alternate settings were skipped.
This prevented some webcams to work, especially when bulk transfer was used.
This patch permits to use the last or only alternate setting.
Reported-by: Antonio Ospite <ospite@studenti.unina.it>
Tested-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7a2813e196
commit
f553d481ae
@@ -652,7 +652,7 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev)
|
||||
: USB_ENDPOINT_XFER_ISOC;
|
||||
i = gspca_dev->alt; /* previous alt setting */
|
||||
if (gspca_dev->cam.reverse_alts) {
|
||||
if (gspca_dev->audio)
|
||||
if (gspca_dev->audio && i < gspca_dev->nbalt - 2)
|
||||
i++;
|
||||
while (++i < gspca_dev->nbalt) {
|
||||
ep = alt_xfer(&intf->altsetting[i], xfer);
|
||||
@@ -660,7 +660,7 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (gspca_dev->audio)
|
||||
if (gspca_dev->audio && i > 1)
|
||||
i--;
|
||||
while (--i >= 0) {
|
||||
ep = alt_xfer(&intf->altsetting[i], xfer);
|
||||
|
||||
Reference in New Issue
Block a user