[{"id":14425,"web_url":"https://patchwork.libcamera.org/comment/14425/","msgid":"<X+zfsiBxlF+QiFlr@pendragon.ideasonboard.com>","date":"2020-12-30T20:14:42","subject":"Re: [libcamera-devel] [PATCH v3 4/6] libcamera: camera_sensor:\n\tDefault 'location' to External","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Wed, Dec 30, 2020 at 07:01:18PM +0100, Jacopo Mondi wrote:\n> If the sensor driver does not report the camera location default it\n> to 'External' instead of 'Front'.\n> \n> As the camera location is used to construct the camera unique name\n> presented to the user, it makes more sense to report multiple 'External'\n> cameras instead of multiple 'Front' ones.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/camera_sensor.cpp | 13 ++++++-------\n>  1 file changed, 6 insertions(+), 7 deletions(-)\n> \n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index 2ce19a40b448..1a316da45511 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -352,7 +352,6 @@ int CameraSensor::initProperties()\n>  \tconst ControlInfoMap &controls = subdev_->controls();\n>  \tint32_t propertyValue;\n>  \n> -\t/* Camera Location: default is front location. */\n>  \tconst auto &orientation = controls.find(V4L2_CID_CAMERA_ORIENTATION);\n>  \tif (orientation != controls.end()) {\n>  \t\tint32_t v4l2Orientation = orientation->second.def().get<int32_t>();\n> @@ -361,22 +360,22 @@ int CameraSensor::initProperties()\n>  \t\tdefault:\n>  \t\t\tLOG(CameraSensor, Warning)\n>  \t\t\t\t<< \"Unsupported camera location \"\n> -\t\t\t\t<< v4l2Orientation << \", setting to Front\";\n> +\t\t\t\t<< v4l2Orientation << \", setting to External\";\n>  \t\t\t/* Fall-through */\n> +\t\tcase V4L2_CAMERA_ORIENTATION_EXTERNAL:\n> +\t\t\tpropertyValue = properties::CameraLocationExternal;\n> +\t\t\tbreak;\n>  \t\tcase V4L2_CAMERA_ORIENTATION_FRONT:\n>  \t\t\tpropertyValue = properties::CameraLocationFront;\n>  \t\t\tbreak;\n>  \t\tcase V4L2_CAMERA_ORIENTATION_BACK:\n>  \t\t\tpropertyValue = properties::CameraLocationBack;\n>  \t\t\tbreak;\n> -\t\tcase V4L2_CAMERA_ORIENTATION_EXTERNAL:\n> -\t\t\tpropertyValue = properties::CameraLocationExternal;\n> -\t\t\tbreak;\n>  \t\t}\n>  \t} else {\n> -\t\tpropertyValue = properties::CameraLocationFront;\n> +\t\tpropertyValue = properties::CameraLocationExternal;\n>  \t\tLOG(CameraSensor, Debug)\n> -\t\t\t<< \"Location property defaulted to 'Front Camera'\";\n> +\t\t\t<< \"Location property defaulted to 'External Camera'\";\n>  \t}\n>  \tproperties_.set(properties::Location, propertyValue);\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 B5A46C0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Dec 2020 20:14:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7531F615B4;\n\tWed, 30 Dec 2020 21:14:55 +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 3B37060526\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Dec 2020 21:14:54 +0100 (CET)","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 BB4DB2A3;\n\tWed, 30 Dec 2020 21:14:53 +0100 (CET)"],"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=\"PPFGT0hx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1609359293;\n\tbh=M3rkickkT/MOC2K5+nOndfeSBnGoaAGoOhwplK/bM/c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PPFGT0hx2LBjn/Slg4YtRXT3gcWNGh47UPT2O+IDr0sPCGb0xTVc+UZ8TJv7uUpBM\n\t+Raj9XIpR3mZCraA/MD+IZ3uDe1X8fEAIjOkvD+NQT09pu77ZODCgOmFju6pGV8E3y\n\ttBHlh2mhry9Yd32a5fC21v8lcB3qrRUE2Aa2I5rk=","Date":"Wed, 30 Dec 2020 22:14:42 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<X+zfsiBxlF+QiFlr@pendragon.ideasonboard.com>","References":"<20201230180120.78407-1-jacopo@jmondi.org>\n\t<20201230180120.78407-5-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201230180120.78407-5-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v3 4/6] libcamera: camera_sensor:\n\tDefault 'location' to External","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","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]