Re: gspca, audio and ov534: regression.

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

 



On Wed, 6 Oct 2010 16:04:41 +0200
Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx> wrote:

> Thanks, the following change fixes it, was this what you had in mind?
> 
> diff --git a/drivers/media/video/gspca/gspca.c
> b/drivers/media/video/gspca/gspca.c index b984610..30e0b32 100644
> --- a/drivers/media/video/gspca/gspca.c
> +++ b/drivers/media/video/gspca/gspca.c
> @@ -651,7 +651,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 && !gspca_dev->cam.bulk)
>                         i++;
>                 while (++i < gspca_dev->nbalt) {
>                         ep = alt_xfer(&intf->altsetting[i], xfer);
> @@ -659,7 +659,7 @@ static struct usb_host_endpoint *get_ep(struct
> gspca_dev *gspca_dev) break;
>                 }
>         } else {
> -               if (gspca_dev->audio)
> +               if (gspca_dev->audio && !gspca_dev->cam.bulk)
>                         i--;
>                 while (--i >= 0) {
>                         ep = alt_xfer(&intf->altsetting[i], xfer);

Yes, but, after thought, as there is only one alternate setting, the
tests could be:
	if (gspca_dev->audio && i < gspca_dev->nbalt - 1)
and
	if (gspca_dev->audio && i > 0)

This should work also for isochronous transfers.

regards.

-- 
Ken ar c'hentaÃ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
--
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