From patchwork Tue Apr 7 16:38:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 3411 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F2B5E600F0 for ; Tue, 7 Apr 2020 18:35:33 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 4114E4000F; Tue, 7 Apr 2020 16:35:32 +0000 (UTC) From: Jacopo Mondi To: Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , Laurent Pinchart , tfiga@google.com, pavel@ucw.cz Cc: Jacopo Mondi , linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)), libcamera-devel@lists.libcamera.org Date: Tue, 7 Apr 2020 18:38:16 +0200 Message-Id: <20200407163825.1766483-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200407163825.1766483-1-jacopo@jmondi.org> References: <20200407163825.1766483-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 02/11] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_LOCATION X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 16:35:34 -0000 Add documentation for the V4L2_CID_CAMERA_SENSOR_LOCATION camera control. The newly added read-only control reports the camera device mounting position. Signed-off-by: Jacopo Mondi --- .../media/uapi/v4l/ext-ctrls-camera.rst | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst index 51c1d5c9eb00..b151c016256c 100644 --- a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst +++ b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst @@ -510,6 +510,38 @@ enum v4l2_scene_mode - value down. A value of zero stops the motion if one is in progress and has no effect otherwise. +``V4L2_CID_CAMERA_SENSOR_LOCATION (integer)`` + This read-only control describes the camera sensor location by reporting + its mounting position on the device where the camera is installed. The + control value is constant and not modifiable by software. This control is + particularly meaningful for devices which have a well defined orientation, + such as phones, laptops and portable devices since the camera location is + expressed as a position relative to the device's intended usage orientation. + For example, a camera sensor installed on the user-facing side of a phone, + a tablet or a laptop device is said to be installed in the + ``V4L2_LOCATION_FRONT`` location while camera sensors installed on the side + opposite the front one are said to be installed in the + ``V4L2_LOCATION_BACK`` location. Camera sensors not directly attached to + the device or attached in a way that allows them to move freely, such as + webcams and digital cameras, are said to have the ``V4L2_LOCATION_EXTERNAL`` + location. + + + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_LOCATION_FRONT`` + - The camera sensor is located on the front side of the device. + * - ``V4L2_LOCATION_BACK`` + - The camera sensor is located on the back side of the device. + * - ``V4L2_LOCATION_EXTERNAL`` + - The camera sensor is not directly attached to the device and is + freely movable. + + + .. [#f1] This control may be changed to a menu control in the future, if more options are required.