From patchwork Fri Jun 18 10:33:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12642 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 004E3BD78E for ; Fri, 18 Jun 2021 10:34:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B6BA46050D; Fri, 18 Jun 2021 12:34:19 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="n/7fOFud"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 65E8A68945 for ; Fri, 18 Jun 2021 12:34:17 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 091E23E5; Fri, 18 Jun 2021 12:34:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624012457; bh=i1UmYNrHYnx1fY9FEZR2TcibEIkhl38gdzlu4qHv3zI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n/7fOFudTtjJwN8sbBxGLtrIafZwLM89h/xWh1yQJJ8t2wJMN75P27ak4ECIPaijY 43g8h29zu4AbXJUloDZlb5tOfkvDkQuog/MShhZGFUD9XL8uivCB1CW5tXnwzc4qFl 6J9lmdj3eJYzX/xtOr4mLlLECcD+JrewbyAZLOy8= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 19:33:46 +0900 Message-Id: <20210618103351.1642060-10-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618103351.1642060-1-paul.elder@ideasonboard.com> References: <20210618103351.1642060-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 09/14] android: Plumb AwbLock control 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" Plumb the AwbLock control into the HAL for CONTROL_AWB_LOCK_AVAILABLE_MODES for static metadata. Bug: https://bugs.libcamera.org/show_bug.cgi?id=45 Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- TODO: plumb result metadata --- src/android/camera_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index a8b6fa38..e89afbb1 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1032,6 +1032,14 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() aeLockAvailable); uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE; + const auto &awbLockInfo = controlsInfo.find(&controls::AwbLock); + if (awbLockInfo != controlsInfo.end()) { + awbLockAvailable = awbLockInfo->second.max().get(); + } + if (!awbLockAvailable) { + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false; + capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] = false; + } staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE, awbLockAvailable);