[{"id":14540,"web_url":"https://patchwork.libcamera.org/comment/14540/","msgid":"<X/7tV/H9UUFuC7WQ@oden.dyn.berto.se>","date":"2021-01-13T12:53:43","subject":"Re: [libcamera-devel] [PATCH v6 05/10] libcamera: camera_sensor:\n\tDefault 'location' to External","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your patch.\n\nOn 2021-01-07 10:47:30 +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> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se\n\nMissing '>' at the end :-)\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/camera_sensor.cpp | 11 +++++------\n>  1 file changed, 5 insertions(+), 6 deletions(-)\n> \n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index e8caa4467643..71aa268f3b4f 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -345,7 +345,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> @@ -354,20 +353,20 @@ 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}\n>  \tproperties_.set(properties::Location, propertyValue);\n>  \n> -- \n> 2.29.2\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 EE378BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Jan 2021 12:53:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7F0F46054E;\n\tWed, 13 Jan 2021 13:53:47 +0100 (CET)","from mail-lj1-x233.google.com (mail-lj1-x233.google.com\n\t[IPv6:2a00:1450:4864:20::233])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 92C556054E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jan 2021 13:53:46 +0100 (CET)","by mail-lj1-x233.google.com with SMTP id u11so2367243ljo.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Jan 2021 04:53:46 -0800 (PST)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\ti11sm201116lfl.297.2021.01.13.04.53.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 13 Jan 2021 04:53:45 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"e6kxtkiZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=Ujkc37/+2GcUxDjfraKdFduPUFDSFZLt0bkpi0tC3mE=;\n\tb=e6kxtkiZTPYjT761IiWYaZMvLsGe2ZKyHDJ0d/M45HNhKuLZj84++hQY2zFGIWXiSv\n\tTV8w9oT+9NftqfdYF/mysYw02OVcKnbdlA/OFVP3iWyHhoMfRHPnTUaGHgCY8K+dBSE9\n\teQ+m7GVb/RiYb3j4oG/fWBCehvfGvBWRfR2GsUPmr3O21Uwi7EoCvvJQg6rpm3TNklI1\n\tTPkelR5Y7LqyTjd4/DB5qyi93PE2x1W7uSC4ENuNSXoyn9jEICR6wHGxmdACkykUjqDy\n\t1kG9noSioJGecWdHidz0w9LfyHBLzjGvTQLJET6D6UJTLCt7+7BMyPatHFFMhowfSB8X\n\trrig==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=Ujkc37/+2GcUxDjfraKdFduPUFDSFZLt0bkpi0tC3mE=;\n\tb=UYjGlMBXDq6Njj4upKnCdkVW/XV/GXdZ5LbGIjaEqeVeUb9nHMbyfJAruANeAldk8w\n\tojKJBWrdffiWZ6f7LNyKIjaiV/Ps+yhQ9obCbPi0r0CFUwEublVmA0OjmZMeYhz8/yo3\n\tleUgbOuILRCsIo+jVyZjwuYqZsG31yPZ9r8PtMUQot+pmIC9f9O5dfClsWZI4VWJZ7jN\n\tnR0cp6ekE4WJfBmKNbSfeABN0Ub99mK64fCjD1qQxtCAyMOMOG6eqejV6HeqMH34ocnm\n\tqqdGwnd1SCVZxhd0MMF02PCPAHM1h+S044lKesm3u6o1E20LWIy0amPW/sgIJ06HTPuK\n\t40mQ==","X-Gm-Message-State":"AOAM530wanuTO0G9xtCmKiX6X1oOzC30nBm1GbAOyPVBXCaI3qwOZ50d\n\t8kqKJad1qyGZsqq3a7fKL2PQi72eyM3kcw==","X-Google-Smtp-Source":"ABdhPJz0EelG0gLss4W3m0UsMqDqPQj7oEocgZS1uJYstoa76uw8d348BXJ0gssbX3N/G+0zek6hnw==","X-Received":"by 2002:a05:651c:1bb:: with SMTP id\n\tc27mr864442ljn.44.1610542425898; \n\tWed, 13 Jan 2021 04:53:45 -0800 (PST)","Date":"Wed, 13 Jan 2021 13:53:43 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<X/7tV/H9UUFuC7WQ@oden.dyn.berto.se>","References":"<20210107094735.11673-1-jacopo@jmondi.org>\n\t<20210107094735.11673-6-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210107094735.11673-6-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v6 05/10] 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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]