{"id":12635,"url":"https://patchwork.libcamera.org/api/patches/12635/?format=json","web_url":"https://patchwork.libcamera.org/patch/12635/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210618103351.1642060-3-paul.elder@ideasonboard.com>","date":"2021-06-18T10:33:39","name":"[libcamera-devel,RFC,02/14] android, controls: Add and plumb MaxLatency control","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"44897f92a4f10dbd2d335b6d7b8a17cdb5a789df","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":{"id":17,"url":"https://patchwork.libcamera.org/api/users/17/?format=json","username":"epaul","first_name":"Paul","last_name":"Elder","email":"paul.elder@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/12635/mbox/","series":[{"id":2151,"url":"https://patchwork.libcamera.org/api/series/2151/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2151","date":"2021-06-18T10:33:37","name":"Preliminary FULL plumbing","version":1,"mbox":"https://patchwork.libcamera.org/series/2151/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12635/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12635/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2F430BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 18 Jun 2021 10:34:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E074868943;\n\tFri, 18 Jun 2021 12:34:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 665CC6050D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 18 Jun 2021 12:34:05 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 152733E5;\n\tFri, 18 Jun 2021 12:34:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"t7AdLKq8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624012445;\n\tbh=xgJ1noi88BFzIY/jc9lyVAkhrYdLrP5AI6PVYfCe/5Y=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=t7AdLKq88wOoV3w142eHviJDrebW/dTRVWTLyfc9F73TUGt/3l+V9g/eD4oAIpq1m\n\toOTXMUDTlXSt7/CX/n6MkUWaaKw25kdGF22iuiS3fkUmHH7Fw2pIZ4uV5nQa0wm/NS\n\tiEl9KXdif8x0dD8SR9Nh5oSCRSZjY4TFKWhnWpQ4=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 18 Jun 2021 19:33:39 +0900","Message-Id":"<20210618103351.1642060-3-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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH 02/14] android,\n\tcontrols: Add and plumb MaxLatency control","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a MaxLatency control, and plumb it into the HAL accordingly.\n\nBug: https://bugs.libcamera.org/show_bug.cgi?id=50\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/android/camera_device.cpp  |  8 ++++++++\n src/libcamera/control_ids.yaml | 10 ++++++++++\n 2 files changed, 18 insertions(+)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 25dd2569..86f47e00 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1187,6 +1187,14 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \n \t/* Sync static metadata. */\n \tint32_t maxLatency = ANDROID_SYNC_MAX_LATENCY_UNKNOWN;\n+\tconst auto &maxLatencyInfo = controlsInfo.find(&controls::draft::MaxLatency);\n+\tif (maxLatencyInfo != controlsInfo.end())\n+\t\tmaxLatency = maxLatencyInfo->second.def().get<int32_t>();\n+\tif (maxLatency < 0 && 4 < maxLatency)\n+\t\tcapabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false;\n+\t/* \\todo Double check if this is the case */\n+\tif (maxLatency != 0)\n+\t\tfullSupport = false;\n \tstaticMetadata_->addEntry(ANDROID_SYNC_MAX_LATENCY, maxLatency);\n \n \t/* Flash static metadata. */\ndiff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex d92f29f5..9d4638ae 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -622,6 +622,16 @@ controls:\n         detection, additional format conversions etc) count as an additional\n         pipeline stage.\n \n+  - MaxLatency:\n+      type: int32_t\n+      draft: true\n+      description: |\n+        The maximum number of frames that can occur after a request (different\n+        than the previous) has been submitted, and before the result's state\n+        becomes synchronized. A value of -1 indicates unknown latency, and 0\n+        indicates per-frame control. Currently identical to\n+        ANDROID_SYNC_MAX_LATENCY.\n+\n   - TestPatternMode:\n       type: int32_t\n       draft: true\n","prefixes":["libcamera-devel","RFC","02/14"]}