From bc8efbdfb02702b7d947cce0a111260351322b4c Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Thu, 28 Oct 2021 10:03:00 +0200 Subject: [PATCH] driver/usbvideodriver: add support for newer C920 Webcam This supports only raw and jpeg capture. Signed-off-by: Jan Luebbe --- labgrid/driver/usbvideodriver.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/labgrid/driver/usbvideodriver.py b/labgrid/driver/usbvideodriver.py index 1b8287aa6..ce3e48d54 100644 --- a/labgrid/driver/usbvideodriver.py +++ b/labgrid/driver/usbvideodriver.py @@ -28,6 +28,12 @@ def get_qualities(self): ("mid", "image/jpeg,width=1280,height=720,framerate=15/2"), ("high", "image/jpeg,width=1920,height=1080,framerate=10/1"), ]) + if match == (0x046d, 0x08e5): # Logitech HD Pro Webcam C920 + return ("mid", [ + ("low", "image/jpeg,width=640,height=360,framerate=5/1"), + ("mid", "image/jpeg,width=1280,height=720,framerate=15/2"), + ("high", "image/jpeg,width=1920,height=1080,framerate=10/1"), + ]) if match == (0x534d, 0x2109): # MacroSilicon return ("mid", [ ("low", "image/jpeg,width=720,height=480,framerate=10/1"), @@ -54,6 +60,9 @@ def get_pipeline(self, path, caps, controls=None): elif match == (0x046d, 0x0892): controls = controls or "focus_auto=1" inner = None + elif match == (0x046d, 0x08e5): + controls = controls or "focus_auto=1" + inner = None elif match == (0x534d, 0x2109): inner = None # just forward the jpeg frames else: