Hi, since firefox 78, video(4) devices arent detected anymore. Upstream added code in https://bugzilla.mozilla.org/show_bug.cgi?id=1637319 to check for the V4L2_CAP_VIDEO_CAPTURE capacity, and the code added in https://hg.mozilla.org/integration/autoland/rev/33facf191f23 checks for that in the 'device_caps' field of v4l2_capability struct.
problem is, we only set the 'capabilities' field in uvideo(4). Looking at the linux doc in https://www.kernel.org/doc/html/v4.14/media/uapi/v4l/vidioc-querycap.html#description, both fields are used to distinguish multiple devices created by the same driver. We dont have such a feature, but still, 'device_caps' should/could be filled for compatibility ? The utvfu(4) driver apparently does it this way: https://github.com/openbsd/src/blob/master/sys/dev/usb/utvfu.c#L490 so let's just do the same in uvideo(4). With this diff, i can use my webcam again from firefox 78. No apparent difference in lsusb -vv. ok ? Landry Index: usb/uvideo.c =================================================================== RCS file: /cvs/src/sys/dev/usb/uvideo.c,v retrieving revision 1.207 diff -u -r1.207 uvideo.c --- usb/uvideo.c 30 May 2020 09:01:04 -0000 1.207 +++ usb/uvideo.c 4 Jul 2020 15:00:14 -0000 @@ -2942,9 +2942,10 @@ strlcpy(caps->bus_info, "usb", sizeof(caps->bus_info)); caps->version = 1; - caps->capabilities = V4L2_CAP_VIDEO_CAPTURE + caps->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | V4L2_CAP_READWRITE; + caps->capabilities = caps->device_caps | V4L2_CAP_DEVICE_CAPS; return (0); }
