From nobody Fri Sep 25 14:31:44 2026 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF0D93CF1FF for ; Fri, 11 Sep 2026 09:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789120232; cv=none; b=cvFGUREAmzfICfayavJztdRU0CnVgvFJ5eyjpT3WiqBXK7SvBoXMjo9KWUNsDdHwim4e37IfptrdrwWZrMrWtrvm2hnmQjpxOBsoMKh7rEcsMBTe6qfaYWuButLpArddOLjm7svlZ2IhAq+Cn3eVCzelVg+1dK/KxD5mimolHoU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789120232; c=relaxed/simple; bh=erfDa/SdhwwJMSV2vIdT52WvFbw3mV+JBH5axbJ2XYA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=psDftG9ou5mm99kNDp7SJP/qliFFQLqZ9POM3L2X/Zu4DxBrESSpXuDmVjmd35rPl5BzW/nKh5w1BZ87TfUzS2GRCXwcQ92zGo6jw90rQvP+bwXdIuaxsN364Ooi6UmF3OLTVOwXtZf5zr+LsesJcFeAOA6VHCk+mrSffp3yQ6c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=k09sOVi4; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="k09sOVi4" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-3a5a0703ae7so4243471fa.0 for ; Fri, 11 Sep 2026 02:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1789120227; x=1789725027; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=v7Sed9HnOj/nU7HTfCSSl3teJktBYNc9R4zkLeU17Ng=; b=k09sOVi4DbzElEI/8O/ba2RCQeb7CuwleOH4G4xyeecm1x7qYaXkDElk7pAo4CA6qg b8tpyFfadwJcyYA2ZiAOOEYWIkx2D8G0pdN15uSHVry5q/sCafhhRaTgE0jkDE8nwJej btFgwcAlmwDsXV2rNfmv3N0bVVB9fnC4StpCE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789120227; x=1789725027; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=v7Sed9HnOj/nU7HTfCSSl3teJktBYNc9R4zkLeU17Ng=; b=ZjpPEIQNEGDoVL+iFOTzml0lbuBq2Wo+HjOyJKpC3uaVx3LCM/LP+L8HiolMQD6nL/ n/A302ssmOiYDsVZqe2fxDflwuYlnZH0giSuYfRObch6M6iiTudYCn2TZttuVgSOflsz zXR9uDAmw/woavkd9gF65dYUzQkvW76rynXFXh33tpo+5k6A6evEpCaRc7vz+u2wYeBs HO0UmCA+sBntT8pt6wz0ifE4e9yQ5FNyFPooPnj1QUulyHbe73B7ANIs+FEJm5iAl6BY xqoeNkswHURru+vd2sW2DUexBFakWdVzpcDlhbiPjsYJDpSD5jOjF+mi+T6K5Vcr9ifd 0y6A== X-Forwarded-Encrypted: i=1; AKwUvBx9NiQ8uLMi8KqyeePiaBomXRDTMnxIrRrRehpK0i3GX7NbwLRqiXgLRoZN5cmGTIiY9f7RX+vHXApNBcM=@vger.kernel.org X-Gm-Message-State: AFuF++ktuKPJLBAyluJcmsxFKCgYtrzQZXFxKimndPj2GfL/7cOwNKb4 jPAj9wi1YoaOIHgwrDtZgQZCTv5GsUm2qalfz9KIIyRqGpKLBNYiMc8BKVCW09E2YQ== X-Gm-Gg: AYBFou1WokIT2kdEV0L+So+aXIy3EqBYvwt5HjQrZnqQ5teOQ+n3eORtO+V+U6utEom EnHsATQZHhVOBWNTp6OuZadobRa1dWEC9140ITQI/zBH4aC+45yPMV1oEDwjWrzCQYy8D9BSToC uRTYFLozpqI1CF/dU2l4kWVgBpsltJAjhKvgON3MrEbVuwQWwvzkd+OUirSun4IkA09jiInAa01 3DNvfVFvZAOzCiq4wi0Wx98vN6QIT6f43Mrdt0CVd9Xk+p8KQ7/M8uTUSKl1ad9GBgol/YTB7wT F2J5q5SjeEoVnYRsoISxBdPEre1fEfoYascG7QU0pTv0ANWP3ni8/f4ISoNCabI53DWoMT6KkC5 Bv0HY3FH3tjKaIvVStzhsiyyeLLxA1GRx80dqcqfmjr7+7h18fdTIVH0bWVnGmNtfvFv90kzbND 4GOq244PXcrJqSeK4BJEfAQ45/IUTCDDpX7iBUvhaMSv2KXNaUlZtmzSBtRrAg0jP/VEMcY8OJI V1eP+tqrbrM6FEsSLw3sE1de1MyN5kRGiacUo0JShYgcwFCrA== X-Received: by 2002:a05:651c:a09:b0:3a4:8e54:562 with SMTP id 38308e7fff4ca-3a59108fc51mr12065841fa.7.1789120227551; Fri, 11 Sep 2026 02:50:27 -0700 (PDT) Received: from ribalda.c.googlers.com (11.36.88.34.bc.googleusercontent.com. [34.88.36.11]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3a5a33263ebsm5138231fa.17.2026.09.11.02.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 02:50:25 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 11 Sep 2026 09:50:22 +0000 Subject: [PATCH v2 1/2] media: uvcvideo: Force UVC version for Avermedia GC515 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-uvc-version-v2-1-395f27b0444c@chromium.org> References: <20260911-uvc-version-v2-0-395f27b0444c@chromium.org> In-Reply-To: <20260911-uvc-version-v2-0-395f27b0444c@chromium.org> To: Laurent Pinchart , Hans de Goede , Mauro Carvalho Chehab Cc: Edwin Gatier , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Ricardo Ribalda , stable@vger.kernel.org X-Mailer: b4 0.14.3 The device announces itself as UVC 1.5, but it only accepts UVC 1.1 controls. Bus 003 Device 021: ID 07ca:1515 AVerMedia Technologies, Inc. X'tra Go GC515 Negotiated speed: High Speed (480Mbps) Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 [unknown] bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x07ca AVerMedia Technologies, Inc. idProduct 0x1515 X'tra Go GC515 bcdDevice 0.10 iManufacturer 1 AVerMedia iProduct 2 X'tra Go GC515 iSerial 3 5313180000221 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x03fd bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self 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 1 iInterface 0 VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.50 wTotalLength 0x0059 dwClockFrequency 30.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 0x00000000 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 4 iTerminal 0 VideoControl Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 4 (SELECTOR_UNIT) bUnitID 3 bNrInPins 1 baSource( 0) 1 iSelector 0 VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) bUnitID 4 bSourceID 3 wMaxMultiplier 0 bControlSize 3 bmControls 0x00000000 iProcessing 0 bmVideoStandards 0x00 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 5 guidExtensionCode {55be8e1c-2fdb-4f7a-bd8d-b9b1108d20c3} bNumControls 24 bNrInPins 1 baSourceID( 0) 4 bControlSize 4 bmControls( 0) 0xff bmControls( 1) 0xff bmControls( 2) 0xff bmControls( 3) 0x00 iExtension 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 VideoControl Endpoint Descriptor: bLength 5 bDescriptorType 37 bDescriptorSubtype 3 (EP_INTERRUPT) wMaxTransferSize 64 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 VideoStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 3 wTotalLength 0x0303 bEndpointAddress 0x81 EP 1 IN bmInfo 0 bTerminalLink 2 bStillCaptureMethod 1 bTriggerSupport 0 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 4 bmaControls( 1) 4 bmaControls( 2) 0 VideoStreaming Interface Descriptor: bLength 28 bDescriptorType 36 bDescriptorSubtype 16 (FORMAT_FRAME_BASED) bFormatIndex 1 bNumFrameDescriptors 8 guidFormat {34363248-0000-0010-8000-00aa= 00389b71} bBitsPerPixel 24 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 1 bVariableSize 1 VideoStreaming Interface Descriptor: bLength 62 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 1920 wHeight 1080 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 9 dwBytesPerLine 0 dwFrameInterval( 0) 83333 dwFrameInterval( 1) 83416 dwFrameInterval( 2) 166666 dwFrameInterval( 3) 166833 dwFrameInterval( 4) 200000 dwFrameInterval( 5) 333333 dwFrameInterval( 6) 333667 dwFrameInterval( 7) 400000 dwFrameInterval( 8) 416666 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 3840 wHeight 2160 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 333333 bFrameIntervalType 4 dwBytesPerLine 0 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 333667 dwFrameInterval( 2) 400000 dwFrameInterval( 3) 416666 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 3 bmCapabilities 0x01 Still image supported wWidth 2560 wHeight 1440 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 4 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 800 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 5 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 720 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 dwFrameInterval( 2) 200000 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 6 bmCapabilities 0x01 Still image supported wWidth 720 wHeight 576 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 200000 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 200000 dwFrameInterval( 1) 400000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 7 bmCapabilities 0x01 Still image supported wWidth 720 wHeight 480 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 4 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 dwFrameInterval( 2) 333333 dwFrameInterval( 3) 333667 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 8 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 0 (Unspecified) bTransferCharacteristics 0 (Unspecified) bMatrixCoefficients 0 (Unspecified) VideoStreaming Interface Descriptor: bLength 28 bDescriptorType 36 bDescriptorSubtype 16 (FORMAT_FRAME_BASED) bFormatIndex 2 bNumFrameDescriptors 8 guidFormat {43564548-0000-0010-8000-00aa= 00389b71} bBitsPerPixel 24 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 1 bVariableSize 1 VideoStreaming Interface Descriptor: bLength 62 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 1920 wHeight 1080 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 9 dwBytesPerLine 0 dwFrameInterval( 0) 83333 dwFrameInterval( 1) 83416 dwFrameInterval( 2) 166666 dwFrameInterval( 3) 166833 dwFrameInterval( 4) 200000 dwFrameInterval( 5) 333333 dwFrameInterval( 6) 333667 dwFrameInterval( 7) 400000 dwFrameInterval( 8) 416666 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 3840 wHeight 2160 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 333333 bFrameIntervalType 4 dwBytesPerLine 0 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 333667 dwFrameInterval( 2) 400000 dwFrameInterval( 3) 416666 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 3 bmCapabilities 0x01 Still image supported wWidth 2560 wHeight 1440 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 4 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 800 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 5 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 720 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 dwFrameInterval( 2) 200000 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 6 bmCapabilities 0x01 Still image supported wWidth 720 wHeight 576 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 200000 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 200000 dwFrameInterval( 1) 400000 VideoStreaming Interface Descriptor: bLength 42 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 7 bmCapabilities 0x01 Still image supported wWidth 720 wHeight 480 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 4 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 dwFrameInterval( 2) 333333 dwFrameInterval( 3) 333667 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 17 (FRAME_FRAME_BASED) bFrameIndex 8 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 33554432 dwMaxBitRate 268435456 dwDefaultFrameInterval 166666 bFrameIntervalType 2 dwBytesPerLine 0 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 166833 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 0 (Unspecified) bTransferCharacteristics 0 (Unspecified) bMatrixCoefficients 0 (Unspecified) VideoStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 6 (FORMAT_MJPEG) bFormatIndex 3 bNumFrameDescriptors 1 bFlags 0 Fixed-size samples: No 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 1 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 1920 wHeight 1080 dwMinBitRate 314572800 dwMaxBitRate 314572800 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 1 dwFrameInterval( 0) 166666 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 0 (Unspecified) bTransferCharacteristics 0 (Unspecified) bMatrixCoefficients 0 (Unspecified) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 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 0x0602 Digital Audio Interface bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 3 iTerminal 0 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 3 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 2 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] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x00c4 1x 196 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 Cc: stable@vger.kernel.org Fixes: b400b6f28af0 ("media: uvcvideo: Force UVC version to 1.0a for 1bcf:0= b40") # When version overwritte was added Reported-by: Edwin Gatier Closes: https://lore.kernel.org/linux-media/CANiDSCu4AW=3DJZ9FS+Ny=3DDK_+Lq= qytGvSe+V6aVncRiGRiyDMfA@mail.gmail.com/T/#me584c35c4b523ac455925a1590a3de8= efc354349 Tested-by: Edwin Gatier Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_driver.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc= _driver.c index e289cc71ba98..c8646032a65c 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -2851,6 +2851,17 @@ static const struct usb_device_id uvc_ids[] =3D { .bInterfaceSubClass =3D 1, .bInterfaceProtocol =3D 0, .driver_info =3D (kernel_ulong_t)&uvc_quirk_fix_bandwidth }, + /* Avermedia GC515 */ + { .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor =3D 0x07ca, + .idProduct =3D 0x1515, + .bInterfaceClass =3D USB_CLASS_VIDEO, + .bInterfaceSubClass =3D 1, + .bInterfaceProtocol =3D UVC_PC_PROTOCOL_15, + .driver_info =3D (kernel_ulong_t)&(const struct uvc_device_info){ + .uvc_version =3D 0x0110, + } }, /* ViMicro Vega */ { .match_flags =3D USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, --=20 2.55.0.1007.g17ff1f9808-goog From nobody Fri Sep 25 14:31:44 2026 Received: from mail-lr2-f12.google.com (mail-lr2-f12.google.com [74.125.230.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB05E3CF976 for ; Fri, 11 Sep 2026 09:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.230.76 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789120232; cv=none; b=gbNxSf8gMSjb/q1O2vRDjFZMZYWlVJa74U3/BRY/4+YpPlfmxvJE2iPbK7AZkSASFN1OAi1QzTI8FoV62wplHx6Q9mIk4Y8PssmX+Ya+lW0V3I/OJaPJ2a6yLC0JC+45Ac7H8uPXoEsacE2udVJ3rkWh9jMbnM3GIVSfSUi3r10= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789120232; c=relaxed/simple; bh=9tXk3ZPAewPfyFZKQu+IkCIE9LAc0tIpxqr26LRPIgk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eNmwPn/1F9w1lb2UHhSJ4IogdplX3XZNgqYjd50+Xdd136pM9LfCm1tRaK7k95qHrjlRP/fUDQ3jWPFGH+knflB+9jTd2pq+162L0l+AGoyfQaanC6BpGRW3S1OLzn/WgQEat+Z4Gxah90Rx642+NDe0dmT4QZe0mKBcJg68gaY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=I/DiebuS; arc=none smtp.client-ip=74.125.230.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="I/DiebuS" Received: by mail-lr2-f12.google.com with SMTP id 38308e7fff4ca-3a2ff17443eso4497131fa.2 for ; Fri, 11 Sep 2026 02:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1789120228; x=1789725028; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6gn6qkEjLLi70HzK/Q8W+KKNiCy2U+M4TIvbFvnVLaM=; b=I/DiebuST/+VLQGv03jSfZ3tJvqmJR611mcSfLbDoQmwJjeuYIddVI6pwVT9C3fugt L+bBBjHqGLvz1SbEXSL/mkfX/Jd7QNUX3/HKo8fS7QSF2B0UKZePqvAx8Q9j5FlgCtld UsBqhAtkyo9y90c7zDWxYIJKiUhOzeSoVjHcw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789120228; x=1789725028; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6gn6qkEjLLi70HzK/Q8W+KKNiCy2U+M4TIvbFvnVLaM=; b=bI9PwGEo5+fggzY2LyrP1N0Le2nLP2GfT9BWawtiT0VMbXjnUpcaBSZrBIKlfc2v82 bLxh/FxRqzFHDZgmCelGvGoBG322PoZNBtmtG0POVMo+nLxoRSuACtwkciShS13rFC58 vHPvLpZifntcYszRK3/DPu0lSN2z6mvzinJB1702gVHtpn2u5v2+ysJAI4XR4+hHP4y4 ExSodiRVu0myQdjgcV1fh3m91nVfLk77Stm8F2scKGzXGjmjKwhcyy5TpQGOo9Uua57b QZpqzKuYbxUChmdN2ZPhgkOcOWnB7i9iIlTxCA7cvUQ2NVnSf00XedIHIehRqc4JwvJa wz7Q== X-Forwarded-Encrypted: i=1; AKwUvBw87L+AqYOe+seXbcGeCYGXwjj+vz6kWfnUxD/FYoiO9Wd7JxJW3FklwW9Fu8lzuX7PkF2DY8vV8/HaU4Q=@vger.kernel.org X-Gm-Message-State: AFuF++lkPSoJKY8UtW3WBtqSiThTbYg2qNkU4Ui29576Y0EA5zTDcKiH Qv78IlHonYvFYAXeSTsnGj+efVQ927BWouR3KBE02GkBg1kCX+2JjPFQqBo+elDxewgRQwPSAtn yNjp2Wg== X-Gm-Gg: AYBFou1O9hxvnaa1C+sVuvHZzpjkeBxhZv4mHZ1WLrqYJzIog1GHqgYZZeSxfbFtzII 4hm15uelnrSbxRE8Yopsl63jqwicsIiEeacFPA7RfvvnvSiRkQXpNaW6FOiw820cREucDlFBxGA kTCbJBFu8PHsWkovcnKJLBmRQikCin3OAqS35eNMJBp39GInmwIIxi6K+VI6K3C40LQAF7dGXR7 0BNQiBw8sxhTQJ1Z7FDhInhi1rsGtLivDrfS3sv++CQm70cfGjosU6IYIG0IefQdbUOiQXSLSFZ tUbxnV6fiCDhmlFrC25dzMbpqqlZd3zN8gnqlAhZAKsBF1O8hQN7bI6XurxwkzQgeb7jpUIM1Ie U9Et4PrCn1FdEqXOTKMwK4i/Ei4AGe+X2kFgqRfuqcAb0OvcUAc/Fh7Z9+tqnXzyv78bwdmDSYa Wn8tj+NwdewpWFKCHJ2OsBYX+DPIWjUONNvKjK1DuYusxsAPkyd7v19RDM+hWRYPL/KtptC3YtO XxESQcy6IiHCgbeTRRwOi2GRKnYk9doABRVMh9nVVDiJ18aGVM= X-Received: by 2002:a05:651c:cc:b0:3a3:3fa5:babf with SMTP id 38308e7fff4ca-3a5a5044a7cmr5260761fa.6.1789120228371; Fri, 11 Sep 2026 02:50:28 -0700 (PDT) Received: from ribalda.c.googlers.com (11.36.88.34.bc.googleusercontent.com. [34.88.36.11]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3a5a33263ebsm5138231fa.17.2026.09.11.02.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 02:50:27 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 11 Sep 2026 09:50:23 +0000 Subject: [PATCH v2 2/2] media: uvcvideo: Automatically handle cameras with invalid uvc_version Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-uvc-version-v2-2-395f27b0444c@chromium.org> References: <20260911-uvc-version-v2-0-395f27b0444c@chromium.org> In-Reply-To: <20260911-uvc-version-v2-0-395f27b0444c@chromium.org> To: Laurent Pinchart , Hans de Goede , Mauro Carvalho Chehab Cc: Edwin Gatier , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Ricardo Ribalda X-Mailer: b4 0.14.3 Currently, the driver expects that cameras properly implement the spec version that they announce, and if they fail to do so, we do not continue probing the driver. To make drivers more fun, some vendors decided to announce that they are a UVC version that they are not. Until now, we handled those cameras via quirks. Unfortunately, reality has shown us that there are more cameras out there with an invalid uvc_version than we initially predicted. This patch tries to handle these cameras with an identity crisis automatically. We still shame them in dmesg. But now they will work. Tested-by: Edwin Gatier Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_driver.c | 11 ++++++---- drivers/media/usb/uvc/uvc_video.c | 44 ++++++++++++++++++++++++++--------= ---- drivers/media/usb/uvc/uvcvideo.h | 1 + 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc= _driver.c index c8646032a65c..eede4b99b156 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1169,9 +1169,7 @@ static int uvc_parse_standard_control(struct uvc_devi= ce *dev, =20 case UVC_VC_PROCESSING_UNIT: n =3D buflen >=3D 8 ? buffer[7] : 0; - p =3D dev->uvc_version >=3D 0x0110 ? 10 : 9; - - if (buflen < p + n) { + if (buflen < 9 + n) { uvc_dbg(dev, DESCR, "device %d videocontrol interface %d PROCESSING_UNIT error\n", udev->devnum, alts->desc.bInterfaceNumber); @@ -1188,7 +1186,12 @@ static int uvc_parse_standard_control(struct uvc_dev= ice *dev, unit->processing.bControlSize =3D buffer[7]; unit->processing.bmControls =3D (u8 *)unit + sizeof(*unit); memcpy(unit->processing.bmControls, &buffer[8], n); - if (dev->uvc_version >=3D 0x0110) + + /* + * We are not using bmVideoStandards, so there is no need to + * warn the user if it is missing. + */ + if (dev->uvc_version >=3D 0x0110 && buflen >=3D (n + 10)) unit->processing.bmVideoStandards =3D buffer[9+n]; =20 uvc_entity_set_name(dev, unit, "Processing", buffer[8+n]); diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_= video.c index fc3536a4399f..f1d32776c594 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -273,6 +273,8 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *= stream, } } =20 +#define UVC_VIDEO_CTRL_MIN_SIZE 26 + static size_t uvc_video_ctrl_size(struct uvc_streaming *stream) { /* @@ -280,7 +282,7 @@ static size_t uvc_video_ctrl_size(struct uvc_streaming = *stream) * on the protocol version. */ if (stream->dev->uvc_version < 0x0110) - return 26; + return UVC_VIDEO_CTRL_MIN_SIZE; else if (stream->dev->uvc_version < 0x0150) return 34; else @@ -290,21 +292,23 @@ static size_t uvc_video_ctrl_size(struct uvc_streamin= g *stream) static int uvc_get_video_ctrl(struct uvc_streaming *stream, struct uvc_streaming_control *ctrl, int probe, u8 query) { - u16 size =3D uvc_video_ctrl_size(stream); u8 *data; int ret; =20 + if (!stream->ctrl_size) + stream->ctrl_size =3D uvc_video_ctrl_size(stream); + if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) && query =3D=3D UVC_GET_DEF) return -EIO; =20 - data =3D kmalloc(size, GFP_KERNEL); + data =3D kmalloc(stream->ctrl_size, GFP_KERNEL); if (data =3D=3D NULL) return -ENOMEM; =20 ret =3D __uvc_query_ctrl(stream->dev, query, 0, stream->intfnum, probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data, - size, uvc_timeout_param); + stream->ctrl_size, uvc_timeout_param); =20 if ((query =3D=3D UVC_GET_MIN || query =3D=3D UVC_GET_MAX) && ret =3D=3D = 2) { /* @@ -319,7 +323,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *str= eam, ctrl->wCompQuality =3D le16_to_cpup((__le16 *)data); ret =3D 0; goto out; - } else if (query =3D=3D UVC_GET_DEF && probe =3D=3D 1 && ret !=3D size) { + } else if (query =3D=3D UVC_GET_DEF && probe =3D=3D 1 && + ret < UVC_VIDEO_CTRL_MIN_SIZE) { /* * Many cameras don't support the GET_DEF request on their * video probe control. Warn once and return, the caller will @@ -330,15 +335,24 @@ static int uvc_get_video_ctrl(struct uvc_streaming *s= tream, "Enabling workaround.\n"); ret =3D -EIO; goto out; - } else if (ret !=3D size) { + } else if (ret < UVC_VIDEO_CTRL_MIN_SIZE) { dev_err(&stream->intf->dev, "Failed to query (%s) UVC %s control : %d (exp. %u).\n", uvc_query_name(query), probe ? "probe" : "commit", - ret, size); + ret, stream->ctrl_size); ret =3D (ret =3D=3D -EPROTO) ? -EPROTO : -EIO; goto out; } =20 + if (ret !=3D stream->ctrl_size) { + dev_warn_once(&stream->intf->dev, + "UVC non compliance: Query (%s) UVC %s control had a size of %d i= nstead of %u.\n", + uvc_query_name(query), + probe ? "probe" : "commit", ret, + stream->ctrl_size); + stream->ctrl_size =3D ret; + } + ctrl->bmHint =3D le16_to_cpup((__le16 *)&data[0]); ctrl->bFormatIndex =3D data[2]; ctrl->bFrameIndex =3D data[3]; @@ -351,7 +365,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *str= eam, ctrl->dwMaxVideoFrameSize =3D get_unaligned_le32(&data[18]); ctrl->dwMaxPayloadTransferSize =3D get_unaligned_le32(&data[22]); =20 - if (size >=3D 34) { + if (ret >=3D 34) { ctrl->dwClockFrequency =3D get_unaligned_le32(&data[26]); ctrl->bmFramingInfo =3D data[30]; ctrl->bPreferedVersion =3D data[31]; @@ -381,11 +395,13 @@ static int uvc_get_video_ctrl(struct uvc_streaming *s= tream, static int uvc_set_video_ctrl(struct uvc_streaming *stream, struct uvc_streaming_control *ctrl, int probe) { - u16 size =3D uvc_video_ctrl_size(stream); u8 *data; int ret; =20 - data =3D kzalloc(size, GFP_KERNEL); + if (!stream->ctrl_size) + stream->ctrl_size =3D uvc_video_ctrl_size(stream); + + data =3D kzalloc(stream->ctrl_size, GFP_KERNEL); if (data =3D=3D NULL) return -ENOMEM; =20 @@ -401,7 +417,7 @@ static int uvc_set_video_ctrl(struct uvc_streaming *str= eam, put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]); put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]); =20 - if (size >=3D 34) { + if (stream->ctrl_size >=3D 34) { put_unaligned_le32(ctrl->dwClockFrequency, &data[26]); data[30] =3D ctrl->bmFramingInfo; data[31] =3D ctrl->bPreferedVersion; @@ -411,11 +427,11 @@ static int uvc_set_video_ctrl(struct uvc_streaming *s= tream, =20 ret =3D __uvc_query_ctrl(stream->dev, UVC_SET_CUR, 0, stream->intfnum, probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data, - size, uvc_timeout_param); - if (ret !=3D size) { + stream->ctrl_size, uvc_timeout_param); + if (ret !=3D stream->ctrl_size) { dev_err(&stream->intf->dev, "Failed to set UVC %s control : %d (exp. %u).\n", - probe ? "probe" : "commit", ret, size); + probe ? "probe" : "commit", ret, stream->ctrl_size); ret =3D -EIO; } =20 diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvi= deo.h index b6bcee4a222f..1866b26a699b 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -461,6 +461,7 @@ struct uvc_streaming { struct usb_interface *intf; int intfnum; u32 maxpsize; + unsigned int ctrl_size; =20 struct uvc_streaming_header header; enum v4l2_buf_type type; --=20 2.55.0.1007.g17ff1f9808-goog