Synopsis
========
-.. cpp:function:: int ioctl( int fd, int request, struct v4l2_tuner *argp )
+.. c:function:: int ioctl( int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp )
+ :name: VIDIOC_G_TUNER
-.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_tuner *argp )
+.. c:function:: int ioctl( int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp )
+ :name: VIDIOC_S_TUNER
Arguments
``fd``
File descriptor returned by :ref:`open() <func-open>`.
-``request``
- VIDIOC_G_TUNER, VIDIOC_S_TUNER
-
``argp``
To query the attributes of a tuner applications initialize the ``index``
field and zero out the ``reserved`` array of a struct
-:ref:`v4l2_tuner <v4l2-tuner>` and call the ``VIDIOC_G_TUNER`` ioctl
+:c:type:`v4l2_tuner` and call the ``VIDIOC_G_TUNER`` ioctl
with a pointer to this structure. Drivers fill the rest of the structure
or return an ``EINVAL`` error code when the index is out of bounds. To
enumerate all tuners applications shall begin at index zero,
.. tabularcolumns:: |p{1.3cm}|p{3.0cm}|p{6.6cm}|p{6.6cm}|
-.. _v4l2-tuner:
+.. c:type:: v4l2_tuner
.. cssclass:: longtable
- ``type``
- - :cspan:`1` Type of the tuner, see :ref:`v4l2-tuner-type`.
+ - :cspan:`1` Type of the tuner, see :c:type:`v4l2_tuner_type`.
- .. row 4
If multiple frequency bands are supported, then ``capability`` is
the union of all ``capability`` fields of each struct
- :ref:`v4l2_frequency_band <v4l2-frequency-band>`.
+ :c:type:`v4l2_frequency_band`.
- .. row 5
received audio programs do not match.
Currently this is the only field of struct
- :ref:`struct v4l2_tuner <v4l2-tuner>` applications can change.
+ struct :c:type:`v4l2_tuner` applications can change.
- .. row 15
- :cspan:`1` Reserved for future extensions.
- Drivers and applications must set the array to zero.
+ Drivers and applications must set the array to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
-.. _v4l2-tuner-type:
+.. c:type:: v4l2_tuner_type
.. flat-table:: enum v4l2_tuner_type
:header-rows: 0
multi-standard because the video standard is automatically
determined from the frequency band.) The set of supported video
standards is available from the struct
- :ref:`v4l2_input <v4l2-input>` pointing to this tuner, see the
+ :c:type:`v4l2_input` pointing to this tuner, see the
description of ioctl :ref:`VIDIOC_ENUMINPUT`
for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
capability.
.. raw:: latex
- \newline\newline\begin{adjustbox}{width=\columnwidth}
+ \begin{adjustbox}{width=\columnwidth}
.. _tuner-matrix:
:ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL
- The struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` is out of
+ The struct :c:type:`v4l2_tuner` ``index`` is out of
bounds.
.. [#f1]