vidioc-subdev-g-frame-interval.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <refentry id="vidioc-subdev-g-frame-interval">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_SUBDEV_G_FRAME_INTERVAL</refname>
  8. <refname>VIDIOC_SUBDEV_S_FRAME_INTERVAL</refname>
  9. <refpurpose>Get or set the frame interval on a subdev pad</refpurpose>
  10. </refnamediv>
  11. <refsynopsisdiv>
  12. <funcsynopsis>
  13. <funcprototype>
  14. <funcdef>int <function>ioctl</function></funcdef>
  15. <paramdef>int <parameter>fd</parameter></paramdef>
  16. <paramdef>int <parameter>request</parameter></paramdef>
  17. <paramdef>struct v4l2_subdev_frame_interval *<parameter>argp</parameter>
  18. </paramdef>
  19. </funcprototype>
  20. </funcsynopsis>
  21. </refsynopsisdiv>
  22. <refsect1>
  23. <title>Arguments</title>
  24. <variablelist>
  25. <varlistentry>
  26. <term><parameter>fd</parameter></term>
  27. <listitem>
  28. <para>&fd;</para>
  29. </listitem>
  30. </varlistentry>
  31. <varlistentry>
  32. <term><parameter>request</parameter></term>
  33. <listitem>
  34. <para>VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL</para>
  35. </listitem>
  36. </varlistentry>
  37. <varlistentry>
  38. <term><parameter>argp</parameter></term>
  39. <listitem>
  40. <para></para>
  41. </listitem>
  42. </varlistentry>
  43. </variablelist>
  44. </refsect1>
  45. <refsect1>
  46. <title>Description</title>
  47. <note>
  48. <title>Experimental</title>
  49. <para>This is an <link linkend="experimental">experimental</link>
  50. interface and may change in the future.</para>
  51. </note>
  52. <para>These ioctls are used to get and set the frame interval at specific
  53. subdev pads in the image pipeline. The frame interval only makes sense for
  54. sub-devices that can control the frame period on their own. This includes,
  55. for instance, image sensors and TV tuners. Sub-devices that don't support
  56. frame intervals must not implement these ioctls.</para>
  57. <para>To retrieve the current frame interval applications set the
  58. <structfield>pad</structfield> field of a &v4l2-subdev-frame-interval; to
  59. the desired pad number as reported by the media controller API. When they
  60. call the <constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant> ioctl with a
  61. pointer to this structure the driver fills the members of the
  62. <structfield>interval</structfield> field.</para>
  63. <para>To change the current frame interval applications set both the
  64. <structfield>pad</structfield> field and all members of the
  65. <structfield>interval</structfield> field. When they call the
  66. <constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant> ioctl with a pointer to
  67. this structure the driver verifies the requested interval, adjusts it based
  68. on the hardware capabilities and configures the device. Upon return the
  69. &v4l2-subdev-frame-interval; contains the current frame interval as would be
  70. returned by a <constant>VIDIOC_SUBDEV_G_FRAME_INTERVAL</constant> call.
  71. </para>
  72. <para>Drivers must not return an error solely because the requested interval
  73. doesn't match the device capabilities. They must instead modify the interval
  74. to match what the hardware can provide. The modified interval should be as
  75. close as possible to the original request.</para>
  76. <para>Sub-devices that support the frame interval ioctls should implement
  77. them on a single pad only. Their behaviour when supported on multiple pads
  78. of the same sub-device is not defined.</para>
  79. <table pgwide="1" frame="none" id="v4l2-subdev-frame-interval">
  80. <title>struct <structname>v4l2_subdev_frame_interval</structname></title>
  81. <tgroup cols="3">
  82. &cs-str;
  83. <tbody valign="top">
  84. <row>
  85. <entry>__u32</entry>
  86. <entry><structfield>pad</structfield></entry>
  87. <entry>Pad number as reported by the media controller API.</entry>
  88. </row>
  89. <row>
  90. <entry>&v4l2-fract;</entry>
  91. <entry><structfield>interval</structfield></entry>
  92. <entry>Period, in seconds, between consecutive video frames.</entry>
  93. </row>
  94. <row>
  95. <entry>__u32</entry>
  96. <entry><structfield>reserved</structfield>[9]</entry>
  97. <entry>Reserved for future extensions. Applications and drivers must
  98. set the array to zero.</entry>
  99. </row>
  100. </tbody>
  101. </tgroup>
  102. </table>
  103. </refsect1>
  104. <refsect1>
  105. &return-value;
  106. <variablelist>
  107. <varlistentry>
  108. <term><errorcode>EBUSY</errorcode></term>
  109. <listitem>
  110. <para>The frame interval can't be changed because the pad is currently
  111. busy. This can be caused, for instance, by an active video stream on
  112. the pad. The ioctl must not be retried without performing another
  113. action to fix the problem first. Only returned by
  114. <constant>VIDIOC_SUBDEV_S_FRAME_INTERVAL</constant></para>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry>
  118. <term><errorcode>EINVAL</errorcode></term>
  119. <listitem>
  120. <para>The &v4l2-subdev-frame-interval; <structfield>pad</structfield>
  121. references a non-existing pad, or the pad doesn't support frame
  122. intervals.</para>
  123. </listitem>
  124. </varlistentry>
  125. </variablelist>
  126. </refsect1>
  127. </refentry>