Based on kernel version 4.7.2. Page generated on 2016-08-22 22:45 EST.
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 11 input</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 <para>The hardware may be able to detect the current DV timings 54 automatically, similar to sensing the video standard. To do so, applications 55 call <constant>VIDIOC_QUERY_DV_TIMINGS</constant> with a pointer to a 56 &v4l2-dv-timings;. Once the hardware detects the timings, it will fill in the 57 timings structure.</para> 58 59 <para>Please note that drivers shall <emphasis>not</emphasis> switch timings automatically 60 if new timings are detected. Instead, drivers should send the 61 <constant>V4L2_EVENT_SOURCE_CHANGE</constant> event (if they support this) and expect 62 that userspace will take action by calling <constant>VIDIOC_QUERY_DV_TIMINGS</constant>. 63 The reason is that new timings usually mean different buffer sizes as well, and you 64 cannot change buffer sizes on the fly. In general, applications that receive the 65 Source Change event will have to call <constant>VIDIOC_QUERY_DV_TIMINGS</constant>, 66 and if the detected timings are valid they will have to stop streaming, set the new 67 timings, allocate new buffers and start streaming again.</para> 68 69 <para>If the timings could not be detected because there was no signal, then 70 <errorcode>ENOLINK</errorcode> is returned. If a signal was detected, but 71 it was unstable and the receiver could not lock to the signal, then 72 <errorcode>ENOLCK</errorcode> is returned. If the receiver could lock to the signal, 73 but the format is unsupported (e.g. because the pixelclock is out of range 74 of the hardware capabilities), then the driver fills in whatever timings it 75 could find and returns <errorcode>ERANGE</errorcode>. In that case the application 76 can call &VIDIOC-DV-TIMINGS-CAP; to compare the found timings with the hardware's 77 capabilities in order to give more precise feedback to the user. 78 </para> 79 </refsect1> 80 81 <refsect1> 82 &return-value; 83 84 <variablelist> 85 <varlistentry> 86 <term><errorcode>ENODATA</errorcode></term> 87 <listitem> 88 <para>Digital video timings are not supported for this input or output.</para> 89 </listitem> 90 </varlistentry> 91 <varlistentry> 92 <term><errorcode>ENOLINK</errorcode></term> 93 <listitem> 94 <para>No timings could be detected because no signal was found. 95 </para> 96 </listitem> 97 </varlistentry> 98 <varlistentry> 99 <term><errorcode>ENOLCK</errorcode></term> 100 <listitem> 101 <para>The signal was unstable and the hardware could not lock on to it. 102 </para> 103 </listitem> 104 </varlistentry> 105 <varlistentry> 106 <term><errorcode>ERANGE</errorcode></term> 107 <listitem> 108 <para>Timings were found, but they are out of range of the hardware 109 capabilities. 110 </para> 111 </listitem> 112 </varlistentry> 113 </variablelist> 114 </refsect1> 115 </refentry>