1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
254f38fcaSMauro Carvalho Chehab
354f38fcaSMauro Carvalho Chehab.. _rf-tuner-controls:
454f38fcaSMauro Carvalho Chehab
554f38fcaSMauro Carvalho Chehab**************************
654f38fcaSMauro Carvalho ChehabRF Tuner Control Reference
754f38fcaSMauro Carvalho Chehab**************************
854f38fcaSMauro Carvalho Chehab
954f38fcaSMauro Carvalho ChehabThe RF Tuner (RF_TUNER) class includes controls for common features of
1054f38fcaSMauro Carvalho Chehabdevices having RF tuner.
1154f38fcaSMauro Carvalho Chehab
1254f38fcaSMauro Carvalho ChehabIn this context, RF tuner is radio receiver circuit between antenna and
1354f38fcaSMauro Carvalho Chehabdemodulator. It receives radio frequency (RF) from the antenna and
1454f38fcaSMauro Carvalho Chehabconverts that received signal to lower intermediate frequency (IF) or
1554f38fcaSMauro Carvalho Chehabbaseband frequency (BB). Tuners that could do baseband output are often
1654f38fcaSMauro Carvalho Chehabcalled Zero-IF tuners. Older tuners were typically simple PLL tuners
1754f38fcaSMauro Carvalho Chehabinside a metal box, while newer ones are highly integrated chips
1854f38fcaSMauro Carvalho Chehabwithout a metal box "silicon tuners". These controls are mostly
1954f38fcaSMauro Carvalho Chehabapplicable for new feature rich silicon tuners, just because older
2054f38fcaSMauro Carvalho Chehabtuners does not have much adjustable features.
2154f38fcaSMauro Carvalho Chehab
2254f38fcaSMauro Carvalho ChehabFor more information about RF tuners see
2354f38fcaSMauro Carvalho Chehab`Tuner (radio) <http://en.wikipedia.org/wiki/Tuner_%28radio%29>`__
2454f38fcaSMauro Carvalho Chehaband `RF front end <http://en.wikipedia.org/wiki/RF_front_end>`__
2554f38fcaSMauro Carvalho Chehabfrom Wikipedia.
2654f38fcaSMauro Carvalho Chehab
2754f38fcaSMauro Carvalho Chehab
2854f38fcaSMauro Carvalho Chehab.. _rf-tuner-control-id:
2954f38fcaSMauro Carvalho Chehab
3054f38fcaSMauro Carvalho ChehabRF_TUNER Control IDs
3154f38fcaSMauro Carvalho Chehab====================
3254f38fcaSMauro Carvalho Chehab
3354f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_CLASS (class)``
3454f38fcaSMauro Carvalho Chehab    The RF_TUNER class descriptor. Calling
3554f38fcaSMauro Carvalho Chehab    :ref:`VIDIOC_QUERYCTRL` for this control will
3654f38fcaSMauro Carvalho Chehab    return a description of this control class.
3754f38fcaSMauro Carvalho Chehab
3854f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (boolean)``
3954f38fcaSMauro Carvalho Chehab    Enables/disables tuner radio channel bandwidth configuration. In
4054f38fcaSMauro Carvalho Chehab    automatic mode bandwidth configuration is performed by the driver.
4154f38fcaSMauro Carvalho Chehab
4254f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_BANDWIDTH (integer)``
4354f38fcaSMauro Carvalho Chehab    Filter(s) on tuner signal path are used to filter signal according
4454f38fcaSMauro Carvalho Chehab    to receiving party needs. Driver configures filters to fulfill
4554f38fcaSMauro Carvalho Chehab    desired bandwidth requirement. Used when
4654f38fcaSMauro Carvalho Chehab    V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not set. Unit is in Hz. The
4754f38fcaSMauro Carvalho Chehab    range and step are driver-specific.
4854f38fcaSMauro Carvalho Chehab
4954f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (boolean)``
5054f38fcaSMauro Carvalho Chehab    Enables/disables LNA automatic gain control (AGC)
5154f38fcaSMauro Carvalho Chehab
5254f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (boolean)``
5354f38fcaSMauro Carvalho Chehab    Enables/disables mixer automatic gain control (AGC)
5454f38fcaSMauro Carvalho Chehab
5554f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_IF_GAIN_AUTO (boolean)``
5654f38fcaSMauro Carvalho Chehab    Enables/disables IF automatic gain control (AGC)
5754f38fcaSMauro Carvalho Chehab
5854f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_RF_GAIN (integer)``
5954f38fcaSMauro Carvalho Chehab    The RF amplifier is the very first amplifier on the receiver signal
6054f38fcaSMauro Carvalho Chehab    path, just right after the antenna input. The difference between the
6154f38fcaSMauro Carvalho Chehab    LNA gain and the RF gain in this document is that the LNA gain is
6254f38fcaSMauro Carvalho Chehab    integrated in the tuner chip while the RF gain is a separate chip.
6354f38fcaSMauro Carvalho Chehab    There may be both RF and LNA gain controls in the same device. The
6454f38fcaSMauro Carvalho Chehab    range and step are driver-specific.
6554f38fcaSMauro Carvalho Chehab
6654f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_LNA_GAIN (integer)``
6754f38fcaSMauro Carvalho Chehab    LNA (low noise amplifier) gain is first gain stage on the RF tuner
6854f38fcaSMauro Carvalho Chehab    signal path. It is located very close to tuner antenna input. Used
6954f38fcaSMauro Carvalho Chehab    when ``V4L2_CID_RF_TUNER_LNA_GAIN_AUTO`` is not set. See
7054f38fcaSMauro Carvalho Chehab    ``V4L2_CID_RF_TUNER_RF_GAIN`` to understand how RF gain and LNA gain
7154f38fcaSMauro Carvalho Chehab    differs from the each others. The range and step are
7254f38fcaSMauro Carvalho Chehab    driver-specific.
7354f38fcaSMauro Carvalho Chehab
7454f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_MIXER_GAIN (integer)``
7554f38fcaSMauro Carvalho Chehab    Mixer gain is second gain stage on the RF tuner signal path. It is
7654f38fcaSMauro Carvalho Chehab    located inside mixer block, where RF signal is down-converted by the
7754f38fcaSMauro Carvalho Chehab    mixer. Used when ``V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO`` is not set.
7854f38fcaSMauro Carvalho Chehab    The range and step are driver-specific.
7954f38fcaSMauro Carvalho Chehab
8054f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_IF_GAIN (integer)``
8154f38fcaSMauro Carvalho Chehab    IF gain is last gain stage on the RF tuner signal path. It is
8254f38fcaSMauro Carvalho Chehab    located on output of RF tuner. It controls signal level of
8354f38fcaSMauro Carvalho Chehab    intermediate frequency output or baseband output. Used when
8454f38fcaSMauro Carvalho Chehab    ``V4L2_CID_RF_TUNER_IF_GAIN_AUTO`` is not set. The range and step
8554f38fcaSMauro Carvalho Chehab    are driver-specific.
8654f38fcaSMauro Carvalho Chehab
8754f38fcaSMauro Carvalho Chehab``V4L2_CID_RF_TUNER_PLL_LOCK (boolean)``
8854f38fcaSMauro Carvalho Chehab    Is synthesizer PLL locked? RF tuner is receiving given frequency
8954f38fcaSMauro Carvalho Chehab    when that control is set. This is a read-only control.
90