1 From 16a7ef36055e414560143ebcb95113f9513ca49d Mon Sep 17 00:00:00 2001
2 From: Jacopo Mondi <jacopo@jmondi.org>
3 Date: Sat, 9 May 2020 11:04:46 +0200
4 Subject: [PATCH] media: v4l2-ctrl: Document
5 V4L2_CID_CAMERA_ORIENTATION
7 Add documentation for the V4L2_CID_CAMERA_ORIENTATION camera
8 control. The newly added read-only control reports the camera device
9 orientation relative to the usage orientation of the system the camera
12 Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
13 Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
14 Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
16 Commit 9397a83f40183eeafd5c787af2240ed0d6b26daa upstream
18 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
20 .../media/uapi/v4l/ext-ctrls-camera.rst | 30 +++++++++++++++++++
21 1 file changed, 30 insertions(+)
23 --- a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst
24 +++ b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst
25 @@ -510,6 +510,36 @@ enum v4l2_scene_mode -
26 value down. A value of zero stops the motion if one is in progress
27 and has no effect otherwise.
29 +``V4L2_CID_CAMERA_ORIENTATION (menu)``
30 + This read-only control describes the camera orientation by reporting its
31 + mounting position on the device where the camera is installed. The control
32 + value is constant and not modifiable by software. This control is
33 + particularly meaningful for devices which have a well defined orientation,
34 + such as phones, laptops and portable devices since the control is expressed
35 + as a position relative to the device's intended usage orientation. For
36 + example, a camera installed on the user-facing side of a phone, a tablet or
37 + a laptop device is said to be have ``V4L2_CAMERA_ORIENTATION_FRONT``
38 + orientation, while a camera installed on the opposite side of the front one
39 + is said to be have ``V4L2_CAMERA_ORIENTATION_BACK`` orientation. Camera
40 + sensors not directly attached to the device, or attached in a way that
41 + allows them to move freely, such as webcams and digital cameras, are said to
42 + have the ``V4L2_CAMERA_ORIENTATION_EXTERNAL`` orientation.
50 + * - ``V4L2_CAMERA_ORIENTATION_FRONT``
51 + - The camera is oriented towards the user facing side of the device.
52 + * - ``V4L2_CAMERA_ORIENTATION_BACK``
53 + - The camera is oriented towards the back facing side of the device.
54 + * - ``V4L2_CAMERA_ORIENTATION_EXTERNAL``
55 + - The camera is not directly attached to the device and is freely movable.
60 This control may be changed to a menu control in the future, if more