[linux-uvc-devel] Logitech C930e UVC 1.5 / H264 webcam
Linux UVC driver and tools
Brought to you by:
pinchartl
From: Damiano A. <dam...@gm...> - 2021-12-20 21:03:48
|
Hello, I've been the owner of a Logitech C930e for many years now, and it does work well on Linux in terms of "basic" webcam functionality. But I've always found it a bit of a shame that I can't use the features I originally bought it for: namely UVC 1.5 and H264. And not mentioning SVC either... To be honest, this particular model is a tricky one as far as I can see. This is for example what *lsusb* reports out the box: > Bus 002 Device 011: ID 046d:0843 Logitech, Inc. Webcam C930e > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.00 > bDeviceClass 239 Miscellaneous Device > bDeviceSubClass 2 > bDeviceProtocol 1 Interface Association > bMaxPacketSize0 64 > idVendor 0x046d Logitech, Inc. > idProduct 0x0843 Webcam C930e > bcdDevice 0.13 > iManufacturer 0 > iProduct 2 > iSerial 1 > *bNumConfigurations 1* > Configuration Descriptor: > ... Actually, that's not quite true: this webcam supports 2 configurations! That's what I found when I sniffed USB traffic on a Windows 10 machine. The first configuration mentions UVC 1.0 and uncompressed / MJPEG streams. But the second configuration reveals the "treasure": UVC 1.5 and uncompressed / MJPEG / H264 streams. I couldn't find an official way to override bNumConfigurations in the Linux USB stack, so I hacked the *usb_get_configuration()* function in *drivers/usb/core/config.c* to falsely report 2 configurations. (Any other suggestions on how to properly implement that?) Quite ugly but it did the job: *lsusb* revealed the second descriptor. For the technical details, see the difference between: - Descriptor 0 on Linux - https://gist.github.com/dalbani/7266379ed93b7b693bb8dd899d18e92b - Descriptor 1 on Windows 10 - https://gist.github.com/dalbani/05432f7ce20b41f2c68ee07ff5f1c7ee Now the question is: where to go from there? The Linux UVC driver doesn't seem to pickup the second descriptor. Probably because probing stops when the first UVC descriptor is found? The logs mention that it is detected as a "UVC 1.00 device" in any case. Let's say we could make the UVC driver use the second descriptor, what functionalities would still be missing to be able to use H264/SVC streams? Thanks for your help! Regards, -- Damiano Albani |