[{"id":25653,"web_url":"https://patchwork.libcamera.org/comment/25653/","msgid":"<166695319127.3974115.16674479816933867796@Monstersaurus>","date":"2022-10-28T10:33:11","subject":"Re: [libcamera-devel] [PATCH v5 10/10] android: libcamera: add\n\tuseful debug prints","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Nicholas Roth via libcamera-devel (2022-10-28 04:17:26)\n> From: Nicholas Roth <nicholas@rothemail.net>\n> \n> I identified opportunities to make libcamera's log output easier to\n> understand while working to get it working on my Android device as a\n> HAL. These additional logging statements came out of that and will\n> hopefully prove useful to Android distribution maintainers with the same\n> goal as mine and to users who attempt to debug tools like Waydroid.\n> \n> Signed-off-by: Nicholas Roth <nicholas@rothemail.net>\n\nThis looks fine to me.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/android/camera_capabilities.cpp | 12 +++++++++---\n>  src/android/camera_hal_manager.cpp  |  3 ++-\n>  2 files changed, 11 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n> index 64bd8dde..ef0d10d0 100644\n> --- a/src/android/camera_capabilities.cpp\n> +++ b/src/android/camera_capabilities.cpp\n> @@ -374,14 +374,20 @@ void CameraCapabilities::computeHwLevel(\n>         camera_metadata_enum_android_info_supported_hardware_level\n>                 hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL;\n>  \n> -       if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR))\n> +       if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR)) {\n> +               LOG(HAL, Info) << noFull << \"missing manual sensor\";\n>                 hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n> +       }\n>  \n> -       if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING))\n> +       if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING)) {\n> +               LOG(HAL, Info) << noFull << \"missing manual post processing\";\n>                 hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n> +       }\n>  \n> -       if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE))\n> +       if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE)) {\n> +               LOG(HAL, Info) << noFull << \"missing burst capture\";\n>                 hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n> +       }\n>  \n>         found = staticMetadata_->getEntry(ANDROID_SYNC_MAX_LATENCY, &entry);\n>         if (!found || *entry.data.i32 != 0) {\n> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\n> index 7512cc4e..b229e2d5 100644\n> --- a/src/android/camera_hal_manager.cpp\n> +++ b/src/android/camera_hal_manager.cpp\n> @@ -140,7 +140,8 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n>          */\n>         if (!isCameraExternal && !halConfig_.exists()) {\n>                 LOG(HAL, Error)\n> -                       << \"HAL configuration file is mandatory for internal cameras\";\n> +                       << \"HAL configuration file is mandatory for internal cameras.\"\n> +                       << \" Camera \" << cam->id() << \"failed to load\";\n>                 return;\n>         }\n>  \n> -- \n> 2.34.1\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 33955BDB16\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Oct 2022 10:33:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A75C262FD0;\n\tFri, 28 Oct 2022 12:33:15 +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 513CD61F4A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Oct 2022 12:33:14 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C88AC501;\n\tFri, 28 Oct 2022 12:33:13 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666953195;\n\tbh=t3T8RbPf303rrcHU7NWH/YUBf3SxHO63LYEtYrBqTXM=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=wV9lPkEnxoBDiReshDiHO5G8a09TT4eCCuP1K71Af9KXTQ/5Hw8ai1hxJC47dNl6K\n\t0pcyR8NgaRBTJ/ttsHEiYT48CFGIQrNSyIjd6W/DALTIUF0xLmgwA1P/SzkuTSqjJD\n\tL232XucFJIvdZahHdZkXQ4yiW71h0VWUXtX91tKepfogbo0pgzuqQ29MA687gBkV5s\n\tUp6g7/ECL+eUumnQArJGyASe9zyMWbkJ7pgiVhmIoGAZ+D+yftsNp1sVnIRffjWbU6\n\t03BBLhHYaEoTrLT1p0M7vy9bo1pUjOOnsv3ImiqZCqw5a5kDTuzfKIkYsdX0mACGCj\n\thPS1R6trUFJXg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666953193;\n\tbh=t3T8RbPf303rrcHU7NWH/YUBf3SxHO63LYEtYrBqTXM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=UP85SP3zMITOblxMX4o1t+tzrjbtvZNrtKz81+A3JCa4BuETzlSnz+cV2uuqI6m3B\n\tsBc5E7i04yIACwTGbrJ8kim/HINEsv/lRYriXwQqEopV/OyK7I3/OCTF4VcnlndN0U\n\tVrP3DJJ4JQFwhpAv2DGIImLKBo5R6Ll9/qR/dYYc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"UP85SP3z\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20221028031726.4849-11-nicholas@rothemail.net>","References":"<20221027224135.348115-1-nicholas@rothemail.net>\n\t<20221028031726.4849-1-nicholas@rothemail.net>\n\t<20221028031726.4849-11-nicholas@rothemail.net>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 28 Oct 2022 11:33:11 +0100","Message-ID":"<166695319127.3974115.16674479816933867796@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v5 10/10] android: libcamera: add\n\tuseful debug prints","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"nicholas@rothemail.net","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25656,"web_url":"https://patchwork.libcamera.org/comment/25656/","msgid":"<20221028110135.c65zkpptr2n46uft@uno.localdomain>","date":"2022-10-28T11:01:35","subject":"Re: [libcamera-devel] [PATCH v5 10/10] android: libcamera: add\n\tuseful debug prints","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi\n\nOn Thu, Oct 27, 2022 at 10:17:26PM -0500, Nicholas Roth via libcamera-devel wrote:\n> From: Nicholas Roth <nicholas@rothemail.net>\n>\n> I identified opportunities to make libcamera's log output easier to\n> understand while working to get it working on my Android device as a\n> HAL. These additional logging statements came out of that and will\n> hopefully prove useful to Android distribution maintainers with the same\n> goal as mine and to users who attempt to debug tools like Waydroid.\n>\n> Signed-off-by: Nicholas Roth <nicholas@rothemail.net>\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> ---\n>  src/android/camera_capabilities.cpp | 12 +++++++++---\n>  src/android/camera_hal_manager.cpp  |  3 ++-\n>  2 files changed, 11 insertions(+), 4 deletions(-)\n>\n> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n> index 64bd8dde..ef0d10d0 100644\n> --- a/src/android/camera_capabilities.cpp\n> +++ b/src/android/camera_capabilities.cpp\n> @@ -374,14 +374,20 @@ void CameraCapabilities::computeHwLevel(\n>  \tcamera_metadata_enum_android_info_supported_hardware_level\n>  \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL;\n>\n> -\tif (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR))\n> +\tif (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR)) {\n> +\t\tLOG(HAL, Info) << noFull << \"missing manual sensor\";\n>  \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n> +\t}\n>\n> -\tif (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING))\n> +\tif (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING)) {\n> +\t\tLOG(HAL, Info) << noFull << \"missing manual post processing\";\n>  \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n> +\t}\n>\n> -\tif (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE))\n> +\tif (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE)) {\n> +\t\tLOG(HAL, Info) << noFull << \"missing burst capture\";\n>  \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n> +\t}\n>\n>  \tfound = staticMetadata_->getEntry(ANDROID_SYNC_MAX_LATENCY, &entry);\n>  \tif (!found || *entry.data.i32 != 0) {\n> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\n> index 7512cc4e..b229e2d5 100644\n> --- a/src/android/camera_hal_manager.cpp\n> +++ b/src/android/camera_hal_manager.cpp\n> @@ -140,7 +140,8 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n>  \t */\n>  \tif (!isCameraExternal && !halConfig_.exists()) {\n>  \t\tLOG(HAL, Error)\n> -\t\t\t<< \"HAL configuration file is mandatory for internal cameras\";\n> +\t\t\t<< \"HAL configuration file is mandatory for internal cameras.\"\n> +\t\t\t<< \" Camera \" << cam->id() << \"failed to load\";\n>  \t\treturn;\n>  \t}\n>\n> --\n> 2.34.1\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 BD3FDBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Oct 2022 11:01:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1124162FD4;\n\tFri, 28 Oct 2022 13:01:39 +0200 (CEST)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DD22561F4A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Oct 2022 13:01:37 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 52F7A240006;\n\tFri, 28 Oct 2022 11:01:37 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666954899;\n\tbh=zQmkc1eSTw5ERxnOGExv4ISFrxmCUihOkxNPzh7qnjc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=238X9YC9JqhJsUxVCuKhEPc5rCpMEdS9cgSwpZfj7EcOI+HsGhEbLYnfSlwIFd7/6\n\te24ZWV6kt58gfnjV7ShRJSZ7F/rAiw54WwpQIYC/HvPnAkL4fTk//oyfirJQ3CU6IX\n\tjqianBPcZ3LBTypadibNgxjTqVPY/NR+INsQy1gIiBoaUAqZScsVZI9ygbz8S41K6K\n\tczob1no46lHeqIlE4g9NnQuRk06v1NLADSIH4iDxxgI14UxssF44/ODYNDssxdu3wk\n\tAHxG7v/oH+yenN75kgVxYyX+jypdKcO43zLvP/FGWcPcKlppMvIF5wo7FyJxc4Az1k\n\tM51yOZf9NOuAw==","Date":"Fri, 28 Oct 2022 13:01:35 +0200","To":"Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20221028110135.c65zkpptr2n46uft@uno.localdomain>","References":"<20221027224135.348115-1-nicholas@rothemail.net>\n\t<20221028031726.4849-1-nicholas@rothemail.net>\n\t<20221028031726.4849-11-nicholas@rothemail.net>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221028031726.4849-11-nicholas@rothemail.net>","Subject":"Re: [libcamera-devel] [PATCH v5 10/10] android: libcamera: add\n\tuseful debug prints","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"nicholas@rothemail.net","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]