the fidx field of struct uvideo_res is used as the frame index in the video stream probe/commit commands. this must be the bFrameIndex value from the frame descriptor, not the index of the frame descriptor in our software array of frame descriptors. although the uvc spec implies that the numbers should be interchangable, there is hardware where this is not the case. this makes the Kodak/PixArt S100 work at 640x480.
ok? -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org Index: uvideo.c =================================================================== RCS file: /cvs/src/sys/dev/usb/uvideo.c,v retrieving revision 1.142 diff -u -p uvideo.c --- uvideo.c 9 Oct 2010 09:48:03 -0000 1.142 +++ uvideo.c 15 Oct 2010 19:04:56 -0000 @@ -1339,7 +1339,7 @@ uvideo_find_res(struct uvideo_softc *sc, int idx, int diff_best = diff; r->width = w; r->height = h; - r->fidx = i; + r->fidx = sc->sc_fmtgrp[idx].frame[i]->bFrameIndex; } DPRINTF(1, "%s: %s: frame index %d: width=%d, height=%d\n", DEVNAME(sc), __func__, i, w, h);