linux/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml
Hans Verkuil 079dda54fe [media] DocBook media: drop 'experimental' annotations
Drop the 'experimental' annotations. The only remaining part of the API
that is still marked 'experimental' are the debug ioctls/structs, and
that is intentional. Only the v4l2-dbg application should use those.

All others have been around for years, so it is time to drop the
'experimental' designation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-04-25 08:05:30 -03:00

116 lines
3.8 KiB
XML

<refentry id="vidioc-query-dv-timings">
<refmeta>
<refentrytitle>ioctl VIDIOC_QUERY_DV_TIMINGS</refentrytitle>
&manvol;
</refmeta>
<refnamediv>
<refname>VIDIOC_QUERY_DV_TIMINGS</refname>
<refname>VIDIOC_SUBDEV_QUERY_DV_TIMINGS</refname>
<refpurpose>Sense the DV preset received by the current
input</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>ioctl</function></funcdef>
<paramdef>int <parameter>fd</parameter></paramdef>
<paramdef>int <parameter>request</parameter></paramdef>
<paramdef>struct v4l2_dv_timings *<parameter>argp</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
<variablelist>
<varlistentry>
<term><parameter>fd</parameter></term>
<listitem>
<para>&fd;</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>request</parameter></term>
<listitem>
<para>VIDIOC_QUERY_DV_TIMINGS, VIDIOC_SUBDEV_QUERY_DV_TIMINGS</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>argp</parameter></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>The hardware may be able to detect the current DV timings
automatically, similar to sensing the video standard. To do so, applications
call <constant>VIDIOC_QUERY_DV_TIMINGS</constant> with a pointer to a
&v4l2-dv-timings;. Once the hardware detects the timings, it will fill in the
timings structure.</para>
<para>Please note that drivers shall <emphasis>not</emphasis> switch timings automatically
if new timings are detected. Instead, drivers should send the
<constant>V4L2_EVENT_SOURCE_CHANGE</constant> event (if they support this) and expect
that userspace will take action by calling <constant>VIDIOC_QUERY_DV_TIMINGS</constant>.
The reason is that new timings usually mean different buffer sizes as well, and you
cannot change buffer sizes on the fly. In general, applications that receive the
Source Change event will have to call <constant>VIDIOC_QUERY_DV_TIMINGS</constant>,
and if the detected timings are valid they will have to stop streaming, set the new
timings, allocate new buffers and start streaming again.</para>
<para>If the timings could not be detected because there was no signal, then
<errorcode>ENOLINK</errorcode> is returned. If a signal was detected, but
it was unstable and the receiver could not lock to the signal, then
<errorcode>ENOLCK</errorcode> is returned. If the receiver could lock to the signal,
but the format is unsupported (e.g. because the pixelclock is out of range
of the hardware capabilities), then the driver fills in whatever timings it
could find and returns <errorcode>ERANGE</errorcode>. In that case the application
can call &VIDIOC-DV-TIMINGS-CAP; to compare the found timings with the hardware's
capabilities in order to give more precise feedback to the user.
</para>
</refsect1>
<refsect1>
&return-value;
<variablelist>
<varlistentry>
<term><errorcode>ENODATA</errorcode></term>
<listitem>
<para>Digital video timings are not supported for this input or output.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>ENOLINK</errorcode></term>
<listitem>
<para>No timings could be detected because no signal was found.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>ENOLCK</errorcode></term>
<listitem>
<para>The signal was unstable and the hardware could not lock on to it.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>ERANGE</errorcode></term>
<listitem>
<para>Timings were found, but they are out of range of the hardware
capabilities.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>