diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-04 10:58:25 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-04 10:58:25 -0400 |
| commit | 1046a2c428bedd64c960dcfd0c57cc69a82fea2f (patch) | |
| tree | d34b83e0ac61b51305cece031f7ff49579e3fe76 /Documentation | |
| parent | 46e85f5f1c2a1d106c1ec0fa2a06280276b8e052 (diff) | |
| parent | b3f4e1eba45eda5d1213810ef3bc53e5247df2df (diff) | |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (144 commits)
[media] saa7134.h: Suppress compiler warnings when CONFIG_VIDEO_SAA7134_RC is not set
[media] it913x [VER 1.07] Support for single ITE 9135 devices
[media] Support for Terratec G1
[media] cx25821: off by one in cx25821_vidioc_s_input()
[media] media: tea5764: reconcile Kconfig symbol and macro
[media] omap_vout: Add poll() support
[media] omap3isp: preview: Add crop support on the sink pad
[media] omap3isp: preview: Rename min/max input/output sizes defines
[media] omap3isp: preview: Remove horizontal averager support
[media] omap3isp: Report the ISP revision through the media controller API
[media] omap3isp: ccdc: remove redundant operation
[media] omap3isp: Fix memory leaks in initialization error paths
[media] omap3isp: Add missing mutex_destroy() calls
[media] omap3isp: Move *_init_entities() functions to the init/cleanup section
[media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()
[media] MFC: Change MFC firmware binary name
[media] vb2: add vb2_get_unmapped_area in vb2 core
[media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor
[media] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control
[media] media: ov6650: stylistic improvements
...
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/DocBook/media/v4l/compat.xml | 3 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/controls.xml | 5 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/io.xml | 27 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/v4l2.xml | 2 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-create-bufs.xml | 139 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml | 88 |
6 files changed, 262 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 91410b6e7e08..b68698f96e7f 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
| @@ -2486,6 +2486,9 @@ ioctls.</para> | |||
| 2486 | <listitem> | 2486 | <listitem> |
| 2487 | <para>Flash API. <xref linkend="flash-controls" /></para> | 2487 | <para>Flash API. <xref linkend="flash-controls" /></para> |
| 2488 | </listitem> | 2488 | </listitem> |
| 2489 | <listitem> | ||
| 2490 | <para>&VIDIOC-CREATE-BUFS; and &VIDIOC-PREPARE-BUF; ioctls.</para> | ||
| 2491 | </listitem> | ||
| 2489 | </itemizedlist> | 2492 | </itemizedlist> |
| 2490 | </section> | 2493 | </section> |
| 2491 | 2494 | ||
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 23fdf79f8cf3..3bc5ee8b2c74 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
| @@ -232,8 +232,9 @@ control is deprecated. New drivers and applications should use the | |||
| 232 | <entry>Enables a power line frequency filter to avoid | 232 | <entry>Enables a power line frequency filter to avoid |
| 233 | flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are: | 233 | flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are: |
| 234 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0), | 234 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0), |
| 235 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1) and | 235 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1), |
| 236 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2).</entry> | 236 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2) and |
| 237 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_AUTO</constant> (3).</entry> | ||
| 237 | </row> | 238 | </row> |
| 238 | <row> | 239 | <row> |
| 239 | <entry><constant>V4L2_CID_HUE_AUTO</constant></entry> | 240 | <entry><constant>V4L2_CID_HUE_AUTO</constant></entry> |
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index c57d1ec6291c..3f47df1aa54a 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
| @@ -927,6 +927,33 @@ ioctl is called.</entry> | |||
| 927 | Applications set or clear this flag before calling the | 927 | Applications set or clear this flag before calling the |
| 928 | <constant>VIDIOC_QBUF</constant> ioctl.</entry> | 928 | <constant>VIDIOC_QBUF</constant> ioctl.</entry> |
| 929 | </row> | 929 | </row> |
| 930 | <row> | ||
| 931 | <entry><constant>V4L2_BUF_FLAG_PREPARED</constant></entry> | ||
| 932 | <entry>0x0400</entry> | ||
| 933 | <entry>The buffer has been prepared for I/O and can be queued by the | ||
| 934 | application. Drivers set or clear this flag when the | ||
| 935 | <link linkend="vidioc-querybuf">VIDIOC_QUERYBUF</link>, <link | ||
| 936 | linkend="vidioc-qbuf">VIDIOC_PREPARE_BUF</link>, <link | ||
| 937 | linkend="vidioc-qbuf">VIDIOC_QBUF</link> or <link | ||
| 938 | linkend="vidioc-qbuf">VIDIOC_DQBUF</link> ioctl is called.</entry> | ||
| 939 | </row> | ||
| 940 | <row> | ||
| 941 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> | ||
| 942 | <entry>0x0400</entry> | ||
| 943 | <entry>Caches do not have to be invalidated for this buffer. | ||
| 944 | Typically applications shall use this flag if the data captured in the buffer | ||
| 945 | is not going to be touched by the CPU, instead the buffer will, probably, be | ||
| 946 | passed on to a DMA-capable hardware unit for further processing or output. | ||
| 947 | </entry> | ||
| 948 | </row> | ||
| 949 | <row> | ||
| 950 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> | ||
| 951 | <entry>0x0800</entry> | ||
| 952 | <entry>Caches do not have to be cleaned for this buffer. | ||
| 953 | Typically applications shall use this flag for output buffers if the data | ||
| 954 | in this buffer has not been created by the CPU but by some DMA-capable unit, | ||
| 955 | in which case caches have not been used.</entry> | ||
| 956 | </row> | ||
| 930 | </tbody> | 957 | </tbody> |
| 931 | </tgroup> | 958 | </tgroup> |
| 932 | </table> | 959 | </table> |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 40132c277647..2ab365c10fb9 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
| @@ -469,6 +469,7 @@ and discussions on the V4L mailing list.</revremark> | |||
| 469 | &sub-close; | 469 | &sub-close; |
| 470 | &sub-ioctl; | 470 | &sub-ioctl; |
| 471 | <!-- All ioctls go here. --> | 471 | <!-- All ioctls go here. --> |
| 472 | &sub-create-bufs; | ||
| 472 | &sub-cropcap; | 473 | &sub-cropcap; |
| 473 | &sub-dbg-g-chip-ident; | 474 | &sub-dbg-g-chip-ident; |
| 474 | &sub-dbg-g-register; | 475 | &sub-dbg-g-register; |
| @@ -511,6 +512,7 @@ and discussions on the V4L mailing list.</revremark> | |||
| 511 | &sub-queryctrl; | 512 | &sub-queryctrl; |
| 512 | &sub-query-dv-preset; | 513 | &sub-query-dv-preset; |
| 513 | &sub-querystd; | 514 | &sub-querystd; |
| 515 | &sub-prepare-buf; | ||
| 514 | &sub-reqbufs; | 516 | &sub-reqbufs; |
| 515 | &sub-s-hw-freq-seek; | 517 | &sub-s-hw-freq-seek; |
| 516 | &sub-streamon; | 518 | &sub-streamon; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml new file mode 100644 index 000000000000..73ae8a6cd004 --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml | |||
| @@ -0,0 +1,139 @@ | |||
| 1 | <refentry id="vidioc-create-bufs"> | ||
| 2 | <refmeta> | ||
| 3 | <refentrytitle>ioctl VIDIOC_CREATE_BUFS</refentrytitle> | ||
| 4 | &manvol; | ||
| 5 | </refmeta> | ||
| 6 | |||
| 7 | <refnamediv> | ||
| 8 | <refname>VIDIOC_CREATE_BUFS</refname> | ||
| 9 | <refpurpose>Create buffers for Memory Mapped or User Pointer I/O</refpurpose> | ||
| 10 | </refnamediv> | ||
| 11 | |||
| 12 | <refsynopsisdiv> | ||
| 13 | <funcsynopsis> | ||
| 14 | <funcprototype> | ||
| 15 | <funcdef>int <function>ioctl</function></funcdef> | ||
| 16 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
| 17 | <paramdef>int <parameter>request</parameter></paramdef> | ||
| 18 | <paramdef>struct v4l2_create_buffers *<parameter>argp</parameter></paramdef> | ||
| 19 | </funcprototype> | ||
| 20 | </funcsynopsis> | ||
| 21 | </refsynopsisdiv> | ||
| 22 | |||
| 23 | <refsect1> | ||
| 24 | <title>Arguments</title> | ||
| 25 | |||
| 26 | <variablelist> | ||
| 27 | <varlistentry> | ||
| 28 | <term><parameter>fd</parameter></term> | ||
| 29 | <listitem> | ||
| 30 | <para>&fd;</para> | ||
| 31 | </listitem> | ||
| 32 | </varlistentry> | ||
| 33 | <varlistentry> | ||
| 34 | <term><parameter>request</parameter></term> | ||
| 35 | <listitem> | ||
| 36 | <para>VIDIOC_CREATE_BUFS</para> | ||
| 37 | </listitem> | ||
| 38 | </varlistentry> | ||
| 39 | <varlistentry> | ||
| 40 | <term><parameter>argp</parameter></term> | ||
| 41 | <listitem> | ||
| 42 | <para></para> | ||
| 43 | </listitem> | ||
| 44 | </varlistentry> | ||
| 45 | </variablelist> | ||
| 46 | </refsect1> | ||
| 47 | |||
| 48 | <refsect1> | ||
| 49 | <title>Description</title> | ||
| 50 | |||
| 51 | <para>This ioctl is used to create buffers for <link linkend="mmap">memory | ||
| 52 | mapped</link> or <link linkend="userp">user pointer</link> | ||
| 53 | I/O. It can be used as an alternative or in addition to the | ||
| 54 | <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter control over buffers | ||
| 55 | is required. This ioctl can be called multiple times to create buffers of | ||
| 56 | different sizes.</para> | ||
| 57 | |||
| 58 | <para>To allocate device buffers applications initialize relevant fields of | ||
| 59 | the <structname>v4l2_create_buffers</structname> structure. They set the | ||
| 60 | <structfield>type</structfield> field in the | ||
| 61 | <structname>v4l2_format</structname> structure, embedded in this | ||
| 62 | structure, to the respective stream or buffer type. | ||
| 63 | <structfield>count</structfield> must be set to the number of required buffers. | ||
| 64 | <structfield>memory</structfield> specifies the required I/O method. The | ||
| 65 | <structfield>format</structfield> field shall typically be filled in using | ||
| 66 | either the <constant>VIDIOC_TRY_FMT</constant> or | ||
| 67 | <constant>VIDIOC_G_FMT</constant> ioctl(). Additionally, applications can adjust | ||
| 68 | <structfield>sizeimage</structfield> fields to fit their specific needs. The | ||
| 69 | <structfield>reserved</structfield> array must be zeroed.</para> | ||
| 70 | |||
| 71 | <para>When the ioctl is called with a pointer to this structure the driver | ||
| 72 | will attempt to allocate up to the requested number of buffers and store the | ||
| 73 | actual number allocated and the starting index in the | ||
| 74 | <structfield>count</structfield> and the <structfield>index</structfield> fields | ||
| 75 | respectively. On return <structfield>count</structfield> can be smaller than | ||
| 76 | the number requested. The driver may also increase buffer sizes if required, | ||
| 77 | however, it will not update <structfield>sizeimage</structfield> field values. | ||
| 78 | The user has to use <constant>VIDIOC_QUERYBUF</constant> to retrieve that | ||
| 79 | information.</para> | ||
| 80 | |||
| 81 | <table pgwide="1" frame="none" id="v4l2-create-buffers"> | ||
| 82 | <title>struct <structname>v4l2_create_buffers</structname></title> | ||
| 83 | <tgroup cols="3"> | ||
| 84 | &cs-str; | ||
| 85 | <tbody valign="top"> | ||
| 86 | <row> | ||
| 87 | <entry>__u32</entry> | ||
| 88 | <entry><structfield>index</structfield></entry> | ||
| 89 | <entry>The starting buffer index, returned by the driver.</entry> | ||
| 90 | </row> | ||
| 91 | <row> | ||
| 92 | <entry>__u32</entry> | ||
| 93 | <entry><structfield>count</structfield></entry> | ||
| 94 | <entry>The number of buffers requested or granted.</entry> | ||
| 95 | </row> | ||
| 96 | <row> | ||
| 97 | <entry>&v4l2-memory;</entry> | ||
| 98 | <entry><structfield>memory</structfield></entry> | ||
| 99 | <entry>Applications set this field to | ||
| 100 | <constant>V4L2_MEMORY_MMAP</constant> or | ||
| 101 | <constant>V4L2_MEMORY_USERPTR</constant>.</entry> | ||
| 102 | </row> | ||
| 103 | <row> | ||
| 104 | <entry>&v4l2-format;</entry> | ||
| 105 | <entry><structfield>format</structfield></entry> | ||
| 106 | <entry>Filled in by the application, preserved by the driver.</entry> | ||
| 107 | </row> | ||
| 108 | <row> | ||
| 109 | <entry>__u32</entry> | ||
| 110 | <entry><structfield>reserved</structfield>[8]</entry> | ||
| 111 | <entry>A place holder for future extensions.</entry> | ||
| 112 | </row> | ||
| 113 | </tbody> | ||
| 114 | </tgroup> | ||
| 115 | </table> | ||
| 116 | </refsect1> | ||
| 117 | |||
| 118 | <refsect1> | ||
| 119 | &return-value; | ||
| 120 | |||
| 121 | <variablelist> | ||
| 122 | <varlistentry> | ||
| 123 | <term><errorcode>ENOMEM</errorcode></term> | ||
| 124 | <listitem> | ||
| 125 | <para>No memory to allocate buffers for <link linkend="mmap">memory | ||
| 126 | mapped</link> I/O.</para> | ||
| 127 | </listitem> | ||
| 128 | </varlistentry> | ||
| 129 | <varlistentry> | ||
| 130 | <term><errorcode>EINVAL</errorcode></term> | ||
| 131 | <listitem> | ||
| 132 | <para>The buffer type (<structfield>type</structfield> field) or the | ||
| 133 | requested I/O method (<structfield>memory</structfield>) is not | ||
| 134 | supported.</para> | ||
| 135 | </listitem> | ||
| 136 | </varlistentry> | ||
| 137 | </variablelist> | ||
| 138 | </refsect1> | ||
| 139 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml b/Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml new file mode 100644 index 000000000000..7bde698760e4 --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-prepare-buf.xml | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | <refentry id="vidioc-prepare-buf"> | ||
| 2 | <refmeta> | ||
| 3 | <refentrytitle>ioctl VIDIOC_PREPARE_BUF</refentrytitle> | ||
| 4 | &manvol; | ||
| 5 | </refmeta> | ||
| 6 | |||
| 7 | <refnamediv> | ||
| 8 | <refname>VIDIOC_PREPARE_BUF</refname> | ||
| 9 | <refpurpose>Prepare a buffer for I/O</refpurpose> | ||
| 10 | </refnamediv> | ||
| 11 | |||
| 12 | <refsynopsisdiv> | ||
| 13 | <funcsynopsis> | ||
| 14 | <funcprototype> | ||
| 15 | <funcdef>int <function>ioctl</function></funcdef> | ||
| 16 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
| 17 | <paramdef>int <parameter>request</parameter></paramdef> | ||
| 18 | <paramdef>struct v4l2_buffer *<parameter>argp</parameter></paramdef> | ||
| 19 | </funcprototype> | ||
| 20 | </funcsynopsis> | ||
| 21 | </refsynopsisdiv> | ||
| 22 | |||
| 23 | <refsect1> | ||
| 24 | <title>Arguments</title> | ||
| 25 | |||
| 26 | <variablelist> | ||
| 27 | <varlistentry> | ||
| 28 | <term><parameter>fd</parameter></term> | ||
| 29 | <listitem> | ||
| 30 | <para>&fd;</para> | ||
| 31 | </listitem> | ||
| 32 | </varlistentry> | ||
| 33 | <varlistentry> | ||
| 34 | <term><parameter>request</parameter></term> | ||
| 35 | <listitem> | ||
| 36 | <para>VIDIOC_PREPARE_BUF</para> | ||
| 37 | </listitem> | ||
| 38 | </varlistentry> | ||
| 39 | <varlistentry> | ||
| 40 | <term><parameter>argp</parameter></term> | ||
| 41 | <listitem> | ||
| 42 | <para></para> | ||
| 43 | </listitem> | ||
| 44 | </varlistentry> | ||
| 45 | </variablelist> | ||
| 46 | </refsect1> | ||
| 47 | |||
| 48 | <refsect1> | ||
| 49 | <title>Description</title> | ||
| 50 | |||
| 51 | <para>Applications can optionally call the | ||
| 52 | <constant>VIDIOC_PREPARE_BUF</constant> ioctl to pass ownership of the buffer | ||
| 53 | to the driver before actually enqueuing it, using the | ||
| 54 | <constant>VIDIOC_QBUF</constant> ioctl, and to prepare it for future I/O. | ||
| 55 | Such preparations may include cache invalidation or cleaning. Performing them | ||
| 56 | in advance saves time during the actual I/O. In case such cache operations are | ||
| 57 | not required, the application can use one of | ||
| 58 | <constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant> and | ||
| 59 | <constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant> flags to skip the respective | ||
| 60 | step.</para> | ||
| 61 | |||
| 62 | <para>The <structname>v4l2_buffer</structname> structure is | ||
| 63 | specified in <xref linkend="buffer" />.</para> | ||
| 64 | </refsect1> | ||
| 65 | |||
| 66 | <refsect1> | ||
| 67 | &return-value; | ||
| 68 | |||
| 69 | <variablelist> | ||
| 70 | <varlistentry> | ||
| 71 | <term><errorcode>EBUSY</errorcode></term> | ||
| 72 | <listitem> | ||
| 73 | <para>File I/O is in progress.</para> | ||
| 74 | </listitem> | ||
| 75 | </varlistentry> | ||
| 76 | <varlistentry> | ||
| 77 | <term><errorcode>EINVAL</errorcode></term> | ||
| 78 | <listitem> | ||
| 79 | <para>The buffer <structfield>type</structfield> is not | ||
| 80 | supported, or the <structfield>index</structfield> is out of bounds, | ||
| 81 | or no buffers have been allocated yet, or the | ||
| 82 | <structfield>userptr</structfield> or | ||
| 83 | <structfield>length</structfield> are invalid.</para> | ||
| 84 | </listitem> | ||
| 85 | </varlistentry> | ||
| 86 | </variablelist> | ||
| 87 | </refsect1> | ||
| 88 | </refentry> | ||
