Download raw body.
sys/uvideo: support devices which reports bulk and isochronous endpoints
sys/uvideo: support devices which reports bulk and isochronous endpoints
On Sat, Dec 21, 2024 at 12:35:41AM GMT, Kirill A. Korinsky wrote: > tech@, > > A user send a debug log for Elgato HD60 S+ which reports both UE_BULK > and UE_ISOCHRONOUS endpoints. > > The code selected endpoint with largest bandwidth, but vs->bulk_endpoint > depends on order of endpoints, and the last one is used, not selected one. > > Ok? Yep, nice one. ok mglocker@ > Index: sys/dev/usb/uvideo.c > =================================================================== > RCS file: /home/cvs/src/sys/dev/usb/uvideo.c,v > diff -u -p -r1.228 uvideo.c > --- sys/dev/usb/uvideo.c 14 Dec 2024 09:58:04 -0000 1.228 > +++ sys/dev/usb/uvideo.c 20 Dec 2024 23:26:07 -0000 > @@ -1204,6 +1204,7 @@ uvideo_vs_parse_desc_alt(struct uvideo_s > usb_interface_descriptor_t *id; > usb_endpoint_descriptor_t *ed; > uint8_t ep_dir, ep_type; > + int bulk_endpoint; > > vs = &sc->sc_vs_coll[vs_nr]; > > @@ -1248,9 +1249,9 @@ uvideo_vs_parse_desc_alt(struct uvideo_s > ep_dir = UE_GET_DIR(ed->bEndpointAddress); > ep_type = UE_GET_XFERTYPE(ed->bmAttributes); > if (ep_dir == UE_DIR_IN && ep_type == UE_ISOCHRONOUS) > - vs->bulk_endpoint = 0; > + bulk_endpoint = 0; > else if (ep_dir == UE_DIR_IN && ep_type == UE_BULK) > - vs->bulk_endpoint = 1; > + bulk_endpoint = 1; > else > goto next; > > @@ -1262,6 +1263,7 @@ uvideo_vs_parse_desc_alt(struct uvideo_s > vs->curalt = id->bAlternateSetting; > vs->psize = UGETW(ed->wMaxPacketSize); > vs->iface = iface; > + vs->bulk_endpoint = bulk_endpoint; > } > next: > desc = usbd_desc_iter_next(&iter); > > > -- > wbr, Kirill >
sys/uvideo: support devices which reports bulk and isochronous endpoints
sys/uvideo: support devices which reports bulk and isochronous endpoints