[{"id":21837,"web_url":"https://patchwork.libcamera.org/comment/21837/","msgid":"<20211221083750.gy67le6fczrrxale@uno.localdomain>","date":"2021-12-21T08:37:50","subject":"Re: [libcamera-devel] [PATCH v2 1/6] android: camera_capabilities:\n\tAdd messages for lack of FULL support","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Paul,\n\nOn Mon, Dec 20, 2021 at 05:26:24PM -0600, Paul Elder wrote:\n> Print messages when some feature is missing that causes hardware level\n> FULL to not be supported.\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  src/android/camera_capabilities.cpp | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n> index c4c26089..6ae2cd4d 100644\n> --- a/src/android/camera_capabilities.cpp\n> +++ b/src/android/camera_capabilities.cpp\n> @@ -359,6 +359,9 @@ void CameraCapabilities::computeHwLevel(\n>  {\n>  \tcamera_metadata_ro_entry_t entry;\n>  \tbool found;\n> +\nYou  can drop this empty line. I would move the noFull declaration at\nthe beginning of the function.\n\n> +\tconst char *noFull = \"Hardware level FULL unavailable: \";\n> +\n\nThis should be a const std::string ?\n\nHowever I see other similar construct using a char * already. Should\nthey be fixed ?\n\n\tconst char *noMode = \"Manual post processing capability unavailable: \";\n\n>  \tcamera_metadata_enum_android_info_supported_hardware_level\n>  \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL;\n>\n> @@ -372,8 +375,10 @@ void CameraCapabilities::computeHwLevel(\n>  \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n>\n>  \tfound = staticMetadata_->getEntry(ANDROID_SYNC_MAX_LATENCY, &entry);\n> -\tif (!found || *entry.data.i32 != 0)\n> +\tif (!found || *entry.data.i32 != 0) {\n> +\t\tLOG(HAL, Info) << noFull << \"missing or invalid max sync latency\";\n\nOr you could simply drop noFull and add the string here.\n\nEither ways\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n>  \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n> +\t}\n>\n>  \thwLevel_ = hwLevel;\n>  }\n> --\n> 2.27.0\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 D7C0ABE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Dec 2021 08:36:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A07060901;\n\tTue, 21 Dec 2021 09:36:58 +0100 (CET)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 95E0160113\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Dec 2021 09:36:56 +0100 (CET)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 2403924000C;\n\tTue, 21 Dec 2021 08:36:55 +0000 (UTC)"],"Date":"Tue, 21 Dec 2021 09:37:50 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20211221083750.gy67le6fczrrxale@uno.localdomain>","References":"<20211220232629.1485890-1-paul.elder@ideasonboard.com>\n\t<20211220232629.1485890-2-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211220232629.1485890-2-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 1/6] android: camera_capabilities:\n\tAdd messages for lack of FULL support","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21935,"web_url":"https://patchwork.libcamera.org/comment/21935/","msgid":"<9bb9d67b-99bf-d5b2-df7f-aeed31fcecd7@ideasonboard.com>","date":"2022-01-04T03:33:12","subject":"Re: [libcamera-devel] [PATCH v2 1/6] android: camera_capabilities:\n\tAdd messages for lack of FULL support","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi,\n\nOn 12/21/21 2:07 PM, Jacopo Mondi wrote:\n> Hi Paul,\n>\n> On Mon, Dec 20, 2021 at 05:26:24PM -0600, Paul Elder wrote:\n>> Print messages when some feature is missing that causes hardware level\n>> FULL to not be supported.\n>>\n>> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n>> ---\n>>   src/android/camera_capabilities.cpp | 7 ++++++-\n>>   1 file changed, 6 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n>> index c4c26089..6ae2cd4d 100644\n>> --- a/src/android/camera_capabilities.cpp\n>> +++ b/src/android/camera_capabilities.cpp\n>> @@ -359,6 +359,9 @@ void CameraCapabilities::computeHwLevel(\n>>   {\n>>   \tcamera_metadata_ro_entry_t entry;\n>>   \tbool found;\n>> +\n> You  can drop this empty line. I would move the noFull declaration at\n> the beginning of the function.\n>\n>> +\tconst char *noFull = \"Hardware level FULL unavailable: \";\n>> +\n> This should be a const std::string ?\n>\n> However I see other similar construct using a char * already. Should\n> they be fixed ?\n>\n> \tconst char *noMode = \"Manual post processing capability unavailable: \";\n>\n>>   \tcamera_metadata_enum_android_info_supported_hardware_level\n>>   \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL;\n>>\n>> @@ -372,8 +375,10 @@ void CameraCapabilities::computeHwLevel(\n>>   \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n>>\n>>   \tfound = staticMetadata_->getEntry(ANDROID_SYNC_MAX_LATENCY, &entry);\n>> -\tif (!found || *entry.data.i32 != 0)\n>> +\tif (!found || *entry.data.i32 != 0) {\n>> +\t\tLOG(HAL, Info) << noFull << \"missing or invalid max sync latency\";\n> Or you could simply drop noFull and add the string here.\n>\n> Either ways\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\n\nSimilar comments, with these addressed:\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n>\n> Thanks\n>     j\n>>   \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n>> +\t}\n>>\n>>   \thwLevel_ = hwLevel;\n>>   }\n>> --\n>> 2.27.0\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 47D57BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Jan 2022 03:33:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B8B260921;\n\tTue,  4 Jan 2022 04:33:20 +0100 (CET)","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 446BD604F8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  4 Jan 2022 04:33:19 +0100 (CET)","from [IPv6:2401:4900:1f3e:193e:9a73:f356:8c6a:a1aa] (unknown\n\t[IPv6:2401:4900:1f3e:193e:9a73:f356:8c6a:a1aa])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C167501;\n\tTue,  4 Jan 2022 04:33:17 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"UOdf8xIl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1641267198;\n\tbh=zG4HbHxV3rlrqAFRX/3FInnYFII20FqObKCkykTqx7o=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=UOdf8xIlXLuis05kfffxVBH1IqLlFi9wB8TL1Wvwdw1a+q+1dDtY0IzsioIEwy8ES\n\tTsGrPyZ+w9L/PzSTKidsPDNqvEN5dQca6pL+M+89V3xZq5glZsKYhgROu5OMHVrGD1\n\tnaiAJNW8EmJj9J0b4uOejbJ4+rACLqtj7i5Mv4P4=","To":"Jacopo Mondi <jacopo@jmondi.org>,\n\tPaul Elder <paul.elder@ideasonboard.com>","References":"<20211220232629.1485890-1-paul.elder@ideasonboard.com>\n\t<20211220232629.1485890-2-paul.elder@ideasonboard.com>\n\t<20211221083750.gy67le6fczrrxale@uno.localdomain>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<9bb9d67b-99bf-d5b2-df7f-aeed31fcecd7@ideasonboard.com>","Date":"Tue, 4 Jan 2022 09:03:12 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<20211221083750.gy67le6fczrrxale@uno.localdomain>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH v2 1/6] android: camera_capabilities:\n\tAdd messages for lack of FULL support","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]