{"id":1947,"url":"https://patchwork.libcamera.org/api/1.1/patches/1947/?format=json","web_url":"https://patchwork.libcamera.org/patch/1947/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20190905210940.32358-6-jacopo@jmondi.org>","date":"2019-09-05T21:09:36","name":"[libcamera-devel,v7,5/9] android: camera_device: Use precise sizes for request template","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"4e6554a258d218d9e7237983b3d1925e2dd0efa3","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1947/mbox/","series":[{"id":482,"url":"https://patchwork.libcamera.org/api/1.1/series/482/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=482","date":"2019-09-05T21:09:31","name":"android: Rework metadata tags","version":7,"mbox":"https://patchwork.libcamera.org/series/482/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1947/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1947/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F230561931\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Sep 2019 23:08:16 +0200 (CEST)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 68DA0C0005;\n\tThu,  5 Sep 2019 21:08:16 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  5 Sep 2019 23:09:36 +0200","Message-Id":"<20190905210940.32358-6-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.23.0","In-Reply-To":"<20190905210940.32358-1-jacopo@jmondi.org>","References":"<20190905210940.32358-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v7 5/9] android: camera_device: Use\n\tprecise sizes for request template","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Thu, 05 Sep 2019 21:08:17 -0000"},"content":"Use more opportune sizes, manually calculated, for the generated request\ntemplate.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_device.cpp | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 969c8192c316..5f8d19b9ef3d 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -547,11 +547,11 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)\n \tif (requestTemplate_)\n \t\treturn requestTemplate_;\n \n-\t/* \\todo Use correct sizes */\n-\t#define REQUEST_TEMPLATE_ENTRIES\t  30\n-\t#define REQUEST_TEMPLATE_DATA\t\t2048\n-\trequestTemplate_ = allocate_camera_metadata(REQUEST_TEMPLATE_ENTRIES,\n-\t\t\t\t\t\t    REQUEST_TEMPLATE_DATA);\n+\t/*\n+\t * \\todo Keep this in sync with the actual number of entries.\n+\t * Currently: 12 entries, 15 bytes\n+\t */\n+\trequestTemplate_ = allocate_camera_metadata(15, 20);\n \tif (!requestTemplate_) {\n \t\tLOG(HAL, Error) << \"Failed to allocate template metadata\";\n \t\treturn nullptr;\n","prefixes":["libcamera-devel","v7","5/9"]}