Re: Question about USB interface index restriction in gspca

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

 



On Tue, 13 Sep 2011 21:14:28 +0200
Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx> wrote:

> I have a question about the following code in gspca.c:
> 
> in function gspca_dev_probe(...):
>      ...
>      /* the USB video interface must be the first one */
>      if (dev->config->desc.bNumInterfaces != 1
> && intf->cur_altsetting->desc.bInterfaceNumber != 0)
>              return -ENODEV;
>      ...
> 
> Is there a special reason for not allowing devices with USB interface 
> index > 0 for video ?
> I'm experimenting with a device that has the video interface at index 3 
> and two audio interfaces at index 0 and 1 (index two is missing !).
> And the follow-up question: can we assume that all device handled by the 
> gspca-driver have vendor specific video interfaces ?
> Then we could change the code to
> 
>      ...
>      /* the USB video interface must be of class vendor */
>      if (intf->cur_altsetting->desc.bInterfaceClass != 
> USB_CLASS_VENDOR_SPEC)
>              return -ENODEV;
>       ...

Hi Frank,

For webcam devices, the interface class is meaningful only when set to
USB_CLASS_VIDEO (UVC). Otherwise, I saw many different values.

For video on a particular interface, the subdriver must call the
function gspca_dev_probe2() as this is done in spca1528 and xirlink_cit.

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