From patchwork Fri Sep 12 07:13:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fend X-Patchwork-Id: 24346 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 2AF25C332A for ; Fri, 12 Sep 2025 07:13:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 78D0169370; Fri, 12 Sep 2025 09:13:37 +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="Gq2NxlTE"; dkim-atps=neutral Received: from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 90A666937A for ; Fri, 12 Sep 2025 09:13:30 +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=dqFRRY77dDi7ond7BaScNXXoUR2h3wlU8GqtWgqWltU=; b=Gq2NxlTELUCFXcnpPtbvFKjnf/ 2FdNM6sKfoPsVSAZes2Rtz0KOfvpBZTvGvMfRnoCWjKF3s0k89NPNDFlSc+Vj5soWSBKOhcOakrLP isH7lAN7pMVqK12pM0eMLJDqSJabi3DxqTLJDcmBK6vcecuTDuB2EuGHceNDBPg3zpro=; Received: from 194-208-208-245.tele.net ([194.208.208.245]:58477 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 1uwxyL-008cBW-OX; Fri, 12 Sep 2025 09:13:30 +0200 From: Matthias Fend Date: Fri, 12 Sep 2025 09:13:24 +0200 Subject: [PATCH v2 5/5] rkisp1: Add support for camera flash devices MIME-Version: 1.0 Message-Id: <20250912-flash_reco-v2-5-d5bb80a2e619@emfend.at> References: <20250912-flash_reco-v2-0-d5bb80a2e619@emfend.at> In-Reply-To: <20250912-flash_reco-v2-0-d5bb80a2e619@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 | 148 +++++++++++++++++++++++++++++ src/libcamera/meson [...] 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 Local_hs1_NotHoststar Sender is not from hoststar.ch|de|com 0.0 TVD_RCVD_IP Message was received from an IP address 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 cfcbb3b2590a293106cb4d1a5c5c6adb504a61af..44ffc9b68d17f271fbab5867cc72b4d4f9330381 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" @@ -1296,6 +1297,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; @@ -1503,6 +1506,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);