doc-rst: linux_tv: Replace reference names to match ioctls
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / tuner.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _tuner:
4
5*********************
6Tuners and Modulators
7*********************
8
9
10Tuners
11======
12
13Video input devices can have one or more tuners demodulating a RF
14signal. Each tuner is associated with one or more video inputs,
15depending on the number of RF connectors on the tuner. The ``type``
16field of the respective struct :ref:`v4l2_input <v4l2-input>`
af4a4d0d 17returned by the :ref:`VIDIOC_ENUMINPUT <VIDIOC_ENUMINPUT>` ioctl is
5377d91f
MH
18set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the
19index number of the tuner.
20
21Radio input devices have exactly one tuner with index zero, no video
22inputs.
23
24To query and change tuner properties applications use the
af4a4d0d
MCC
25:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
26:ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The
5377d91f
MH
27struct :ref:`v4l2_tuner <v4l2-tuner>` returned by ``VIDIOC_G_TUNER``
28also contains signal status information applicable when the tuner of the
29current video or radio input is queried. Note that ``VIDIOC_S_TUNER``
30does not switch the current tuner, when there is more than one at all.
31The tuner is solely determined by the current video input. Drivers must
32support both ioctls and set the ``V4L2_CAP_TUNER`` flag in the struct
33:ref:`v4l2_capability <v4l2-capability>` returned by the
af4a4d0d 34:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl when the device has
5377d91f
MH
35one or more tuners.
36
37
38Modulators
39==========
40
41Video output devices can have one or more modulators, uh, modulating a
42video signal for radiation or connection to the antenna input of a TV
43set or video recorder. Each modulator is associated with one or more
44video outputs, depending on the number of RF connectors on the
45modulator. The ``type`` field of the respective struct
46:ref:`v4l2_output <v4l2-output>` returned by the
af4a4d0d 47:ref:`VIDIOC_ENUMOUTPUT <VIDIOC_ENUMOUTPUT>` ioctl is set to
5377d91f
MH
48``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the
49index number of the modulator.
50
51Radio output devices have exactly one modulator with index zero, no
52video outputs.
53
54A video or radio device cannot support both a tuner and a modulator. Two
55separate device nodes will have to be used for such hardware, one that
56supports the tuner functionality and one that supports the modulator
57functionality. The reason is a limitation with the
af4a4d0d 58:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl where you
5377d91f
MH
59cannot specify whether the frequency is for a tuner or a modulator.
60
61To query and change modulator properties applications use the
af4a4d0d
MCC
62:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` and
63:ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl. Note that
5377d91f
MH
64``VIDIOC_S_MODULATOR`` does not switch the current modulator, when there
65is more than one at all. The modulator is solely determined by the
66current video output. Drivers must support both ioctls and set the
67``V4L2_CAP_MODULATOR`` flag in the struct
68:ref:`v4l2_capability <v4l2-capability>` returned by the
af4a4d0d 69:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl when the device has
5377d91f
MH
70one or more modulators.
71
72
73Radio Frequency
74===============
75
76To get and set the tuner or modulator radio frequency applications use
af4a4d0d
MCC
77the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
78:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take
5377d91f
MH
79a pointer to a struct :ref:`v4l2_frequency <v4l2-frequency>`. These
80ioctls are used for TV and radio devices alike. Drivers must support
81both ioctls when the tuner or modulator ioctls are supported, or when
82the device is a radio device.
83
84
85.. ------------------------------------------------------------------------------
86.. This file was automatically converted from DocBook-XML with the dbxml
87.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
88.. from the linux kernel, refer to:
89..
90.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
91.. ------------------------------------------------------------------------------
This page took 0.030907 seconds and 5 git commands to generate.