[{"id":17053,"web_url":"https://patchwork.libcamera.org/comment/17053/","msgid":"<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>","date":"2021-05-21T05:15:51","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Jacopo,\n\nOn Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n\n> Open the HAL configuration file in the Camera HAL manager and get\n> the camera properties for each created CameraDevice and initialize it\n> with them.\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\nWhen would you merge this series?\n\n-Hiro\n\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/android/camera_device.cpp      | 56 +++++++++++++++++++++++++-----\n>  src/android/camera_device.h        |  3 +-\n>  src/android/camera_hal_manager.cpp | 33 +++++++++++++++++-\n>  src/android/camera_hal_manager.h   |  3 ++\n>  4 files changed, 85 insertions(+), 10 deletions(-)\n>\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 89044efa7ebe..50809c6ffbdc 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -6,6 +6,7 @@\n>   */\n>\n>  #include \"camera_device.h\"\n> +#include \"camera_hal_config.h\"\n>  #include \"camera_ops.h\"\n>  #include \"post_processor.h\"\n>\n> @@ -443,12 +444,25 @@ std::unique_ptr<CameraDevice>\n> CameraDevice::create(unsigned int id,\n>  }\n>\n>  /*\n> - * Initialize the camera static information.\n> + * Initialize the camera static information retrieved from the\n> + * Camera::properties or from the cameraConfigData.\n> + *\n> + * cameraConfigData is optional for external camera devices and can be\n> + * nullptr.\n> + *\n>   * This method is called before the camera device is opened.\n>   */\n> -int CameraDevice::initialize()\n> +int CameraDevice::initialize(const CameraConfigData *cameraConfigData)\n>  {\n> -       /* Initialize orientation and facing side of the camera. */\n> +       /*\n> +        * Initialize orientation and facing side of the camera.\n> +        *\n> +        * If the libcamera::Camera provides those information as retrieved\n> +        * from firmware use them, otherwise fallback to values parsed from\n> +        * the configuration file. If the configuration file is not\n> available\n> +        * the camera is external so its location and rotation can be\n> safely\n> +        * defaulted.\n> +        */\n>         const ControlList &properties = camera_->properties();\n>\n>         if (properties.contains(properties::Location)) {\n> @@ -464,12 +478,22 @@ int CameraDevice::initialize()\n>                         facing_ = CAMERA_FACING_EXTERNAL;\n>                         break;\n>                 }\n> +\n> +               if (cameraConfigData && cameraConfigData->facing != -1 &&\n> +                   facing_ != cameraConfigData->facing) {\n> +                       LOG(HAL, Warning)\n> +                               << \"Camera location does not match\"\n> +                               << \" configuration file. Using \" <<\n> facing_;\n> +               }\n> +       } else if (cameraConfigData) {\n> +               if (cameraConfigData->facing == -1) {\n> +                       LOG(HAL, Error)\n> +                               << \"Camera facing not in configuration\n> file\";\n> +                       return -EINVAL;\n> +               }\n> +               facing_ = cameraConfigData->facing;\n>         } else {\n> -               /*\n> -                * \\todo Retrieve the camera location from configuration\n> file\n> -                * if not available from the library.\n> -                */\n> -               facing_ = CAMERA_FACING_FRONT;\n> +               facing_ = CAMERA_FACING_EXTERNAL;\n>         }\n>\n>         /*\n> @@ -483,8 +507,24 @@ int CameraDevice::initialize()\n>         if (properties.contains(properties::Rotation)) {\n>                 int rotation = properties.get(properties::Rotation);\n>                 orientation_ = (360 - rotation) % 360;\n> +               if (cameraConfigData && cameraConfigData->rotation != -1 &&\n> +                   orientation_ != cameraConfigData->rotation) {\n> +                       LOG(HAL, Warning)\n> +                               << \"Camera orientation does not match\"\n> +                               << \" configuration file. Using \" <<\n> orientation_;\n> +               }\n> +       } else if (cameraConfigData) {\n> +               if (cameraConfigData->rotation == -1) {\n> +                       LOG(HAL, Error)\n> +                               << \"Camera rotation not in configuration\n> file\";\n> +                       return -EINVAL;\n> +               }\n> +               orientation_ = cameraConfigData->rotation;\n> +       } else {\n> +               orientation_ = 0;\n>         }\n>\n> +       /* Acquire the camera and initialize available stream\n> configurations. */\n>         int ret = camera_->acquire();\n>         if (ret) {\n>                 LOG(HAL, Error) << \"Failed to temporarily acquire the\n> camera\";\n> diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n> index 11bdfec8d587..9cc0d4005242 100644\n> --- a/src/android/camera_device.h\n> +++ b/src/android/camera_device.h\n> @@ -29,6 +29,7 @@\n>  #include \"camera_worker.h\"\n>  #include \"jpeg/encoder.h\"\n>\n> +struct CameraConfigData;\n>  class CameraDevice : protected libcamera::Loggable\n>  {\n>  public:\n> @@ -36,7 +37,7 @@ public:\n>\n> std::shared_ptr<libcamera::Camera> cam);\n>         ~CameraDevice();\n>\n> -       int initialize();\n> +       int initialize(const CameraConfigData *cameraConfigData);\n>\n>         int open(const hw_module_t *hardwareModule);\n>         void close();\n> diff --git a/src/android/camera_hal_manager.cpp\n> b/src/android/camera_hal_manager.cpp\n> index bf3fcda75237..f5b86974e8e3 100644\n> --- a/src/android/camera_hal_manager.cpp\n> +++ b/src/android/camera_hal_manager.cpp\n> @@ -41,6 +41,15 @@ int CameraHalManager::init()\n>  {\n>         cameraManager_ = std::make_unique<CameraManager>();\n>\n> +       /*\n> +        * If the configuration file is not available the HAL only supports\n> +        * external cameras. If it exists but it's not valid then error\n> out.\n> +        */\n> +       if (halConfig_.exists() && !halConfig_.isValid()) {\n> +               LOG(HAL, Error) << \"HAL configuration file is not valid\";\n> +               return -EINVAL;\n> +       }\n> +\n>         /* Support camera hotplug. */\n>         cameraManager_->cameraAdded.connect(this,\n> &CameraHalManager::cameraAdded);\n>         cameraManager_->cameraRemoved.connect(this,\n> &CameraHalManager::cameraRemoved);\n> @@ -100,6 +109,8 @@ void\n> CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n>         auto iter = cameraIdsMap_.find(cam->id());\n>         if (iter != cameraIdsMap_.end()) {\n>                 id = iter->second;\n> +               if (id >= firstExternalCameraId_)\n> +                       isCameraExternal = true;\n>         } else {\n>                 isCameraNew = true;\n>\n> @@ -117,7 +128,27 @@ void\n> CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n>\n>         /* Create a CameraDevice instance to wrap the libcamera Camera. */\n>         std::unique_ptr<CameraDevice> camera = CameraDevice::create(id,\n> cam);\n> -       int ret = camera->initialize();\n> +\n> +       /*\n> +        * The configuration file must be valid, and contain a\n> corresponding\n> +        * entry for internal cameras. External cameras can be initialized\n> +        * without configuration file.\n> +        */\n> +       if (!isCameraExternal && !halConfig_.exists()) {\n> +               LOG(HAL, Error)\n> +                       << \"HAL configuration file is mandatory for\n> internal cameras\";\n> +               return;\n> +       }\n> +\n> +       const CameraConfigData *cameraConfigData =\n> halConfig_.cameraConfigData(cam->id());\n> +       if (!isCameraExternal && !cameraConfigData) {\n> +               LOG(HAL, Error)\n> +                       << \"HAL configuration entry for internal camera \"\n> +                       << cam->id() << \" is missing\";\n> +               return;\n> +       }\n> +\n> +       int ret = camera->initialize(cameraConfigData);\n>         if (ret) {\n>                 LOG(HAL, Error) << \"Failed to initialize camera: \" <<\n> cam->id();\n>                 return;\n> diff --git a/src/android/camera_hal_manager.h\n> b/src/android/camera_hal_manager.h\n> index d9bf27989965..af1581da6579 100644\n> --- a/src/android/camera_hal_manager.h\n> +++ b/src/android/camera_hal_manager.h\n> @@ -19,6 +19,8 @@\n>\n>  #include <libcamera/camera_manager.h>\n>\n> +#include \"camera_hal_config.h\"\n> +\n>  class CameraDevice;\n>\n>  class CameraHalManager\n> @@ -50,6 +52,7 @@ private:\n>         CameraDevice *cameraDeviceFromHalId(unsigned int id);\n>\n>         std::unique_ptr<libcamera::CameraManager> cameraManager_;\n> +       CameraHalConfig halConfig_;\n>\n>         const camera_module_callbacks_t *callbacks_;\n>         std::vector<std::unique_ptr<CameraDevice>> cameras_;\n> --\n> 2.31.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel\n>","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 0765CC31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 05:16:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A96C6891F;\n\tFri, 21 May 2021 07:16:04 +0200 (CEST)","from mail-ed1-x530.google.com (mail-ed1-x530.google.com\n\t[IPv6:2a00:1450:4864:20::530])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 646D56050E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 07:16:03 +0200 (CEST)","by mail-ed1-x530.google.com with SMTP id r11so21843973edt.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 May 2021 22:16:03 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"oY4qMVib\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=ewF4VAYK9z6qwXwGdkBIxoHuDPL9oQe7Xbc+mKj7VN8=;\n\tb=oY4qMVib4ngDiL9uzn4xKdpjuMS0Rj7tc82+GmK8hbdi+/bLnehsR79T4TjA+Pfsf+\n\tWcJSr8pRaAXnVRg6i1ss/n1r4569AcxW716MCXWXheVPqfk7HRa3D0ezhsE20Zq7gcIv\n\tf8LZ3TbLwMbwLyi51JddaQEWNUywzlTdJkew8=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=ewF4VAYK9z6qwXwGdkBIxoHuDPL9oQe7Xbc+mKj7VN8=;\n\tb=p+MXFVm9LeWSG2Tdw9/PFt8CSLlHLyIdidtAb1mLPl9ooBtIssQX4nyFkyXBcOGcsG\n\tUH/wkY+b5kjLxceOLEUkNjko/F5SlvDdprmsx5hDZDR42uoDthIOt0RYC8LTLbbHIz2k\n\tugXiIH5g0Pk/hxdEZUEGcJcKReS3uKV9WzKBPIQ09xbPWetelxBiD/OUyKY5JYr30aRR\n\tQAfAoYFOVmB3fbEioev0ojUaYPiiO68wT2+zY9WTdfZNLEzOLE6EIyaEpHcPX69b30J9\n\tVrKsZX4YxMS7cI3JdYxUCJ9ut+LuNdrcajCc0JTYeOIGeOQgKHgkWh5bBH+6o/9fMkKz\n\tpaxQ==","X-Gm-Message-State":"AOAM5307y95jevQSwlgkIBAecC/TqKY+81NaNDCu12W/KZB8+ySk5bzJ\n\tzCLgEM6dS7qzc4X5sqZshAjqB416ipbzcHGIrtZRxA==","X-Google-Smtp-Source":"ABdhPJz9UbjLZplpal6DKJP3IBTQmeFl7q9MiOKMX6yyoRTz4+At35C91dk3ObEyjpy3IuOxDRYCJTQFJTwDyekq2xM=","X-Received":"by 2002:a50:afa3:: with SMTP id\n\th32mr8866885edd.202.1621574163024; \n\tThu, 20 May 2021 22:16:03 -0700 (PDT)","MIME-Version":"1.0","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>","In-Reply-To":"<20210415135213.94511-5-jacopo@jmondi.org>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 21 May 2021 14:15:51 +0900","Message-ID":"<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Content-Type":"multipart/alternative; boundary=\"000000000000f6de2905c2d02745\"","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17055,"web_url":"https://patchwork.libcamera.org/comment/17055/","msgid":"<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>","date":"2021-05-21T07:29:51","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Hiro,\n\nOn Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> Hi Jacopo,\n>\n> On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n>\n> > Open the HAL configuration file in the Camera HAL manager and get\n> > the camera properties for each created CameraDevice and initialize it\n> > with them.\n> >\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >\n>\n> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n>\n> When would you merge this series?\n\nMy plan was to update my SDK to the latest version which contains the\nCL to the libcamera and libcamera-configs ebuild, so I could have\ntested one more time on a fresh image. Am I too paranoid ?\n\nCould you or Han-lin tell me which is the id of the first CPFE image\nthat contains:\nhttps://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\nhttps://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n\nI've tested those patches applied on my rather ancient SDK version,\nbut I would like to try with an out-of-the-box image\n\nThanks\n   j\n\n>\n> -Hiro\n>\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/android/camera_device.cpp      | 56 +++++++++++++++++++++++++-----\n> >  src/android/camera_device.h        |  3 +-\n> >  src/android/camera_hal_manager.cpp | 33 +++++++++++++++++-\n> >  src/android/camera_hal_manager.h   |  3 ++\n> >  4 files changed, 85 insertions(+), 10 deletions(-)\n> >\n> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > index 89044efa7ebe..50809c6ffbdc 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -6,6 +6,7 @@\n> >   */\n> >\n> >  #include \"camera_device.h\"\n> > +#include \"camera_hal_config.h\"\n> >  #include \"camera_ops.h\"\n> >  #include \"post_processor.h\"\n> >\n> > @@ -443,12 +444,25 @@ std::unique_ptr<CameraDevice>\n> > CameraDevice::create(unsigned int id,\n> >  }\n> >\n> >  /*\n> > - * Initialize the camera static information.\n> > + * Initialize the camera static information retrieved from the\n> > + * Camera::properties or from the cameraConfigData.\n> > + *\n> > + * cameraConfigData is optional for external camera devices and can be\n> > + * nullptr.\n> > + *\n> >   * This method is called before the camera device is opened.\n> >   */\n> > -int CameraDevice::initialize()\n> > +int CameraDevice::initialize(const CameraConfigData *cameraConfigData)\n> >  {\n> > -       /* Initialize orientation and facing side of the camera. */\n> > +       /*\n> > +        * Initialize orientation and facing side of the camera.\n> > +        *\n> > +        * If the libcamera::Camera provides those information as retrieved\n> > +        * from firmware use them, otherwise fallback to values parsed from\n> > +        * the configuration file. If the configuration file is not\n> > available\n> > +        * the camera is external so its location and rotation can be\n> > safely\n> > +        * defaulted.\n> > +        */\n> >         const ControlList &properties = camera_->properties();\n> >\n> >         if (properties.contains(properties::Location)) {\n> > @@ -464,12 +478,22 @@ int CameraDevice::initialize()\n> >                         facing_ = CAMERA_FACING_EXTERNAL;\n> >                         break;\n> >                 }\n> > +\n> > +               if (cameraConfigData && cameraConfigData->facing != -1 &&\n> > +                   facing_ != cameraConfigData->facing) {\n> > +                       LOG(HAL, Warning)\n> > +                               << \"Camera location does not match\"\n> > +                               << \" configuration file. Using \" <<\n> > facing_;\n> > +               }\n> > +       } else if (cameraConfigData) {\n> > +               if (cameraConfigData->facing == -1) {\n> > +                       LOG(HAL, Error)\n> > +                               << \"Camera facing not in configuration\n> > file\";\n> > +                       return -EINVAL;\n> > +               }\n> > +               facing_ = cameraConfigData->facing;\n> >         } else {\n> > -               /*\n> > -                * \\todo Retrieve the camera location from configuration\n> > file\n> > -                * if not available from the library.\n> > -                */\n> > -               facing_ = CAMERA_FACING_FRONT;\n> > +               facing_ = CAMERA_FACING_EXTERNAL;\n> >         }\n> >\n> >         /*\n> > @@ -483,8 +507,24 @@ int CameraDevice::initialize()\n> >         if (properties.contains(properties::Rotation)) {\n> >                 int rotation = properties.get(properties::Rotation);\n> >                 orientation_ = (360 - rotation) % 360;\n> > +               if (cameraConfigData && cameraConfigData->rotation != -1 &&\n> > +                   orientation_ != cameraConfigData->rotation) {\n> > +                       LOG(HAL, Warning)\n> > +                               << \"Camera orientation does not match\"\n> > +                               << \" configuration file. Using \" <<\n> > orientation_;\n> > +               }\n> > +       } else if (cameraConfigData) {\n> > +               if (cameraConfigData->rotation == -1) {\n> > +                       LOG(HAL, Error)\n> > +                               << \"Camera rotation not in configuration\n> > file\";\n> > +                       return -EINVAL;\n> > +               }\n> > +               orientation_ = cameraConfigData->rotation;\n> > +       } else {\n> > +               orientation_ = 0;\n> >         }\n> >\n> > +       /* Acquire the camera and initialize available stream\n> > configurations. */\n> >         int ret = camera_->acquire();\n> >         if (ret) {\n> >                 LOG(HAL, Error) << \"Failed to temporarily acquire the\n> > camera\";\n> > diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n> > index 11bdfec8d587..9cc0d4005242 100644\n> > --- a/src/android/camera_device.h\n> > +++ b/src/android/camera_device.h\n> > @@ -29,6 +29,7 @@\n> >  #include \"camera_worker.h\"\n> >  #include \"jpeg/encoder.h\"\n> >\n> > +struct CameraConfigData;\n> >  class CameraDevice : protected libcamera::Loggable\n> >  {\n> >  public:\n> > @@ -36,7 +37,7 @@ public:\n> >\n> > std::shared_ptr<libcamera::Camera> cam);\n> >         ~CameraDevice();\n> >\n> > -       int initialize();\n> > +       int initialize(const CameraConfigData *cameraConfigData);\n> >\n> >         int open(const hw_module_t *hardwareModule);\n> >         void close();\n> > diff --git a/src/android/camera_hal_manager.cpp\n> > b/src/android/camera_hal_manager.cpp\n> > index bf3fcda75237..f5b86974e8e3 100644\n> > --- a/src/android/camera_hal_manager.cpp\n> > +++ b/src/android/camera_hal_manager.cpp\n> > @@ -41,6 +41,15 @@ int CameraHalManager::init()\n> >  {\n> >         cameraManager_ = std::make_unique<CameraManager>();\n> >\n> > +       /*\n> > +        * If the configuration file is not available the HAL only supports\n> > +        * external cameras. If it exists but it's not valid then error\n> > out.\n> > +        */\n> > +       if (halConfig_.exists() && !halConfig_.isValid()) {\n> > +               LOG(HAL, Error) << \"HAL configuration file is not valid\";\n> > +               return -EINVAL;\n> > +       }\n> > +\n> >         /* Support camera hotplug. */\n> >         cameraManager_->cameraAdded.connect(this,\n> > &CameraHalManager::cameraAdded);\n> >         cameraManager_->cameraRemoved.connect(this,\n> > &CameraHalManager::cameraRemoved);\n> > @@ -100,6 +109,8 @@ void\n> > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> >         auto iter = cameraIdsMap_.find(cam->id());\n> >         if (iter != cameraIdsMap_.end()) {\n> >                 id = iter->second;\n> > +               if (id >= firstExternalCameraId_)\n> > +                       isCameraExternal = true;\n> >         } else {\n> >                 isCameraNew = true;\n> >\n> > @@ -117,7 +128,27 @@ void\n> > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> >\n> >         /* Create a CameraDevice instance to wrap the libcamera Camera. */\n> >         std::unique_ptr<CameraDevice> camera = CameraDevice::create(id,\n> > cam);\n> > -       int ret = camera->initialize();\n> > +\n> > +       /*\n> > +        * The configuration file must be valid, and contain a\n> > corresponding\n> > +        * entry for internal cameras. External cameras can be initialized\n> > +        * without configuration file.\n> > +        */\n> > +       if (!isCameraExternal && !halConfig_.exists()) {\n> > +               LOG(HAL, Error)\n> > +                       << \"HAL configuration file is mandatory for\n> > internal cameras\";\n> > +               return;\n> > +       }\n> > +\n> > +       const CameraConfigData *cameraConfigData =\n> > halConfig_.cameraConfigData(cam->id());\n> > +       if (!isCameraExternal && !cameraConfigData) {\n> > +               LOG(HAL, Error)\n> > +                       << \"HAL configuration entry for internal camera \"\n> > +                       << cam->id() << \" is missing\";\n> > +               return;\n> > +       }\n> > +\n> > +       int ret = camera->initialize(cameraConfigData);\n> >         if (ret) {\n> >                 LOG(HAL, Error) << \"Failed to initialize camera: \" <<\n> > cam->id();\n> >                 return;\n> > diff --git a/src/android/camera_hal_manager.h\n> > b/src/android/camera_hal_manager.h\n> > index d9bf27989965..af1581da6579 100644\n> > --- a/src/android/camera_hal_manager.h\n> > +++ b/src/android/camera_hal_manager.h\n> > @@ -19,6 +19,8 @@\n> >\n> >  #include <libcamera/camera_manager.h>\n> >\n> > +#include \"camera_hal_config.h\"\n> > +\n> >  class CameraDevice;\n> >\n> >  class CameraHalManager\n> > @@ -50,6 +52,7 @@ private:\n> >         CameraDevice *cameraDeviceFromHalId(unsigned int id);\n> >\n> >         std::unique_ptr<libcamera::CameraManager> cameraManager_;\n> > +       CameraHalConfig halConfig_;\n> >\n> >         const camera_module_callbacks_t *callbacks_;\n> >         std::vector<std::unique_ptr<CameraDevice>> cameras_;\n> > --\n> > 2.31.1\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n> >","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 699A1C31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 07:29:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E6CD46891D;\n\tFri, 21 May 2021 09:29:07 +0200 (CEST)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6ADE768918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 09:29:06 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A6A9C4000F;\n\tFri, 21 May 2021 07:29:05 +0000 (UTC)"],"Date":"Fri, 21 May 2021 09:29:51 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17056,"web_url":"https://patchwork.libcamera.org/comment/17056/","msgid":"<CAO5uPHNhyXpibsKvNnF+g94=u+9LEh59TN+M-L0hBCdw8N+neg@mail.gmail.com>","date":"2021-05-21T07:40:42","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Jacopo,\n\nOn Fri, May 21, 2021 at 4:29 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n\n> Hi Hiro,\n>\n> On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > Hi Jacopo,\n> >\n> > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> >\n> > > Open the HAL configuration file in the Camera HAL manager and get\n> > > the camera properties for each created CameraDevice and initialize it\n> > > with them.\n> > >\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > >\n> >\n> > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> >\n> > When would you merge this series?\n>\n> My plan was to update my SDK to the latest version which contains the\n> CL to the libcamera and libcamera-configs ebuild, so I could have\n> tested one more time on a fresh image. Am I too paranoid ?\n>\n> Could you or Han-lin tell me which is the id of the first CPFE image\n> that contains:\n>\n> https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n>\n> https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n\n\nThey landed on 13971.0.0.\n\n-Hiro\n\n>\n>\n> I've tested those patches applied on my rather ancient SDK version,\n> but I would like to try with an out-of-the-box image\n>\n> Thanks\n>    j\n>\n> >\n> > -Hiro\n> >\n> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > > ---\n> > >  src/android/camera_device.cpp      | 56 +++++++++++++++++++++++++-----\n> > >  src/android/camera_device.h        |  3 +-\n> > >  src/android/camera_hal_manager.cpp | 33 +++++++++++++++++-\n> > >  src/android/camera_hal_manager.h   |  3 ++\n> > >  4 files changed, 85 insertions(+), 10 deletions(-)\n> > >\n> > > diff --git a/src/android/camera_device.cpp\n> b/src/android/camera_device.cpp\n> > > index 89044efa7ebe..50809c6ffbdc 100644\n> > > --- a/src/android/camera_device.cpp\n> > > +++ b/src/android/camera_device.cpp\n> > > @@ -6,6 +6,7 @@\n> > >   */\n> > >\n> > >  #include \"camera_device.h\"\n> > > +#include \"camera_hal_config.h\"\n> > >  #include \"camera_ops.h\"\n> > >  #include \"post_processor.h\"\n> > >\n> > > @@ -443,12 +444,25 @@ std::unique_ptr<CameraDevice>\n> > > CameraDevice::create(unsigned int id,\n> > >  }\n> > >\n> > >  /*\n> > > - * Initialize the camera static information.\n> > > + * Initialize the camera static information retrieved from the\n> > > + * Camera::properties or from the cameraConfigData.\n> > > + *\n> > > + * cameraConfigData is optional for external camera devices and can be\n> > > + * nullptr.\n> > > + *\n> > >   * This method is called before the camera device is opened.\n> > >   */\n> > > -int CameraDevice::initialize()\n> > > +int CameraDevice::initialize(const CameraConfigData *cameraConfigData)\n> > >  {\n> > > -       /* Initialize orientation and facing side of the camera. */\n> > > +       /*\n> > > +        * Initialize orientation and facing side of the camera.\n> > > +        *\n> > > +        * If the libcamera::Camera provides those information as\n> retrieved\n> > > +        * from firmware use them, otherwise fallback to values parsed\n> from\n> > > +        * the configuration file. If the configuration file is not\n> > > available\n> > > +        * the camera is external so its location and rotation can be\n> > > safely\n> > > +        * defaulted.\n> > > +        */\n> > >         const ControlList &properties = camera_->properties();\n> > >\n> > >         if (properties.contains(properties::Location)) {\n> > > @@ -464,12 +478,22 @@ int CameraDevice::initialize()\n> > >                         facing_ = CAMERA_FACING_EXTERNAL;\n> > >                         break;\n> > >                 }\n> > > +\n> > > +               if (cameraConfigData && cameraConfigData->facing != -1\n> &&\n> > > +                   facing_ != cameraConfigData->facing) {\n> > > +                       LOG(HAL, Warning)\n> > > +                               << \"Camera location does not match\"\n> > > +                               << \" configuration file. Using \" <<\n> > > facing_;\n> > > +               }\n> > > +       } else if (cameraConfigData) {\n> > > +               if (cameraConfigData->facing == -1) {\n> > > +                       LOG(HAL, Error)\n> > > +                               << \"Camera facing not in configuration\n> > > file\";\n> > > +                       return -EINVAL;\n> > > +               }\n> > > +               facing_ = cameraConfigData->facing;\n> > >         } else {\n> > > -               /*\n> > > -                * \\todo Retrieve the camera location from\n> configuration\n> > > file\n> > > -                * if not available from the library.\n> > > -                */\n> > > -               facing_ = CAMERA_FACING_FRONT;\n> > > +               facing_ = CAMERA_FACING_EXTERNAL;\n> > >         }\n> > >\n> > >         /*\n> > > @@ -483,8 +507,24 @@ int CameraDevice::initialize()\n> > >         if (properties.contains(properties::Rotation)) {\n> > >                 int rotation = properties.get(properties::Rotation);\n> > >                 orientation_ = (360 - rotation) % 360;\n> > > +               if (cameraConfigData && cameraConfigData->rotation !=\n> -1 &&\n> > > +                   orientation_ != cameraConfigData->rotation) {\n> > > +                       LOG(HAL, Warning)\n> > > +                               << \"Camera orientation does not match\"\n> > > +                               << \" configuration file. Using \" <<\n> > > orientation_;\n> > > +               }\n> > > +       } else if (cameraConfigData) {\n> > > +               if (cameraConfigData->rotation == -1) {\n> > > +                       LOG(HAL, Error)\n> > > +                               << \"Camera rotation not in\n> configuration\n> > > file\";\n> > > +                       return -EINVAL;\n> > > +               }\n> > > +               orientation_ = cameraConfigData->rotation;\n> > > +       } else {\n> > > +               orientation_ = 0;\n> > >         }\n> > >\n> > > +       /* Acquire the camera and initialize available stream\n> > > configurations. */\n> > >         int ret = camera_->acquire();\n> > >         if (ret) {\n> > >                 LOG(HAL, Error) << \"Failed to temporarily acquire the\n> > > camera\";\n> > > diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n> > > index 11bdfec8d587..9cc0d4005242 100644\n> > > --- a/src/android/camera_device.h\n> > > +++ b/src/android/camera_device.h\n> > > @@ -29,6 +29,7 @@\n> > >  #include \"camera_worker.h\"\n> > >  #include \"jpeg/encoder.h\"\n> > >\n> > > +struct CameraConfigData;\n> > >  class CameraDevice : protected libcamera::Loggable\n> > >  {\n> > >  public:\n> > > @@ -36,7 +37,7 @@ public:\n> > >\n> > > std::shared_ptr<libcamera::Camera> cam);\n> > >         ~CameraDevice();\n> > >\n> > > -       int initialize();\n> > > +       int initialize(const CameraConfigData *cameraConfigData);\n> > >\n> > >         int open(const hw_module_t *hardwareModule);\n> > >         void close();\n> > > diff --git a/src/android/camera_hal_manager.cpp\n> > > b/src/android/camera_hal_manager.cpp\n> > > index bf3fcda75237..f5b86974e8e3 100644\n> > > --- a/src/android/camera_hal_manager.cpp\n> > > +++ b/src/android/camera_hal_manager.cpp\n> > > @@ -41,6 +41,15 @@ int CameraHalManager::init()\n> > >  {\n> > >         cameraManager_ = std::make_unique<CameraManager>();\n> > >\n> > > +       /*\n> > > +        * If the configuration file is not available the HAL only\n> supports\n> > > +        * external cameras. If it exists but it's not valid then error\n> > > out.\n> > > +        */\n> > > +       if (halConfig_.exists() && !halConfig_.isValid()) {\n> > > +               LOG(HAL, Error) << \"HAL configuration file is not\n> valid\";\n> > > +               return -EINVAL;\n> > > +       }\n> > > +\n> > >         /* Support camera hotplug. */\n> > >         cameraManager_->cameraAdded.connect(this,\n> > > &CameraHalManager::cameraAdded);\n> > >         cameraManager_->cameraRemoved.connect(this,\n> > > &CameraHalManager::cameraRemoved);\n> > > @@ -100,6 +109,8 @@ void\n> > > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> > >         auto iter = cameraIdsMap_.find(cam->id());\n> > >         if (iter != cameraIdsMap_.end()) {\n> > >                 id = iter->second;\n> > > +               if (id >= firstExternalCameraId_)\n> > > +                       isCameraExternal = true;\n> > >         } else {\n> > >                 isCameraNew = true;\n> > >\n> > > @@ -117,7 +128,27 @@ void\n> > > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> > >\n> > >         /* Create a CameraDevice instance to wrap the libcamera\n> Camera. */\n> > >         std::unique_ptr<CameraDevice> camera = CameraDevice::create(id,\n> > > cam);\n> > > -       int ret = camera->initialize();\n> > > +\n> > > +       /*\n> > > +        * The configuration file must be valid, and contain a\n> > > corresponding\n> > > +        * entry for internal cameras. External cameras can be\n> initialized\n> > > +        * without configuration file.\n> > > +        */\n> > > +       if (!isCameraExternal && !halConfig_.exists()) {\n> > > +               LOG(HAL, Error)\n> > > +                       << \"HAL configuration file is mandatory for\n> > > internal cameras\";\n> > > +               return;\n> > > +       }\n> > > +\n> > > +       const CameraConfigData *cameraConfigData =\n> > > halConfig_.cameraConfigData(cam->id());\n> > > +       if (!isCameraExternal && !cameraConfigData) {\n> > > +               LOG(HAL, Error)\n> > > +                       << \"HAL configuration entry for internal\n> camera \"\n> > > +                       << cam->id() << \" is missing\";\n> > > +               return;\n> > > +       }\n> > > +\n> > > +       int ret = camera->initialize(cameraConfigData);\n> > >         if (ret) {\n> > >                 LOG(HAL, Error) << \"Failed to initialize camera: \" <<\n> > > cam->id();\n> > >                 return;\n> > > diff --git a/src/android/camera_hal_manager.h\n> > > b/src/android/camera_hal_manager.h\n> > > index d9bf27989965..af1581da6579 100644\n> > > --- a/src/android/camera_hal_manager.h\n> > > +++ b/src/android/camera_hal_manager.h\n> > > @@ -19,6 +19,8 @@\n> > >\n> > >  #include <libcamera/camera_manager.h>\n> > >\n> > > +#include \"camera_hal_config.h\"\n> > > +\n> > >  class CameraDevice;\n> > >\n> > >  class CameraHalManager\n> > > @@ -50,6 +52,7 @@ private:\n> > >         CameraDevice *cameraDeviceFromHalId(unsigned int id);\n> > >\n> > >         std::unique_ptr<libcamera::CameraManager> cameraManager_;\n> > > +       CameraHalConfig halConfig_;\n> > >\n> > >         const camera_module_callbacks_t *callbacks_;\n> > >         std::vector<std::unique_ptr<CameraDevice>> cameras_;\n> > > --\n> > > 2.31.1\n> > >\n> > > _______________________________________________\n> > > libcamera-devel mailing list\n> > > libcamera-devel@lists.libcamera.org\n> > > https://lists.libcamera.org/listinfo/libcamera-devel\n> > >\n>","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 933F3C31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 07:40:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 045A56891F;\n\tFri, 21 May 2021 09:40:55 +0200 (CEST)","from mail-ed1-x529.google.com (mail-ed1-x529.google.com\n\t[IPv6:2a00:1450:4864:20::529])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 245D368918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 09:40:54 +0200 (CEST)","by mail-ed1-x529.google.com with SMTP id s6so22200445edu.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 00:40:54 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"kJdN2LFW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=LF1NSwzFh6xvrF1x2dAWTHhA0ofUn1L2+uWdVRYbaXo=;\n\tb=kJdN2LFWRmdEItvo2/97k/mGuv1mLB1JEYmBvfygOI4hk7YNW085oOiNgQDqhRKvCp\n\tBHeCLesRfsHMFeEiWMUtWbvtuTW/H2gkC03c+A8Gbs4dtCoGnakE7VFwrrqAcAn3GHWM\n\tDExT9LPiTHC6nDmTo8aSynQvQyolt3pXvI0rQ=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=LF1NSwzFh6xvrF1x2dAWTHhA0ofUn1L2+uWdVRYbaXo=;\n\tb=GN89+ysFHhymUzx0Xgif2k7ntHIQEnWQREvrsA9r/kmZh9d1SJAgFQJxSUS75l6cXI\n\tUPyRvrifpzDljqObYDGadLufCafLGG+x1mzwzWbbxKjwsPTiTJZDwSgtiaPV0zP9F37H\n\t2ZdHq3lXlDnblWrA38HfdYi5SPIWNsTUbmrqWPOQEHU16XX8tYLiIueCzK1eBae3slvI\n\tnkO8kivOvbBxtOID0etTGi1WlczM05IXdt2vW7tTTzFnIGbVUtUHEP7X8Y7DtnOLA2qy\n\t/IQ42NatOLJGTpDTf9zFHOFEtBavYiJ/K+f/GNQMNBeQZg2BJH3InfHgnApZeOCaGoje\n\txYNA==","X-Gm-Message-State":"AOAM531/wFnQ4yLwHelrcri3HrIRKydALI2eEufHjp/LbDaG/C/yhkHr\n\tAzUarJxqEqD/brKOuj4+ltg4HYslens+NsDAPF3jW+YylSY=","X-Google-Smtp-Source":"ABdhPJxjq7nBSgvS9NJfxSbJXeTcxJ2lXkV810Dkv3vPd9TYJkpCNrdqO98KIFx3eHSW5P1HBxHhWj8e/wM3z0ysHtg=","X-Received":"by 2002:a05:6402:2547:: with SMTP id\n\tl7mr9808375edb.73.1621582853769; \n\tFri, 21 May 2021 00:40:53 -0700 (PDT)","MIME-Version":"1.0","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>","In-Reply-To":"<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 21 May 2021 16:40:42 +0900","Message-ID":"<CAO5uPHNhyXpibsKvNnF+g94=u+9LEh59TN+M-L0hBCdw8N+neg@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Content-Type":"multipart/alternative; boundary=\"000000000000f91df805c2d22d2f\"","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17057,"web_url":"https://patchwork.libcamera.org/comment/17057/","msgid":"<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>","date":"2021-05-21T07:41:10","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":72,"url":"https://patchwork.libcamera.org/api/people/72/","name":"Han-lin Chen","email":"hanlinchen@google.com"},"content":"Hi Jacopo,\nThanks for the efforts. The commits should be contained in 13971 and\nany later versions.\n\nOn Fri, May 21, 2021 at 3:29 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n>\n> Hi Hiro,\n>\n> On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > Hi Jacopo,\n> >\n> > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> >\n> > > Open the HAL configuration file in the Camera HAL manager and get\n> > > the camera properties for each created CameraDevice and initialize it\n> > > with them.\n> > >\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > >\n> >\n> > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> >\n> > When would you merge this series?\n>\n> My plan was to update my SDK to the latest version which contains the\n> CL to the libcamera and libcamera-configs ebuild, so I could have\n> tested one more time on a fresh image. Am I too paranoid ?\n>\n> Could you or Han-lin tell me which is the id of the first CPFE image\n> that contains:\n> https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n> https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n>\n> I've tested those patches applied on my rather ancient SDK version,\n> but I would like to try with an out-of-the-box image\n>\n> Thanks\n>    j\n>\n> >\n> > -Hiro\n> >\n> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > > ---\n> > >  src/android/camera_device.cpp      | 56 +++++++++++++++++++++++++-----\n> > >  src/android/camera_device.h        |  3 +-\n> > >  src/android/camera_hal_manager.cpp | 33 +++++++++++++++++-\n> > >  src/android/camera_hal_manager.h   |  3 ++\n> > >  4 files changed, 85 insertions(+), 10 deletions(-)\n> > >\n> > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > index 89044efa7ebe..50809c6ffbdc 100644\n> > > --- a/src/android/camera_device.cpp\n> > > +++ b/src/android/camera_device.cpp\n> > > @@ -6,6 +6,7 @@\n> > >   */\n> > >\n> > >  #include \"camera_device.h\"\n> > > +#include \"camera_hal_config.h\"\n> > >  #include \"camera_ops.h\"\n> > >  #include \"post_processor.h\"\n> > >\n> > > @@ -443,12 +444,25 @@ std::unique_ptr<CameraDevice>\n> > > CameraDevice::create(unsigned int id,\n> > >  }\n> > >\n> > >  /*\n> > > - * Initialize the camera static information.\n> > > + * Initialize the camera static information retrieved from the\n> > > + * Camera::properties or from the cameraConfigData.\n> > > + *\n> > > + * cameraConfigData is optional for external camera devices and can be\n> > > + * nullptr.\n> > > + *\n> > >   * This method is called before the camera device is opened.\n> > >   */\n> > > -int CameraDevice::initialize()\n> > > +int CameraDevice::initialize(const CameraConfigData *cameraConfigData)\n> > >  {\n> > > -       /* Initialize orientation and facing side of the camera. */\n> > > +       /*\n> > > +        * Initialize orientation and facing side of the camera.\n> > > +        *\n> > > +        * If the libcamera::Camera provides those information as retrieved\n> > > +        * from firmware use them, otherwise fallback to values parsed from\n> > > +        * the configuration file. If the configuration file is not\n> > > available\n> > > +        * the camera is external so its location and rotation can be\n> > > safely\n> > > +        * defaulted.\n> > > +        */\n> > >         const ControlList &properties = camera_->properties();\n> > >\n> > >         if (properties.contains(properties::Location)) {\n> > > @@ -464,12 +478,22 @@ int CameraDevice::initialize()\n> > >                         facing_ = CAMERA_FACING_EXTERNAL;\n> > >                         break;\n> > >                 }\n> > > +\n> > > +               if (cameraConfigData && cameraConfigData->facing != -1 &&\n> > > +                   facing_ != cameraConfigData->facing) {\n> > > +                       LOG(HAL, Warning)\n> > > +                               << \"Camera location does not match\"\n> > > +                               << \" configuration file. Using \" <<\n> > > facing_;\n> > > +               }\n> > > +       } else if (cameraConfigData) {\n> > > +               if (cameraConfigData->facing == -1) {\n> > > +                       LOG(HAL, Error)\n> > > +                               << \"Camera facing not in configuration\n> > > file\";\n> > > +                       return -EINVAL;\n> > > +               }\n> > > +               facing_ = cameraConfigData->facing;\n> > >         } else {\n> > > -               /*\n> > > -                * \\todo Retrieve the camera location from configuration\n> > > file\n> > > -                * if not available from the library.\n> > > -                */\n> > > -               facing_ = CAMERA_FACING_FRONT;\n> > > +               facing_ = CAMERA_FACING_EXTERNAL;\n> > >         }\n> > >\n> > >         /*\n> > > @@ -483,8 +507,24 @@ int CameraDevice::initialize()\n> > >         if (properties.contains(properties::Rotation)) {\n> > >                 int rotation = properties.get(properties::Rotation);\n> > >                 orientation_ = (360 - rotation) % 360;\n> > > +               if (cameraConfigData && cameraConfigData->rotation != -1 &&\n> > > +                   orientation_ != cameraConfigData->rotation) {\n> > > +                       LOG(HAL, Warning)\n> > > +                               << \"Camera orientation does not match\"\n> > > +                               << \" configuration file. Using \" <<\n> > > orientation_;\n> > > +               }\n> > > +       } else if (cameraConfigData) {\n> > > +               if (cameraConfigData->rotation == -1) {\n> > > +                       LOG(HAL, Error)\n> > > +                               << \"Camera rotation not in configuration\n> > > file\";\n> > > +                       return -EINVAL;\n> > > +               }\n> > > +               orientation_ = cameraConfigData->rotation;\n> > > +       } else {\n> > > +               orientation_ = 0;\n> > >         }\n> > >\n> > > +       /* Acquire the camera and initialize available stream\n> > > configurations. */\n> > >         int ret = camera_->acquire();\n> > >         if (ret) {\n> > >                 LOG(HAL, Error) << \"Failed to temporarily acquire the\n> > > camera\";\n> > > diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n> > > index 11bdfec8d587..9cc0d4005242 100644\n> > > --- a/src/android/camera_device.h\n> > > +++ b/src/android/camera_device.h\n> > > @@ -29,6 +29,7 @@\n> > >  #include \"camera_worker.h\"\n> > >  #include \"jpeg/encoder.h\"\n> > >\n> > > +struct CameraConfigData;\n> > >  class CameraDevice : protected libcamera::Loggable\n> > >  {\n> > >  public:\n> > > @@ -36,7 +37,7 @@ public:\n> > >\n> > > std::shared_ptr<libcamera::Camera> cam);\n> > >         ~CameraDevice();\n> > >\n> > > -       int initialize();\n> > > +       int initialize(const CameraConfigData *cameraConfigData);\n> > >\n> > >         int open(const hw_module_t *hardwareModule);\n> > >         void close();\n> > > diff --git a/src/android/camera_hal_manager.cpp\n> > > b/src/android/camera_hal_manager.cpp\n> > > index bf3fcda75237..f5b86974e8e3 100644\n> > > --- a/src/android/camera_hal_manager.cpp\n> > > +++ b/src/android/camera_hal_manager.cpp\n> > > @@ -41,6 +41,15 @@ int CameraHalManager::init()\n> > >  {\n> > >         cameraManager_ = std::make_unique<CameraManager>();\n> > >\n> > > +       /*\n> > > +        * If the configuration file is not available the HAL only supports\n> > > +        * external cameras. If it exists but it's not valid then error\n> > > out.\n> > > +        */\n> > > +       if (halConfig_.exists() && !halConfig_.isValid()) {\n> > > +               LOG(HAL, Error) << \"HAL configuration file is not valid\";\n> > > +               return -EINVAL;\n> > > +       }\n> > > +\n> > >         /* Support camera hotplug. */\n> > >         cameraManager_->cameraAdded.connect(this,\n> > > &CameraHalManager::cameraAdded);\n> > >         cameraManager_->cameraRemoved.connect(this,\n> > > &CameraHalManager::cameraRemoved);\n> > > @@ -100,6 +109,8 @@ void\n> > > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> > >         auto iter = cameraIdsMap_.find(cam->id());\n> > >         if (iter != cameraIdsMap_.end()) {\n> > >                 id = iter->second;\n> > > +               if (id >= firstExternalCameraId_)\n> > > +                       isCameraExternal = true;\n> > >         } else {\n> > >                 isCameraNew = true;\n> > >\n> > > @@ -117,7 +128,27 @@ void\n> > > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> > >\n> > >         /* Create a CameraDevice instance to wrap the libcamera Camera. */\n> > >         std::unique_ptr<CameraDevice> camera = CameraDevice::create(id,\n> > > cam);\n> > > -       int ret = camera->initialize();\n> > > +\n> > > +       /*\n> > > +        * The configuration file must be valid, and contain a\n> > > corresponding\n> > > +        * entry for internal cameras. External cameras can be initialized\n> > > +        * without configuration file.\n> > > +        */\n> > > +       if (!isCameraExternal && !halConfig_.exists()) {\n> > > +               LOG(HAL, Error)\n> > > +                       << \"HAL configuration file is mandatory for\n> > > internal cameras\";\n> > > +               return;\n> > > +       }\n> > > +\n> > > +       const CameraConfigData *cameraConfigData =\n> > > halConfig_.cameraConfigData(cam->id());\n> > > +       if (!isCameraExternal && !cameraConfigData) {\n> > > +               LOG(HAL, Error)\n> > > +                       << \"HAL configuration entry for internal camera \"\n> > > +                       << cam->id() << \" is missing\";\n> > > +               return;\n> > > +       }\n> > > +\n> > > +       int ret = camera->initialize(cameraConfigData);\n> > >         if (ret) {\n> > >                 LOG(HAL, Error) << \"Failed to initialize camera: \" <<\n> > > cam->id();\n> > >                 return;\n> > > diff --git a/src/android/camera_hal_manager.h\n> > > b/src/android/camera_hal_manager.h\n> > > index d9bf27989965..af1581da6579 100644\n> > > --- a/src/android/camera_hal_manager.h\n> > > +++ b/src/android/camera_hal_manager.h\n> > > @@ -19,6 +19,8 @@\n> > >\n> > >  #include <libcamera/camera_manager.h>\n> > >\n> > > +#include \"camera_hal_config.h\"\n> > > +\n> > >  class CameraDevice;\n> > >\n> > >  class CameraHalManager\n> > > @@ -50,6 +52,7 @@ private:\n> > >         CameraDevice *cameraDeviceFromHalId(unsigned int id);\n> > >\n> > >         std::unique_ptr<libcamera::CameraManager> cameraManager_;\n> > > +       CameraHalConfig halConfig_;\n> > >\n> > >         const camera_module_callbacks_t *callbacks_;\n> > >         std::vector<std::unique_ptr<CameraDevice>> cameras_;\n> > > --\n> > > 2.31.1\n> > >\n> > > _______________________________________________\n> > > libcamera-devel mailing list\n> > > libcamera-devel@lists.libcamera.org\n> > > https://lists.libcamera.org/listinfo/libcamera-devel\n> > >","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 5612FC31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 07:41:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 160626891D;\n\tFri, 21 May 2021 09:41:23 +0200 (CEST)","from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com\n\t[IPv6:2a00:1450:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BE31B68918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 09:41:21 +0200 (CEST)","by mail-wr1-x42a.google.com with SMTP id n2so20113642wrm.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 00:41:21 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"FZEHWSzZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=D9O2Q2QgoGY4rURD9Yvj5QnsampG/TY8Q6CnAOhHInc=;\n\tb=FZEHWSzZl0IN7KVlwmDrGJldli57Dfy+ZwggIAfISDT+PeORfhGL3zd2f9x3QUZFL3\n\tzxOgo6DNuusalmCJ0fS/66xWDWjFwtniJmoevNnjqeUxxc0Hmhvm5kEpEi2iKSOIO1vI\n\tLtr0w0Tzw3NgUNdDvMvG/hIX46lWdspxu7cZZpjmf7rKs4Yj1SWiicT4u2dCyoTS8vTf\n\tG8asqSht8pBTSqxa+6C9DlN1dDXJsOk+NGgjVMCokhzH/8jcvwxW0TLw5w4w9JvJsW6Z\n\t6Y/xOXJaRGAQzq80TNMo3jiYjEueEQ4+n1DshJv1fN2RbhnpIb9D9yEn3zy5QTXmNZ9e\n\tcUqw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=D9O2Q2QgoGY4rURD9Yvj5QnsampG/TY8Q6CnAOhHInc=;\n\tb=X2TnXVJ5U+3ZauAcHuyamLQCCn+7hI0GMrcrOBqXMPapmjYN/pfy4JyEYfmDTBMh4E\n\taLGBNgFQiF/0duhcv+qsanSqRnto8Le94p/ZtFN7TbzoOxvZwgbUM4adl4GREYXM4c0Q\n\tjOa0l7hcPpMssNwwT8LJg+WZzpV9WfvssJ29RJAFNVKammQB5ewMKc+wXmuJKvvl/EEU\n\t13FQh2BLnDtr/zbsxIBWBVjADWUaMo5Dqnn982+GTLRR/l8o7JIhaPEaUhckWRWIty7j\n\tcQH8ZP924wDL00/oHMNX3+w2fSaa1R/uUcPwaAG47mG5vpHmf+alMkLqWO27ITnAif/l\n\twxgA==","X-Gm-Message-State":"AOAM531UYDlnIZKAJOiLn6h9P8OOHepgp/mrSWAybESgiTkXFHakexUX\n\tAZF9dkPkZIzUlHY2cM4NA6+hI8pnbjyl0xpFJJboRA==","X-Google-Smtp-Source":"ABdhPJy7LTbkcZtOgJhT88ageBeaI1J1t3N1dTrMQxghnwg+XP85YmFKypG1SDxPO/gOPDdjvTSPW2/fnFZbGZgZAfY=","X-Received":"by 2002:a5d:638e:: with SMTP id\n\tp14mr7893635wru.299.1621582881183; \n\tFri, 21 May 2021 00:41:21 -0700 (PDT)","MIME-Version":"1.0","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>","In-Reply-To":"<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>","From":"Han-lin Chen <hanlinchen@google.com>","Date":"Fri, 21 May 2021 15:41:10 +0800","Message-ID":"<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17107,"web_url":"https://patchwork.libcamera.org/comment/17107/","msgid":"<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>","date":"2021-05-21T15:56:41","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Hiro and Han-lin,\n\nOn Fri, May 21, 2021 at 03:41:10PM +0800, Han-lin Chen wrote:\n> Hi Jacopo,\n> Thanks for the efforts. The commits should be contained in 13971 and\n> any later versions.\n\nGreat, thanks, I have now verified my series works on an\nout-of-the-box image.\n\nHowever the manifests for the SDK in manifest-version have not yet\ncatch up with the images and are stuck to R91. We'll have to wait\nbefore merging the series for the right manifest to land, so we can\nhave both the image and the SDK at the same version.\n\nThanks\n   j\n\n>\n> On Fri, May 21, 2021 at 3:29 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> >\n> > Hi Hiro,\n> >\n> > On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > > Hi Jacopo,\n> > >\n> > > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> > >\n> > > > Open the HAL configuration file in the Camera HAL manager and get\n> > > > the camera properties for each created CameraDevice and initialize it\n> > > > with them.\n> > > >\n> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > >\n> > >\n> > > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> > >\n> > > When would you merge this series?\n> >\n> > My plan was to update my SDK to the latest version which contains the\n> > CL to the libcamera and libcamera-configs ebuild, so I could have\n> > tested one more time on a fresh image. Am I too paranoid ?\n> >\n> > Could you or Han-lin tell me which is the id of the first CPFE image\n> > that contains:\n> > https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n> > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n> >\n> > I've tested those patches applied on my rather ancient SDK version,\n> > but I would like to try with an out-of-the-box image\n> >\n> > Thanks\n> >    j\n> >\n> > >\n> > > -Hiro\n> > >\n> > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > > > ---\n> > > >  src/android/camera_device.cpp      | 56 +++++++++++++++++++++++++-----\n> > > >  src/android/camera_device.h        |  3 +-\n> > > >  src/android/camera_hal_manager.cpp | 33 +++++++++++++++++-\n> > > >  src/android/camera_hal_manager.h   |  3 ++\n> > > >  4 files changed, 85 insertions(+), 10 deletions(-)\n> > > >\n> > > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > > index 89044efa7ebe..50809c6ffbdc 100644\n> > > > --- a/src/android/camera_device.cpp\n> > > > +++ b/src/android/camera_device.cpp\n> > > > @@ -6,6 +6,7 @@\n> > > >   */\n> > > >\n> > > >  #include \"camera_device.h\"\n> > > > +#include \"camera_hal_config.h\"\n> > > >  #include \"camera_ops.h\"\n> > > >  #include \"post_processor.h\"\n> > > >\n> > > > @@ -443,12 +444,25 @@ std::unique_ptr<CameraDevice>\n> > > > CameraDevice::create(unsigned int id,\n> > > >  }\n> > > >\n> > > >  /*\n> > > > - * Initialize the camera static information.\n> > > > + * Initialize the camera static information retrieved from the\n> > > > + * Camera::properties or from the cameraConfigData.\n> > > > + *\n> > > > + * cameraConfigData is optional for external camera devices and can be\n> > > > + * nullptr.\n> > > > + *\n> > > >   * This method is called before the camera device is opened.\n> > > >   */\n> > > > -int CameraDevice::initialize()\n> > > > +int CameraDevice::initialize(const CameraConfigData *cameraConfigData)\n> > > >  {\n> > > > -       /* Initialize orientation and facing side of the camera. */\n> > > > +       /*\n> > > > +        * Initialize orientation and facing side of the camera.\n> > > > +        *\n> > > > +        * If the libcamera::Camera provides those information as retrieved\n> > > > +        * from firmware use them, otherwise fallback to values parsed from\n> > > > +        * the configuration file. If the configuration file is not\n> > > > available\n> > > > +        * the camera is external so its location and rotation can be\n> > > > safely\n> > > > +        * defaulted.\n> > > > +        */\n> > > >         const ControlList &properties = camera_->properties();\n> > > >\n> > > >         if (properties.contains(properties::Location)) {\n> > > > @@ -464,12 +478,22 @@ int CameraDevice::initialize()\n> > > >                         facing_ = CAMERA_FACING_EXTERNAL;\n> > > >                         break;\n> > > >                 }\n> > > > +\n> > > > +               if (cameraConfigData && cameraConfigData->facing != -1 &&\n> > > > +                   facing_ != cameraConfigData->facing) {\n> > > > +                       LOG(HAL, Warning)\n> > > > +                               << \"Camera location does not match\"\n> > > > +                               << \" configuration file. Using \" <<\n> > > > facing_;\n> > > > +               }\n> > > > +       } else if (cameraConfigData) {\n> > > > +               if (cameraConfigData->facing == -1) {\n> > > > +                       LOG(HAL, Error)\n> > > > +                               << \"Camera facing not in configuration\n> > > > file\";\n> > > > +                       return -EINVAL;\n> > > > +               }\n> > > > +               facing_ = cameraConfigData->facing;\n> > > >         } else {\n> > > > -               /*\n> > > > -                * \\todo Retrieve the camera location from configuration\n> > > > file\n> > > > -                * if not available from the library.\n> > > > -                */\n> > > > -               facing_ = CAMERA_FACING_FRONT;\n> > > > +               facing_ = CAMERA_FACING_EXTERNAL;\n> > > >         }\n> > > >\n> > > >         /*\n> > > > @@ -483,8 +507,24 @@ int CameraDevice::initialize()\n> > > >         if (properties.contains(properties::Rotation)) {\n> > > >                 int rotation = properties.get(properties::Rotation);\n> > > >                 orientation_ = (360 - rotation) % 360;\n> > > > +               if (cameraConfigData && cameraConfigData->rotation != -1 &&\n> > > > +                   orientation_ != cameraConfigData->rotation) {\n> > > > +                       LOG(HAL, Warning)\n> > > > +                               << \"Camera orientation does not match\"\n> > > > +                               << \" configuration file. Using \" <<\n> > > > orientation_;\n> > > > +               }\n> > > > +       } else if (cameraConfigData) {\n> > > > +               if (cameraConfigData->rotation == -1) {\n> > > > +                       LOG(HAL, Error)\n> > > > +                               << \"Camera rotation not in configuration\n> > > > file\";\n> > > > +                       return -EINVAL;\n> > > > +               }\n> > > > +               orientation_ = cameraConfigData->rotation;\n> > > > +       } else {\n> > > > +               orientation_ = 0;\n> > > >         }\n> > > >\n> > > > +       /* Acquire the camera and initialize available stream\n> > > > configurations. */\n> > > >         int ret = camera_->acquire();\n> > > >         if (ret) {\n> > > >                 LOG(HAL, Error) << \"Failed to temporarily acquire the\n> > > > camera\";\n> > > > diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n> > > > index 11bdfec8d587..9cc0d4005242 100644\n> > > > --- a/src/android/camera_device.h\n> > > > +++ b/src/android/camera_device.h\n> > > > @@ -29,6 +29,7 @@\n> > > >  #include \"camera_worker.h\"\n> > > >  #include \"jpeg/encoder.h\"\n> > > >\n> > > > +struct CameraConfigData;\n> > > >  class CameraDevice : protected libcamera::Loggable\n> > > >  {\n> > > >  public:\n> > > > @@ -36,7 +37,7 @@ public:\n> > > >\n> > > > std::shared_ptr<libcamera::Camera> cam);\n> > > >         ~CameraDevice();\n> > > >\n> > > > -       int initialize();\n> > > > +       int initialize(const CameraConfigData *cameraConfigData);\n> > > >\n> > > >         int open(const hw_module_t *hardwareModule);\n> > > >         void close();\n> > > > diff --git a/src/android/camera_hal_manager.cpp\n> > > > b/src/android/camera_hal_manager.cpp\n> > > > index bf3fcda75237..f5b86974e8e3 100644\n> > > > --- a/src/android/camera_hal_manager.cpp\n> > > > +++ b/src/android/camera_hal_manager.cpp\n> > > > @@ -41,6 +41,15 @@ int CameraHalManager::init()\n> > > >  {\n> > > >         cameraManager_ = std::make_unique<CameraManager>();\n> > > >\n> > > > +       /*\n> > > > +        * If the configuration file is not available the HAL only supports\n> > > > +        * external cameras. If it exists but it's not valid then error\n> > > > out.\n> > > > +        */\n> > > > +       if (halConfig_.exists() && !halConfig_.isValid()) {\n> > > > +               LOG(HAL, Error) << \"HAL configuration file is not valid\";\n> > > > +               return -EINVAL;\n> > > > +       }\n> > > > +\n> > > >         /* Support camera hotplug. */\n> > > >         cameraManager_->cameraAdded.connect(this,\n> > > > &CameraHalManager::cameraAdded);\n> > > >         cameraManager_->cameraRemoved.connect(this,\n> > > > &CameraHalManager::cameraRemoved);\n> > > > @@ -100,6 +109,8 @@ void\n> > > > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> > > >         auto iter = cameraIdsMap_.find(cam->id());\n> > > >         if (iter != cameraIdsMap_.end()) {\n> > > >                 id = iter->second;\n> > > > +               if (id >= firstExternalCameraId_)\n> > > > +                       isCameraExternal = true;\n> > > >         } else {\n> > > >                 isCameraNew = true;\n> > > >\n> > > > @@ -117,7 +128,27 @@ void\n> > > > CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n> > > >\n> > > >         /* Create a CameraDevice instance to wrap the libcamera Camera. */\n> > > >         std::unique_ptr<CameraDevice> camera = CameraDevice::create(id,\n> > > > cam);\n> > > > -       int ret = camera->initialize();\n> > > > +\n> > > > +       /*\n> > > > +        * The configuration file must be valid, and contain a\n> > > > corresponding\n> > > > +        * entry for internal cameras. External cameras can be initialized\n> > > > +        * without configuration file.\n> > > > +        */\n> > > > +       if (!isCameraExternal && !halConfig_.exists()) {\n> > > > +               LOG(HAL, Error)\n> > > > +                       << \"HAL configuration file is mandatory for\n> > > > internal cameras\";\n> > > > +               return;\n> > > > +       }\n> > > > +\n> > > > +       const CameraConfigData *cameraConfigData =\n> > > > halConfig_.cameraConfigData(cam->id());\n> > > > +       if (!isCameraExternal && !cameraConfigData) {\n> > > > +               LOG(HAL, Error)\n> > > > +                       << \"HAL configuration entry for internal camera \"\n> > > > +                       << cam->id() << \" is missing\";\n> > > > +               return;\n> > > > +       }\n> > > > +\n> > > > +       int ret = camera->initialize(cameraConfigData);\n> > > >         if (ret) {\n> > > >                 LOG(HAL, Error) << \"Failed to initialize camera: \" <<\n> > > > cam->id();\n> > > >                 return;\n> > > > diff --git a/src/android/camera_hal_manager.h\n> > > > b/src/android/camera_hal_manager.h\n> > > > index d9bf27989965..af1581da6579 100644\n> > > > --- a/src/android/camera_hal_manager.h\n> > > > +++ b/src/android/camera_hal_manager.h\n> > > > @@ -19,6 +19,8 @@\n> > > >\n> > > >  #include <libcamera/camera_manager.h>\n> > > >\n> > > > +#include \"camera_hal_config.h\"\n> > > > +\n> > > >  class CameraDevice;\n> > > >\n> > > >  class CameraHalManager\n> > > > @@ -50,6 +52,7 @@ private:\n> > > >         CameraDevice *cameraDeviceFromHalId(unsigned int id);\n> > > >\n> > > >         std::unique_ptr<libcamera::CameraManager> cameraManager_;\n> > > > +       CameraHalConfig halConfig_;\n> > > >\n> > > >         const camera_module_callbacks_t *callbacks_;\n> > > >         std::vector<std::unique_ptr<CameraDevice>> cameras_;\n> > > > --\n> > > > 2.31.1\n> > > >\n> > > > _______________________________________________\n> > > > libcamera-devel mailing list\n> > > > libcamera-devel@lists.libcamera.org\n> > > > https://lists.libcamera.org/listinfo/libcamera-devel\n> > > >\n>\n>\n>\n> --\n> Cheers.\n> Hanlin Chen","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 ED18DC3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 15:55:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5534F6891E;\n\tFri, 21 May 2021 17:55:58 +0200 (CEST)","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 DD40A6891A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 17:55:56 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 1EFBDC000B;\n\tFri, 21 May 2021 15:55:55 +0000 (UTC)"],"Date":"Fri, 21 May 2021 17:56:41 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Han-lin Chen <hanlinchen@google.com>","Message-ID":"<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>\n\t<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17124,"web_url":"https://patchwork.libcamera.org/comment/17124/","msgid":"<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>","date":"2021-05-23T00:32:06","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Fri, May 21, 2021 at 05:56:41PM +0200, Jacopo Mondi wrote:\n> On Fri, May 21, 2021 at 03:41:10PM +0800, Han-lin Chen wrote:\n> > Hi Jacopo,\n> > Thanks for the efforts. The commits should be contained in 13971 and\n> > any later versions.\n> \n> Great, thanks, I have now verified my series works on an\n> out-of-the-box image.\n> \n> However the manifests for the SDK in manifest-version have not yet\n> catch up with the images and are stuck to R91. We'll have to wait\n> before merging the series for the right manifest to land, so we can\n> have both the image and the SDK at the same version.\n\nSeems like it's available now. I'll kick off a build with\nfull/buildspecs/92/13971.0.0-rc1.xml and report the results.\n\n> > On Fri, May 21, 2021 at 3:29 PM Jacopo Mondi wrote:\n> > > On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > > > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> > > >\n> > > > > Open the HAL configuration file in the Camera HAL manager and get\n> > > > > the camera properties for each created CameraDevice and initialize it\n> > > > > with them.\n> > > > >\n> > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > >\n> > > > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> > > >\n> > > > When would you merge this series?\n> > >\n> > > My plan was to update my SDK to the latest version which contains the\n> > > CL to the libcamera and libcamera-configs ebuild, so I could have\n> > > tested one more time on a fresh image. Am I too paranoid ?\n> > >\n> > > Could you or Han-lin tell me which is the id of the first CPFE image\n> > > that contains:\n> > > https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n> > > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n> > >\n> > > I've tested those patches applied on my rather ancient SDK version,\n> > > but I would like to try with an out-of-the-box image\n> > >\n> > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>","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 42B5AC3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 23 May 2021 00:32:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8A2F76891A;\n\tSun, 23 May 2021 02:32:11 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C001160510\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 May 2021 02:32:09 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1ED332A8;\n\tSun, 23 May 2021 02:32:09 +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=\"NgFfVs0Q\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621729929;\n\tbh=bIk7ZYN2KnGOC0G0Trnf0glb2Xe+iMAYSL+Bdi0K5aQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NgFfVs0Q0DDXucPrH6NzlynvEQLt6xCc7SF4Y26tYme6/97RwA5EguBQ2jrxzi4na\n\t8ZkocevxIdS/07IMqRgHb8r7qPVzJCYWdsmc703+xxsZpAWbLSs39Z4d4XTraQtb8L\n\tCvRwRHetf6h/g0DTTp6Ey9lCfb+bCxxAO4FTuk1M=","Date":"Sun, 23 May 2021 03:32:06 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>\n\t<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>\n\t<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17130,"web_url":"https://patchwork.libcamera.org/comment/17130/","msgid":"<YKpRFbtiEcZndtnV@pendragon.ideasonboard.com>","date":"2021-05-23T12:56:53","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, May 23, 2021 at 03:32:08AM +0300, Laurent Pinchart wrote:\n> On Fri, May 21, 2021 at 05:56:41PM +0200, Jacopo Mondi wrote:\n> > On Fri, May 21, 2021 at 03:41:10PM +0800, Han-lin Chen wrote:\n> > > Hi Jacopo,\n> > > Thanks for the efforts. The commits should be contained in 13971 and\n> > > any later versions.\n> > \n> > Great, thanks, I have now verified my series works on an\n> > out-of-the-box image.\n> > \n> > However the manifests for the SDK in manifest-version have not yet\n> > catch up with the images and are stuck to R91. We'll have to wait\n> > before merging the series for the right manifest to land, so we can\n> > have both the image and the SDK at the same version.\n> \n> Seems like it's available now. I'll kick off a build with\n> full/buildspecs/92/13971.0.0-rc1.xml and report the results.\n\nI had a build error in the chromeos-base/regions packages:\n\n14:49:49 >>> Compiling source in /build/soraka-libcamera/tmp/portage/chromeos-base/regions-0.0.1-r2020/work/regions-0.0.1/regions ...\nusage: regions.py [-h] [--format {human-readable,csv,json,yaml}] [--all] [--notes] [--include_pseudolocales] [--output OUTPUT] [--overlay OVERLAY]\nregions.py: error: unrecognized arguments:\n\nThis was caused by the ebuild passing an empty argument to the\nregions.py script (a `print(args)` in regions.py clearly shows this).\nI've fixed it with the following patch.\n\ndiff --git a/chromeos-base/regions/regions-0.0.1-r2020.ebuild b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\nindex 22684c2bf7e8..06b1a82f027c 100644\n--- a/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n+++ b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n@@ -31,7 +31,7 @@ src_unpack() {\n }\n\n src_compile() {\n-\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" \"$(usex cros-debug \"--include_pseudolocales\" \"\")\"\n+\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" $(usex cros-debug \"--include_pseudolocales\" \"\")\n }\n\n src_test() {\n\nI'm curious, as the offending code was added in\n\ncommit a05940690157c100c902f41e8118400f2183eb3b\nAuthor:     Matt Stark <msta@google.com>\nAuthorDate: Mon Apr 19 11:16:04 2021 +1000\nCommit:     Commit Bot <commit-bot@chromium.org>\nCommitDate: Wed May 5 05:06:19 2021 +0000\n\n    When creating a chrome OS debug build, add pseudolocales to the build.\n\nwhich is more than two weeks old, and I would have expected the issue to\nbe caught. I can't see any fix in neither the chromeos-overlay (for the\nbuild) nor the platform2 (for regions.py) main branches.\n\nI can't rule out that it could be specific to my environment, as I\nhaven( recreated the SDK from scratch, I've removed the build directory\nand updated the chroot with update_chroot.\n\nCould anyone on the Chrome OS site which if they can reproduce this\nissue when the cros-debug use flag isn't set ? I've added a comment to\nhttps://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2879390.\n\nOther than that, the build is still ongoing, I'll report when it\ncompletes.\n\n> > > On Fri, May 21, 2021 at 3:29 PM Jacopo Mondi wrote:\n> > > > On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > > > > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> > > > >\n> > > > > > Open the HAL configuration file in the Camera HAL manager and get\n> > > > > > the camera properties for each created CameraDevice and initialize it\n> > > > > > with them.\n> > > > > >\n> > > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > >\n> > > > > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> > > > >\n> > > > > When would you merge this series?\n> > > >\n> > > > My plan was to update my SDK to the latest version which contains the\n> > > > CL to the libcamera and libcamera-configs ebuild, so I could have\n> > > > tested one more time on a fresh image. Am I too paranoid ?\n> > > >\n> > > > Could you or Han-lin tell me which is the id of the first CPFE image\n> > > > that contains:\n> > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n> > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n> > > >\n> > > > I've tested those patches applied on my rather ancient SDK version,\n> > > > but I would like to try with an out-of-the-box image\n> > > >\n> > > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>","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 01385C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 23 May 2021 12:56:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 372966891B;\n\tSun, 23 May 2021 14:56:58 +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 EA208602B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 May 2021 14:56:56 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4DC142A8;\n\tSun, 23 May 2021 14:56:56 +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=\"T+SrQhKG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621774616;\n\tbh=fWS2QbH4lkvCS3u+K0XsoaT6HIZo/23omfnk43Sw2S8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=T+SrQhKGyxZr1DYHa8eLHbZoYMpPF/MpDLfiG0t5LGjK0QsdyePc58eeNP+hsnnI3\n\tZupSOhy7RzaBBdydxQTGk7XzJcSBrf4YJ4MGrVw29RZJg0w24tefXNg5tawiEVSFYi\n\tyC9EYPvbOwJqzpJZNMqvPBs0ygmhfncTOcD2+oPM=","Date":"Sun, 23 May 2021 15:56:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YKpRFbtiEcZndtnV@pendragon.ideasonboard.com>","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>\n\t<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>\n\t<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>\n\t<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17132,"web_url":"https://patchwork.libcamera.org/comment/17132/","msgid":"<YKpy7SamELiwG0US@pendragon.ideasonboard.com>","date":"2021-05-23T15:21:17","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, May 23, 2021 at 03:56:54PM +0300, Laurent Pinchart wrote:\n> On Sun, May 23, 2021 at 03:32:08AM +0300, Laurent Pinchart wrote:\n> > On Fri, May 21, 2021 at 05:56:41PM +0200, Jacopo Mondi wrote:\n> > > On Fri, May 21, 2021 at 03:41:10PM +0800, Han-lin Chen wrote:\n> > > > Hi Jacopo,\n> > > > Thanks for the efforts. The commits should be contained in 13971 and\n> > > > any later versions.\n> > > \n> > > Great, thanks, I have now verified my series works on an\n> > > out-of-the-box image.\n> > > \n> > > However the manifests for the SDK in manifest-version have not yet\n> > > catch up with the images and are stuck to R91. We'll have to wait\n> > > before merging the series for the right manifest to land, so we can\n> > > have both the image and the SDK at the same version.\n> > \n> > Seems like it's available now. I'll kick off a build with\n> > full/buildspecs/92/13971.0.0-rc1.xml and report the results.\n> \n> I had a build error in the chromeos-base/regions packages:\n> \n> 14:49:49 >>> Compiling source in /build/soraka-libcamera/tmp/portage/chromeos-base/regions-0.0.1-r2020/work/regions-0.0.1/regions ...\n> usage: regions.py [-h] [--format {human-readable,csv,json,yaml}] [--all] [--notes] [--include_pseudolocales] [--output OUTPUT] [--overlay OVERLAY]\n> regions.py: error: unrecognized arguments:\n> \n> This was caused by the ebuild passing an empty argument to the\n> regions.py script (a `print(args)` in regions.py clearly shows this).\n> I've fixed it with the following patch.\n> \n> diff --git a/chromeos-base/regions/regions-0.0.1-r2020.ebuild b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> index 22684c2bf7e8..06b1a82f027c 100644\n> --- a/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> +++ b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> @@ -31,7 +31,7 @@ src_unpack() {\n>  }\n> \n>  src_compile() {\n> -\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" \"$(usex cros-debug \"--include_pseudolocales\" \"\")\"\n> +\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" $(usex cros-debug \"--include_pseudolocales\" \"\")\n>  }\n> \n>  src_test() {\n> \n> I'm curious, as the offending code was added in\n> \n> commit a05940690157c100c902f41e8118400f2183eb3b\n> Author:     Matt Stark <msta@google.com>\n> AuthorDate: Mon Apr 19 11:16:04 2021 +1000\n> Commit:     Commit Bot <commit-bot@chromium.org>\n> CommitDate: Wed May 5 05:06:19 2021 +0000\n> \n>     When creating a chrome OS debug build, add pseudolocales to the build.\n> \n> which is more than two weeks old, and I would have expected the issue to\n> be caught. I can't see any fix in neither the chromeos-overlay (for the\n> build) nor the platform2 (for regions.py) main branches.\n> \n> I can't rule out that it could be specific to my environment, as I\n> haven( recreated the SDK from scratch, I've removed the build directory\n> and updated the chroot with update_chroot.\n> \n> Could anyone on the Chrome OS site which if they can reproduce this\n> issue when the cros-debug use flag isn't set ? I've added a comment to\n> https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2879390.\n> \n> Other than that, the build is still ongoing, I'll report when it\n> completes.\n\nOr when it fails again :-S\n\nThe next issue is related to cryptohome.\n\ncryptohome-0.0.1-r3658: 17:36:31 >>> Install chromeos-base/cryptohome-0.0.1-r3658 into /build/soraka-libcamera/tmp/portage/chromeos-base/cryptohome-0.0.1-r3658/image\ncryptohome-0.0.1-r3658:  * ERROR: chromeos-base/cryptohome-0.0.1-r3658::chromiumos failed (install phase):\ncryptohome-0.0.1-r3658:  *   direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\ncryptohome-0.0.1-r3658:  *\ncryptohome-0.0.1-r3658:  * Call stack:\ncryptohome-0.0.1-r3658:  *               ebuild.sh, line  125:  Called src_install\ncryptohome-0.0.1-r3658:  *             environment, line 4321:  Called die\ncryptohome-0.0.1-r3658:  * The specific snippet of code:\ncryptohome-0.0.1-r3658:  *           die \"direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\";\n\n\nThe error check was added in the ebuild in\n\ncommit c9cbca71d43158c5dc1bd366224087e34e7905b7\nAuthor:     Daniil Lunev <dlunev@chromium.org>\nAuthorDate: Fri Feb 12 10:17:01 2021 +1100\nCommit:     Commit Bot <commit-bot@chromium.org>\nCommitDate: Mon Mar 8 23:30:29 2021 +0000\n\n    cryptohome: rollout control for fscrypt_v2\n\n\nThe uprev-4-to-5 USE flag got enabled for Soraka (and Nautilus) in\n\ncommit 14bb32f0477d5956f86802f80e8e4d0ab8c7b9bc\nAuthor:     Daniil Lunev <dlunev@chromium.org>\nAuthorDate: Wed Mar 10 09:22:06 2021 +1100\nCommit:     Commit Bot <commit-bot@chromium.org>\nCommitDate: Tue Mar 9 23:56:23 2021 +0000\n\n    overlays: add a special tag for 4->5 uprevs\n\n\nThe direncription_allow_v2 USE flag got enabled for soraka-libcamera in\n\ncommit 6b846af8ee5752878fc2e125c612719b3467cc3b\nAuthor:     Daniil Lunev <dlunev@chromium.org>\nAuthorDate: Mon Mar 1 09:28:11 2021 +1100\nCommit:     Commit Bot <commit-bot@chromium.org>\nCommitDate: Tue Mar 2 06:14:31 2021 +0000\n\n    overlays: enable fscrypt v2 attempt on post 5.4 boards\n\n\nDisabling direncription_allow_v2 manually allows the build to continue,\nbut I don't think that's a very good idea.\n\n> > > > On Fri, May 21, 2021 at 3:29 PM Jacopo Mondi wrote:\n> > > > > On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > > > > > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> > > > > >\n> > > > > > > Open the HAL configuration file in the Camera HAL manager and get\n> > > > > > > the camera properties for each created CameraDevice and initialize it\n> > > > > > > with them.\n> > > > > > >\n> > > > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > > >\n> > > > > > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> > > > > >\n> > > > > > When would you merge this series?\n> > > > >\n> > > > > My plan was to update my SDK to the latest version which contains the\n> > > > > CL to the libcamera and libcamera-configs ebuild, so I could have\n> > > > > tested one more time on a fresh image. Am I too paranoid ?\n> > > > >\n> > > > > Could you or Han-lin tell me which is the id of the first CPFE image\n> > > > > that contains:\n> > > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n> > > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n> > > > >\n> > > > > I've tested those patches applied on my rather ancient SDK version,\n> > > > > but I would like to try with an out-of-the-box image\n> > > > >\n> > > > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>","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 29CABC3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 23 May 2021 15:21:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AB6F56891B;\n\tSun, 23 May 2021 17:21:22 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 04795601A9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 May 2021 17:21:21 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3E82E2A8;\n\tSun, 23 May 2021 17:21:20 +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=\"p12I2BVu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621783280;\n\tbh=axY6QTLGuoBDYWrF6QoxVg09uTpQAmgW6nG/lfrvdh8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=p12I2BVuFvmCIltPmCi8D41cg/ViA8Nypgg8GmFM02Fjzi0YQsJ+U7PMpe7nn7p+i\n\tR2v8OnTUL6gwi3oBXKXfWfI18WnaN1EG6rMcghVwr77V1xIWiyRl3VirhrgU8nEACR\n\tU5OyklFrM7hm+aEOq5lmVvlKy/lDow56h84JhOLQ=","Date":"Sun, 23 May 2021 18:21:17 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YKpy7SamELiwG0US@pendragon.ideasonboard.com>","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>\n\t<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>\n\t<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>\n\t<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>\n\t<YKpRFbtiEcZndtnV@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YKpRFbtiEcZndtnV@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17133,"web_url":"https://patchwork.libcamera.org/comment/17133/","msgid":"<YKqGe5KlaZVv30Oa@pendragon.ideasonboard.com>","date":"2021-05-23T16:44:43","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, May 23, 2021 at 06:21:19PM +0300, Laurent Pinchart wrote:\n> On Sun, May 23, 2021 at 03:56:54PM +0300, Laurent Pinchart wrote:\n> > On Sun, May 23, 2021 at 03:32:08AM +0300, Laurent Pinchart wrote:\n> > > On Fri, May 21, 2021 at 05:56:41PM +0200, Jacopo Mondi wrote:\n> > > > On Fri, May 21, 2021 at 03:41:10PM +0800, Han-lin Chen wrote:\n> > > > > Hi Jacopo,\n> > > > > Thanks for the efforts. The commits should be contained in 13971 and\n> > > > > any later versions.\n> > > > \n> > > > Great, thanks, I have now verified my series works on an\n> > > > out-of-the-box image.\n> > > > \n> > > > However the manifests for the SDK in manifest-version have not yet\n> > > > catch up with the images and are stuck to R91. We'll have to wait\n> > > > before merging the series for the right manifest to land, so we can\n> > > > have both the image and the SDK at the same version.\n> > > \n> > > Seems like it's available now. I'll kick off a build with\n> > > full/buildspecs/92/13971.0.0-rc1.xml and report the results.\n> > \n> > I had a build error in the chromeos-base/regions packages:\n> > \n> > 14:49:49 >>> Compiling source in /build/soraka-libcamera/tmp/portage/chromeos-base/regions-0.0.1-r2020/work/regions-0.0.1/regions ...\n> > usage: regions.py [-h] [--format {human-readable,csv,json,yaml}] [--all] [--notes] [--include_pseudolocales] [--output OUTPUT] [--overlay OVERLAY]\n> > regions.py: error: unrecognized arguments:\n> > \n> > This was caused by the ebuild passing an empty argument to the\n> > regions.py script (a `print(args)` in regions.py clearly shows this).\n> > I've fixed it with the following patch.\n> > \n> > diff --git a/chromeos-base/regions/regions-0.0.1-r2020.ebuild b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > index 22684c2bf7e8..06b1a82f027c 100644\n> > --- a/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > +++ b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > @@ -31,7 +31,7 @@ src_unpack() {\n> >  }\n> > \n> >  src_compile() {\n> > -\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" \"$(usex cros-debug \"--include_pseudolocales\" \"\")\"\n> > +\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" $(usex cros-debug \"--include_pseudolocales\" \"\")\n> >  }\n> > \n> >  src_test() {\n> > \n> > I'm curious, as the offending code was added in\n> > \n> > commit a05940690157c100c902f41e8118400f2183eb3b\n> > Author:     Matt Stark <msta@google.com>\n> > AuthorDate: Mon Apr 19 11:16:04 2021 +1000\n> > Commit:     Commit Bot <commit-bot@chromium.org>\n> > CommitDate: Wed May 5 05:06:19 2021 +0000\n> > \n> >     When creating a chrome OS debug build, add pseudolocales to the build.\n> > \n> > which is more than two weeks old, and I would have expected the issue to\n> > be caught. I can't see any fix in neither the chromeos-overlay (for the\n> > build) nor the platform2 (for regions.py) main branches.\n> > \n> > I can't rule out that it could be specific to my environment, as I\n> > haven( recreated the SDK from scratch, I've removed the build directory\n> > and updated the chroot with update_chroot.\n> > \n> > Could anyone on the Chrome OS site which if they can reproduce this\n> > issue when the cros-debug use flag isn't set ? I've added a comment to\n> > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2879390.\n> > \n> > Other than that, the build is still ongoing, I'll report when it\n> > completes.\n> \n> Or when it fails again :-S\n> \n> The next issue is related to cryptohome.\n> \n> cryptohome-0.0.1-r3658: 17:36:31 >>> Install chromeos-base/cryptohome-0.0.1-r3658 into /build/soraka-libcamera/tmp/portage/chromeos-base/cryptohome-0.0.1-r3658/image\n> cryptohome-0.0.1-r3658:  * ERROR: chromeos-base/cryptohome-0.0.1-r3658::chromiumos failed (install phase):\n> cryptohome-0.0.1-r3658:  *   direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\n> cryptohome-0.0.1-r3658:  *\n> cryptohome-0.0.1-r3658:  * Call stack:\n> cryptohome-0.0.1-r3658:  *               ebuild.sh, line  125:  Called src_install\n> cryptohome-0.0.1-r3658:  *             environment, line 4321:  Called die\n> cryptohome-0.0.1-r3658:  * The specific snippet of code:\n> cryptohome-0.0.1-r3658:  *           die \"direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\";\n> \n> \n> The error check was added in the ebuild in\n> \n> commit c9cbca71d43158c5dc1bd366224087e34e7905b7\n> Author:     Daniil Lunev <dlunev@chromium.org>\n> AuthorDate: Fri Feb 12 10:17:01 2021 +1100\n> Commit:     Commit Bot <commit-bot@chromium.org>\n> CommitDate: Mon Mar 8 23:30:29 2021 +0000\n> \n>     cryptohome: rollout control for fscrypt_v2\n> \n> \n> The uprev-4-to-5 USE flag got enabled for Soraka (and Nautilus) in\n> \n> commit 14bb32f0477d5956f86802f80e8e4d0ab8c7b9bc\n> Author:     Daniil Lunev <dlunev@chromium.org>\n> AuthorDate: Wed Mar 10 09:22:06 2021 +1100\n> Commit:     Commit Bot <commit-bot@chromium.org>\n> CommitDate: Tue Mar 9 23:56:23 2021 +0000\n> \n>     overlays: add a special tag for 4->5 uprevs\n> \n> \n> The direncription_allow_v2 USE flag got enabled for soraka-libcamera in\n> \n> commit 6b846af8ee5752878fc2e125c612719b3467cc3b\n> Author:     Daniil Lunev <dlunev@chromium.org>\n> AuthorDate: Mon Mar 1 09:28:11 2021 +1100\n> Commit:     Commit Bot <commit-bot@chromium.org>\n> CommitDate: Tue Mar 2 06:14:31 2021 +0000\n> \n>     overlays: enable fscrypt v2 attempt on post 5.4 boards\n> \n> \n> Disabling direncription_allow_v2 manually allows the build to continue,\n> but I don't think that's a very good idea.\n\nAfter fixing (or working around) those two issues, the build completes.\nI'll now try to build the latest version (R93-13987), to see if some of\nthe problems have been fixed.\n\n> > > > > On Fri, May 21, 2021 at 3:29 PM Jacopo Mondi wrote:\n> > > > > > On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > > > > > > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> > > > > > >\n> > > > > > > > Open the HAL configuration file in the Camera HAL manager and get\n> > > > > > > > the camera properties for each created CameraDevice and initialize it\n> > > > > > > > with them.\n> > > > > > > >\n> > > > > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > > > >\n> > > > > > > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> > > > > > >\n> > > > > > > When would you merge this series?\n> > > > > >\n> > > > > > My plan was to update my SDK to the latest version which contains the\n> > > > > > CL to the libcamera and libcamera-configs ebuild, so I could have\n> > > > > > tested one more time on a fresh image. Am I too paranoid ?\n> > > > > >\n> > > > > > Could you or Han-lin tell me which is the id of the first CPFE image\n> > > > > > that contains:\n> > > > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n> > > > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n> > > > > >\n> > > > > > I've tested those patches applied on my rather ancient SDK version,\n> > > > > > but I would like to try with an out-of-the-box image\n> > > > > >\n> > > > > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>","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 D7089C3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 23 May 2021 16:44:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 19B916891D;\n\tSun, 23 May 2021 18:44:49 +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 71F19601A9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 May 2021 18:44:47 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C492F2A8;\n\tSun, 23 May 2021 18:44:46 +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=\"tc7zerCI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621788287;\n\tbh=drpYxShYsvr8VwlIuR9US6vW0MnzwcnMspmZRIQ6c98=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tc7zerCIlvw2iG8OqjgsnxCD+o91Z6KHw3pBEoAvo+qVqLgADyEvIaXd754zKBw4B\n\tIJVX+lzHgpHd+oQ3clhmda6E2z+tA8dbznI2Uuu6W2CSjpQfyUKgCxSDWwv8t4R8YN\n\tWY3ae+aWTpSLOAuexBHplSMnqhRwGzcC2l+pYTwo=","Date":"Sun, 23 May 2021 19:44:43 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YKqGe5KlaZVv30Oa@pendragon.ideasonboard.com>","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>\n\t<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>\n\t<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>\n\t<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>\n\t<YKpRFbtiEcZndtnV@pendragon.ideasonboard.com>\n\t<YKpy7SamELiwG0US@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YKpy7SamELiwG0US@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17146,"web_url":"https://patchwork.libcamera.org/comment/17146/","msgid":"<YKrSdc5U1Ljm+vcf@pendragon.ideasonboard.com>","date":"2021-05-23T22:08:53","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, May 23, 2021 at 07:44:45PM +0300, Laurent Pinchart wrote:\n> On Sun, May 23, 2021 at 06:21:19PM +0300, Laurent Pinchart wrote:\n> > On Sun, May 23, 2021 at 03:56:54PM +0300, Laurent Pinchart wrote:\n> > > On Sun, May 23, 2021 at 03:32:08AM +0300, Laurent Pinchart wrote:\n> > > > On Fri, May 21, 2021 at 05:56:41PM +0200, Jacopo Mondi wrote:\n> > > > > On Fri, May 21, 2021 at 03:41:10PM +0800, Han-lin Chen wrote:\n> > > > > > Hi Jacopo,\n> > > > > > Thanks for the efforts. The commits should be contained in 13971 and\n> > > > > > any later versions.\n> > > > > \n> > > > > Great, thanks, I have now verified my series works on an\n> > > > > out-of-the-box image.\n> > > > > \n> > > > > However the manifests for the SDK in manifest-version have not yet\n> > > > > catch up with the images and are stuck to R91. We'll have to wait\n> > > > > before merging the series for the right manifest to land, so we can\n> > > > > have both the image and the SDK at the same version.\n> > > > \n> > > > Seems like it's available now. I'll kick off a build with\n> > > > full/buildspecs/92/13971.0.0-rc1.xml and report the results.\n> > > \n> > > I had a build error in the chromeos-base/regions packages:\n> > > \n> > > 14:49:49 >>> Compiling source in /build/soraka-libcamera/tmp/portage/chromeos-base/regions-0.0.1-r2020/work/regions-0.0.1/regions ...\n> > > usage: regions.py [-h] [--format {human-readable,csv,json,yaml}] [--all] [--notes] [--include_pseudolocales] [--output OUTPUT] [--overlay OVERLAY]\n> > > regions.py: error: unrecognized arguments:\n> > > \n> > > This was caused by the ebuild passing an empty argument to the\n> > > regions.py script (a `print(args)` in regions.py clearly shows this).\n> > > I've fixed it with the following patch.\n> > > \n> > > diff --git a/chromeos-base/regions/regions-0.0.1-r2020.ebuild b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > > index 22684c2bf7e8..06b1a82f027c 100644\n> > > --- a/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > > +++ b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > > @@ -31,7 +31,7 @@ src_unpack() {\n> > >  }\n> > > \n> > >  src_compile() {\n> > > -\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" \"$(usex cros-debug \"--include_pseudolocales\" \"\")\"\n> > > +\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" $(usex cros-debug \"--include_pseudolocales\" \"\")\n> > >  }\n> > > \n> > >  src_test() {\n> > > \n> > > I'm curious, as the offending code was added in\n> > > \n> > > commit a05940690157c100c902f41e8118400f2183eb3b\n> > > Author:     Matt Stark <msta@google.com>\n> > > AuthorDate: Mon Apr 19 11:16:04 2021 +1000\n> > > Commit:     Commit Bot <commit-bot@chromium.org>\n> > > CommitDate: Wed May 5 05:06:19 2021 +0000\n> > > \n> > >     When creating a chrome OS debug build, add pseudolocales to the build.\n> > > \n> > > which is more than two weeks old, and I would have expected the issue to\n> > > be caught. I can't see any fix in neither the chromeos-overlay (for the\n> > > build) nor the platform2 (for regions.py) main branches.\n> > > \n> > > I can't rule out that it could be specific to my environment, as I\n> > > haven( recreated the SDK from scratch, I've removed the build directory\n> > > and updated the chroot with update_chroot.\n> > > \n> > > Could anyone on the Chrome OS site which if they can reproduce this\n> > > issue when the cros-debug use flag isn't set ? I've added a comment to\n> > > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2879390.\n> > > \n> > > Other than that, the build is still ongoing, I'll report when it\n> > > completes.\n> > \n> > Or when it fails again :-S\n> > \n> > The next issue is related to cryptohome.\n> > \n> > cryptohome-0.0.1-r3658: 17:36:31 >>> Install chromeos-base/cryptohome-0.0.1-r3658 into /build/soraka-libcamera/tmp/portage/chromeos-base/cryptohome-0.0.1-r3658/image\n> > cryptohome-0.0.1-r3658:  * ERROR: chromeos-base/cryptohome-0.0.1-r3658::chromiumos failed (install phase):\n> > cryptohome-0.0.1-r3658:  *   direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\n> > cryptohome-0.0.1-r3658:  *\n> > cryptohome-0.0.1-r3658:  * Call stack:\n> > cryptohome-0.0.1-r3658:  *               ebuild.sh, line  125:  Called src_install\n> > cryptohome-0.0.1-r3658:  *             environment, line 4321:  Called die\n> > cryptohome-0.0.1-r3658:  * The specific snippet of code:\n> > cryptohome-0.0.1-r3658:  *           die \"direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\";\n> > \n> > \n> > The error check was added in the ebuild in\n> > \n> > commit c9cbca71d43158c5dc1bd366224087e34e7905b7\n> > Author:     Daniil Lunev <dlunev@chromium.org>\n> > AuthorDate: Fri Feb 12 10:17:01 2021 +1100\n> > Commit:     Commit Bot <commit-bot@chromium.org>\n> > CommitDate: Mon Mar 8 23:30:29 2021 +0000\n> > \n> >     cryptohome: rollout control for fscrypt_v2\n> > \n> > \n> > The uprev-4-to-5 USE flag got enabled for Soraka (and Nautilus) in\n> > \n> > commit 14bb32f0477d5956f86802f80e8e4d0ab8c7b9bc\n> > Author:     Daniil Lunev <dlunev@chromium.org>\n> > AuthorDate: Wed Mar 10 09:22:06 2021 +1100\n> > Commit:     Commit Bot <commit-bot@chromium.org>\n> > CommitDate: Tue Mar 9 23:56:23 2021 +0000\n> > \n> >     overlays: add a special tag for 4->5 uprevs\n> > \n> > \n> > The direncription_allow_v2 USE flag got enabled for soraka-libcamera in\n> > \n> > commit 6b846af8ee5752878fc2e125c612719b3467cc3b\n> > Author:     Daniil Lunev <dlunev@chromium.org>\n> > AuthorDate: Mon Mar 1 09:28:11 2021 +1100\n> > Commit:     Commit Bot <commit-bot@chromium.org>\n> > CommitDate: Tue Mar 2 06:14:31 2021 +0000\n> > \n> >     overlays: enable fscrypt v2 attempt on post 5.4 boards\n> > \n> > \n> > Disabling direncription_allow_v2 manually allows the build to continue,\n> > but I don't think that's a very good idea.\n> \n> After fixing (or working around) those two issues, the build completes.\n> I'll now try to build the latest version (R93-13987), to see if some of\n> the problems have been fixed.\n\nExact same issues with R93-13987. Other than that, it compiles fine. I\nalso confirm that Soraka finally produces sound :-)\n\n> > > > > > On Fri, May 21, 2021 at 3:29 PM Jacopo Mondi wrote:\n> > > > > > > On Fri, May 21, 2021 at 02:15:51PM +0900, Hirokazu Honda wrote:\n> > > > > > > > On Thu, Apr 15, 2021 at 10:51 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n> > > > > > > >\n> > > > > > > > > Open the HAL configuration file in the Camera HAL manager and get\n> > > > > > > > > the camera properties for each created CameraDevice and initialize it\n> > > > > > > > > with them.\n> > > > > > > > >\n> > > > > > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > > > > >\n> > > > > > > > Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> > > > > > > >\n> > > > > > > > When would you merge this series?\n> > > > > > >\n> > > > > > > My plan was to update my SDK to the latest version which contains the\n> > > > > > > CL to the libcamera and libcamera-configs ebuild, so I could have\n> > > > > > > tested one more time on a fresh image. Am I too paranoid ?\n> > > > > > >\n> > > > > > > Could you or Han-lin tell me which is the id of the first CPFE image\n> > > > > > > that contains:\n> > > > > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2887093\n> > > > > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2886535\n> > > > > > >\n> > > > > > > I've tested those patches applied on my rather ancient SDK version,\n> > > > > > > but I would like to try with an out-of-the-box image\n> > > > > > >\n> > > > > > > > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>","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 3A118C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 23 May 2021 22:09:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ACD84602B1;\n\tMon, 24 May 2021 00:08:59 +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 C3812601AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 May 2021 00:08:57 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0F52E476;\n\tMon, 24 May 2021 00:08:56 +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=\"lv7nYF5o\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621807737;\n\tbh=ZvCEZAKlUV9R1VqviFngv1HjiLr6RVwrb/naknwUhRk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lv7nYF5oLQOXT1U1ZYARYPqH/E8Pt/yLhMcr6RHXP4LZfly6TI9HmdyB8yEbnVRSD\n\tLavaZxV5LlFNso3OHr1c+OsmIrKQVZAMtdg7sjdbrjhVbK9JW0Wb2esWG4s9K/yFZS\n\tcU6yna4/eaKIJki28yAKrA4N9I8hIR0MLEPzmhJM=","Date":"Mon, 24 May 2021 01:08:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YKrSdc5U1Ljm+vcf@pendragon.ideasonboard.com>","References":"<20210415135213.94511-1-jacopo@jmondi.org>\n\t<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>\n\t<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>\n\t<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>\n\t<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>\n\t<YKpRFbtiEcZndtnV@pendragon.ideasonboard.com>\n\t<YKpy7SamELiwG0US@pendragon.ideasonboard.com>\n\t<YKqGe5KlaZVv30Oa@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YKqGe5KlaZVv30Oa@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17211,"web_url":"https://patchwork.libcamera.org/comment/17211/","msgid":"<20210524144905.rn43zzy2qysugufb@uno.localdomain>","date":"2021-05-24T14:49:05","subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent, all\n\nOn Mon, May 24, 2021 at 01:08:53AM +0300, Laurent Pinchart wrote:\n> On Sun, May 23, 2021 at 07:44:45PM +0300, Laurent Pinchart wrote:\n> > On Sun, May 23, 2021 at 06:21:19PM +0300, Laurent Pinchart wrote:\n> > > On Sun, May 23, 2021 at 03:56:54PM +0300, Laurent Pinchart wrote:\n> > > > On Sun, May 23, 2021 at 03:32:08AM +0300, Laurent Pinchart wrote:\n> > > > > On Fri, May 21, 2021 at 05:56:41PM +0200, Jacopo Mondi wrote:\n> > > > > > On Fri, May 21, 2021 at 03:41:10PM +0800, Han-lin Chen wrote:\n> > > > > > > Hi Jacopo,\n> > > > > > > Thanks for the efforts. The commits should be contained in 13971 and\n> > > > > > > any later versions.\n> > > > > >\n> > > > > > Great, thanks, I have now verified my series works on an\n> > > > > > out-of-the-box image.\n> > > > > >\n> > > > > > However the manifests for the SDK in manifest-version have not yet\n> > > > > > catch up with the images and are stuck to R91. We'll have to wait\n> > > > > > before merging the series for the right manifest to land, so we can\n> > > > > > have both the image and the SDK at the same version.\n> > > > >\n> > > > > Seems like it's available now. I'll kick off a build with\n> > > > > full/buildspecs/92/13971.0.0-rc1.xml and report the results.\n> > > >\n> > > > I had a build error in the chromeos-base/regions packages:\n> > > >\n> > > > 14:49:49 >>> Compiling source in /build/soraka-libcamera/tmp/portage/chromeos-base/regions-0.0.1-r2020/work/regions-0.0.1/regions ...\n> > > > usage: regions.py [-h] [--format {human-readable,csv,json,yaml}] [--all] [--notes] [--include_pseudolocales] [--output OUTPUT] [--overlay OVERLAY]\n> > > > regions.py: error: unrecognized arguments:\n> > > >\n> > > > This was caused by the ebuild passing an empty argument to the\n> > > > regions.py script (a `print(args)` in regions.py clearly shows this).\n> > > > I've fixed it with the following patch.\n> > > >\n> > > > diff --git a/chromeos-base/regions/regions-0.0.1-r2020.ebuild b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > > > index 22684c2bf7e8..06b1a82f027c 100644\n> > > > --- a/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > > > +++ b/chromeos-base/regions/regions-0.0.1-r2020.ebuild\n> > > > @@ -31,7 +31,7 @@ src_unpack() {\n> > > >  }\n> > > >\n> > > >  src_compile() {\n> > > > -\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" \"$(usex cros-debug \"--include_pseudolocales\" \"\")\"\n> > > > +\t./regions.py --format=json --output \"${WORKDIR}/cros-regions.json\" $(usex cros-debug \"--include_pseudolocales\" \"\")\n> > > >  }\n> > > >\n> > > >  src_test() {\n> > > >\n> > > > I'm curious, as the offending code was added in\n> > > >\n> > > > commit a05940690157c100c902f41e8118400f2183eb3b\n> > > > Author:     Matt Stark <msta@google.com>\n> > > > AuthorDate: Mon Apr 19 11:16:04 2021 +1000\n> > > > Commit:     Commit Bot <commit-bot@chromium.org>\n> > > > CommitDate: Wed May 5 05:06:19 2021 +0000\n> > > >\n> > > >     When creating a chrome OS debug build, add pseudolocales to the build.\n> > > >\n> > > > which is more than two weeks old, and I would have expected the issue to\n> > > > be caught. I can't see any fix in neither the chromeos-overlay (for the\n> > > > build) nor the platform2 (for regions.py) main branches.\n> > > >\n> > > > I can't rule out that it could be specific to my environment, as I\n> > > > haven( recreated the SDK from scratch, I've removed the build directory\n> > > > and updated the chroot with update_chroot.\n> > > >\n> > > > Could anyone on the Chrome OS site which if they can reproduce this\n> > > > issue when the cros-debug use flag isn't set ? I've added a comment to\n> > > > https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2879390.\n> > > >\n> > > > Other than that, the build is still ongoing, I'll report when it\n> > > > completes.\n> > >\n> > > Or when it fails again :-S\n> > >\n> > > The next issue is related to cryptohome.\n> > >\n> > > cryptohome-0.0.1-r3658: 17:36:31 >>> Install chromeos-base/cryptohome-0.0.1-r3658 into /build/soraka-libcamera/tmp/portage/chromeos-base/cryptohome-0.0.1-r3658/image\n> > > cryptohome-0.0.1-r3658:  * ERROR: chromeos-base/cryptohome-0.0.1-r3658::chromiumos failed (install phase):\n> > > cryptohome-0.0.1-r3658:  *   direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\n> > > cryptohome-0.0.1-r3658:  *\n> > > cryptohome-0.0.1-r3658:  * Call stack:\n> > > cryptohome-0.0.1-r3658:  *               ebuild.sh, line  125:  Called src_install\n> > > cryptohome-0.0.1-r3658:  *             environment, line 4321:  Called die\n> > > cryptohome-0.0.1-r3658:  * The specific snippet of code:\n> > > cryptohome-0.0.1-r3658:  *           die \"direncription_allow_v2 is enabled where it shouldn't be. Do you need to change the board overlay? Note, uprev boards should have it disabled!\";\n> > >\n> > >\n> > > The error check was added in the ebuild in\n> > >\n> > > commit c9cbca71d43158c5dc1bd366224087e34e7905b7\n> > > Author:     Daniil Lunev <dlunev@chromium.org>\n> > > AuthorDate: Fri Feb 12 10:17:01 2021 +1100\n> > > Commit:     Commit Bot <commit-bot@chromium.org>\n> > > CommitDate: Mon Mar 8 23:30:29 2021 +0000\n> > >\n> > >     cryptohome: rollout control for fscrypt_v2\n> > >\n> > >\n> > > The uprev-4-to-5 USE flag got enabled for Soraka (and Nautilus) in\n> > >\n> > > commit 14bb32f0477d5956f86802f80e8e4d0ab8c7b9bc\n> > > Author:     Daniil Lunev <dlunev@chromium.org>\n> > > AuthorDate: Wed Mar 10 09:22:06 2021 +1100\n> > > Commit:     Commit Bot <commit-bot@chromium.org>\n> > > CommitDate: Tue Mar 9 23:56:23 2021 +0000\n> > >\n> > >     overlays: add a special tag for 4->5 uprevs\n> > >\n> > >\n> > > The direncription_allow_v2 USE flag got enabled for soraka-libcamera in\n> > >\n> > > commit 6b846af8ee5752878fc2e125c612719b3467cc3b\n> > > Author:     Daniil Lunev <dlunev@chromium.org>\n> > > AuthorDate: Mon Mar 1 09:28:11 2021 +1100\n> > > Commit:     Commit Bot <commit-bot@chromium.org>\n> > > CommitDate: Tue Mar 2 06:14:31 2021 +0000\n> > >\n> > >     overlays: enable fscrypt v2 attempt on post 5.4 boards\n> > >\n> > >\n> > > Disabling direncription_allow_v2 manually allows the build to continue,\n> > > but I don't think that's a very good idea.\n> >\n> > After fixing (or working around) those two issues, the build completes.\n> > I'll now try to build the latest version (R93-13987), to see if some of\n> > the problems have been fixed.\n>\n> Exact same issues with R93-13987. Other than that, it compiles fine. I\n> also confirm that Soraka finally produces sound :-)\n>\n\nI've now built R93-13987 with the fixes suggested by Laurent and\ntested the configuration file series there and can confirm it works\n\nOnce we got all team with an updated SDK we'll finally merge the\nseries.\n\nThanks\n   j","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 E0FA9C3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 May 2021 14:48:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE12768919;\n\tMon, 24 May 2021 16:48:21 +0200 (CEST)","from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9FCC3601AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 May 2021 16:48:20 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id A55C61C0008;\n\tMon, 24 May 2021 14:48:19 +0000 (UTC)"],"Date":"Mon, 24 May 2021 16:49:05 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210524144905.rn43zzy2qysugufb@uno.localdomain>","References":"<20210415135213.94511-5-jacopo@jmondi.org>\n\t<CAO5uPHMzPstV3UVGxKKmZXg51nAFYk_cPdM-PB0PyQF22PUrhQ@mail.gmail.com>\n\t<20210521072951.w2eysj4w2mrw5dud@uno.localdomain>\n\t<CANJVT8dHy-Pdb++7zWg1YWAACTHueLeM3j49Ps-+offkyRPPQA@mail.gmail.com>\n\t<20210521155641.s7hsxxcq4tnvwszd@uno.localdomain>\n\t<YKmihv2IJWP3TOGm@pendragon.ideasonboard.com>\n\t<YKpRFbtiEcZndtnV@pendragon.ideasonboard.com>\n\t<YKpy7SamELiwG0US@pendragon.ideasonboard.com>\n\t<YKqGe5KlaZVv30Oa@pendragon.ideasonboard.com>\n\t<YKrSdc5U1Ljm+vcf@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YKrSdc5U1Ljm+vcf@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v6 4/5] android: camera_device: Get\n\tproperties from configuration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]