[{"id":2313,"web_url":"https://patchwork.libcamera.org/comment/2313/","msgid":"<20190805114522.GN29747@pendragon.ideasonboard.com>","date":"2019-08-05T11:45:22","subject":"Re: [libcamera-devel] [PATCH 3/5] include: android: Add Android\n\theaders from Cros","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Thu, Aug 01, 2019 at 05:54:18PM +0200, Jacopo Mondi wrote:\n> Copy the Android Camera3 HAL headers from the ChromiumOS build system\n> and define a new inclusion directive in the meson build system for them.\n> \n> The header files have been copied from:\n> https://chromium.googlesource.com/chromiumos/platform2\n> at revision ceb477360a8012ee38e80746258f4828aad6b4c7\n> and provide:\n> \n> 1) Android CameraHAL3 HAL headers in include/android/hardware/\n> 2) The Android system headers in include/android/system/\n> 3) The Android camera metadata headers in include/android/metadata/\n> \n> The original path in the Cros platform2/ repository is, respectively:\n> camera/android/header_files/include/hardware\n> camera/android/header_files/include/system\n> camera/android/libcamera_metadata/include/\n\nWe may want to copy the files from AOSP instead, but for now this will\ndo.\n\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  .../libhardware/include/hardware/camera3.h    | 3093 +++++++++++++++++\n>  .../include/hardware/camera_common.h          |  916 +++++\n>  .../libhardware/include/hardware/fb.h         |  173 +\n>  .../libhardware/include/hardware/gralloc.h    |  384 ++\n>  .../libhardware/include/hardware/hardware.h   |  238 ++\n>  .../android/metadata/camera_metadata_hidden.h |  100 +\n>  .../android/metadata/system/camera_metadata.h |  580 ++++\n>  .../metadata/system/camera_metadata_tags.h    | 1005 ++++++\n>  .../metadata/system/camera_vendor_tags.h      |  158 +\n>  .../android/system/core/include/android/log.h |  144 +\n>  .../system/core/include/cutils/compiler.h     |   44 +\n>  .../core/include/cutils/native_handle.h       |   69 +\n>  .../system/core/include/system/camera.h       |  298 ++\n>  .../system/core/include/system/graphics.h     |  763 ++++\n>  .../system/core/include/system/window.h       |  954 +++++\n>  meson.build                                   |    5 +\n>  16 files changed, 8924 insertions(+)\n>  create mode 100644 include/android/hardware/libhardware/include/hardware/camera3.h\n>  create mode 100644 include/android/hardware/libhardware/include/hardware/camera_common.h\n>  create mode 100644 include/android/hardware/libhardware/include/hardware/fb.h\n>  create mode 100644 include/android/hardware/libhardware/include/hardware/gralloc.h\n>  create mode 100644 include/android/hardware/libhardware/include/hardware/hardware.h\n>  create mode 100644 include/android/metadata/camera_metadata_hidden.h\n>  create mode 100644 include/android/metadata/system/camera_metadata.h\n>  create mode 100644 include/android/metadata/system/camera_metadata_tags.h\n>  create mode 100644 include/android/metadata/system/camera_vendor_tags.h\n>  create mode 100644 include/android/system/core/include/android/log.h\n>  create mode 100644 include/android/system/core/include/cutils/compiler.h\n>  create mode 100644 include/android/system/core/include/cutils/native_handle.h\n>  create mode 100644 include/android/system/core/include/system/camera.h\n>  create mode 100644 include/android/system/core/include/system/graphics.h\n>  create mode 100644 include/android/system/core/include/system/window.h\n> \n> diff --git a/include/android/hardware/libhardware/include/hardware/camera3.h b/include/android/hardware/libhardware/include/hardware/camera3.h\n> new file mode 100644\n> index 000000000000..49664dc3ceb6\n> --- /dev/null\n> +++ b/include/android/hardware/libhardware/include/hardware/camera3.h\n> @@ -0,0 +1,3093 @@\n\n\nCould you add SPDX headers in a separate patch ? You can keep the\ncopyright and license text below unchanged, but every file should have\nan SPDX header. This comment applieds to all the include/android/ files.\n\nThe license should also be added to licenses/.\n\n> +/*\n> + * Copyright (C) 2013 The Android Open Source Project\n> + *\n> + * Licensed under the Apache License, Version 2.0 (the \"License\");\n> + * you may not use this file except in compliance with the License.\n> + * You may obtain a copy of the License at\n> + *\n> + *      http://www.apache.org/licenses/LICENSE-2.0\n> + *\n> + * Unless required by applicable law or agreed to in writing, software\n> + * distributed under the License is distributed on an \"AS IS\" BASIS,\n> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n> + * See the License for the specific language governing permissions and\n> + * limitations under the License.\n> + */\n\n[snip]\n\n> diff --git a/meson.build b/meson.build\n> index 13d0605f903c..2575d0abb334 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -51,6 +51,11 @@ add_project_arguments(cpp_arguments, language : 'cpp')\n>  add_project_link_arguments(cpp_arguments, language : 'cpp')\n>  \n>  libcamera_includes = include_directories('include')\n> +android_includes = ([\n> +    include_directories('include/android/hardware/libhardware/include/'),\n> +    include_directories('include/android/system/core/include'),\n> +    include_directories('include/android/metadata/'),\n> +])\n\nI would move this to src/android/meson.build (and thus to patch 3/5) as\nI don't think it belongs to the top-level meson.build. Don't forget to\nremove the corresponding sentence from the commit message of this patch.\n\n>  \n>  subdir('include')\n>  subdir('src')","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 9CB2F60E33\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Aug 2019 13:45:24 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EA4432F9;\n\tMon,  5 Aug 2019 13:45:23 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1565005524;\n\tbh=kYByGzB8+wih7Q49j63nuPnMDUhYK/qFqNT244xzBxk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sMS+PaPBfuWCvqGr71hRwh/zNRxaTUegGFP4xyhKQlpvngVDgWp1nyF9z911AVz0t\n\t6HKwZFTbjZKM4qaU7k2iu86Hjr75ruFclALRoDupwqmQJdkkBIz2zb1Gu0C7Q9xzGt\n\t3mq9oAe+aTqGg5uZcJJHRYChASbjVsalIT8ueY70=","Date":"Mon, 5 Aug 2019 14:45:22 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190805114522.GN29747@pendragon.ideasonboard.com>","References":"<20190801155420.24694-1-jacopo@jmondi.org>\n\t<20190801155420.24694-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190801155420.24694-4-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 3/5] include: android: Add Android\n\theaders from Cros","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":"Mon, 05 Aug 2019 11:45:24 -0000"}},{"id":2314,"web_url":"https://patchwork.libcamera.org/comment/2314/","msgid":"<20190805114621.GO29747@pendragon.ideasonboard.com>","date":"2019-08-05T11:46:21","subject":"Re: [libcamera-devel] [PATCH 3/5] include: android: Add Android\n\theaders from Cros","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Aug 05, 2019 at 02:45:22PM +0300, Laurent Pinchart wrote:\n> Hi Jacopo,\n> \n> Thank you for the patch.\n> \n> On Thu, Aug 01, 2019 at 05:54:18PM +0200, Jacopo Mondi wrote:\n> > Copy the Android Camera3 HAL headers from the ChromiumOS build system\n> > and define a new inclusion directive in the meson build system for them.\n> > \n> > The header files have been copied from:\n> > https://chromium.googlesource.com/chromiumos/platform2\n> > at revision ceb477360a8012ee38e80746258f4828aad6b4c7\n> > and provide:\n> > \n> > 1) Android CameraHAL3 HAL headers in include/android/hardware/\n> > 2) The Android system headers in include/android/system/\n> > 3) The Android camera metadata headers in include/android/metadata/\n> > \n> > The original path in the Cros platform2/ repository is, respectively:\n> > camera/android/header_files/include/hardware\n> > camera/android/header_files/include/system\n> > camera/android/libcamera_metadata/include/\n> \n> We may want to copy the files from AOSP instead, but for now this will\n> do.\n> \n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  .../libhardware/include/hardware/camera3.h    | 3093 +++++++++++++++++\n> >  .../include/hardware/camera_common.h          |  916 +++++\n> >  .../libhardware/include/hardware/fb.h         |  173 +\n> >  .../libhardware/include/hardware/gralloc.h    |  384 ++\n> >  .../libhardware/include/hardware/hardware.h   |  238 ++\n> >  .../android/metadata/camera_metadata_hidden.h |  100 +\n> >  .../android/metadata/system/camera_metadata.h |  580 ++++\n> >  .../metadata/system/camera_metadata_tags.h    | 1005 ++++++\n> >  .../metadata/system/camera_vendor_tags.h      |  158 +\n> >  .../android/system/core/include/android/log.h |  144 +\n> >  .../system/core/include/cutils/compiler.h     |   44 +\n> >  .../core/include/cutils/native_handle.h       |   69 +\n> >  .../system/core/include/system/camera.h       |  298 ++\n> >  .../system/core/include/system/graphics.h     |  763 ++++\n> >  .../system/core/include/system/window.h       |  954 +++++\n> >  meson.build                                   |    5 +\n> >  16 files changed, 8924 insertions(+)\n> >  create mode 100644 include/android/hardware/libhardware/include/hardware/camera3.h\n> >  create mode 100644 include/android/hardware/libhardware/include/hardware/camera_common.h\n> >  create mode 100644 include/android/hardware/libhardware/include/hardware/fb.h\n> >  create mode 100644 include/android/hardware/libhardware/include/hardware/gralloc.h\n> >  create mode 100644 include/android/hardware/libhardware/include/hardware/hardware.h\n> >  create mode 100644 include/android/metadata/camera_metadata_hidden.h\n> >  create mode 100644 include/android/metadata/system/camera_metadata.h\n> >  create mode 100644 include/android/metadata/system/camera_metadata_tags.h\n> >  create mode 100644 include/android/metadata/system/camera_vendor_tags.h\n> >  create mode 100644 include/android/system/core/include/android/log.h\n> >  create mode 100644 include/android/system/core/include/cutils/compiler.h\n> >  create mode 100644 include/android/system/core/include/cutils/native_handle.h\n> >  create mode 100644 include/android/system/core/include/system/camera.h\n> >  create mode 100644 include/android/system/core/include/system/graphics.h\n> >  create mode 100644 include/android/system/core/include/system/window.h\n> > \n> > diff --git a/include/android/hardware/libhardware/include/hardware/camera3.h b/include/android/hardware/libhardware/include/hardware/camera3.h\n> > new file mode 100644\n> > index 000000000000..49664dc3ceb6\n> > --- /dev/null\n> > +++ b/include/android/hardware/libhardware/include/hardware/camera3.h\n> > @@ -0,0 +1,3093 @@\n> \n> \n> Could you add SPDX headers in a separate patch ? You can keep the\n> copyright and license text below unchanged, but every file should have\n> an SPDX header. This comment applieds to all the include/android/ files.\n> \n> The license should also be added to licenses/.\n> \n> > +/*\n> > + * Copyright (C) 2013 The Android Open Source Project\n> > + *\n> > + * Licensed under the Apache License, Version 2.0 (the \"License\");\n> > + * you may not use this file except in compliance with the License.\n> > + * You may obtain a copy of the License at\n> > + *\n> > + *      http://www.apache.org/licenses/LICENSE-2.0\n> > + *\n> > + * Unless required by applicable law or agreed to in writing, software\n> > + * distributed under the License is distributed on an \"AS IS\" BASIS,\n> > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n> > + * See the License for the specific language governing permissions and\n> > + * limitations under the License.\n> > + */\n> \n> [snip]\n> \n> > diff --git a/meson.build b/meson.build\n> > index 13d0605f903c..2575d0abb334 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -51,6 +51,11 @@ add_project_arguments(cpp_arguments, language : 'cpp')\n> >  add_project_link_arguments(cpp_arguments, language : 'cpp')\n> >  \n> >  libcamera_includes = include_directories('include')\n> > +android_includes = ([\n> > +    include_directories('include/android/hardware/libhardware/include/'),\n> > +    include_directories('include/android/system/core/include'),\n> > +    include_directories('include/android/metadata/'),\n> > +])\n> \n> I would move this to src/android/meson.build (and thus to patch 3/5) as\n> I don't think it belongs to the top-level meson.build. Don't forget to\n> remove the corresponding sentence from the commit message of this patch.\n\nAnd now that I wrote this I of course realise it's not correct, as the\ninclude directory is at the top level. How about moving it to\ninclude/android/meson.build ?\n\n> >  \n> >  subdir('include')\n> >  subdir('src')","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E2F960E33\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Aug 2019 13:46:24 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1A0722F9;\n\tMon,  5 Aug 2019 13:46:23 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1565005583;\n\tbh=tD/Z+eSXuwpt5v8rmOJ/FTj91TqrO8lk1BpywkZyBHw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KkWmXyIL/3p7SYuQ2wK40asv4HS2tY3EwPYIbs5GyL/YkUNn04RtDCofG9GtIcV2X\n\tS4+jKqyYZkfNZynT+6KvD7ekVvEeiZvidbVX1MqIwqQzwdsPgszO7ATMUv/yr3/5bw\n\tCpPv4jpu1KG7sqoYz3M+rUJHXcRJ5v04q3pZIkKU=","Date":"Mon, 5 Aug 2019 14:46:21 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190805114621.GO29747@pendragon.ideasonboard.com>","References":"<20190801155420.24694-1-jacopo@jmondi.org>\n\t<20190801155420.24694-4-jacopo@jmondi.org>\n\t<20190805114522.GN29747@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190805114522.GN29747@pendragon.ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 3/5] include: android: Add Android\n\theaders from Cros","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":"Mon, 05 Aug 2019 11:46:24 -0000"}}]