From patchwork Tue Dec 10 10:48:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13901255 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 D5CFC2080E1 for ; Tue, 10 Dec 2024 10:48:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733827702; cv=none; b=fzAmp6yzJXuI5LF09KHXQEVSiEskeA1cVIcY4uEAdRNjT8TihhY4lPkC5hsb8hEa2N0BzLGvxcc0g6sRW5Jicb1USylQxGCsK+YzVdbT340uKhiG31/5pqL5ibBoLJO6Vog0naeOQ3IWN/Zt3ewHiRz7w2az0MDXKSpqtD5DrDg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733827702; c=relaxed/simple; bh=+0ys5UgmQijNoQjl9/lX9fbCGBmLT0hizMSuMKyBuqk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=TCwyJlA72nxNR4y0BAx9NUV2UGr3GIXpkQ1ciWXhF2fTYrm/OSvWrgHNDbFrMcnmVJlhPmxaW1UZZYHNXyiP75qcZ4y8yWu08b9ItY64cSGmKNc6sb6792A2qnX7uhQlEWEToZBOXNaIMHQE5nrrSicCpaNAjaeufHJf/LY0Ets= 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=lgLH+rwI; arc=none smtp.client-ip=209.85.219.53 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="lgLH+rwI" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6d92e457230so1762656d6.1 for ; Tue, 10 Dec 2024 02:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733827700; x=1734432500; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=BWiBzSR7Ex3B8p6+KWz9iImmzK3cw0twXWBORsTvuDo=; b=lgLH+rwI/SVUNIjp8R5r7N6iP0oOkjYakZF7mjvNLSRUIbo8hQXNlFdv2ybFvZfO2B p5LIHmxmDSwT8MHCMO51wf38qNW1jTSaZpJKyHpNMt05OB44ERUGAZyJa5oAC3Jf3/F6 9Hyq6lx6PpSQjeWmU0TcfRnsnYJ9huP8Tsiwo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733827700; x=1734432500; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BWiBzSR7Ex3B8p6+KWz9iImmzK3cw0twXWBORsTvuDo=; b=E2MFfTWBRDbE2RsM5MVWuV5rgHSnpNuFJQZ8f5gy8NHF0VgvHBDdjRLIosMRp/616B xfIxtjWyxSP1+aIZhpMuLptxzch/BCe1p50y001hP7P2FL9g0yNnWT4crTKtiGLWjvtZ QbX9qkXEyUapEf+cG6nUJYmQTSUhuwXcw7deW9pYe8tcy2+nAaFOGZjllnFtErEtMElf TLxdqPZfRAt/8SRD1vR+55s1mgeCwV9o93dio9eLAnXQXOnzXj5VcAc/vIV5wj+0ePei +s0RBeDn3DRlf6hNpIGknu/G1voSw6df+1TdVQE75MOmnorgDH1jjycgJpuqT9xOWn1K +Szw== X-Gm-Message-State: AOJu0YyTbMsXtzwgf8+J2K28Id3wKRnEyqoEg99FKIr6J71yE/ztEnLp Bw8flcm6r7hnrM81tEhp2SPXpQt8lblbGDjIcKAMsuua1NRsRhifMnJg492giA== X-Gm-Gg: ASbGnctU6beH8FVR546sHJOnyH4eGptxqxEmVhWu8An+O4E5KJ9RuIevO3dWtkOQk+b BFNYVmb1/tCk2CK+z75vyV1s5oEKUb5RszVLaWUJ7PhrGjXHjPzvje3/kzx7mzNrktDyJqXxVwq izC3Jb4Q/DZqYGSZIpcou7nYU1us7QJn6Fh0etakUgaK/RV0Mh7MY8rgGnoOoI9y0f+WLNRPQju C2BMIhc8H+fCuAnPP5hW6gfWk77k5Qu5Lx/KcImLK42AutuZzFpoHQf4+oSiiEPzPu6+I0hKMFW pX8dNuCGIDM+W+QrffM0W7BpQTSn X-Google-Smtp-Source: AGHT+IESk67BDUndNd+G09mFCmaSmMFk4OCrEAuymf7oV6rqfgOhRr3z3pSuopcNXQ2WJ0/jRhcNJg== X-Received: by 2002:ad4:5b88:0:b0:6d8:a1b4:b589 with SMTP id 6a1803df08f44-6d91e4688a0mr58024666d6.49.1733827699767; Tue, 10 Dec 2024 02:48:19 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8da66db7csm58498926d6.23.2024.12.10.02.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 02:48:19 -0800 (PST) From: Ricardo Ribalda Date: Tue, 10 Dec 2024 10:48:14 +0000 Subject: [PATCH] media: uvcvideo: Add quirk for Actions UVC05 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241210-uvc-hdmi-suspend-v1-1-01f5dec023ea@chromium.org> X-B4-Tracking: v=1; b=H4sIAG0cWGcC/x3MQQqAIBBA0avErBtQqYiuEi1Sp5xFFg5FIN49a fkW/2cQSkwCU5Mh0cPCZ6zQbQMurHEnZF8NRplOG63wfhwGfzDKLRdFj9auWvWjG1S/Qc2uRBu //3JeSvkACfam8GIAAAA= To: Laurent Pinchart , Hans de Goede , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.13.0 Actions UVC05 is a HDMI to USB dongle that implements the UVC protocol. When the device suspends, its firmware seems to enter a weird mode when it does not produce more frames. Add the device to the quirk list to disable autosuspend. Bus 001 Device 007: ID 1de1:f105 Actions Microelectronics Co. Display capture-UVC05 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 [unknown] bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1de1 Actions Microelectronics Co. idProduct 0xf105 Display capture-UVC05 bcdDevice 4.09 iManufacturer 1 Actions Micro iProduct 2 Display capture-UVC05 iSerial 3 -1005308387 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda --- Bus 001 Device 007: ID 1de1:f105 Actions Microelectronics Co. Display capture-UVC05 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 [unknown] bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1de1 Actions Microelectronics Co. idProduct 0xf105 Display capture-UVC05 bcdDevice 4.09 iManufacturer 1 Actions Micro iProduct 2 Display capture-UVC05 iSerial 3 -1005308387 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x028a bNumInterfaces 4 bConfigurationValue 1 iConfiguration 4 Video bmAttributes 0xc0 Self Powered MaxPower 2mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 5 Display capture-UVC05 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 5 Display capture-UVC05 VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 0x0033 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 0x00000002 Auto-Exposure Mode VideoControl Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) Warning: Descriptor too short bUnitID 2 bSourceID 1 wMaxMultiplier 16384 bControlSize 2 bmControls 0x00000000 iProcessing 0 bmVideoStandards 0x09 None SECAM - 625/50 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 2 iTerminal 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 6 Video Streaming VideoStreaming Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 1 wTotalLength 0x01c1 bEndpointAddress 0x81 EP 1 IN bmInfo 0 bTerminalLink 3 bStillCaptureMethod 0 bTriggerSupport 0 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 0 VideoStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 6 (FORMAT_MJPEG) bFormatIndex 1 bNumFrameDescriptors 11 bFlags 0 Fixed-size samples: No bDefaultFrameIndex 2 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 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 1 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 1920 wHeight 1080 dwMinBitRate 31104000 dwMaxBitRate 1990656000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 333333 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 2 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 1920 wHeight 1080 dwMinBitRate 31104000 dwMaxBitRate 1990656000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 4 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 1360 wHeight 768 dwMinBitRate 15667200 dwMaxBitRate 62668800 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 5 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 1280 wHeight 1024 dwMinBitRate 19660800 dwMaxBitRate 78643200 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 6 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 1280 wHeight 960 dwMinBitRate 18432000 dwMaxBitRate 73728000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 7 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 720 dwMinBitRate 13824000 dwMaxBitRate 55296000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 8 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 1024 wHeight 768 dwMinBitRate 11796480 dwMaxBitRate 47185920 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 9 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 800 wHeight 600 dwMinBitRate 7200000 dwMaxBitRate 28800000 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 10 bmCapabilities 0x02 Still image unsupported Fixed frame-rate wWidth 720 wHeight 576 dwMinBitRate 6220800 dwMaxBitRate 24883200 dwMaxVideoFrameBufferSize 4147200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 11 bmCapabilities 0x00 Still image unsupported wWidth 720 wHeight 480 dwMinBitRate 5184000 dwMaxBitRate 20736000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 VideoStreaming Interface Descriptor: bLength 38 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 12 bmCapabilities 0x00 Still image unsupported wWidth 640 wHeight 480 dwMinBitRate 4608000 dwMaxBitRate 18432000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 166666 bFrameIntervalType 3 dwFrameInterval( 0) 166666 dwFrameInterval( 1) 333333 dwFrameInterval( 2) 666666 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)) 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 0x0027 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 0x0000 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 9 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 3 bSourceID 1 bControlSize 1 bmaControls(0) 0x03 Mute Control Volume Control bmaControls(1) 0x00 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 9 Transfer Type Isochronous Synch Type Adaptive Usage Type Data wMaxPacketSize 0x00c0 1x 192 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 [unknown] bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0001 Self Powered --- drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- base-commit: 6c10d1adae82e1c8da16e7ebd2320e69f20b9d6f change-id: 20241210-uvc-hdmi-suspend-bba1058c605f Best regards, diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index b3c8411dc05c..3205f53acea2 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -3014,6 +3014,15 @@ static const struct usb_device_id uvc_ids[] = { .bInterfaceProtocol = 0, .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_PROBE_MINMAX | UVC_QUIRK_IGNORE_SELECTOR_UNIT) }, + /* Actions Microelectronics Co. Display capture-UVC05 */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x1de1, + .idProduct = 0xf105, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_DISABLE_AUTOSUSPEND) }, /* NXP Semiconductors IR VIDEO */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,