{"id":3333,"url":"https://patchwork.libcamera.org/api/1.1/patches/3333/?format=json","web_url":"https://patchwork.libcamera.org/patch/3333/","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":"<20200326145927.324919-6-jacopo@jmondi.org>","date":"2020-03-26T14:59:26","name":"[libcamera-devel,v4,5/6] libcamera: sensor: Add OV5670 camera sensor","commit_ref":null,"pull_url":null,"state":"rfc","archived":false,"hash":"e11afa5db687b1407cb52ac06788d18a46887f55","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":{"id":15,"url":"https://patchwork.libcamera.org/api/1.1/users/15/?format=json","username":"jmondi","first_name":"Jacopo","last_name":"Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/patch/3333/mbox/","series":[{"id":782,"url":"https://patchwork.libcamera.org/api/1.1/series/782/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=782","date":"2020-03-26T14:59:21","name":"Camera properties and camera sensor factory","version":4,"mbox":"https://patchwork.libcamera.org/series/782/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3333/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3333/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 943BF60414\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 15:56:35 +0100 (CET)","from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 599DD20006\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 14:56:35 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 26 Mar 2020 15:59:26 +0100","Message-Id":"<20200326145927.324919-6-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20200326145927.324919-1-jacopo@jmondi.org>","References":"<20200326145927.324919-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 5/6] libcamera: sensor: Add OV5670\n\tcamera sensor","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>","X-List-Received-Date":"Thu, 26 Mar 2020 14:56:36 -0000"},"content":"Add an OV5670 class to handle the Omnivision OV5670 image sensor\nand register it to the camera sensor factory and initialize its pixel\narray properties by overriding CameraSensor::initProperties() method.\n\nAdd the newly created src/libcamera/sensor/ directory to the Doxygen\nexclude paths, as the documentation of each CameraSensor sub-class\ndoes not belong to the library core documentation.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n Documentation/Doxyfile.in        |  3 +-\n src/libcamera/meson.build        |  1 +\n src/libcamera/sensor/meson.build |  3 ++\n src/libcamera/sensor/ov5670.cpp  | 54 ++++++++++++++++++++++++++++++++\n 4 files changed, 60 insertions(+), 1 deletion(-)\n create mode 100644 src/libcamera/sensor/meson.build\n create mode 100644 src/libcamera/sensor/ov5670.cpp","diff":"diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\nindex 3dffbf823398..0df93d593b25 100644\n--- a/Documentation/Doxyfile.in\n+++ b/Documentation/Doxyfile.in\n@@ -846,7 +846,8 @@ EXCLUDE                = @TOP_SRCDIR@/include/libcamera/span.h \\\n \t\t\t @TOP_SRCDIR@/src/libcamera/include/device_enumerator_sysfs.h \\\n \t\t\t @TOP_SRCDIR@/src/libcamera/include/device_enumerator_udev.h \\\n \t\t\t @TOP_SRCDIR@/src/libcamera/pipeline/ \\\n-\t\t\t @TOP_SRCDIR@/src/libcamera/proxy/\n+\t\t\t @TOP_SRCDIR@/src/libcamera/proxy/ \\\n+\t\t\t @TOP_SRCDIR@/src/libcamera/sensor/\n \n # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or\n # directories that are symbolic links (a Unix file system feature) are excluded\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 87fa09cde63d..358c784baa20 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -57,6 +57,7 @@ includes = [\n \n subdir('pipeline')\n subdir('proxy')\n+subdir('sensor')\n \n libatomic = cc.find_library('atomic', required : false)\n libdl = cc.find_library('dl')\ndiff --git a/src/libcamera/sensor/meson.build b/src/libcamera/sensor/meson.build\nnew file mode 100644\nindex 000000000000..7af70370cf5c\n--- /dev/null\n+++ b/src/libcamera/sensor/meson.build\n@@ -0,0 +1,3 @@\n+libcamera_sources += files([\n+    'ov5670.cpp',\n+])\ndiff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\nnew file mode 100644\nindex 000000000000..d7339b9792e1\n--- /dev/null\n+++ b/src/libcamera/sensor/ov5670.cpp\n@@ -0,0 +1,54 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2020, Google Inc.\n+ *\n+ * ov5670.cpp - OV5670 camera sensor\n+ */\n+\n+#include <libcamera/property_ids.h>\n+\n+#include \"camera_sensor.h\"\n+\n+namespace libcamera {\n+\n+class OV5670 final : public CameraSensor\n+{\n+public:\n+\tOV5670(const MediaEntity *entity);\n+\tint initProperties();\n+};\n+\n+/*\n+ * \\class OV5670\n+ * \\brief Camera sensor class for Omnivision OV5670 image sensor\n+ */\n+\n+/*\n+ * \\brief Construct the ov5670 sensor class\n+ * \\param[in] entity The media entity representing the sensor\n+ */\n+OV5670::OV5670(const MediaEntity *entity)\n+\t: CameraSensor(entity)\n+{\n+}\n+\n+/*\n+ * \\brief Initialize Camera properties with ov5670 specific values\n+ * \\return 0 on success, a negative error code otherwise\n+ */\n+int OV5670::initProperties()\n+{\n+\t/* Pixel Array Properties. */\n+\tproperties_.set(properties::PixelArraySize, { 2.9457f, 2.214f });\n+\tproperties_.set(properties::PixelArray, { 2592, 1944 });\n+\tproperties_.set(properties::ActiveAreas, { 16, 6, 2560, 1920 });\n+\tproperties_.set(properties::BayerFilterArrangement,\n+\t\t\tproperties::BayerFilterGRBG);\n+\tproperties_.set(properties::ISOSensitivityRange, { 50, 800 });\n+\n+\treturn CameraSensor::initProperties();\n+}\n+\n+REGISTER_CAMERA_SENSOR(OV5670, \"ov5670\");\n+\n+}; /* namespace libcamera */\n","prefixes":["libcamera-devel","v4","5/6"]}