1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_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-enumaudioout.html" title="ioctl VIDIOC_ENUMAUDOUT"><link rel="next" href="vidioc-enum-fmt.html" title="ioctl VIDIOC_ENUM_FMT"></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_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-enumaudioout.html">Prev</a> </td><th width="60%" align="center">Appendix A. Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="vidioc-enum-fmt.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="vidioc-enum-dv-timings"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS — Enumerate supported Digital Video timings</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_enum_dv_timings *<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1112744972"></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_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_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="idp1112780148"></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> 2 interface and may change in the future.</p></div><p>While some DV receivers or transmitters support a wide range of timings, others 3support only a limited number of timings. With this ioctl applications can enumerate a list 4of known supported timings. 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 check if it also supports other 5standards or even custom timings that are not in this list.</p><p>To query the available timings, applications initialize the 6<em class="structfield"><code>index</code></em> field and zero the reserved array of struct <a class="link" href="vidioc-enum-dv-timings.html#v4l2-enum-dv-timings" title="Table A.27. struct v4l2_enum_dv_timings">v4l2_enum_dv_timings</a> 7and call the <code class="constant">VIDIOC_ENUM_DV_TIMINGS</code> ioctl on a video node with a 8pointer to this structure. Drivers fill the rest of the structure or return an 9<span class="errorcode">EINVAL</span> error code when the index is out of bounds. To enumerate all supported DV timings, 10applications shall begin at index zero, incrementing by one until the 11driver returns <span class="errorcode">EINVAL</span>. Note that drivers may enumerate a 12different set of DV timings after switching the video input or 13output.</p><p>When implemented by the driver DV timings of subdevices can be queried 14by calling the <code class="constant">VIDIOC_SUBDEV_ENUM_DV_TIMINGS</code> ioctl directly 15on a subdevice node. The DV timings are specific to inputs (for DV receivers) or 16outputs (for DV transmitters), applications must specify the desired pad number 17in the struct <a class="link" href="vidioc-enum-dv-timings.html#v4l2-enum-dv-timings" title="Table A.27. struct v4l2_enum_dv_timings">v4l2_enum_dv_timings</a> <em class="structfield"><code>pad</code></em> field. Attempts to 18enumerate timings on a pad that doesn't support them will return an <span class="errorcode">EINVAL</span> error code.</p><div class="table"><a name="v4l2-enum-dv-timings"></a><p class="title"><b>Table A.27. struct <span class="structname">v4l2_enum_dv_timings</span></b></p><div class="table-contents"><table summary="struct v4l2_enum_dv_timings" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>index</code></em></td><td valign="top">Number of the DV timings, set by the 19application.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>pad</code></em></td><td valign="top">Pad number as reported by the media controller API. This field 20 is only used when operating on a subdevice node. When operating on a 21 video node applications must set this field to zero.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>reserved</code></em>[2]</td><td valign="top">Reserved for future extensions. Drivers and applications must 22 set the array to zero.</td></tr><tr><td valign="top">struct <a class="link" href="vidioc-g-dv-timings.html#v4l2-dv-timings" title="Table A.58. struct v4l2_dv_timings">v4l2_dv_timings</a></td><td valign="top"><em class="structfield"><code>timings</code></em></td><td valign="top">The timings.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idp1112795140"></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">EINVAL</span></span></dt><dd><p>The struct <a class="link" href="vidioc-enum-dv-timings.html#v4l2-enum-dv-timings" title="Table A.27. struct v4l2_enum_dv_timings">v4l2_enum_dv_timings</a> <em class="structfield"><code>index</code></em> 23is out of bounds or the <em class="structfield"><code>pad</code></em> number is invalid.</p></dd><dt><span class="term"><span class="errorcode">ENODATA</span></span></dt><dd><p>Digital video presets are not supported for this input or output.</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-enumaudioout.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-enum-fmt.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_ENUMAUDOUT </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> ioctl VIDIOC_ENUM_FMT</td></tr></table></div></body></html> 24