From patchwork Thu Aug 28 13:09:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fend X-Patchwork-Id: 24255 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9EDEAC32BB for ; Thu, 28 Aug 2025 13:09:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 13CDE692FC; Thu, 28 Aug 2025 15:09:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=emfend.at header.i=@emfend.at header.b="aXfU5vzH"; dkim-atps=neutral Received: from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B6C94692E9 for ; Thu, 28 Aug 2025 15:09:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=emfend.at; s=mail; h=Cc:To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hrmycKM5vz19EHoPbU8uUhqnMarL+q4v19l4pkGwgEs=; b=aXfU5vzH7Chc8P0H1bZmiZ3KW3 f7ovKNFy9eVtHvirVS/W9p6tZ1TCWrQ2N5xiyyUOECSojzVz86eu9pTGFiLzuF0kJeKBB+C0BGCfY Jehfw+KzrKi+BzJ7j3iaHcv1YH1YZdu4JtMYva1db+pRBnDtYGZktI1nKkPsVEcoK1HM=; Received: from 194-208-208-245.tele.net ([194.208.208.245]:56023 helo=[127.0.1.1]) by lx20.hoststar.hosting with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1urcNr-00BORr-NJ; Thu, 28 Aug 2025 15:09:44 +0200 From: Matthias Fend Date: Thu, 28 Aug 2025 15:09:40 +0200 Subject: [PATCH 3/5] Documentation: Add flash driver requirements MIME-Version: 1.0 Message-Id: <20250828-flash-support-v1-3-4c5dc674a05b@emfend.at> References: <20250828-flash-support-v1-0-4c5dc674a05b@emfend.at> In-Reply-To: <20250828-flash-support-v1-0-4c5dc674a05b@emfend.at> To: libcamera-devel@lists.libcamera.org Cc: Matthias Fend X-Mailer: b4 0.14.2 X-Spam-Score: -0.7 X-Spam-Bar: / X-Spam-Report: Spam detection software, running on the system "lx20.hoststar.hosting", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add a class to model camera flash devices. Currently, only v4l2 flash devices are supported. The v4l2 flash devices are implemented similar to the camera lenses. Signed-off-by: Matthias Fend --- include/libcamera/internal/camera_flash.h | 75 ++++++++ include/libcamera/internal/camera_sensor.h | 2 + src/libcamera/camera_flash.cpp | 248 [...] Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: meson.build] 0.0 URIBL_DBL_BLOCKED_OPENDNS ADMINISTRATOR NOTICE: The query to dbl.spamhaus.org was blocked due to usage of an open resolver. See https://www.spamhaus.org/returnc/pub/ [URIs: meson.build] 0.0 URIBL_ZEN_BLOCKED_OPENDNS ADMINISTRATOR NOTICE: The query to zen.spamhaus.org was blocked due to usage of an open resolver. See https://www.spamhaus.org/returnc/pub/ [URIs: meson.build] -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address 0.0 Local_hs1_NotHoststar Sender is not from hoststar.ch|de|com 0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict Alignment 0.2 KAM_LOTSOFHASH Emails with lots of hash-like gibberish X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Document the requirements for the v4l2 flash device drivers required by libcamera. Signed-off-by: Matthias Fend --- Documentation/documentation-contents.rst | 1 + Documentation/flash_driver_requirements.rst | 40 +++++++++++++++++++++++++++++ Documentation/index.rst | 1 + Documentation/meson.build | 1 + 4 files changed, 43 insertions(+) diff --git a/Documentation/documentation-contents.rst b/Documentation/documentation-contents.rst index 5c1118493745692f2521bced9dab48098585c39e..be7415cde42f55ae5f9da20bc9211227b8f8658c 100644 --- a/Documentation/documentation-contents.rst +++ b/Documentation/documentation-contents.rst @@ -22,6 +22,7 @@ * :doc:`/internal-api-html/index` * | * **Documentation for System Integrators** + * :doc:`/flash_driver_requirements` * :doc:`/lens_driver_requirements` * :doc:`/sensor_driver_requirements` diff --git a/Documentation/flash_driver_requirements.rst b/Documentation/flash_driver_requirements.rst new file mode 100644 index 0000000000000000000000000000000000000000..b4a1b4866e651c506203af7089b5634808de5ab7 --- /dev/null +++ b/Documentation/flash_driver_requirements.rst @@ -0,0 +1,40 @@ +.. SPDX-License-Identifier: CC-BY-SA-4.0 + +.. include:: documentation-contents.rst + +.. _flash-driver-requirements: + +Flash Driver Requirements +========================= + +libcamera handles V4L2 flash devices in the CameraFlash class and defines +a consistent interface through its API towards other library components. + +The CameraFlash class uses the V4L2 subdev kernel API to interface with the +camera flash through a sub-device exposed to userspace by the V4L2 flash driver. + +In order for libcamera to be fully operational and provide all the required +information to interface with the camera flash to applications and pipeline +handlers, the driver must support a set of mandatory features. + +Mandatory Requirements +---------------------- + +The flash driver is assumed to be fully compliant with the V4L2 specification. + +The flash driver shall support the following V4L2 controls: + +* `V4L2_CID_FLASH_LED_MODE`_ +* `V4L2_CID_FLASH_STROBE_SOURCE`_ +* `V4L2_CID_FLASH_STROBE`_ +* `V4L2_CID_FLASH_TIMEOUT`_ +* `V4L2_CID_FLASH_INTENSITY`_ +* `V4L2_CID_FLASH_TORCH_INTENSITY`_ + +.. _V4L2_CID_FLASH_LED_MODE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html +.. _V4L2_CID_FLASH_STROBE_SOURCE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html +.. _V4L2_CID_FLASH_STROBE: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html +.. _V4L2_CID_FLASH_TIMEOUT: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html +.. _V4L2_CID_FLASH_INTENSITY: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html +.. _V4L2_CID_FLASH_TORCH_INTENSITY: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-flash.html + diff --git a/Documentation/index.rst b/Documentation/index.rst index 251112fbdf5f075b3e5c064d7230b9ad2c23b587..7ed56c17787fc643ef74cc35ef5b5db7d29eb18d 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -14,6 +14,7 @@ Camera Sensor Model Environment variables Feature Requirements + Flash driver requirements IPA Writer's guide Lens driver requirements libcamera Architecture diff --git a/Documentation/meson.build b/Documentation/meson.build index a8d4afc01dd154546d107b49bc322a993e4d78bd..965b33c60b031610251efbe59abb1682cb714d4a 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -159,6 +159,7 @@ if sphinx.found() 'documentation-contents.rst', 'environment_variables.rst', 'feature_requirements.rst', + 'flash_driver_requirements.rst', 'guides/application-developer.rst', 'guides/ipa.rst', 'guides/pipeline-handler.rst',