On Mon, Jun 25, 2018 at 11:59:46AM +0200, Martin Pieuchot wrote:
> On 24/06/18(Sun) 14:15, Landry Breuil wrote:
> > Hi,
> > 
> > the logitech c310 is supported by uvideo, but its uaudio fails to
> > attach properly and fallbacks to ugen.
> > 

<snip>

> > from that point, i dunno if my analysis is wrong or right, nor how to
> > properly handle it, so here's my take:
> > - add a UAUDIO_FLAG_BAD_ADC_LEN quirk
> > - set it for the c310 vendor/product
> > - if the device matches this quirk, aclen++
> > 
> > feedback or better ideas welcome :)
> 
> Did you look at how other OSes deal with that problem?  Maybe you'll
> find a more generic hack.

I've looked on bxr.su but it seems netbsd and freebsd don't have the
c310 in their usbdevs, and https://wiki.freebsd.org/WebcamCompat
mentions it needing this strange 'usbconfig -d ugenX.Y do_request' hack.

afaict, netbsd uses more or less our logic (cf
http://bxr.su/NetBSD/sys/dev/usb/uaudio.c#1914, iirc our uaudio comes
from it)

freebsd has a 5000+ lines uaudio.c in
http://bxr.su/FreeBSD/sys/dev/sound/usb/uaudio.c#955 and i didnt see
support for such specific case.

> If you don't find any better solution, I'd suggest using a device ID
> check rather than adding a quirk.  Because such quirk cannot be generic.
> In that case you have an off-by-one, but another device might have a
> different problem.

That was in the case we'd encounter other devices where the descriptor
is bogus and has the same issue, but i agree this is unlikely.

So checking for USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_WEBCAMC310,
maybe the device revision, and eventually checking if the advertised
size is 38 ?

Landry

Reply via email to