From patchwork Fri Sep 16 10:37:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kate Hsuan X-Patchwork-Id: 17375 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 2A73FC3272 for ; Fri, 16 Sep 2022 10:37:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E8AD461FBA; Fri, 16 Sep 2022 12:37:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1663324658; bh=+LX1xPaaR2C8yA6D4RnRXY9lbP66wLhrJtiprkp5Akg=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EBC0KiK1uUBvuNTpAfMIBIxAbB2TJAGjJM5020Da402rpIS03ZSLOxcCIKlQXwxyJ sX36gG08czz6WiNy1qOXJDtGkJnakarqo6s/PwmO3E9jTlrauIOMaC1ZfpeSKYM0iS 6pVdDXWfc8A3etcHYPpTPtFv9XLBsA+FQm1IILCdGe+m3jGOk/2psD4XzX02i1yru1 vT6ktgDuYdLw3HsjtqTpin5CFtk1uEVnWkCSqsCODaKaBf8xwYuzskSUsM2Vs1SLKp 3LANQ4qPOnVcenjDrrL8B70pkpD9V2staIrc7yWvq5r8J+QDqF9T96lkqzhg7A0PNM K31mWZXXY4pwQ== Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D1EA61FAB for ; Fri, 16 Sep 2022 12:37:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="C2L2R+cV"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663324656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BUd4fh3maUw7N0BUVSH1+BM4NctThW+3TbIDj42y71o=; b=C2L2R+cVtNJDoRX+uvIdDYDQu04K+XRRfdMLTePR4t5Ro6XfG2pMnEV36l/UTZZi36Pm0K CB+oMwQOgAh7hIKohjdtaao45vXsHWl965FUiKArMbaPsVlzHpylpm8JmSys18IlGs7Vrq hxALVMTyUXdzT/SXGfoI+WazlIPkbh0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-pZ3drWUtNx-Bu6e2PSDSUA-1; Fri, 16 Sep 2022 06:37:35 -0400 X-MC-Unique: pZ3drWUtNx-Bu6e2PSDSUA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E932F101A52A for ; Fri, 16 Sep 2022 10:37:34 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.39.193.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1E5740F2D20; Fri, 16 Sep 2022 10:37:32 +0000 (UTC) To: libcamera devel , Hans De Goede Date: Fri, 16 Sep 2022 18:37:11 +0800 Message-Id: <20220916103713.21132-2-hpa@redhat.com> In-Reply-To: <20220916103713.21132-1-hpa@redhat.com> References: <20220916103713.21132-1-hpa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [libcamera-devel] [PATCH 1/3] ipu3: Registering AF controls 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: , X-Patchwork-Original-From: Kate Hsuan via libcamera-devel From: Kate Hsuan Reply-To: Kate Hsuan Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Regitering AF controls, including AF_MODE and LENS_POSITION. Signed-off-by: Kate Hsuan --- src/ipa/ipu3/ipu3.cpp | 4 ++++ src/libcamera/pipeline/ipu3/ipu3.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index e37b2fa0..ac0c42a7 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -277,6 +277,10 @@ void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo, frameDurations[1], frameDurations[2]); + /* Af controls */ + controls[&controls::AfMode] = ControlInfo(controls::AfModeValues); + controls[&controls::LensPosition] = ControlInfo(0.0f, 1.0f, 0.5f); + *ipaControls = ControlInfoMap(std::move(controls), controls::controls); } diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 93219a6c..2e35b9bc 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -43,6 +43,8 @@ LOG_DEFINE_CATEGORY(IPU3) static const ControlInfoMap::Map IPU3Controls = { { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, + { &controls::AfMode, ControlInfo(controls::AfModeValues) }, + { &controls::LensPosition, ControlInfo(0.0f, 1.0f, 0.5f) } }; class IPU3CameraData : public Camera::Private