From patchwork Thu Aug 28 13:09:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fend X-Patchwork-Id: 24257 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 A08ACC332A for ; Thu, 28 Aug 2025 13:09:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 125EC69305; Thu, 28 Aug 2025 15:09:54 +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="FcR4zIai"; dkim-atps=neutral Received: from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 105C869301 for ; Thu, 28 Aug 2025 15:09:46 +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=d9LOX1DvwYOxhjRSOQ0loAX/jgTazITi85JZDtouFbY=; b=FcR4zIainyGO6qQKvC8IvlKVEX KqOZtNdn6j5pwdLcm/CE1e1h1e5IyPPyIANgLlwzEdsqq1o4RdLQirth5NzB3sDI+sgJRNCYhjNDB IDzU1KOmygv6IB2HGV98QqK//RCUVF9VIFCsgG/M2/4Ynt/Xx/S7Pxw+Hpan2gs6Ub6w=; 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 1urcNt-00BORr-04; Thu, 28 Aug 2025 15:09:45 +0200 From: Matthias Fend Date: Thu, 28 Aug 2025 15:09:42 +0200 Subject: [PATCH 5/5] rkisp1: Add support for camera flash devices MIME-Version: 1.0 Message-Id: <20250828-flash-support-v1-5-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 set of helpers that pipeline handlers can use to deal with camera flash devices. This mainly involves mapping controls to the flash device and vice versa. Signed-off-by: Matthias Fend --- include/libcamera/internal/flash_control.h | 23 +++++++ src/libcamera/flash_control.cpp | 103 +++++++++++++++++++++++++++++ src/libcamera/mes [...] 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" Use the flash device pipeline helpers to bring flash support to the RKISP1 pipeline. Signed-off-by: Matthias Fend --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 55d7d4442caf25c3e56880136986f48c1447c433..585bb2f0b51a2fe76cc84fa1a62cf66ef43c5723 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -39,6 +39,7 @@ #include "libcamera/internal/converter/converter_v4l2_m2m.h" #include "libcamera/internal/delayed_controls.h" #include "libcamera/internal/device_enumerator.h" +#include "libcamera/internal/flash_control.h" #include "libcamera/internal/framebuffer.h" #include "libcamera/internal/ipa_manager.h" #include "libcamera/internal/media_device.h" @@ -1294,6 +1295,8 @@ int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data) activeCrop_ = scalerMaxCrop_; } + FlashControl::updateFlashControls(data->sensor_->flash(), controls); + /* Add the IPA registered controls to list of camera controls. */ for (const auto &ipaControl : data->ipaControls_) controls[ipaControl.first] = ipaControl.second; @@ -1501,6 +1504,8 @@ void PipelineHandlerRkISP1::imageBufferReady(FrameBuffer *buffer) info->metadataProcessed = true; } + FlashControl::handleFlashControls(data->sensor_->flash(), request->controls(), request->metadata()); + if (!useDewarper_) { completeBuffer(request, buffer); tryCompleteRequest(info);