public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Question about USB interface index restriction in gspca
@ 2011-09-13 19:14 Frank Schäfer
  2011-09-14  6:25 ` Jean-Francois Moine
  0 siblings, 1 reply; 6+ messages in thread
From: Frank Schäfer @ 2011-09-13 19:14 UTC (permalink / raw)
  To: Linux Media Mailing List

Hi,

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;
      ...

Regards,
Frank



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-21  8:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 19:14 Question about USB interface index restriction in gspca Frank Schäfer
2011-09-14  6:25 ` Jean-Francois Moine
2011-09-15 21:46   ` Frank Schäfer
2011-09-16  6:33     ` Jean-Francois Moine
2011-09-19 20:13       ` Frank Schäfer
2011-09-21  8:29         ` Jean-Francois Moine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox