{"id":20771,"url":"https://patchwork.libcamera.org/api/patches/20771/?format=json","web_url":"https://patchwork.libcamera.org/patch/20771/","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":"<20240805120522.1613342-2-stefan.klug@ideasonboard.com>","date":"2024-08-05T12:05:02","name":"[v1,1/6] libcamera: controls: Update the ColourTemperature control to be writable","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"2f4b51b8b6d3073ee1783d626af68884d57af39e","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/?format=json","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20771/mbox/","series":[{"id":4486,"url":"https://patchwork.libcamera.org/api/series/4486/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4486","date":"2024-08-05T12:05:01","name":"rkisp1: Add manual colour temperature control","version":1,"mbox":"https://patchwork.libcamera.org/series/4486/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20771/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20771/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 01F8AC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Aug 2024 12:05:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A66CF63385;\n\tMon,  5 Aug 2024 14:05:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AB43D6195D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Aug 2024 14:05:52 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:30ff:e7b4:349c:44ce])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5EC20581;\n\tMon,  5 Aug 2024 14:05:01 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"A9s/S2EV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1722859501;\n\tbh=SWD+JJG6iwx8L2d9BHWiU2/XvE5aNdYH6jstXTLijeE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=A9s/S2EVVe4l3hE/JntiZmY2vBzzz/90/21ooPGOKn+ngxu4oHbtxKIFityFMdlYA\n\tP5Fr8vXAe2DJ/AeYZt+wD4s5EEjw2KnBE/GHGCFPBRZl6BxB5eL0gF23t6V4s7/wsw\n\t34KEYZh9KP+6qd1IZ6KhXJbPECH0t7orvnAWgUQg=","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"David Plowman <david.plowman@raspberrypi.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>","Subject":"[PATCH v1 1/6] libcamera: controls: Update the ColourTemperature\n\tcontrol to be writable","Date":"Mon,  5 Aug 2024 14:05:02 +0200","Message-ID":"<20240805120522.1613342-2-stefan.klug@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20240805120522.1613342-1-stefan.klug@ideasonboard.com>","References":"<20240805120522.1613342-1-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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":"For manual control it is helpful to be able to specify a fixed colour\ntemperature. It also provides a easy way to apply the temperature\nspecific CCMs and colour gains that are contained in the tuning files.\n\nDocument this and update the control dependencies.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/libcamera/control_ids_core.yaml | 24 ++++++++++++++++++++----\n 1 file changed, 20 insertions(+), 4 deletions(-)","diff":"diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\nindex 9d413a94e0ee..90a52bccaa98 100644\n--- a/src/libcamera/control_ids_core.yaml\n+++ b/src/libcamera/control_ids_core.yaml\n@@ -252,9 +252,12 @@ controls:\n   - AwbEnable:\n       type: bool\n       description: |\n-        Enable or disable the AWB.\n+        Enable or disable the AWB. Disabling AWB stops updates to the\n+        ColourGains and to the ColourCorrectionMatrix.\n \n+        \\sa ColourCorrectionMatrix\n         \\sa ColourGains\n+        \\sa ColourTemperature\n \n   # AwbMode needs further attention:\n   # - Auto-generate max enum value.\n@@ -309,13 +312,24 @@ controls:\n         disabled.\n \n         \\sa AwbEnable\n+        \\sa ColourTemperature\n       size: [2]\n \n   - ColourTemperature:\n       type: int32_t\n-      description: Report the current estimate of the colour temperature, in\n-        kelvin, for this frame. The ColourTemperature control can only be\n-        returned in metadata.\n+      description: |\n+        Report the current estimate of the colour temperature, in kelvin, for\n+        this frame. An implementation may also allow this control to be set when\n+        AWB is disabled. In that case ColourGains and the ColourCorrectionMatrix\n+        get set accordingly. If either ColourGains or ColourCorrectionMatrix are\n+        specified at the same time, they takes precedence.\n+\n+        Note that the metadata always contains the measured value, even when the\n+        value was set manually.\n+\n+        \\sa AwbEnable\n+        \\sa ColourCorrectionMatrix\n+        \\sa ColourGains\n \n   - Saturation:\n       type: float\n@@ -365,6 +379,8 @@ controls:\n         transformation. The 3x3 matrix is stored in conventional reading\n         order in an array of 9 floating point values.\n \n+        \\sa AwbEnable\n+        \\sa ColourTemperature\n       size: [3,3]\n \n   - ScalerCrop:\n","prefixes":["v1","1/6"]}