1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ioctl VIDIOC_QUERY_DV_TIMINGS</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="user-func.html" title="Appendix A. Function Reference"><link rel="prev" href="vidioc-queryctrl.html" title="ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU"><link rel="next" href="vidioc-querystd.html" title="ioctl VIDIOC_QUERYSTD"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_QUERY_DV_TIMINGS</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-queryctrl.html">Prev</a> </td><th width="60%" align="center">Appendix A. Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="vidioc-querystd.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="vidioc-query-dv-timings"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_QUERY_DV_TIMINGS — Sense the DV preset received by the current 2input</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ioctl</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">request</var>, </td></tr><tr><td> </td><td>struct v4l2_dv_timings *<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1116189452"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>fd</code></em></span></dt><dd><p>File descriptor returned by <a class="link" href="func-open.html" title="V4L2 open()"><code class="function">open()</code></a>.</p></dd><dt><span class="term"><em class="parameter"><code>request</code></em></span></dt><dd><p>VIDIOC_QUERY_DV_TIMINGS</p></dd><dt><span class="term"><em class="parameter"><code>argp</code></em></span></dt><dd><p></p></dd></dl></div></div><div class="refsect1"><a name="idp1116193548"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Experimental</h3><p>This is an <a class="link" href="hist-v4l2.html#experimental" title="Experimental API Elements"> experimental </a> 3 interface and may change in the future.</p></div><p>The hardware may be able to detect the current DV timings 4automatically, similar to sensing the video standard. To do so, applications 5call <code class="constant">VIDIOC_QUERY_DV_TIMINGS</code> with a pointer to a 6struct <a class="link" href="vidioc-g-dv-timings.html#v4l2-dv-timings" title="Table A.58. struct v4l2_dv_timings">v4l2_dv_timings</a>. Once the hardware detects the timings, it will fill in the 7timings structure. 8 9If the timings could not be detected because there was no signal, then 10<span class="errorcode">ENOLINK</span> is returned. If a signal was detected, but 11it was unstable and the receiver could not lock to the signal, then 12<span class="errorcode">ENOLCK</span> is returned. If the receiver could lock to the signal, 13but the format is unsupported (e.g. because the pixelclock is out of range 14of the hardware capabilities), then the driver fills in whatever timings it 15could find and returns <span class="errorcode">ERANGE</span>. In that case the application 16can call <a class="link" href="vidioc-dv-timings-cap.html" title="ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP"><code class="constant">VIDIOC_DV_TIMINGS_CAP</code></a> to compare the found timings with the hardware's 17capabilities in order to give more precise feedback to the user. 18</p></div><div class="refsect1"><a name="idp1116198172"></a><h2>Return Value</h2><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 19.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">ENODATA</span></span></dt><dd><p>Digital video timings are not supported for this input or output.</p></dd><dt><span class="term"><span class="errorcode">ENOLINK</span></span></dt><dd><p>No timings could be detected because no signal was found. 19</p></dd><dt><span class="term"><span class="errorcode">ENOLCK</span></span></dt><dd><p>The signal was unstable and the hardware could not lock on to it. 20</p></dd><dt><span class="term"><span class="errorcode">ERANGE</span></span></dt><dd><p>Timings were found, but they are out of range of the hardware 21capabilities. 22</p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vidioc-queryctrl.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="user-func.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="vidioc-querystd.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> ioctl VIDIOC_QUERYSTD</td></tr></table></div></body></html> 23