1<refentry id="vidioc-query-dv-timings">
2  <refmeta>
3    <refentrytitle>ioctl VIDIOC_QUERY_DV_TIMINGS</refentrytitle>
4    &manvol;
5  </refmeta>
6
7  <refnamediv>
8    <refname>VIDIOC_QUERY_DV_TIMINGS</refname>
9    <refname>VIDIOC_SUBDEV_QUERY_DV_TIMINGS</refname>
10    <refpurpose>Sense the DV preset received by the current
11input</refpurpose>
12  </refnamediv>
13
14  <refsynopsisdiv>
15    <funcsynopsis>
16      <funcprototype>
17	<funcdef>int <function>ioctl</function></funcdef>
18	<paramdef>int <parameter>fd</parameter></paramdef>
19	<paramdef>int <parameter>request</parameter></paramdef>
20	<paramdef>struct v4l2_dv_timings *<parameter>argp</parameter></paramdef>
21      </funcprototype>
22    </funcsynopsis>
23  </refsynopsisdiv>
24
25  <refsect1>
26    <title>Arguments</title>
27
28    <variablelist>
29	<varlistentry>
30	<term><parameter>fd</parameter></term>
31	<listitem>
32	  <para>&fd;</para>
33	</listitem>
34      </varlistentry>
35      <varlistentry>
36	<term><parameter>request</parameter></term>
37	<listitem>
38	  <para>VIDIOC_QUERY_DV_TIMINGS, VIDIOC_SUBDEV_QUERY_DV_TIMINGS</para>
39	</listitem>
40      </varlistentry>
41      <varlistentry>
42	<term><parameter>argp</parameter></term>
43	<listitem>
44	  <para></para>
45	</listitem>
46      </varlistentry>
47    </variablelist>
48  </refsect1>
49
50  <refsect1>
51    <title>Description</title>
52
53    <note>
54      <title>Experimental</title>
55      <para>This is an <link linkend="experimental"> experimental </link>
56      interface and may change in the future.</para>
57    </note>
58
59    <para>The hardware may be able to detect the current DV timings
60automatically, similar to sensing the video standard. To do so, applications
61call <constant>VIDIOC_QUERY_DV_TIMINGS</constant> with a pointer to a
62&v4l2-dv-timings;. Once the hardware detects the timings, it will fill in the
63timings structure.
64
65If the timings could not be detected because there was no signal, then
66<errorcode>ENOLINK</errorcode> is returned. If a signal was detected, but
67it was unstable and the receiver could not lock to the signal, then
68<errorcode>ENOLCK</errorcode> is returned. If the receiver could lock to the signal,
69but the format is unsupported (e.g. because the pixelclock is out of range
70of the hardware capabilities), then the driver fills in whatever timings it
71could find and returns <errorcode>ERANGE</errorcode>. In that case the application
72can call &VIDIOC-DV-TIMINGS-CAP; to compare the found timings with the hardware's
73capabilities in order to give more precise feedback to the user.
74</para>
75  </refsect1>
76
77  <refsect1>
78    &return-value;
79
80    <variablelist>
81      <varlistentry>
82	<term><errorcode>ENODATA</errorcode></term>
83	<listitem>
84	  <para>Digital video timings are not supported for this input or output.</para>
85	</listitem>
86      </varlistentry>
87      <varlistentry>
88	<term><errorcode>ENOLINK</errorcode></term>
89	<listitem>
90	  <para>No timings could be detected because no signal was found.
91</para>
92	</listitem>
93      </varlistentry>
94      <varlistentry>
95	<term><errorcode>ENOLCK</errorcode></term>
96	<listitem>
97	  <para>The signal was unstable and the hardware could not lock on to it.
98</para>
99	</listitem>
100      </varlistentry>
101      <varlistentry>
102	<term><errorcode>ERANGE</errorcode></term>
103	<listitem>
104	  <para>Timings were found, but they are out of range of the hardware
105capabilities.
106</para>
107	</listitem>
108      </varlistentry>
109    </variablelist>
110  </refsect1>
111</refentry>
112