Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) .. _tuner:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) *********************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) Tuners and Modulators
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) *********************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Tuners
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) ======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) Video input devices can have one or more tuners demodulating a RF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) signal. Each tuner is associated with one or more video inputs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) depending on the number of RF connectors on the tuner. The ``type``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) field of the respective struct :c:type:`v4l2_input`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) returned by the :ref:`VIDIOC_ENUMINPUT` ioctl is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) index number of the tuner.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) Radio input devices have exactly one tuner with index zero, no video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) inputs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) To query and change tuner properties applications use the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct :c:type:`v4l2_tuner` returned by :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) also contains signal status information applicable when the tuner of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) current video or radio input is queried.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) .. note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)    :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` does not switch the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)    current tuner, when there is more than one. The tuner is solely
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)    determined by the current video input. Drivers must support both ioctls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)    and set the ``V4L2_CAP_TUNER`` flag in the struct :c:type:`v4l2_capability`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)    returned by the :ref:`VIDIOC_QUERYCAP` ioctl when the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)    device has one or more tuners.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) Modulators
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) ==========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) Video output devices can have one or more modulators, that modulate a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) video signal for radiation or connection to the antenna input of a TV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) set or video recorder. Each modulator is associated with one or more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) video outputs, depending on the number of RF connectors on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) modulator. The ``type`` field of the respective struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) :c:type:`v4l2_output` returned by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) :ref:`VIDIOC_ENUMOUTPUT` ioctl is set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) ``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) index number of the modulator.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) Radio output devices have exactly one modulator with index zero, no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) video outputs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) A video or radio device cannot support both a tuner and a modulator. Two
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) separate device nodes will have to be used for such hardware, one that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) supports the tuner functionality and one that supports the modulator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) functionality. The reason is a limitation with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl where you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) cannot specify whether the frequency is for a tuner or a modulator.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) To query and change modulator properties applications use the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) :ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl. Note that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` does not switch the current modulator, when there
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) is more than one at all. The modulator is solely determined by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) current video output. Drivers must support both ioctls and set the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) ``V4L2_CAP_MODULATOR`` flag in the struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) :c:type:`v4l2_capability` returned by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) :ref:`VIDIOC_QUERYCAP` ioctl when the device has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) one or more modulators.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) Radio Frequency
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) To get and set the tuner or modulator radio frequency applications use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) a pointer to a struct :c:type:`v4l2_frequency`. These
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) ioctls are used for TV and radio devices alike. Drivers must support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) both ioctls when the tuner or modulator ioctls are supported, or when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) the device is a radio device.