From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAF65C54EE9 for ; Tue, 20 Sep 2022 14:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231510AbiITOIh (ORCPT ); Tue, 20 Sep 2022 10:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbiITOIb (ORCPT ); Tue, 20 Sep 2022 10:08:31 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37D6F5465D for ; Tue, 20 Sep 2022 07:08:29 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id y3so6509709ejc.1 for ; Tue, 20 Sep 2022 07:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=GNRZeqqBofwFFgvrtZo64pHwe4vN8QcPuwanc3P7m18=; b=dnl1UAEIow118xOMF3d6RV2uDS3Ampdbfn1MZ3MdrPkxuKps/M901LSwgUR2f7gSnx Aqs9MQURHmRNMKI3ptqiA5ssM3VAnUCI2/E+Gqnc9KxiVfJ7pqRU6QsdWr5LYXTyvyVS avsZfKcyJwxWSCWuBvLqgXVSUib0DJUHZ5MBY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=GNRZeqqBofwFFgvrtZo64pHwe4vN8QcPuwanc3P7m18=; b=LMmITFUUC9/bXfDe0l/NuC4+DBl8Pproz1ykPwRK5wcFReNATrsL8LYnw3mtOf0lEs 02zf0juLXyDOfyZ4EaDCuyi1JszKNPh2LCUs5+IAIeSYR7Xydi8KLwOxXz7d4nfK5gCk O2u5pBYG1i+lGjr/eG7gTZ76qJb+OknzgA73+g1/6OGZiNo/lyHLYpRY0v+fwdxcx/0b SyT8iMhFJ3xCUz2JRVGB+gs56t/S6dwKe1Wi56fuxlvgaOflxBTpLxMp5Yp0UHONyYqh yK082r4zcR7nHxx3GS2zDobDlpbJcq359JLg4z5BC5xpOzsYboDemI6q6gUqqQvxKwv5 Bsjg== X-Gm-Message-State: ACrzQf0smpXrRy9cV/mojiIbdlt2Tjh32Aw5KuAJMvik/sH9GeIkruEZ etkxRxFnTT2JK2ODKvxZrIc0nw== X-Google-Smtp-Source: AMsMyM5NcNM0Hllkv6SuG/1QMVy1P2GJGEUX/BF/5aVADEeqmQHmsphKLxgXR1Wte8bFdAGpZWm95A== X-Received: by 2002:a17:907:3f09:b0:780:330d:d907 with SMTP id hq9-20020a1709073f0900b00780330dd907mr17967603ejc.23.1663682907241; Tue, 20 Sep 2022 07:08:27 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:26 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:07 +0200 Subject: [PATCH v1 1/8] media: uvc: Extend documentation of uvc_video_clock_decode() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-1-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=962; i=ribalda@chromium.org; h=from:subject:message-id; bh=HA7gMmyIlso0y4JghGpn78Jy/w8ZP1mfGIQm1eY7vlA=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclLuC0+GprVRxBvAJv8LhmrYKAks0uKapIO0d7+ k/bas+eJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJSwAKCRDRN9E+zzrEiK66D/ 0eAwIh96q1kC3kaW1GM7CZDtt98KXc5Fyz2oK4QdJdaRA2/zxVxQ3lnLFw6cvs/XI4nawjYU4prYEt b6gYhY7vPvLyoWbigdRjcwSxxj9Bn9B+p34lMimLLV+sTw0MVlDdf84xLmSxeFffg+89JaJl62Cs+o Gc3notu6stl92B4UP6bsueh/XsifvFj/EqGYO5crJBUawtuF2CHrJomFRvNfmul72kockWrm12nFSS nmga38/SDIz+IyubUOfV1feuhA/VC/Q45Lith1ezwQNgUFCLPcAVJ6hQj+DeWnWL0sJQyV73NwO3yq tRgZaHwHz/VjBBQ8IpVB7e38+a4v+mQILoO58jRaT/NYeHqLS9HpA4DoyyrxlCdxw6sFAsi11CZ6GX HkwdVX2A7CBgEQGXfjHLsYjWoy0kP/EDlECWDtoCwVx2eWO/gKPopJI7rzY+j2GLPRgqNyPKJHK5zI 83WXnMdvWu2RgBRsO8BFonmUgEl1Gka2T4/g2l0HgSJTYcHxDLuGX0yDNqDBltuKJIlREgyz6AoeO3 CptJ/WVpT6rEE04NDCvX5xXe0Ze/zP7C9rHkegbbj7epu7TC+f/n0LglqBG9ousJZTb78lmoOlcqKz pPtsHvkicSFlDeD6F/qKk6kCuxYkHQr2CxPb39ALNuFQrcXI7wFXqOAu37rg== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make a explicit reference to uvc 1.5, explaining how the algorithm supports the different behaviour of uvc 1.1 and 1.5. Tested-by: hn.chen Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index 170a008f4006..ab56e65ca324 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -517,6 +517,9 @@ uvc_video_clock_decode(struct uvc_streaming *stream, st= ruct uvc_buffer *buf, /* * To limit the amount of data, drop SCRs with an SOF identical to the * previous one. + * This filtering is also needed for supporting UVC 1.5. Where all the + * data packages of the same frame contains the same sof. In that case + * only the first one will match the host_sof. */ dev_sof =3D get_unaligned_le16(&data[header_size - 2]); if (dev_sof =3D=3D stream->clock.last_sof) --=20 b4 0.11.0-dev-d93f8 From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99A7CC6FA90 for ; Tue, 20 Sep 2022 14:08:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231532AbiITOIr (ORCPT ); Tue, 20 Sep 2022 10:08:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbiITOId (ORCPT ); Tue, 20 Sep 2022 10:08:33 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4AB457274 for ; Tue, 20 Sep 2022 07:08:30 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id r18so6391738eja.11 for ; Tue, 20 Sep 2022 07:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=L+YXSruL8FZXKkluNVYHxY4b4v+zabzmrYEwgelER8o=; b=jLhG91LTt3NbAgXp8TrnzBdO/e978j4vjVG6AHEceU6M4C7BJdCPH1ghLlLN4PJF+H 8r7dPO/6e0oBCRGeUJKhaSBU95zlOTsFaSUrl7TPkQ19dZIOk5r90huzhehGVjssoyMn Oc43BGp2HhEbve9XtZsiDWU3aXeZaxiHJIiEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=L+YXSruL8FZXKkluNVYHxY4b4v+zabzmrYEwgelER8o=; b=Yv1cIJBSW4VpT63PGymw5uzp9ZMlnGYYGYOqky8IqE6An3mK3qxb8pGA342dylpCm7 kWY1uA80DQ+EnZqCT54ywJiglqnKD8db8ielK99mmd4O0C8a06OZCt7+UCe64USEjoV8 p9U9L43iHClyNqXXAbK/Pe+ic0adu0JyQZiDg3hXRRFWHXyrpxErYNmFXWfiMr0pEYlm yhEnT+G9H3StLy4uKAQ9nADi881N0HvW/hHxfg0o5eU7oOnLm/oRjFYr1WJtuecj2/jE ZAqW2PH1rrnrI0l2qm4CrpsMgh69amC9Ps72m1s+5nhTtdxjdL7ogZJmPvaa8M0UQ33d h+RQ== X-Gm-Message-State: ACrzQf0aGU0iPgjpCf12yk0qxP4pKR2ws8vaCrm6mxeEeFrj2u5Q3IaK 2fp3xMtYgNZnoUL5+w5fdCAZxj7gjJL29yLwhVk= X-Google-Smtp-Source: AMsMyM7jwon6ecxE7NfNiosUmO0/077D8sLx6myf2Iq2py+mmFDrAXVRIF/KlIaZRTTQ0lO7e09XKg== X-Received: by 2002:a17:907:94c9:b0:781:316c:755e with SMTP id dn9-20020a17090794c900b00781316c755emr9029571ejc.749.1663682909106; Tue, 20 Sep 2022 07:08:29 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:28 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:08 +0200 Subject: [PATCH v1 2/8] media: uvc: Allow quirking by entity guid MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-2-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1645; i=ribalda@chromium.org; h=from:subject:message-id; bh=xw2dHHXml1PIJfr+b0l5YFAoO7vYI8kJa5F3mUvTDDE=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclNlN/M2/uzNrk1dLEasraRExVc/PHIaHyxNNab 6gs57eeJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJTQAKCRDRN9E+zzrEiJLKD/ 0TxLIsGVcYtl/NZJTBqh+6CiPU0BLBb/KSqIrT2cJ7n2j1tdyFURkMHE6nx8ygSjlaIhJh6uhTwa/I QeMvxKp1CXa66K7vZ4Xz1bLxNmtgj8pI1nFzVL9N79T65JipilQIQfHFyKfvveAXNDDHvcXUZhznd7 lRfjbOb6TEo5fve8hON8hcjDdQ6vOEWMzyUrQqSEj7eNHXyQT6MQIJZyqANLlrfGVVjs0mrF3eukOT 68rgjP51ueB6NNhwmur7IonIw7j1YMZC99QN2KDZoSKx9xjixMO0a6YxY5R4bDl7WeWsNpIjsr2Oxh VZOixCy0pdcHbR3vfPJWn82Q71Ed+uIa2HMLXSh0+2gZhEhPhm8Sg8JMkFfyuCi6ZqNp3s0EHN3lgB e+OKXtOsKGH8ggy9T1bt2w9kfVT4TgyBZQL8hRvfjnz/wh1Y6W4iKhnq8hmUc3p0sRboiReXYED0+A nuSbtYrID+VsQ7t4HMqmeVRUPCTmITgPvnoLYr/WqaO2iCH91o4mVIGGPxsCDFwLiZhKvarQ296net /nIIHwie6eawv6mjC0ckXHe5jdvfkqgzc4RSEAmjj7Lx0XoiOvzaQnWr5m7RhIzmK5MBvQ/VGTGKqo ahBoeeKgZmHIEqCQpQ/+4sZUixPJbm9TmYEX/oOcKFYdTlJ4L86pDPdlAeWA== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When an IP is shared by multiple devices its erratas will be shared by all of them. Instead of creating a long list of device quirks, or waiting for the users to report errors in their hardware lets add a routine to add quirks based on the entity guid. Tested-by: hn.chen Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc= _driver.c index 9c05776f11d1..c63ecfd4617d 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1493,6 +1493,28 @@ static int uvc_parse_control(struct uvc_device *dev) return 0; } =20 +static const struct uvc_entity_quirk { + u8 guid[16]; + u32 quirks; +} uvc_entity_quirk[] =3D { +}; + +static void uvc_entity_quirks(struct uvc_device *dev) +{ + struct uvc_entity *entity; + int i; + + list_for_each_entry(entity, &dev->entities, list) { + for (i =3D 0; i < ARRAY_SIZE(uvc_entity_quirk); i++) { + if (memcmp(entity->guid, uvc_entity_quirk[i].guid, + sizeof(entity->guid)) =3D=3D 0) { + dev->quirks |=3D uvc_entity_quirk[i].quirks; + break; + } + } + } +} + /* -----------------------------------------------------------------------= ------ * Privacy GPIO */ @@ -2452,6 +2474,9 @@ static int uvc_probe(struct usb_interface *intf, goto error; } =20 + /* Apply entity based quirks */ + uvc_entity_quirks(dev); + dev_info(&dev->udev->dev, "Found UVC %u.%02x device %s (%04x:%04x)\n", dev->uvc_version >> 8, dev->uvc_version & 0xff, udev->product ? udev->product : "", --=20 b4 0.11.0-dev-d93f8 From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF8B0C54EE9 for ; Tue, 20 Sep 2022 14:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231577AbiITOIw (ORCPT ); Tue, 20 Sep 2022 10:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230515AbiITOId (ORCPT ); Tue, 20 Sep 2022 10:08:33 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED49557E3D for ; Tue, 20 Sep 2022 07:08:30 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id l14so6441085eja.7 for ; Tue, 20 Sep 2022 07:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=p6VhhvjRu0kK7K1Hcnt66imAt+uopG+auRNJJJNMyOY=; b=CJsiqSTfMdfC7jQHgYXCN+C4as3ChCCL+3/PsNJJU0SwHyNnYpb5DMzKtdxvreeIMX OJuoWX6zpmgy5pBj3YuJavTlMgGY9ig+B30MLBTBwVnpx9IzTBeFThnBSa7Gmsj8eq+R jHfwBXqxcyQuEJuTLM3TjOZq0JCj3D9JFlKh4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=p6VhhvjRu0kK7K1Hcnt66imAt+uopG+auRNJJJNMyOY=; b=1z8TKBdjNHNO6u3gCFcPjc8lbp28KB7abrD1y1wiCyPxLbNUY7hW926e+t+c76v7y4 sYXextjslc80lWTlxb7TLU6QFi5U3Ir4TjPdE5cBzgTzej2YO0I1meHcfYHY9lFLhc77 32+v+WF9EiAZ52sknBnI814eVgpAGTp00MixLfTRJaN2MJk5DHqQ9px/0iklJeuGG7K3 EQafp9Z7ooRcGWr/mzmigh1RpaqS6OKqZlvMfwZNPNMH+20rU5tW+tf7Qhi+9DDgExmz LzanYnSr7Yed8zaddW2PGpUxKRG2moLnwVSrcpWR4wYFnTPw3hOhesnitsQAJj5ATOPX iCuA== X-Gm-Message-State: ACrzQf2WBrP8sm30oiqPqaOJ5QCFHjWcu1Ib53VkD6pSdTl4EEff1dT+ mWmLbTrbgtfo4jDA5r6rOZMJnXBuEPrPalMWmQg= X-Google-Smtp-Source: AMsMyM4iT+6qCsM7u6VxivAii1dUx8n1OMlP6yZDc1sGIaV/za1Roa/PTfYtH1jJtFJeUp73C0Qa2g== X-Received: by 2002:a17:907:9610:b0:77b:a7cd:839b with SMTP id gb16-20020a170907961000b0077ba7cd839bmr17379946ejc.60.1663682910391; Tue, 20 Sep 2022 07:08:30 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:29 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:09 +0200 Subject: [PATCH v1 3/8] media: uvc: Create UVC_QUIRK_IGNORE_EMPTY_TS quirk MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-3-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=34637; i=ribalda@chromium.org; h=from:subject:message-id; bh=qf+BX1U2ysQFPEHaekF+yNvYD+9tgnIh4nUntliIbnQ=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclP9kstBm6PLELEAkutsd3Vx4UGCMs7s0fgxI0O HzRmRdqJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJTwAKCRDRN9E+zzrEiA0zEA CGaxKpPCHNMbq6rJtuzH2BGi8mV3p4pBdhulj0yKJyAmN4ywWFwo2XKPHJL1qlyiceFqlIqWuW0xXF qxY8MKqxYG/ddwXCHQSYqn12P/Es7mL6rWyNIrU2pgbeopk+Skb6DB9uLGHTXKPRoYLQv2bwcqeTte Z1n+sTxoQw9997ZPJYIiEGhxVJBPeKuEYMLqHF6Ezn+zLEsRTrZw4UHzBShqhRtBZ3kTlQ+7CuszzY wSs3vfJ66SRkUBRy58CrghWu6x/VO9CegGiPuCyHwt/tQQciHgBuW+4pbVBX+nTDukoSbfAz8ntj7G j1HCAKN0rJqiKQAF0Y/jwZgWGL7Na0mo32GoJtG+PTdSsbGS2SpmmjhP9mwTOFZIXmo/IewiyLj1bt K3vRPWxibAv3b98aWO4P8iOwuzQOl/QoICfPxsKpXIfLfTm0l0+OcSBGQ4AtdjufYeaHuIhxpQqhMY 7TgwGXzHEjpVXTs0/Vs4TliF2TZXS7+XNn4dS9dS8EJA+Nz4qftSImRF29EpOQ7diNCtD5ElIAs8kw uC7vwWtpQlumeZUhrK5ys7okniM2L0/FToSCnwl7rR2HxS07JVDQEab0J0BX2f0HKItlLZ5jKksHPp Gl3npveGARPXWZoBaU7JNzrJKKQahrD3au4+tTvTWCHhW3a066CXjYod5ggg== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some Sunplus cameras took a borderline interpretation of the UVC 1.5 standard, and fill the PTS and SCR fields with invalid data if the package does not contain data. "STC must be captured when the first video data of a video frame is put on the USB bus." Eg: buffer: 0xa7755c00 len 000012 header:0x8c stc 00000000 sof 0000 pts 00000000 buffer: 0xa7755c00 len 000012 header:0x8c stc 00000000 sof 0000 pts 00000000 buffer: 0xa7755c00 len 000668 header:0x8c stc 73779dba sof 070c pts 7376d37a This borderline/buggy interpretation has been implemented in a variety of devices, from directly Sunplus and from other OEMs that rebrand Sunplus products. Luckily we can identify the affected modules by looking at the guid of one of the extension units: VideoControl Interface Descriptor: guidExtensionCode {82066163-7050-ab49-b8cc-b3855e8d221d} This patch adds a new quirk to take care of this. Complete lsusb -v of one of the affected cameras: Bus 001 Device 003: ID 1bcf:2a01 Sunplus Innovation Technology Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1bcf Sunplus Innovation Technology Inc. idProduct 0x2a01 bcdDevice 0.02 iManufacturer 1 SunplusIT Inc iProduct 2 HanChen Wise Camera iSerial 3 01.00.00 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 935 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 4 HanChen Wise Camera Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 1 iInterface 4 HanChen Wise Camera VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.50 wTotalLength 111 dwClockFrequency 48.000000MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x0030000e Auto-Exposure Mode Auto-Exposure Priority Exposure Time (Absolute) VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) bUnitID 2 bSourceID 1 wMaxMultiplier 16384 bControlSize 3 bmControls 0x0000157f Brightness Contrast Hue Saturation Sharpness Gamma White Balance Temperature Backlight Compensation Power Line Frequency White Balance Temperature, Auto iProcessing 0 bmVideoStandards 0x 0 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 3 guidExtensionCode {0fb885c3-68c2-4547-90f7-8f47579d95fc} bNumControl 5 bNrPins 1 baSourceID( 0) 2 bControlSize 4 bmControls( 0) 0x1f bmControls( 1) 0x00 bmControls( 2) 0x00 bmControls( 3) 0x00 iExtension 0 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 4 guidExtensionCode {63610682-5070-49ab-b8cc-b3855e8d221d} bNumControl 20 bNrPins 1 baSourceID( 0) 3 bControlSize 4 bmControls( 0) 0xff bmControls( 1) 0xff bmControls( 2) 0x71 bmControls( 3) 0x00 iExtension 0 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 5 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 4 iTerminal 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 VideoStreaming Interface Descriptor: bLength 15 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 2 wTotalLength 335 bEndPointAddress 129 bmInfo 0 bTerminalLink 5 bStillCaptureMethod 1 bTriggerSupport 0 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 11 bmaControls( 1) 11 VideoStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 6 (FORMAT_MJPEG) bFormatIndex 1 bNumFrameDescriptors 7 bFlags 1 Fixed-size samples: Yes bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 1 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 1920 wHeight 1080 dwMinBitRate 995328000 dwMaxBitRate 995328000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 720 dwMinBitRate 442368000 dwMaxBitRate 442368000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 3 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 147456000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 4 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 110592000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 5 bmCapabilities 0x01 Still image supported wWidth 352 wHeight 288 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 6 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 240 dwMinBitRate 36864000 dwMaxBitRate 36864000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 7 bmCapabilities 0x01 Still image supported wWidth 176 wHeight 144 dwMinBitRate 12165120 dwMaxBitRate 12165120 dwMaxVideoFrameBufferSize 50688 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 2 bNumFrameDescriptors 2 guidFormat {32595559-0000-0010-8000-00aa= 00389b71} bBitsPerPixel 16 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 2 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 147456000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 110592000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x00c0 1x 192 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0180 1x 384 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0280 1x 640 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 5 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0320 1x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 6 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x03b0 1x 944 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 7 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0a80 2x 640 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 8 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0b20 2x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 9 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0be0 2x 992 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 10 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13c0 3x 960 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 11 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13fc 3x 1020 bytes bInterval 1 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 11 HanChen IR Camera Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 1 iInterface 11 HanChen IR Camera VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.50 wTotalLength 111 dwClockFrequency 48.000000MHz bInCollection 1 baInterfaceNr( 0) 3 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x00300000 VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) bUnitID 2 bSourceID 1 wMaxMultiplier 16384 bControlSize 3 bmControls 0x00000000 iProcessing 0 bmVideoStandards 0x 0 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 7 guidExtensionCode {0f3f95dc-2632-4c4e-92c9-a04782f43bc8} bNumControl 4 bNrPins 1 baSourceID( 0) 2 bControlSize 4 bmControls( 0) 0xe0 bmControls( 1) 0x01 bmControls( 2) 0x00 bmControls( 3) 0x00 iExtension 0 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 4 guidExtensionCode {63610682-5070-49ab-b8cc-b3855e8d221d} bNumControl 27 bNrPins 1 baSourceID( 0) 7 bControlSize 4 bmControls( 0) 0xff bmControls( 1) 0xff bmControls( 2) 0x77 bmControls( 3) 0x1f iExtension 0 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 5 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 4 iTerminal 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 VideoStreaming Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 1 wTotalLength 101 bEndPointAddress 130 bmInfo 0 bTerminalLink 5 bStillCaptureMethod 1 bTriggerSupport 0 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 27 VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 1 bNumFrameDescriptors 1 guidFormat {00000032-0002-0010-8000-00aa= 00389b71} bBitsPerPixel 8 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 2 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 624 wHeight 352 dwMinBitRate 52715520 dwMaxBitRate 52715520 dwMaxVideoFrameBufferSize 439296 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 400000 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0a80 2x 640 bytes bInterval 1 Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 33 bNumDeviceCaps 1 Platform Device Capability: bLength 28 bDescriptorType 16 bDevCapabilityType 5 bReserved 0 PlatformCapabilityUUID {d8dd60df-4589-4cc7-9cd2-659d9e648a9f} CapabilityData[0] 0x00 CapabilityData[1] 0x00 CapabilityData[2] 0x00 CapabilityData[3] 0x0a CapabilityData[4] 0x6a CapabilityData[5] 0x03 CapabilityData[6] 0x01 CapabilityData[7] 0x00 Device Status: 0x0000 (Bus Powered) Tested-by: hn.chen Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc= _driver.c index c63ecfd4617d..80ef0f0e04b0 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1497,6 +1497,17 @@ static const struct uvc_entity_quirk { u8 guid[16]; u32 quirks; } uvc_entity_quirk[] =3D { + /* + * Some SunPlus uvc 1.5 device firmware expects that packages with + * no frame data are ignored by the host. + * Therefore it does not clear the PTS/SCR bits in the header, and + * breaks the timestamp decode algorithm. + */ + { + .guid =3D {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, + 0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x1d}, + .quirks =3D UVC_QUIRK_IGNORE_EMPTY_TS, + }, }; =20 static void uvc_entity_quirks(struct uvc_device *dev) diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index ab56e65ca324..a5b184e71ad7 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -500,6 +500,14 @@ uvc_video_clock_decode(struct uvc_streaming *stream, s= truct uvc_buffer *buf, if (len < header_size) return; =20 + /* + * Ignore the hardware timestamp on frames with no data on + * miss-behaving devices. + */ + if (stream->dev->quirks & UVC_QUIRK_IGNORE_EMPTY_TS && + len =3D=3D header_size) + return; + /* * Extract the timestamps: * diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvi= deo.h index 24c911aeebce..f395b67fe95a 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -212,6 +212,7 @@ #define UVC_QUIRK_RESTORE_CTRLS_ON_INIT 0x00000400 #define UVC_QUIRK_FORCE_Y8 0x00000800 #define UVC_QUIRK_FORCE_BPP 0x00001000 +#define UVC_QUIRK_IGNORE_EMPTY_TS 0x00002000 =20 /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED 0x00000001 --=20 b4 0.11.0-dev-d93f8 From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC51AECAAD8 for ; Tue, 20 Sep 2022 14:09:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231618AbiITOJV (ORCPT ); Tue, 20 Sep 2022 10:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231514AbiITOIi (ORCPT ); Tue, 20 Sep 2022 10:08:38 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08E9C5A3FC for ; Tue, 20 Sep 2022 07:08:33 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id u9so6473134ejy.5 for ; Tue, 20 Sep 2022 07:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=iJ6YiuVLVq3ozUheFk+ygqnCDy4vyHtWKL/kAJ+KLCA=; b=N/FEUp7RTRDntLQOIijHBor6c+v+s9MD8SKhjY2ImT4/qBVm448zglwK4CEG7Mf/+M VbRyuAxGUPxfOU9hJw0/QS7GQIHO5YbHIMUihQsA0WHOu0GqJUTN/AGH3z/h3kWNrCrJ cJ7HSprEpt4hQ+WID3nqD/DT7yheC3j/vB2+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=iJ6YiuVLVq3ozUheFk+ygqnCDy4vyHtWKL/kAJ+KLCA=; b=i6qkyh+51THeJQdnnkeXW2RVtK/oRf9u6ALjesDa1kpDBc6gx7IkoXIZKGWERWoLMM LuoreTJUNux5QqQINs2HEu27dzIcBaZmbNxLKJYL2LIGD7TJmGnBSSHn/ky/KJou4P08 qEaA4/H6VMChgWahl/+0f59/yvftWPrjlK9gZOxEN/mbJCNZM2Rd0Kp+0tTY9UuVOR0K gq1wtVTfWp3/QP3eAFR7qnNgyRcfP/55i7i4HI05OLOfkYTOJqf4UvYD/DuOl92w275k qkJ5Ph10tgGhVtLepqGqDBE3LgiK0va09kktInSNW1WQSi1DJ6pEx4Qnvoh1jPhRXWrC dqLQ== X-Gm-Message-State: ACrzQf1ouPIj1/T1crZD74ZJQhy9LcCZ/T2EcHeoiwH0J3UHgDRyotYP KyDR3ueo9fCl0NVp6lMKXA5cgQ== X-Google-Smtp-Source: AMsMyM7CGgxvLoTq1rPHkf8DV6IK9k4EZIhzD13YZjKp333hynGKYyhdRcH70RKZ92Iv5fXFfe9KGg== X-Received: by 2002:a17:906:8457:b0:781:648c:3495 with SMTP id e23-20020a170906845700b00781648c3495mr6579270ejy.541.1663682911367; Tue, 20 Sep 2022 07:08:31 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:31 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:10 +0200 Subject: [PATCH v1 4/8] media: uvcvideo: Quirk for invalid dev_sof in Logi C922 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-4-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=65348; i=ribalda@chromium.org; h=from:subject:message-id; bh=3w1Ss1WtCyTNvPmlHnEmNhVx6j5mK4KVicpDAZKCTRY=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclRkaW4JPZRExo++kI06rVzjAlqlj+ESFl9XwUa K+Rf+fGJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJUQAKCRDRN9E+zzrEiDGWEA CCn/W+VepBMBtDwQB2eoHEZ1pPI3UlPd1yMF8epKYCpd34k83K325WBiIBRKRQVJDpSeki4+FStjgf 7A6rjudZ3hSpOZ+I5uMOhZecgBXvJZZb4GBzAjR7EeIgwCcVkZrhP12eeHNla5POzuJxBIZOUPiaNK apRABtMuFuyPl8j4Xa8XomuiwCzqirZl923IBZ/Isu9apmgLJclEAfLYt6GczbXfAxXjhvR1nKnPSD ExHqTMgbmnBS2AlgVnMth65ISmGinIys3+cn+JHYhlmWTfvY0j3npIBZXXI0toNnyGdbVaK/3eNe03 +L+FfimYw2vpYNsGnYUtBZBBiCcnrgYrCjYXtDTNCT/Xf+ndTGG5zkUlHnvUJwbsr0gqPLIPrDSdrq NGd8JF5D/SGrCo2aqEd9LF6mF02dp0FsCRpTgvD+zWBhmqwDEOvoxwo41EToyaOTj2VRBj3guTSYNH aV8lfJVTapQQW7s33AJK188sDWzYhY8bluYSJaNVmHz83+so50JXonQhk3MZUX13xlKT2ZfDz2dE6Z uK0nrS1BGhvALKhOk10c4+l7e7dqyADQBU/7CeDLu63yaX/DrRnmFoeKq5ToYO3rgTU58G2pZ44opX S24bCCr30yFzlvr/fXxd5wj9BPW1BKvvm3Y7W+qvMuRRm0OzHVK5cmrRrLHw== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Logitech C922 internal sof does not increases at a stable rate of 1KHz. This causes that the device_sof and the host_sof run at different rates, breaking the clock domain conversion algorithm. Eg: 30 (6) [-] none 30 614400 B 21.245557 21.395214 34.133 fps ts mono/SoE 31 (7) [-] none 31 614400 B 21.275327 21.427246 33.591 fps ts mono/SoE 32 (0) [-] none 32 614400 B 21.304739 21.459256 34.000 fps ts mono/SoE 33 (1) [-] none 33 614400 B 21.334324 21.495274 33.801 fps ts mono/SoE * 34 (2) [-] none 34 614400 B 21.529237 21.527297 5.130 fps ts mono/SoE * 35 (3) [-] none 35 614400 B 21.649416 21.559306 8.321 fps ts mono/SoE 36 (4) [-] none 36 614400 B 21.678789 21.595320 34.045 fps ts mono/SoE ... 99 (3) [-] none 99 614400 B 23.542226 23.696352 33.541 fps ts mono/SoE 100 (4) [-] none 100 614400 B 23.571578 23.728404 34.069 fps ts mono/SoE 101 (5) [-] none 101 614400 B 23.601425 23.760420 33.504 fps ts mono/SoE * 102 (6) [-] none 102 614400 B 23.798324 23.796428 5.079 fps ts mono/SoE * 103 (7) [-] none 103 614400 B 23.916271 23.828450 8.478 fps ts mono/SoE 104 (0) [-] none 104 614400 B 23.945720 23.860479 33.957 fps ts mono/SoE Instead of disabling completely the hardware timestamping for such hardware we take the assumption that the package handling jitter is under 2ms and use the host_sof as dev_sof. For the hardware tested, it provides a much better timestamping than a pure software solution: https://ibb.co/D1HJJ4x https://ibb.co/8s9dBdk https://ibb.co/QC9MgVK This bug in the camera firmware has been confirmed by the vendor. lsusb -v Bus 001 Device 044: ID 046d:085c Logitech, Inc. C922 Pro Stream Webcam 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 0x085c C922 Pro Stream Webcam bcdDevice 0.16 iManufacturer 0 iProduct 2 C922 Pro Stream Webcam iSerial 1 80B912DF bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x09c7 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 0 VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 0x00d6 dwClockFrequency 300.000000MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x00020a2e Auto-Exposure Mode Auto-Exposure Priority Exposure Time (Absolute) Focus (Absolute) Zoom (Absolute) PanTilt (Absolute) Focus, Auto VideoControl Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) Warning: Descriptor too short bUnitID 3 bSourceID 1 wMaxMultiplier 16384 bControlSize 2 bmControls 0x0000175b Brightness Contrast Saturation Sharpness White Balance Temperature Backlight Compensation Gain Power Line Frequency White Balance Temperature, Auto iProcessing 0 bmVideoStandards 0x1b None NTSC - 525/60 SECAM - 625/50 NTSC - 625/50 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 6 guidExtensionCode {23e49ed0-1178-4f31-ae52-d2fb8a8d3b48} bNumControls 10 bNrInPins 1 baSourceID( 0) 3 bControlSize 2 bmControls( 0) 0xff bmControls( 1) 0x03 iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 8 guidExtensionCode {69678ee4-410f-40db-a850-7420d7d8240e} bNumControls 7 bNrInPins 1 baSourceID( 0) 1 bControlSize 2 bmControls( 0) 0x3b bmControls( 1) 0x03 iExtension 0 VideoControl Interface Descriptor: bLength 28 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 9 guidExtensionCode {1f5d4ca9-de11-4487-840d-50933c8ec8d1} bNumControls 17 bNrInPins 1 baSourceID( 0) 1 bControlSize 3 bmControls( 0) 0xf3 bmControls( 1) 0xff bmControls( 2) 0x23 iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 10 guidExtensionCode {49e40215-f434-47fe-b158-0e885023e51b} bNumControls 7 bNrInPins 1 baSourceID( 0) 1 bControlSize 2 bmControls( 0) 0xba bmControls( 1) 0x07 iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 11 guidExtensionCode {ffe52d21-8030-4e2c-82d9-f587d00540bd} bNumControls 2 bNrInPins 1 baSourceID( 0) 1 bControlSize 2 bmControls( 0) 0x00 bmControls( 1) 0x41 iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 12 guidExtensionCode {a29e7641-de04-47e3-8b2b-f4341aff003b} bNumControls 11 bNrInPins 1 baSourceID( 0) 3 bControlSize 2 bmControls( 0) 0x07 bmControls( 1) 0x7f iExtension 0 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 3 iTerminal 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 VideoStreaming Interface Descriptor: bLength 15 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 2 wTotalLength 0x0751 bEndpointAddress 0x81 EP 1 IN bmInfo 0 bTerminalLink 4 bStillCaptureMethod 0 bTriggerSupport 0 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 0 bmaControls( 1) 4 VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 1 bNumFrameDescriptors 19 guidFormat {32595559-0000-0010-8000-00aa= 00389b71} bBitsPerPixel 16 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 2 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x00 Still image unsupported wWidth 640 wHeight 480 dwMinBitRate 24576000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x00 Still image unsupported wWidth 160 wHeight 90 dwMinBitRate 1152000 dwMaxBitRate 6912000 dwMaxVideoFrameBufferSize 28800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 3 bmCapabilities 0x00 Still image unsupported wWidth 160 wHeight 120 dwMinBitRate 1536000 dwMaxBitRate 9216000 dwMaxVideoFrameBufferSize 38400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 4 bmCapabilities 0x00 Still image unsupported wWidth 176 wHeight 144 dwMinBitRate 2027520 dwMaxBitRate 12165120 dwMaxVideoFrameBufferSize 50688 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 5 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 180 dwMinBitRate 4608000 dwMaxBitRate 27648000 dwMaxVideoFrameBufferSize 115200 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 6 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 240 dwMinBitRate 6144000 dwMaxBitRate 36864000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 7 bmCapabilities 0x00 Still image unsupported wWidth 352 wHeight 288 dwMinBitRate 8110080 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 8 bmCapabilities 0x00 Still image unsupported wWidth 432 wHeight 240 dwMinBitRate 8294400 dwMaxBitRate 49766400 dwMaxVideoFrameBufferSize 207360 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 9 bmCapabilities 0x00 Still image unsupported wWidth 640 wHeight 360 dwMinBitRate 18432000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 10 bmCapabilities 0x00 Still image unsupported wWidth 800 wHeight 448 dwMinBitRate 28672000 dwMaxBitRate 172032000 dwMaxVideoFrameBufferSize 716800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 50 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 11 bmCapabilities 0x00 Still image unsupported wWidth 800 wHeight 600 dwMinBitRate 38400000 dwMaxBitRate 184320000 dwMaxVideoFrameBufferSize 960000 dwDefaultFrameInterval 416666 bFrameIntervalType 6 dwFrameInterval( 0) 416666 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 1333333 dwFrameInterval( 5) 2000000 VideoStreaming Interface Descriptor: bLength 50 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 12 bmCapabilities 0x00 Still image unsupported wWidth 864 wHeight 480 dwMinBitRate 33177600 dwMaxBitRate 159252480 dwMaxVideoFrameBufferSize 829440 dwDefaultFrameInterval 416666 bFrameIntervalType 6 dwFrameInterval( 0) 416666 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 1333333 dwFrameInterval( 5) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 13 bmCapabilities 0x00 Still image unsupported wWidth 960 wHeight 720 dwMinBitRate 55296000 dwMaxBitRate 165888000 dwMaxVideoFrameBufferSize 1382400 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 14 bmCapabilities 0x00 Still image unsupported wWidth 1024 wHeight 576 dwMinBitRate 47185920 dwMaxBitRate 141557760 dwMaxVideoFrameBufferSize 1179648 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 15 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 720 dwMinBitRate 73728000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 1000000 bFrameIntervalType 3 dwFrameInterval( 0) 1000000 dwFrameInterval( 1) 1333333 dwFrameInterval( 2) 2000000 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 16 bmCapabilities 0x00 Still image unsupported wWidth 1600 wHeight 896 dwMinBitRate 114688000 dwMaxBitRate 172032000 dwMaxVideoFrameBufferSize 2867200 dwDefaultFrameInterval 1333333 bFrameIntervalType 2 dwFrameInterval( 0) 1333333 dwFrameInterval( 1) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 17 bmCapabilities 0x00 Still image unsupported wWidth 1920 wHeight 1080 dwMinBitRate 165888000 dwMaxBitRate 165888000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 2000000 bFrameIntervalType 1 dwFrameInterval( 0) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 18 bmCapabilities 0x00 Still image unsupported wWidth 2304 wHeight 1296 dwMinBitRate 238878720 dwMaxBitRate 238878720 dwMaxVideoFrameBufferSize 5971968 dwDefaultFrameInterval 4999998 bFrameIntervalType 1 dwFrameInterval( 0) 4999998 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 19 bmCapabilities 0x00 Still image unsupported wWidth 2304 wHeight 1536 dwMinBitRate 283115520 dwMaxBitRate 283115520 dwMaxVideoFrameBufferSize 7077888 dwDefaultFrameInterval 4999998 bFrameIntervalType 1 dwFrameInterval( 0) 4999998 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) VideoStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 6 (FORMAT_MJPEG) bFormatIndex 2 bNumFrameDescriptors 17 bFlags 1 Fixed-size samples: Yes bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 1 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 1 bmCapabilities 0x00 Still image unsupported wWidth 640 wHeight 480 dwMinBitRate 24576000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 2 bmCapabilities 0x00 Still image unsupported wWidth 160 wHeight 90 dwMinBitRate 1152000 dwMaxBitRate 6912000 dwMaxVideoFrameBufferSize 28800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 3 bmCapabilities 0x00 Still image unsupported wWidth 160 wHeight 120 dwMinBitRate 1536000 dwMaxBitRate 9216000 dwMaxVideoFrameBufferSize 38400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 4 bmCapabilities 0x00 Still image unsupported wWidth 176 wHeight 144 dwMinBitRate 2027520 dwMaxBitRate 12165120 dwMaxVideoFrameBufferSize 50688 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 5 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 180 dwMinBitRate 4608000 dwMaxBitRate 27648000 dwMaxVideoFrameBufferSize 115200 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 6 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 240 dwMinBitRate 6144000 dwMaxBitRate 36864000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 7 bmCapabilities 0x00 Still image unsupported wWidth 352 wHeight 288 dwMinBitRate 8110080 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 8 bmCapabilities 0x00 Still image unsupported wWidth 432 wHeight 240 dwMinBitRate 8294400 dwMaxBitRate 49766400 dwMaxVideoFrameBufferSize 207360 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 9 bmCapabilities 0x00 Still image unsupported wWidth 640 wHeight 360 dwMinBitRate 18432000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 10 bmCapabilities 0x00 Still image unsupported wWidth 800 wHeight 448 dwMinBitRate 28672000 dwMaxBitRate 172032000 dwMaxVideoFrameBufferSize 716800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 11 bmCapabilities 0x00 Still image unsupported wWidth 800 wHeight 600 dwMinBitRate 38400000 dwMaxBitRate 230400000 dwMaxVideoFrameBufferSize 960000 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 12 bmCapabilities 0x00 Still image unsupported wWidth 864 wHeight 480 dwMinBitRate 33177600 dwMaxBitRate 199065600 dwMaxVideoFrameBufferSize 829440 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 13 bmCapabilities 0x00 Still image unsupported wWidth 960 wHeight 720 dwMinBitRate 55296000 dwMaxBitRate 331776000 dwMaxVideoFrameBufferSize 1382400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 14 bmCapabilities 0x00 Still image unsupported wWidth 1024 wHeight 576 dwMinBitRate 47185920 dwMaxBitRate 283115520 dwMaxVideoFrameBufferSize 1179648 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 58 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 15 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 720 dwMinBitRate 73728000 dwMaxBitRate 884736000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 333333 bFrameIntervalType 8 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 416666 dwFrameInterval( 3) 500000 dwFrameInterval( 4) 666666 dwFrameInterval( 5) 1000000 dwFrameInterval( 6) 1333333 dwFrameInterval( 7) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 16 bmCapabilities 0x00 Still image unsupported wWidth 1600 wHeight 896 dwMinBitRate 114688000 dwMaxBitRate 688128000 dwMaxVideoFrameBufferSize 2867200 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 17 bmCapabilities 0x00 Still image unsupported wWidth 1920 wHeight 1080 dwMinBitRate 165888000 dwMaxBitRate 995328000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x00c0 1x 192 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0180 1x 384 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0280 1x 640 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 5 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0320 1x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 6 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x03b0 1x 944 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 7 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0a80 2x 640 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 8 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0b20 2x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 9 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0be0 2x 992 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 10 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x1380 3x 896 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 11 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13fc 3x 1020 bytes bInterval 1 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 1 Audio bFunctionSubClass 2 Streaming bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 0x0026 bInCollection 1 baInterfaceNr(0) 3 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Microphone bAssocTerminal 0 bNrChannels 1 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 5 iTerminal 0 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 5 bSourceID 1 bControlSize 1 bmaControls(0) 0x03 Mute Control Volume Control iFeature 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 255 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 16000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0044 1x 68 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 255 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 24000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0064 1x 100 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 255 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 32000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0084 1x 132 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0x0000 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc= _driver.c index 80ef0f0e04b0..4512316c8748 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -2880,6 +2880,15 @@ static const struct usb_device_id uvc_ids[] =3D { .bInterfaceSubClass =3D 1, .bInterfaceProtocol =3D 0, .driver_info =3D UVC_INFO_QUIRK(UVC_QUIRK_RESTORE_CTRLS_ON_INIT) }, + /* Logitech HD Pro Webcam C922 */ + { .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor =3D 0x046d, + .idProduct =3D 0x085c, + .bInterfaceClass =3D USB_CLASS_VIDEO, + .bInterfaceSubClass =3D 1, + .bInterfaceProtocol =3D 0, + .driver_info =3D UVC_INFO_QUIRK(UVC_QUIRK_INVALID_DEVICE_SOF) }, /* Chicony CNF7129 (Asus EEE 100HE) */ { .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index a5b184e71ad7..d387d6335344 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -529,13 +529,20 @@ uvc_video_clock_decode(struct uvc_streaming *stream, = struct uvc_buffer *buf, * data packages of the same frame contains the same sof. In that case * only the first one will match the host_sof. */ - dev_sof =3D get_unaligned_le16(&data[header_size - 2]); + if (stream->dev->quirks & UVC_QUIRK_INVALID_DEVICE_SOF) + dev_sof =3D usb_get_current_frame_number(stream->dev->udev); + else + dev_sof =3D get_unaligned_le16(&data[header_size - 2]); + if (dev_sof =3D=3D stream->clock.last_sof) return; =20 stream->clock.last_sof =3D dev_sof; =20 - host_sof =3D usb_get_current_frame_number(stream->dev->udev); + if (stream->dev->quirks & UVC_QUIRK_INVALID_DEVICE_SOF) + host_sof =3D dev_sof; + else + host_sof =3D usb_get_current_frame_number(stream->dev->udev); time =3D uvc_video_get_time(); =20 /* diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvi= deo.h index f395b67fe95a..e41289605d0e 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -213,6 +213,7 @@ #define UVC_QUIRK_FORCE_Y8 0x00000800 #define UVC_QUIRK_FORCE_BPP 0x00001000 #define UVC_QUIRK_IGNORE_EMPTY_TS 0x00002000 +#define UVC_QUIRK_INVALID_DEVICE_SOF 0x00004000 =20 /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED 0x00000001 --=20 b4 0.11.0-dev-d93f8 From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80CF4C54EE9 for ; Tue, 20 Sep 2022 14:09:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231368AbiITOI6 (ORCPT ); Tue, 20 Sep 2022 10:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231389AbiITOIg (ORCPT ); Tue, 20 Sep 2022 10:08:36 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 034325A3E2 for ; Tue, 20 Sep 2022 07:08:32 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id r18so6392157eja.11 for ; Tue, 20 Sep 2022 07:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=wbjVPtKtLQ851WL3q48NdlcJsiO8hZfoJ9jqBLi4VCc=; b=L/ABAL49H0vi9WJd8mlylxLrPR/3YfFIkNDRAKy6Q87DGth7qbXs4o3H2kv205lnB1 ykq5LqOYleQOdflMC1/TG5gyoZP16Um/vaRYseTsJ/iI54NXO/ZJAsGHwb6TzI4f091U GzPdRc6e/Pm4G/8u2ZXx262Ce9FyB3EpQIoO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=wbjVPtKtLQ851WL3q48NdlcJsiO8hZfoJ9jqBLi4VCc=; b=6EJfzmpQPSmUc8AxH9J9JKB+9KNDSYOFOPCWwTVHdXvOdb1tv4x0AMFs+N4K1fNt15 FzvSeaUqIN/9zumVEJtNHiBBJT2un/oQgFTToE+r/xjBzW38S1a376u21dV8eTlyJ3SB 6UqFQ837MeRKLwGOX/nL8sv0bV2NjiBRmlbtdZCh9Ai7/8Hy8XvAC5RWL4E+ahMApV6c xej4KHmKBOroSQkzkNgULmOhLDw/aNi2UYPuHcyzp3cuCnbrBzAYgdsgSkpHGTqywoiP 8OE1odyog01wLWb8IZWNcW42XoHCS0MGIxjPNdqTla3/egmSZb/0YtBUDHrivighxyPB YxXA== X-Gm-Message-State: ACrzQf0yEcRMMEyMnEwn0CgAcEDqVZMiCyHJpR8Nnx76poqK5p0IyFjF GoF7COaZP4aIqiWWZtEdBsDsQg== X-Google-Smtp-Source: AMsMyM5uZcfaIj4nG1OdXXKJXHlE9TNoNkEGxjFrdkP16utDgoDIHlashix2y883yRMilqWE5NGf1w== X-Received: by 2002:a17:906:4fd1:b0:781:35c1:3664 with SMTP id i17-20020a1709064fd100b0078135c13664mr8843786ejw.140.1663682912256; Tue, 20 Sep 2022 07:08:32 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:31 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:11 +0200 Subject: [PATCH v1 5/8] media: uvcvideo: Quirk for autosuspend in Logi C910 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-5-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=81448; i=ribalda@chromium.org; h=from:subject:message-id; bh=HUM3dTd+MW2QM4EOhQK1DvV8MGME3kYnLce9EfzHEKA=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclT5Ly9vV86ftRGVM1ui7BivhD6oHwhtsT1yoXY Voy7lICJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJUwAKCRDRN9E+zzrEiEIlEA CmDVJ/ErTxHe9ToGLdNfFCUl0gWDyd1IlF/I3hNCt/milkae4ya6kjQbonH9a5qJfowINemT0Bu0Ll rZ5SqjrAl2yRquobNul3TNP/0UORgCmX4VAuJKCiiBA1YevWUNWb09LH5UMubCFXJpeP3cX64nufM2 sqTTMVEVaEPDkEkFRhUsF6RvSyaZZmZJLEaXaiYXjxSeLW3lTEoVlKkUu0OrjZOGzTzYzbwQURsYko Qxw/2xQqi/PQlByTeO3OxlGxgpxSZTTti1DFiJsIYI6cv92DBF+mWrkOUSeMEqFVA2hhuNKfsid2Gc 8QpcUZ18+aBFme6xF3O3/XBw2Lhl0y7cDqPagP4w1V5/f2Kqe3WiAFN3pEkfpTZfe7J9haZzcQilP8 h44zKOg8NQih7YS/F/zg5hGpQbcx4Rlss82KbGwMvxvUEizTv63GuuRJOCUClqQpDTn57WWrO51OzW kDiUfGb4WrAfvbPkdgorRAKHW8dxbV8tx1Nc5BJlq6SoTAjUJ9KcBP90yIRIuXSN5sYL8MBqgRKL1u PGVFCjGj9qjQc1VLuE6MRg0mWrSPqNmzLI5aIbbfWaxeYvPG+wk2hlDTEMuoNgVTkPqeAH94JRnjAT NuJhZRBzktBJ/1wNHVBuakboLjDCJ/7761Cf+tzb//krwKORzE7/G5VnyF6w== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Logitech C910 firmware is unable to recover from a usb autosuspend. When it resumes, the device is in a state where it only produces invalid frames. Eg: $ echo 0xFFFF > /sys/module/uvcvideo/parameters/trace # enable verbose log $ yavta -c1 -n1 --file=3D'frame#.jpg' --format MJPEG --size=3D1920x1080 /de= v/video1 [350438.435219] uvcvideo: uvc_v4l2_open [350438.529794] uvcvideo: Resuming interface 2 [350438.529801] uvcvideo: Resuming interface 3 [350438.529991] uvcvideo: Trying format 0x47504a4d (MJPG): 1920x1080. [350438.529996] uvcvideo: Using default frame interval 33333.3 us (30.0 fps= ). [350438.551496] uvcvideo: uvc_v4l2_mmap [350438.555890] uvcvideo: Device requested 3060 B/frame bandwidth. [350438.555896] uvcvideo: Selecting alternate setting 11 (3060 B/frame band= width). [350438.556362] uvcvideo: Allocated 5 URB buffers of 32x3060 bytes each. [350439.316468] uvcvideo: Marking buffer as bad (error bit set). [350439.316475] uvcvideo: Frame complete (EOF found). [350439.316477] uvcvideo: EOF in empty payload. [350439.316484] uvcvideo: frame 1 stats: 149/261/417 packets, 1/149/417 pts= (early initial), 416/417 scr, last pts/stc/sof 2976325734/2978107243/249 [350439.384510] uvcvideo: Marking buffer as bad (error bit set). [350439.384516] uvcvideo: Frame complete (EOF found). [350439.384518] uvcvideo: EOF in empty payload. [350439.384525] uvcvideo: frame 2 stats: 265/379/533 packets, 1/265/533 pts= (early initial), 532/533 scr, last pts/stc/sof 2979524454/2981305193/316 [350439.448472] uvcvideo: Marking buffer as bad (error bit set). [350439.448478] uvcvideo: Frame complete (EOF found). [350439.448480] uvcvideo: EOF in empty payload. [350439.448487] uvcvideo: frame 3 stats: 265/377/533 packets, 1/265/533 pts= (early initial), 532/533 scr, last pts/stc/sof 2982723174/2984503144/382 ...(loop)... The devices can leave this invalid state if its altstate is toggled. This patch addes a quirk for this device so it can be autosuspended properly. lsusb -v: Bus 001 Device 049: ID 046d:0821 Logitech, Inc. HD Webcam C910 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 0x0821 HD Webcam C910 bcdDevice 0.10 iManufacturer 0 iProduct 0 iSerial 1 390022B0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0cc1 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 1 Audio bFunctionSubClass 2 Streaming bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 0x0026 bInCollection 1 baInterfaceNr(0) 1 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Microphone bAssocTerminal 0 bNrChannels 1 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 5 iTerminal 0 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 5 bSourceID 1 bControlSize 1 bmaControls(0) 0x03 Mute Control Volume Control iFeature 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 1 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 16000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0044 1x 68 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 1 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 24000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0064 1x 100 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 1 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 32000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0084 1x 132 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0x0000 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 0 VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 0x00bc dwClockFrequency 48.000000MHz bInCollection 1 baInterfaceNr( 0) 3 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x00020a2e Auto-Exposure Mode Auto-Exposure Priority Exposure Time (Absolute) Focus (Absolute) Zoom (Absolute) PanTilt (Absolute) Focus, Auto VideoControl Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) Warning: Descriptor too short bUnitID 2 bSourceID 1 wMaxMultiplier 16384 bControlSize 2 bmControls 0x0000175b Brightness Contrast Saturation Sharpness White Balance Temperature Backlight Compensation Gain Power Line Frequency White Balance Temperature, Auto iProcessing 0 bmVideoStandards 0x1d None PAL - 625/50 SECAM - 625/50 NTSC - 625/50 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 4 guidExtensionCode {7d5a1d99-5b32-428b-8cad-671b8a65f37a} bNumControls 0 bNrInPins 1 baSourceID( 0) 2 bControlSize 4 bmControls( 0) 0x3f bmControls( 1) 0x00 bmControls( 2) 0x07 bmControls( 3) 0x00 iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 5 guidExtensionCode {69678ee4-410f-40db-a850-7420d7d8240e} bNumControls 8 bNrInPins 1 baSourceID( 0) 1 bControlSize 2 bmControls( 0) 0x3f bmControls( 1) 0x03 iExtension 0 VideoControl Interface Descriptor: bLength 28 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 6 guidExtensionCode {1f5d4ca9-de11-4487-840d-50933c8ec8d1} bNumControls 16 bNrInPins 1 baSourceID( 0) 1 bControlSize 3 bmControls( 0) 0xff bmControls( 1) 0xff bmControls( 2) 0x03 iExtension 0 VideoControl Interface Descriptor: bLength 26 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 7 guidExtensionCode {49e40215-f434-47fe-b158-0e885023e51b} bNumControls 9 bNrInPins 1 baSourceID( 0) 1 bControlSize 1 bmControls( 0) 0x7f iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 8 guidExtensionCode {ffe52d21-8030-4e2c-82d9-f587d00540bd} bNumControls 10 bNrInPins 1 baSourceID( 0) 1 bControlSize 2 bmControls( 0) 0x00 bmControls( 1) 0x03 iExtension 0 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 4 iTerminal 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 VideoStreaming Interface Descriptor: bLength 15 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 2 wTotalLength 0x0a65 bEndpointAddress 0x81 EP 1 IN bmInfo 0 bTerminalLink 3 bStillCaptureMethod 1 bTriggerSupport 0 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 0 bmaControls( 1) 4 VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 1 bNumFrameDescriptors 28 guidFormat {32595559-0000-0010-8000-00aa= 00389b71} bBitsPerPixel 16 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 2 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 24576000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 160 wHeight 120 dwMinBitRate 1536000 dwMaxBitRate 9216000 dwMaxVideoFrameBufferSize 38400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 3 bmCapabilities 0x01 Still image supported wWidth 176 wHeight 144 dwMinBitRate 2027520 dwMaxBitRate 12165120 dwMaxVideoFrameBufferSize 50688 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 4 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 176 dwMinBitRate 4505600 dwMaxBitRate 27033600 dwMaxVideoFrameBufferSize 112640 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 5 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 240 dwMinBitRate 6144000 dwMaxBitRate 36864000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 6 bmCapabilities 0x01 Still image supported wWidth 432 wHeight 240 dwMinBitRate 8294400 dwMaxBitRate 49766400 dwMaxVideoFrameBufferSize 207360 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 7 bmCapabilities 0x01 Still image supported wWidth 352 wHeight 288 dwMinBitRate 8110080 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 8 bmCapabilities 0x01 Still image supported wWidth 544 wHeight 288 dwMinBitRate 12533760 dwMaxBitRate 75202560 dwMaxVideoFrameBufferSize 313344 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 9 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 18432000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 50 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 10 bmCapabilities 0x01 Still image supported wWidth 752 wHeight 416 dwMinBitRate 25026560 dwMaxBitRate 120127488 dwMaxVideoFrameBufferSize 625664 dwDefaultFrameInterval 416666 bFrameIntervalType 6 dwFrameInterval( 0) 416666 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 1333333 dwFrameInterval( 5) 2000000 VideoStreaming Interface Descriptor: bLength 50 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 11 bmCapabilities 0x01 Still image supported wWidth 800 wHeight 448 dwMinBitRate 28672000 dwMaxBitRate 137625600 dwMaxVideoFrameBufferSize 716800 dwDefaultFrameInterval 416666 bFrameIntervalType 6 dwFrameInterval( 0) 416666 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 1333333 dwFrameInterval( 5) 2000000 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 12 bmCapabilities 0x01 Still image supported wWidth 864 wHeight 480 dwMinBitRate 33177600 dwMaxBitRate 132710400 dwMaxVideoFrameBufferSize 829440 dwDefaultFrameInterval 500000 bFrameIntervalType 5 dwFrameInterval( 0) 500000 dwFrameInterval( 1) 666666 dwFrameInterval( 2) 1000000 dwFrameInterval( 3) 1333333 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 13 bmCapabilities 0x01 Still image supported wWidth 960 wHeight 544 dwMinBitRate 41779200 dwMaxBitRate 167116800 dwMaxVideoFrameBufferSize 1044480 dwDefaultFrameInterval 500000 bFrameIntervalType 5 dwFrameInterval( 0) 500000 dwFrameInterval( 1) 666666 dwFrameInterval( 2) 1000000 dwFrameInterval( 3) 1333333 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 14 bmCapabilities 0x01 Still image supported wWidth 1024 wHeight 576 dwMinBitRate 47185920 dwMaxBitRate 94371840 dwMaxVideoFrameBufferSize 1179648 dwDefaultFrameInterval 1000000 bFrameIntervalType 3 dwFrameInterval( 0) 1000000 dwFrameInterval( 1) 1333333 dwFrameInterval( 2) 2000000 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 15 bmCapabilities 0x01 Still image supported wWidth 800 wHeight 600 dwMinBitRate 38400000 dwMaxBitRate 153600000 dwMaxVideoFrameBufferSize 960000 dwDefaultFrameInterval 500000 bFrameIntervalType 5 dwFrameInterval( 0) 500000 dwFrameInterval( 1) 666666 dwFrameInterval( 2) 1000000 dwFrameInterval( 3) 1333333 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 16 bmCapabilities 0x01 Still image supported wWidth 1184 wHeight 656 dwMinBitRate 62136320 dwMaxBitRate 124272640 dwMaxVideoFrameBufferSize 1553408 dwDefaultFrameInterval 1000000 bFrameIntervalType 3 dwFrameInterval( 0) 1000000 dwFrameInterval( 1) 1333333 dwFrameInterval( 2) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 17 bmCapabilities 0x01 Still image supported wWidth 960 wHeight 720 dwMinBitRate 55296000 dwMaxBitRate 165888000 dwMaxVideoFrameBufferSize 1382400 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 18 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 720 dwMinBitRate 73728000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 1000000 bFrameIntervalType 3 dwFrameInterval( 0) 1000000 dwFrameInterval( 1) 1333333 dwFrameInterval( 2) 2000000 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 19 bmCapabilities 0x01 Still image supported wWidth 1392 wHeight 768 dwMinBitRate 85524480 dwMaxBitRate 128286720 dwMaxVideoFrameBufferSize 2138112 dwDefaultFrameInterval 1333333 bFrameIntervalType 2 dwFrameInterval( 0) 1333333 dwFrameInterval( 1) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 20 bmCapabilities 0x01 Still image supported wWidth 1504 wHeight 832 dwMinBitRate 100106240 dwMaxBitRate 100106240 dwMaxVideoFrameBufferSize 2502656 dwDefaultFrameInterval 2000000 bFrameIntervalType 1 dwFrameInterval( 0) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 21 bmCapabilities 0x01 Still image supported wWidth 1600 wHeight 896 dwMinBitRate 114688000 dwMaxBitRate 114688000 dwMaxVideoFrameBufferSize 2867200 dwDefaultFrameInterval 2000000 bFrameIntervalType 1 dwFrameInterval( 0) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 22 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 960 dwMinBitRate 98304000 dwMaxBitRate 98304000 dwMaxVideoFrameBufferSize 2457600 dwDefaultFrameInterval 2000000 bFrameIntervalType 1 dwFrameInterval( 0) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 23 bmCapabilities 0x01 Still image supported wWidth 1712 wHeight 960 dwMinBitRate 131481600 dwMaxBitRate 131481600 dwMaxVideoFrameBufferSize 3287040 dwDefaultFrameInterval 2000000 bFrameIntervalType 1 dwFrameInterval( 0) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 24 bmCapabilities 0x01 Still image supported wWidth 1792 wHeight 1008 dwMinBitRate 144506880 dwMaxBitRate 144506880 dwMaxVideoFrameBufferSize 3612672 dwDefaultFrameInterval 2000000 bFrameIntervalType 1 dwFrameInterval( 0) 2000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 25 bmCapabilities 0x01 Still image supported wWidth 1920 wHeight 1080 dwMinBitRate 165888000 dwMaxBitRate 165888000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 4999998 bFrameIntervalType 1 dwFrameInterval( 0) 4999998 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 26 bmCapabilities 0x01 Still image supported wWidth 1600 wHeight 1200 dwMinBitRate 153600000 dwMaxBitRate 153600000 dwMaxVideoFrameBufferSize 3840000 dwDefaultFrameInterval 4999998 bFrameIntervalType 1 dwFrameInterval( 0) 4999998 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 27 bmCapabilities 0x01 Still image supported wWidth 2048 wHeight 1536 dwMinBitRate 251658240 dwMaxBitRate 251658240 dwMaxVideoFrameBufferSize 6291456 dwDefaultFrameInterval 4999998 bFrameIntervalType 1 dwFrameInterval( 0) 4999998 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 28 bmCapabilities 0x01 Still image supported wWidth 2592 wHeight 1944 dwMinBitRate 403107840 dwMaxBitRate 403107840 dwMaxVideoFrameBufferSize 10077696 dwDefaultFrameInterval 4999998 bFrameIntervalType 1 dwFrameInterval( 0) 4999998 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) VideoStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 6 (FORMAT_MJPEG) bFormatIndex 2 bNumFrameDescriptors 28 bFlags 1 Fixed-size samples: Yes bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 1 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 58 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 24576000 dwMaxBitRate 294912000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 8 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 416666 dwFrameInterval( 3) 500000 dwFrameInterval( 4) 666666 dwFrameInterval( 5) 1000000 dwFrameInterval( 6) 1333333 dwFrameInterval( 7) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 160 wHeight 120 dwMinBitRate 1536000 dwMaxBitRate 9216000 dwMaxVideoFrameBufferSize 38400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 3 bmCapabilities 0x01 Still image supported wWidth 176 wHeight 144 dwMinBitRate 2027520 dwMaxBitRate 12165120 dwMaxVideoFrameBufferSize 50688 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 4 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 176 dwMinBitRate 4505600 dwMaxBitRate 27033600 dwMaxVideoFrameBufferSize 112640 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 58 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 5 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 240 dwMinBitRate 6144000 dwMaxBitRate 73728000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 8 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 416666 dwFrameInterval( 3) 500000 dwFrameInterval( 4) 666666 dwFrameInterval( 5) 1000000 dwFrameInterval( 6) 1333333 dwFrameInterval( 7) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 6 bmCapabilities 0x01 Still image supported wWidth 432 wHeight 240 dwMinBitRate 8294400 dwMaxBitRate 49766400 dwMaxVideoFrameBufferSize 207360 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 7 bmCapabilities 0x01 Still image supported wWidth 352 wHeight 288 dwMinBitRate 8110080 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 8 bmCapabilities 0x01 Still image supported wWidth 544 wHeight 288 dwMinBitRate 12533760 dwMaxBitRate 75202560 dwMaxVideoFrameBufferSize 313344 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 58 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 9 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 18432000 dwMaxBitRate 221184000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 8 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 416666 dwFrameInterval( 3) 500000 dwFrameInterval( 4) 666666 dwFrameInterval( 5) 1000000 dwFrameInterval( 6) 1333333 dwFrameInterval( 7) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 10 bmCapabilities 0x01 Still image supported wWidth 752 wHeight 416 dwMinBitRate 25026560 dwMaxBitRate 150159360 dwMaxVideoFrameBufferSize 625664 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 11 bmCapabilities 0x01 Still image supported wWidth 800 wHeight 448 dwMinBitRate 28672000 dwMaxBitRate 172032000 dwMaxVideoFrameBufferSize 716800 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 12 bmCapabilities 0x01 Still image supported wWidth 864 wHeight 480 dwMinBitRate 33177600 dwMaxBitRate 199065600 dwMaxVideoFrameBufferSize 829440 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 13 bmCapabilities 0x01 Still image supported wWidth 960 wHeight 544 dwMinBitRate 41779200 dwMaxBitRate 250675200 dwMaxVideoFrameBufferSize 1044480 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 14 bmCapabilities 0x01 Still image supported wWidth 1024 wHeight 576 dwMinBitRate 47185920 dwMaxBitRate 283115520 dwMaxVideoFrameBufferSize 1179648 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 15 bmCapabilities 0x01 Still image supported wWidth 800 wHeight 600 dwMinBitRate 38400000 dwMaxBitRate 230400000 dwMaxVideoFrameBufferSize 960000 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 16 bmCapabilities 0x01 Still image supported wWidth 1184 wHeight 656 dwMinBitRate 62136320 dwMaxBitRate 372817920 dwMaxVideoFrameBufferSize 1553408 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 17 bmCapabilities 0x01 Still image supported wWidth 960 wHeight 720 dwMinBitRate 55296000 dwMaxBitRate 331776000 dwMaxVideoFrameBufferSize 1382400 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 18 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 720 dwMinBitRate 73728000 dwMaxBitRate 442368000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 19 bmCapabilities 0x01 Still image supported wWidth 1392 wHeight 768 dwMinBitRate 85524480 dwMaxBitRate 256573440 dwMaxVideoFrameBufferSize 2138112 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 20 bmCapabilities 0x01 Still image supported wWidth 1504 wHeight 832 dwMinBitRate 100106240 dwMaxBitRate 300318720 dwMaxVideoFrameBufferSize 2502656 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 21 bmCapabilities 0x01 Still image supported wWidth 1600 wHeight 896 dwMinBitRate 114688000 dwMaxBitRate 344064000 dwMaxVideoFrameBufferSize 2867200 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 22 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 960 dwMinBitRate 98304000 dwMaxBitRate 294912000 dwMaxVideoFrameBufferSize 2457600 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 23 bmCapabilities 0x01 Still image supported wWidth 1712 wHeight 960 dwMinBitRate 131481600 dwMaxBitRate 394444800 dwMaxVideoFrameBufferSize 3287040 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 24 bmCapabilities 0x01 Still image supported wWidth 1792 wHeight 1008 dwMinBitRate 144506880 dwMaxBitRate 433520640 dwMaxVideoFrameBufferSize 3612672 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 54 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 25 bmCapabilities 0x01 Still image supported wWidth 1920 wHeight 1080 dwMinBitRate 165888000 dwMaxBitRate 995328000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 333333 bFrameIntervalType 7 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 416666 dwFrameInterval( 2) 500000 dwFrameInterval( 3) 666666 dwFrameInterval( 4) 1000000 dwFrameInterval( 5) 1333333 dwFrameInterval( 6) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 26 bmCapabilities 0x01 Still image supported wWidth 1600 wHeight 1200 dwMinBitRate 153600000 dwMaxBitRate 460800000 dwMaxVideoFrameBufferSize 3840000 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 27 bmCapabilities 0x01 Still image supported wWidth 2048 wHeight 1536 dwMinBitRate 251658240 dwMaxBitRate 754974720 dwMaxVideoFrameBufferSize 6291456 dwDefaultFrameInterval 666666 bFrameIntervalType 4 dwFrameInterval( 0) 666666 dwFrameInterval( 1) 1000000 dwFrameInterval( 2) 1333333 dwFrameInterval( 3) 2000000 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 28 bmCapabilities 0x01 Still image supported wWidth 2592 wHeight 1944 dwMinBitRate 403107840 dwMaxBitRate 806215680 dwMaxVideoFrameBufferSize 10077696 dwDefaultFrameInterval 1000000 bFrameIntervalType 3 dwFrameInterval( 0) 1000000 dwFrameInterval( 1) 1333333 dwFrameInterval( 2) 2000000 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x00c0 1x 192 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0180 1x 384 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0280 1x 640 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 5 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0320 1x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 6 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x03b0 1x 944 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 7 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0a80 2x 640 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 8 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0b20 2x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 9 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0be0 2x 992 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 10 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13fc 3x 1020 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 11 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13fc 3x 1020 bytes bInterval 1 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc= _driver.c index 4512316c8748..d2a158a1ce35 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -2823,6 +2823,24 @@ static const struct usb_device_id uvc_ids[] =3D { .bInterfaceSubClass =3D 1, .bInterfaceProtocol =3D 0, .driver_info =3D (kernel_ulong_t)&uvc_quirk_probe_minmax }, + /* Logitech, Webcam C910 */ + { .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor =3D 0x046d, + .idProduct =3D 0x0821, + .bInterfaceClass =3D USB_CLASS_VIDEO, + .bInterfaceSubClass =3D 1, + .bInterfaceProtocol =3D 0, + .driver_info =3D UVC_INFO_QUIRK(UVC_QUIRK_WAKE_AUTOSUSPEND)}, + /* Logitech, Webcam B910 */ + { .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor =3D 0x046d, + .idProduct =3D 0x0823, + .bInterfaceClass =3D USB_CLASS_VIDEO, + .bInterfaceSubClass =3D 1, + .bInterfaceProtocol =3D 0, + .driver_info =3D UVC_INFO_QUIRK(UVC_QUIRK_WAKE_AUTOSUSPEND)}, /* Logitech Quickcam Fusion */ { .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index d387d6335344..75c32e232f5d 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -1983,6 +1983,11 @@ static int uvc_video_start_transfer(struct uvc_strea= ming *stream, "Selecting alternate setting %u (%u B/frame bandwidth)\n", altsetting, best_psize); =20 + if (stream->dev->quirks & UVC_QUIRK_WAKE_AUTOSUSPEND) { + usb_set_interface(stream->dev->udev, intfnum, + altsetting); + usb_set_interface(stream->dev->udev, intfnum, 0); + } ret =3D usb_set_interface(stream->dev->udev, intfnum, altsetting); if (ret < 0) return ret; diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvi= deo.h index e41289605d0e..14daa7111953 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -214,6 +214,7 @@ #define UVC_QUIRK_FORCE_BPP 0x00001000 #define UVC_QUIRK_IGNORE_EMPTY_TS 0x00002000 #define UVC_QUIRK_INVALID_DEVICE_SOF 0x00004000 +#define UVC_QUIRK_WAKE_AUTOSUSPEND 0x00008000 =20 /* Format flags */ #define UVC_FMT_FLAG_COMPRESSED 0x00000001 --=20 b4 0.11.0-dev-d93f8 From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67361C54EE9 for ; Tue, 20 Sep 2022 14:09:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231582AbiITOJQ (ORCPT ); Tue, 20 Sep 2022 10:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231524AbiITOIi (ORCPT ); Tue, 20 Sep 2022 10:08:38 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01B645A885 for ; Tue, 20 Sep 2022 07:08:35 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id f20so4012238edf.6 for ; Tue, 20 Sep 2022 07:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=2m5NjiSQ3UFcFg+RUZgWJGP2l7gs/3+ArugwLslOKeE=; b=Qog8O021pF2YpCNSfKIFSrzglOkUJfYjp/+iykdEDhA2rUzeTskHBghLNIn667tEIx YRjgd/2WjIW8lAE5Te5Yd/KuQ6nhDQh3n/Gy4igXH4sV1xPYrK3VLZWa7iDQxRFkKDny LNH7AtkR12pvioQ8Xepwi/BClUJDOUtspbh0A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=2m5NjiSQ3UFcFg+RUZgWJGP2l7gs/3+ArugwLslOKeE=; b=Np1bMmr0tX13pxTCoRtPixa/I6tq7Ge5DnB8utW1uL0g4yjm+GUWkCMmEy18P/Zzsa TkdmWu8LNJjERu/ZwTKfSKSHq/Qbya45yLm4UGx/8SLaNWqpZTjvmq7f3Zpk5b6aVZRx xOxgAJiu8/yHSPpIXn1b+xbxbeIFUO87At3MJt1ywl3ar31ieYJsd5CVKW/lFS+FOeX+ JjdiyuePXsevcfum5Q5YFaXPV0hZQ7t17KZLNwyQMWM3cDty+LImdR9PGM5iLYmW6ULw fcCc7NAYZVZcSz8v+bnXp9sRxwxvxOEj7nj3UQkU/q5KcBIuTcXvcPYhOGnkfH9ByRhH YR1A== X-Gm-Message-State: ACrzQf3WUMwYTEMCL8tFjWbRdhUb8jRqguNsob6MrT2sJWSRBDSIA1Ha 1VAb0m75oifPfHNSpFQ3ial8kw== X-Google-Smtp-Source: AMsMyM7Kttfu3Wsv8rxi19u3YeiT1tiXz9wHrvoFQFz4kKSYvS3PuNb1O521uebjBc0XlYZE2HrKoQ== X-Received: by 2002:a05:6402:1b06:b0:44e:a073:1dd8 with SMTP id by6-20020a0564021b0600b0044ea0731dd8mr19527488edb.391.1663682913102; Tue, 20 Sep 2022 07:08:33 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:32 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:12 +0200 Subject: [PATCH v1 6/8] media: uvcvideo: Allow hw clock updates with buffers not full MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-6-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1139; i=ribalda@chromium.org; h=from:subject:message-id; bh=e4J+nrDAhgtu8XgKC9q34sJueku2ku3RgCFGTHQq+rM=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclVPstkH2tqWY0nEWxBnkdg51HwzIUCHCT2SJIh 90evtTuJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJVQAKCRDRN9E+zzrEiMh4EA CMsLkuVpPkdk5Dw96HZtyoD4QFh88Ekmm5Ugj05gyKL5+RNVrwIuaEvTQgneLKQ5i2ARyq2ZdnWmFt Lx/d+P7OXGibbi38Jqllt19Jv7qtFI0eD/ldJ1FuLDPsz/sYBgrD4yNQqHlSTlHoX6rN6FHCKVpG+f QXJeagc1ChxU9gIb+P0lGvomrAq1qIO3RHjipwd2d4Qnyr5GQ7hXxlw/jmHK0HpbJQXG8wp7iotWVU bhwQY9WXeHJEZ6K4I345bFFpeQGQw7y+koAtpdO2wcCdYT4NnIVMBZELONHgKilYgd9mA3skOzMRir u4j1W0faE/Ml5Wq8BnrtUNimXrfLGebTUNTVl7bxrARfeH7H/Caa/VAuEesHrH2OICMEsxVlwzM/hW J4XRPzEaoTgMlRBouzs6x+YbOMSb/l/SHIEQxywDiRSOom87Dfvacqxrdmgczi8e+AWtsUW6/wkhpE EY5EqMze+HehXjoPJvHKYAwf/SPtbeNSH06aK8LTRrF46l5QR9AY6+nTt8eViEH5b2HG0O7wFG2nFN MjsbObx7yVgT1OPC2rG9YRCrmjfYrpvu2wm9oUFW5iBs/jJjE0zOPXiLh8aXJc4tweTNMN8zDAixm1 4kKV9lMekTN3+T72giWH24O5uVNd0PTBlP/VRrDq+wARMBD0qUj1h298kOvA== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With UVC 1.5 we get as little as one clock sample per frame. Which means that it takes 32 frames to move from the software timestamp to the hardware timestamp method. This results in abrupt changes in the timestamping after 32 frames (~1 second), resulting in noticeable artifacts when used for encoding. With this patch we modify the update algorithm to work with whatever amount of values are available. Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index 75c32e232f5d..7c7fb478aef7 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -742,10 +742,10 @@ void uvc_video_clock_update(struct uvc_streaming *str= eam, =20 spin_lock_irqsave(&clock->lock, flags); =20 - if (clock->count < clock->size) + if (clock->count < 2) goto done; =20 - first =3D &clock->samples[clock->head]; + first =3D &clock->samples[(clock->head - clock->count) % clock->size]; last =3D &clock->samples[(clock->head - 1) % clock->size]; =20 /* First step, PTS to SOF conversion. */ --=20 b4 0.11.0-dev-d93f8 From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9A56C54EE9 for ; Tue, 20 Sep 2022 14:09:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231561AbiITOJF (ORCPT ); Tue, 20 Sep 2022 10:09:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbiITOIi (ORCPT ); Tue, 20 Sep 2022 10:08:38 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA2056BB9 for ; Tue, 20 Sep 2022 07:08:34 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id 13so6485199ejn.3 for ; Tue, 20 Sep 2022 07:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=NCc5XnE86A35upfQb7w9Zg49ZtxeysSLRX/7yyxgtR0=; b=BX1eXrPvlIVcwDO3uOoPlFa+ImKnuEQCQV/DWcnsoCT6sqrex4Hu7kkrwCgLMyWJtx UNJcjUQV2YD8jravMv0yw7c/xqBO25g8hMAACLntYpoJoUXKUELs4ZOkieYcfdHHBhFd l/quskDGx3sQyd4FHgPSVZrexFzLbKQLo3caM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=NCc5XnE86A35upfQb7w9Zg49ZtxeysSLRX/7yyxgtR0=; b=sC6Q089eNIuOZkrkItvExp56EnsV4dECKC3LoqDhtY0PIy458RBnUrG/JqJMNSljB1 BXybzPNH7ABFYTlsvqeet/+dXQZUbQXWvKUboQi6OXkH+nxLjJNi+1WCnHDsx80M6uW/ K+8JAxle0KVtVRGw7z/tzp3awBbDFbs6efZTsKOIPnm51XVG11N0y4deUc7PA8heY+qM Wh2R2xxuP9Q3lcyih+1+PNr8zoI/4f6pZ5Fjrh+iyR54xU0wzhbbE2mZiCbzVjXiYWs1 S6Xzi6G1Ur8KpEmaXVoFxfkqhccv96gRB/Uy0D983N0EJFR0n6ep402nbS8SLMh1TKKu DwSQ== X-Gm-Message-State: ACrzQf24i7G7O1kvgyWU795OJ93pSo1tPxeGYmfBv30ude+ex/ggq1wA Bp8VBnv3ccYCposZ4q4KoThARRm4DDvcpCB6LO8= X-Google-Smtp-Source: AMsMyM7PE6lyS3+0vtSumMvg+ryWzwkFIVOxy/qOiei/xbbb0im3D3s8lTsiQHWWrV9HXqQr9yDzsQ== X-Received: by 2002:a17:906:cc4a:b0:779:ed37:b5a3 with SMTP id mm10-20020a170906cc4a00b00779ed37b5a3mr16861886ejb.626.1663682914022; Tue, 20 Sep 2022 07:08:34 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:33 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:13 +0200 Subject: [PATCH v1 7/8] media: uvcvideo: Refactor clock circular buffer MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-7-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=5683; i=ribalda@chromium.org; h=from:subject:message-id; bh=z/+kzQHc3YxeEXHUqT6czLGAa5vbV9no6M5D99w9Aks=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclW0N/GT6a158BpvExijGgXwYoWPIwxcszDBMi7 C5iAMHCJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJVgAKCRDRN9E+zzrEiGC4EA CKtFH0hEXzzHQtBofaYIEP0M3h7dxYuzsCo0upAQgd5jzreQXQPSfq4+hIHvfBqlKEWYO8j1Kl5BVw jcs9KGfYF3H+Oxk2tAlNHpvh/MehKyHnE9HtNbQjkU9OEOcoEQElSleKv9meMo7eKZ0t59K9tlVNRv 0z/MaIVQCFJ8slQ5YxkqP6OGJoUCqcr4w4fVYvGKQf758AFB5AHRdyoFC8zZR7ARU7MnUNnQRnqHu1 4FQ2rxxukpuiuzwZaiyBqT0IWVohLEk/1X16na43YkMdBqhFODfxt6M0W4CtmWXINvx+5pvYf4RKgF tPsK3IFGY8sY2LJ6fRu3pLcRHahGF2lxvxpR6f4C+ZsJSU96txF693nooIQcwqQVuZwbBDIfPDv5iF Wgex9vKVDIeh7Jt44sQXJ6yYFZ/TtaDahxhL1lR+mZcZBVTsHtPxvFpHNphehj/n/m+h1cAesTsJBg 2T1GpsRCbJDPHZCPUvjhJnHpucaRohuofM+LXHcihW40X8TC/ku/Gd7psBf3ytCyKwc1f4zJQCiC5f qJCD6ZOure5118fJouhI0V5F7HVrAbpGMd3eAuDv6UxWfJdU4BipA6TiNoNCwrTUApUlvIVLtGfp8F vNjD/8l2RRUQvxsMubsWoJQyBHKULQNpoNWmGS4a+QCVT3vK791zMsyVcJsQ== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the addition to the buffer into its own function and remove the stream dependency to all the clock functions. Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index 7c7fb478aef7..9e7ab7ef8624 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -464,18 +464,29 @@ static inline ktime_t uvc_video_get_time(void) return ktime_get_real(); } =20 +static void uvc_video_clock_add_sample(struct uvc_clock *clock, + const struct uvc_clock_sample *sample) +{ + unsigned long flags; + + spin_lock_irqsave(&clock->lock, flags); + + memcpy(&clock->samples[clock->head], sample, sizeof(*sample)); + clock->last_sof =3D sample->dev_sof; + clock->head =3D (clock->head + 1) % clock->size; + clock->count =3D min(clock->count + 1, clock->size); + + spin_unlock_irqrestore(&clock->lock, flags); +} + static void uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *bu= f, const u8 *data, int len) { - struct uvc_clock_sample *sample; + struct uvc_clock_sample sample; unsigned int header_size; bool has_pts =3D false; bool has_scr =3D false; - unsigned long flags; - ktime_t time; - u16 host_sof; - u16 dev_sof; =20 switch (data[1] & (UVC_STREAM_PTS | UVC_STREAM_SCR)) { case UVC_STREAM_PTS | UVC_STREAM_SCR: @@ -530,20 +541,19 @@ uvc_video_clock_decode(struct uvc_streaming *stream, = struct uvc_buffer *buf, * only the first one will match the host_sof. */ if (stream->dev->quirks & UVC_QUIRK_INVALID_DEVICE_SOF) - dev_sof =3D usb_get_current_frame_number(stream->dev->udev); + sample.dev_sof =3D + usb_get_current_frame_number(stream->dev->udev); else - dev_sof =3D get_unaligned_le16(&data[header_size - 2]); + sample.dev_sof =3D get_unaligned_le16(&data[header_size - 2]); =20 - if (dev_sof =3D=3D stream->clock.last_sof) + if (sample.dev_sof =3D=3D stream->clock.last_sof) return; =20 - stream->clock.last_sof =3D dev_sof; - if (stream->dev->quirks & UVC_QUIRK_INVALID_DEVICE_SOF) - host_sof =3D dev_sof; + sample.host_sof =3D sample.dev_sof; else - host_sof =3D usb_get_current_frame_number(stream->dev->udev); - time =3D uvc_video_get_time(); + sample.host_sof =3D usb_get_current_frame_number(stream->dev->udev); + sample.host_time =3D uvc_video_get_time(); =20 /* * The UVC specification allows device implementations that can't obtain @@ -566,46 +576,29 @@ uvc_video_clock_decode(struct uvc_streaming *stream, = struct uvc_buffer *buf, * the 8 LSBs of the delta are kept. */ if (stream->clock.sof_offset =3D=3D (u16)-1) { - u16 delta_sof =3D (host_sof - dev_sof) & 255; + u16 delta_sof =3D (sample.host_sof - sample.dev_sof) & 255; if (delta_sof >=3D 10) stream->clock.sof_offset =3D delta_sof; else stream->clock.sof_offset =3D 0; } =20 - dev_sof =3D (dev_sof + stream->clock.sof_offset) & 2047; - - spin_lock_irqsave(&stream->clock.lock, flags); - - sample =3D &stream->clock.samples[stream->clock.head]; - sample->dev_stc =3D get_unaligned_le32(&data[header_size - 6]); - sample->dev_sof =3D dev_sof; - sample->host_sof =3D host_sof; - sample->host_time =3D time; - - /* Update the sliding window head and count. */ - stream->clock.head =3D (stream->clock.head + 1) % stream->clock.size; + sample.dev_sof =3D (sample.dev_sof + stream->clock.sof_offset) & 2047; + sample.dev_stc =3D get_unaligned_le32(&data[header_size - 6]); =20 - if (stream->clock.count < stream->clock.size) - stream->clock.count++; - - spin_unlock_irqrestore(&stream->clock.lock, flags); + uvc_video_clock_add_sample(&stream->clock, &sample); } =20 -static void uvc_video_clock_reset(struct uvc_streaming *stream) +static void uvc_video_clock_reset(struct uvc_clock *clock) { - struct uvc_clock *clock =3D &stream->clock; - clock->head =3D 0; clock->count =3D 0; clock->last_sof =3D -1; clock->sof_offset =3D -1; } =20 -static int uvc_video_clock_init(struct uvc_streaming *stream) +static int uvc_video_clock_init(struct uvc_clock *clock) { - struct uvc_clock *clock =3D &stream->clock; - spin_lock_init(&clock->lock); clock->size =3D 32; =20 @@ -614,15 +607,15 @@ static int uvc_video_clock_init(struct uvc_streaming = *stream) if (clock->samples =3D=3D NULL) return -ENOMEM; =20 - uvc_video_clock_reset(stream); + uvc_video_clock_reset(clock); =20 return 0; } =20 -static void uvc_video_clock_cleanup(struct uvc_streaming *stream) +static void uvc_video_clock_cleanup(struct uvc_clock *clock) { - kfree(stream->clock.samples); - stream->clock.samples =3D NULL; + kfree(clock->samples); + clock->samples =3D NULL; } =20 /* @@ -2077,7 +2070,7 @@ int uvc_video_resume(struct uvc_streaming *stream, in= t reset) =20 stream->frozen =3D 0; =20 - uvc_video_clock_reset(stream); + uvc_video_clock_reset(&stream->clock); =20 if (!uvc_queue_streaming(&stream->queue)) return 0; @@ -2211,7 +2204,7 @@ int uvc_video_start_streaming(struct uvc_streaming *s= tream) { int ret; =20 - ret =3D uvc_video_clock_init(stream); + ret =3D uvc_video_clock_init(&stream->clock); if (ret < 0) return ret; =20 @@ -2229,7 +2222,7 @@ int uvc_video_start_streaming(struct uvc_streaming *s= tream) error_video: usb_set_interface(stream->dev->udev, stream->intfnum, 0); error_commit: - uvc_video_clock_cleanup(stream); + uvc_video_clock_cleanup(&stream->clock); =20 return ret; } @@ -2257,5 +2250,5 @@ void uvc_video_stop_streaming(struct uvc_streaming *s= tream) usb_clear_halt(stream->dev->udev, pipe); } =20 - uvc_video_clock_cleanup(stream); + uvc_video_clock_cleanup(&stream->clock); } --=20 b4 0.11.0-dev-d93f8 From nobody Thu Apr 2 21:58:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD12ECAAD8 for ; Tue, 20 Sep 2022 14:09:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231366AbiITOJL (ORCPT ); Tue, 20 Sep 2022 10:09:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231530AbiITOIi (ORCPT ); Tue, 20 Sep 2022 10:08:38 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31C335A3DF for ; Tue, 20 Sep 2022 07:08:36 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id bj12so6365228ejb.13 for ; Tue, 20 Sep 2022 07:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date; bh=zfUVo5J8a2Bc8Duiv5hBpojxqjiC6LXnccd1O1p7p0U=; b=GGSkGcugjAI5yDMtvFFgQZkoRn1WsWjHTUuM/wR3ngskRt3eWvwItbKa1C5Q+L1inV 4gImBazugpqgfchUHois0K4Xhm26uFHIzzZwG8LZ5GGUI0TU7e0vcKnYJTNBGr1Wv92w YO7zb8fc1OjtlRmBG7Sxiv+3Neq9fur8nxyjs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date; bh=zfUVo5J8a2Bc8Duiv5hBpojxqjiC6LXnccd1O1p7p0U=; b=BJ2DlVgOi00h4oX+BXjU8eAnm+wlnRmStkNGdJX84OBOilWb0NMBZr9GwRhocbvCUB Wsi100oPfmTtnxAwa7nnhVjVxBqwV34uf43nE9eUmi8bZ5FtmE2UZbvJpPZVMD2g0YIM 27qWVwd3El+Gim0NIedEDJr7im7iI/xsJ8mJTn0lJCsLJ+OhjS8r+cYNsvvNW1U2uMuC kEYDUdvOlkghcqYWc473JDNIOn04x2LkInpSEkdFPfXmqdD2iz2kdTNJ+a21qYRtUFjD VxRgEhOCsupsTGt5kCdZuGfYjEhjDncYP8owS5B4HNp5cBa425Ms1sbVs1uqy6nwiTgv ib1g== X-Gm-Message-State: ACrzQf3CLlZ+f1vSsbtUse4tjm24lADvZ1MgmH2nCEoDh8tQREVrChBQ WHYG2HfoEWsfcg7X5jFFrdUM8Q== X-Google-Smtp-Source: AMsMyM4yFtq+9sFEZcoug4XGhgUUbnOXsp0PEFnO5fzU35xBZ0cm2kU6M58aSrde7nxwrtUO8SgePQ== X-Received: by 2002:a17:907:d04:b0:76e:e208:27ba with SMTP id gn4-20020a1709070d0400b0076ee20827bamr17762019ejc.652.1663682914733; Tue, 20 Sep 2022 07:08:34 -0700 (PDT) Received: from alco.roam.corp.google.com ([2620:0:1059:10:935d:52b0:7461:88e1]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b0077016f4c6d4sm936564ejg.55.2022.09.20.07.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 07:08:34 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 20 Sep 2022 16:08:14 +0200 Subject: [PATCH v1 8/8] media: uvcvideo: Fix hw timestampt handling for slow FPS MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220920-resend-hwtimestamp-v1-8-e9c14b258404@chromium.org> References: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> In-Reply-To: <20220920-resend-hwtimestamp-v1-0-e9c14b258404@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab Cc: "hn.chen" , Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1919; i=ribalda@chromium.org; h=from:subject:message-id; bh=7rcJtAlLWDuwlqgI5NuBwa+lBBH+2hhnt1cWwbcRz7A=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjKclX0W5Uzo50SekqUWJQMW9HQARbEzF6bZlFifz5 eUVVjXeJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCYynJVwAKCRDRN9E+zzrEiGY7EA CLeJzonsNH3rsNFk/G7xmiEGJKmENtbohahM5F9b+cxF9DKX57xHTN3schTpSqhAdkKq08aW2QdxX9 7Id04JlIgVqAL3oPx3XVkipHwBPT61KSHA4uDnREhNviHlWoKktIb/FwWuwH2ikUr0wMfGHOOt7fi1 Wg/PAgUtDwcB6+qDDX3bI1oUQF5A67NqEkxUcdGZ/SQwGun9ZQv3nITw4DaWi6r46yCP1AdepoQYfd MnShHEpvagb4GCLIBTmF7wUIGlBTe8V3Z+3IWAkShGJYJyagEkjlTuLu/R6ZKCqjJchl413f0ovW9C 8xBB1ZGdN7BHdCzs0+ENhhRJcBzv8KI8QdPJqWsG57fMNTKw1/8/FhZWG0BL+xztdweSBFpZUurBpY 2w2SByJ+84QUK0QheTPgPRzERimPauY33ipXIRHzIvB1rTiEKPC1mvqXGuBqiXPkOv6h0OFWSDHDgK aarHabyN5Tpe89Si9cBovsm+6zo7cPJxF4CyhfYq5SkCLaTXw/UH67YVblaO9J2o2qlgHhznrjkyix hEVSDbMI4LLAvM1gx0PHgv6OiftNzVQ/WGX+MkiLgi5agEj8lLzlBoIaQNWC7FU+1SKCIUkTymavEW KqR7iYlBqQikL1ugS7XQguaBaDBnRa77yx8hsIQ8cRTATeR/AkvcwgBwy/lg== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In UVC 1.5, when working with FPS under 32, there is a chance that the circular buffer contains two dev_sof overflows, but the clock interpolator is only capable of handle a single overflow. Remove all the samples from the circular buffer that are two overflows old. Signed-off-by: Ricardo Ribalda diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index 9e7ab7ef8624..25e1f4e115c2 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -471,6 +471,20 @@ static void uvc_video_clock_add_sample(struct uvc_cloc= k *clock, =20 spin_lock_irqsave(&clock->lock, flags); =20 + /* Delete last overflows */ + if (clock->head =3D=3D clock->last_sof_overflow) + clock->last_sof_overflow =3D -1; + + /* Handle overflows */ + if (clock->count > 0 && clock->last_sof > sample->dev_sof) { + /* Remove data from the last^2 overflows */ + if (clock->last_sof_overflow !=3D -1) + clock->count =3D (clock->head - clock->last_sof_overflow) + % clock->count; + clock->last_sof_overflow =3D clock->head; + } + + /* Add sample */ memcpy(&clock->samples[clock->head], sample, sizeof(*sample)); clock->last_sof =3D sample->dev_sof; clock->head =3D (clock->head + 1) % clock->size; @@ -594,6 +608,7 @@ static void uvc_video_clock_reset(struct uvc_clock *clo= ck) clock->head =3D 0; clock->count =3D 0; clock->last_sof =3D -1; + clock->last_sof_overflow =3D -1; clock->sof_offset =3D -1; } =20 diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvi= deo.h index 14daa7111953..d8c520ce5a86 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -647,6 +647,7 @@ struct uvc_streaming { unsigned int head; unsigned int count; unsigned int size; + unsigned int last_sof_overflow; =20 u16 last_sof; u16 sof_offset; --=20 b4 0.11.0-dev-d93f8