Skip to content

Commit 9397a83

Browse files
jmondimchehab
authored andcommitted
media: v4l2-ctrl: Document V4L2_CID_CAMERA_ORIENTATION
Add documentation for the V4L2_CID_CAMERA_ORIENTATION camera control. The newly added read-only control reports the camera device orientation relative to the usage orientation of the system the camera is installed on. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 915bd31 commit 9397a83

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,36 @@ enum v4l2_scene_mode -
510510
value down. A value of zero stops the motion if one is in progress
511511
and has no effect otherwise.
512512

513+
``V4L2_CID_CAMERA_ORIENTATION (menu)``
514+
This read-only control describes the camera orientation by reporting its
515+
mounting position on the device where the camera is installed. The control
516+
value is constant and not modifiable by software. This control is
517+
particularly meaningful for devices which have a well defined orientation,
518+
such as phones, laptops and portable devices since the control is expressed
519+
as a position relative to the device's intended usage orientation. For
520+
example, a camera installed on the user-facing side of a phone, a tablet or
521+
a laptop device is said to be have ``V4L2_CAMERA_ORIENTATION_FRONT``
522+
orientation, while a camera installed on the opposite side of the front one
523+
is said to be have ``V4L2_CAMERA_ORIENTATION_BACK`` orientation. Camera
524+
sensors not directly attached to the device, or attached in a way that
525+
allows them to move freely, such as webcams and digital cameras, are said to
526+
have the ``V4L2_CAMERA_ORIENTATION_EXTERNAL`` orientation.
527+
528+
529+
530+
.. flat-table::
531+
:header-rows: 0
532+
:stub-columns: 0
533+
534+
* - ``V4L2_CAMERA_ORIENTATION_FRONT``
535+
- The camera is oriented towards the user facing side of the device.
536+
* - ``V4L2_CAMERA_ORIENTATION_BACK``
537+
- The camera is oriented towards the back facing side of the device.
538+
* - ``V4L2_CAMERA_ORIENTATION_EXTERNAL``
539+
- The camera is not directly attached to the device and is freely movable.
540+
541+
542+
513543
.. [#f1]
514544
This control may be changed to a menu control in the future, if more
515545
options are required.

0 commit comments

Comments
 (0)