diff options
author | Markus Heiser <markus.heiser@darmarIT.de> | 2016-06-30 15:18:56 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-06-30 16:14:52 -0300 |
commit | 5377d91f3e88d5c8da46b1feba78b00d379fb7b6 (patch) | |
tree | e1b42603f4ccab1e027454cf04ebe7ea11bea30f /Documentation/linux_tv/media/v4l/tuner.rst | |
parent | 6ab99fa6a04b60ff14368af98e2763e707ffc691 (diff) | |
download | lwn-5377d91f3e88d5c8da46b1feba78b00d379fb7b6.tar.gz lwn-5377d91f3e88d5c8da46b1feba78b00d379fb7b6.zip |
doc-rst: linux_tv DocBook to reST migration (docs-next)
This is the restructuredText (reST) migration of the ``media``
DocBook-XML set from the linux_tv project.
Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/linux_tv/media/v4l/tuner.rst')
-rw-r--r-- | Documentation/linux_tv/media/v4l/tuner.rst | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/Documentation/linux_tv/media/v4l/tuner.rst b/Documentation/linux_tv/media/v4l/tuner.rst new file mode 100644 index 000000000000..bc22a99579e3 --- /dev/null +++ b/Documentation/linux_tv/media/v4l/tuner.rst @@ -0,0 +1,91 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _tuner: + +********************* +Tuners and Modulators +********************* + + +Tuners +====== + +Video input devices can have one or more tuners demodulating a RF +signal. Each tuner is associated with one or more video inputs, +depending on the number of RF connectors on the tuner. The ``type`` +field of the respective struct :ref:`v4l2_input <v4l2-input>` +returned by the :ref:`VIDIOC_ENUMINPUT <vidioc-enuminput>` ioctl is +set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the +index number of the tuner. + +Radio input devices have exactly one tuner with index zero, no video +inputs. + +To query and change tuner properties applications use the +:ref:`VIDIOC_G_TUNER <vidioc-g-tuner>` and +:ref:`VIDIOC_S_TUNER <vidioc-g-tuner>` ioctls, respectively. The +struct :ref:`v4l2_tuner <v4l2-tuner>` returned by ``VIDIOC_G_TUNER`` +also contains signal status information applicable when the tuner of the +current video or radio input is queried. Note that ``VIDIOC_S_TUNER`` +does not switch the current tuner, when there is more than one at all. +The tuner is solely determined by the current video input. Drivers must +support both ioctls and set the ``V4L2_CAP_TUNER`` flag in the struct +:ref:`v4l2_capability <v4l2-capability>` returned by the +:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl when the device has +one or more tuners. + + +Modulators +========== + +Video output devices can have one or more modulators, uh, modulating a +video signal for radiation or connection to the antenna input of a TV +set or video recorder. Each modulator is associated with one or more +video outputs, depending on the number of RF connectors on the +modulator. The ``type`` field of the respective struct +:ref:`v4l2_output <v4l2-output>` returned by the +:ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` ioctl is set to +``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the +index number of the modulator. + +Radio output devices have exactly one modulator with index zero, no +video outputs. + +A video or radio device cannot support both a tuner and a modulator. Two +separate device nodes will have to be used for such hardware, one that +supports the tuner functionality and one that supports the modulator +functionality. The reason is a limitation with the +:ref:`VIDIOC_S_FREQUENCY <vidioc-g-frequency>` ioctl where you +cannot specify whether the frequency is for a tuner or a modulator. + +To query and change modulator properties applications use the +:ref:`VIDIOC_G_MODULATOR <vidioc-g-modulator>` and +:ref:`VIDIOC_S_MODULATOR <vidioc-g-modulator>` ioctl. Note that +``VIDIOC_S_MODULATOR`` does not switch the current modulator, when there +is more than one at all. The modulator is solely determined by the +current video output. Drivers must support both ioctls and set the +``V4L2_CAP_MODULATOR`` flag in the struct +:ref:`v4l2_capability <v4l2-capability>` returned by the +:ref:`VIDIOC_QUERYCAP <vidioc-querycap>` ioctl when the device has +one or more modulators. + + +Radio Frequency +=============== + +To get and set the tuner or modulator radio frequency applications use +the :ref:`VIDIOC_G_FREQUENCY <vidioc-g-frequency>` and +:ref:`VIDIOC_S_FREQUENCY <vidioc-g-frequency>` ioctl which both take +a pointer to a struct :ref:`v4l2_frequency <v4l2-frequency>`. These +ioctls are used for TV and radio devices alike. Drivers must support +both ioctls when the tuner or modulator ioctls are supported, or when +the device is a radio device. + + +.. ------------------------------------------------------------------------------ +.. This file was automatically converted from DocBook-XML with the dbxml +.. library (https://github.com/return42/sphkerneldoc). The origin XML comes +.. from the linux kernel, refer to: +.. +.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook +.. ------------------------------------------------------------------------------ |