aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/80211.tmpl4
-rw-r--r--Documentation/DocBook/drm.tmpl117
-rw-r--r--Documentation/DocBook/gadget.tmpl2
-rw-r--r--Documentation/DocBook/kernel-api.tmpl3
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl11
-rw-r--r--Documentation/DocBook/kgdb.tmpl6
-rw-r--r--Documentation/DocBook/media/dvb/dvbapi.xml2
-rw-r--r--Documentation/DocBook/media/dvb/dvbproperty.xml180
-rw-r--r--Documentation/DocBook/media/dvb/frontend.xml2
-rw-r--r--Documentation/DocBook/media/v4l/common.xml2
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml23
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml23
-rw-r--r--Documentation/DocBook/media/v4l/driver.xml6
-rw-r--r--Documentation/DocBook/media/v4l/io.xml243
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-nv12m.xml2
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml34
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-uv8.xml62
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml2
-rw-r--r--Documentation/DocBook/media/v4l/subdev-formats.xml926
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml13
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-create-bufs.xml16
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dqevent.xml6
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-expbuf.xml208
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml8
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml57
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-qbuf.xml17
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-querycap.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-reqbufs.xml47
-rw-r--r--Documentation/DocBook/media_api.tmpl1
-rw-r--r--Documentation/DocBook/uio-howto.tmpl58
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl143
31 files changed, 1493 insertions, 733 deletions
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index 42e7f030cb16..284ced7a228f 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -107,8 +107,8 @@
107!Finclude/net/cfg80211.h key_params 107!Finclude/net/cfg80211.h key_params
108!Finclude/net/cfg80211.h survey_info_flags 108!Finclude/net/cfg80211.h survey_info_flags
109!Finclude/net/cfg80211.h survey_info 109!Finclude/net/cfg80211.h survey_info
110!Finclude/net/cfg80211.h beacon_parameters 110!Finclude/net/cfg80211.h cfg80211_beacon_data
111!Finclude/net/cfg80211.h plink_actions 111!Finclude/net/cfg80211.h cfg80211_ap_settings
112!Finclude/net/cfg80211.h station_parameters 112!Finclude/net/cfg80211.h station_parameters
113!Finclude/net/cfg80211.h station_info_flags 113!Finclude/net/cfg80211.h station_info_flags
114!Finclude/net/cfg80211.h rate_info_flags 114!Finclude/net/cfg80211.h rate_info_flags
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index b0300529ab13..f9df3b872c16 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -743,6 +743,10 @@ char *date;</synopsis>
743 These two operations are mandatory for GEM drivers that support DRM 743 These two operations are mandatory for GEM drivers that support DRM
744 PRIME. 744 PRIME.
745 </para> 745 </para>
746 <sect4>
747 <title>DRM PRIME Helper Functions Reference</title>
748!Pdrivers/gpu/drm/drm_prime.c PRIME Helpers
749 </sect4>
746 </sect3> 750 </sect3>
747 <sect3 id="drm-gem-objects-mapping"> 751 <sect3 id="drm-gem-objects-mapping">
748 <title>GEM Objects Mapping</title> 752 <title>GEM Objects Mapping</title>
@@ -978,10 +982,25 @@ int max_width, max_height;</synopsis>
978 If the parameters are deemed valid, drivers then create, initialize and 982 If the parameters are deemed valid, drivers then create, initialize and
979 return an instance of struct <structname>drm_framebuffer</structname>. 983 return an instance of struct <structname>drm_framebuffer</structname>.
980 If desired the instance can be embedded in a larger driver-specific 984 If desired the instance can be embedded in a larger driver-specific
981 structure. The new instance is initialized with a call to 985 structure. Drivers must fill its <structfield>width</structfield>,
982 <function>drm_framebuffer_init</function> which takes a pointer to DRM 986 <structfield>height</structfield>, <structfield>pitches</structfield>,
983 frame buffer operations (struct 987 <structfield>offsets</structfield>, <structfield>depth</structfield>,
984 <structname>drm_framebuffer_funcs</structname>). Frame buffer operations are 988 <structfield>bits_per_pixel</structfield> and
989 <structfield>pixel_format</structfield> fields from the values passed
990 through the <parameter>drm_mode_fb_cmd2</parameter> argument. They
991 should call the <function>drm_helper_mode_fill_fb_struct</function>
992 helper function to do so.
993 </para>
994
995 <para>
996 The initailization of the new framebuffer instance is finalized with a
997 call to <function>drm_framebuffer_init</function> which takes a pointer
998 to DRM frame buffer operations (struct
999 <structname>drm_framebuffer_funcs</structname>). Note that this function
1000 publishes the framebuffer and so from this point on it can be accessed
1001 concurrently from other threads. Hence it must be the last step in the
1002 driver's framebuffer initialization sequence. Frame buffer operations
1003 are
985 <itemizedlist> 1004 <itemizedlist>
986 <listitem> 1005 <listitem>
987 <synopsis>int (*create_handle)(struct drm_framebuffer *fb, 1006 <synopsis>int (*create_handle)(struct drm_framebuffer *fb,
@@ -1022,16 +1041,16 @@ int max_width, max_height;</synopsis>
1022 </itemizedlist> 1041 </itemizedlist>
1023 </para> 1042 </para>
1024 <para> 1043 <para>
1025 After initializing the <structname>drm_framebuffer</structname> 1044 The lifetime of a drm framebuffer is controlled with a reference count,
1026 instance drivers must fill its <structfield>width</structfield>, 1045 drivers can grab additional references with
1027 <structfield>height</structfield>, <structfield>pitches</structfield>, 1046 <function>drm_framebuffer_reference</function> </para> and drop them
1028 <structfield>offsets</structfield>, <structfield>depth</structfield>, 1047 again with <function>drm_framebuffer_unreference</function>. For
1029 <structfield>bits_per_pixel</structfield> and 1048 driver-private framebuffers for which the last reference is never
1030 <structfield>pixel_format</structfield> fields from the values passed 1049 dropped (e.g. for the fbdev framebuffer when the struct
1031 through the <parameter>drm_mode_fb_cmd2</parameter> argument. They 1050 <structname>drm_framebuffer</structname> is embedded into the fbdev
1032 should call the <function>drm_helper_mode_fill_fb_struct</function> 1051 helper struct) drivers can manually clean up a framebuffer at module
1033 helper function to do so. 1052 unload time with
1034 </para> 1053 <function>drm_framebuffer_unregister_private</function>.
1035 </sect2> 1054 </sect2>
1036 <sect2> 1055 <sect2>
1037 <title>Output Polling</title> 1056 <title>Output Polling</title>
@@ -1043,6 +1062,22 @@ int max_width, max_height;</synopsis>
1043 operation. 1062 operation.
1044 </para> 1063 </para>
1045 </sect2> 1064 </sect2>
1065 <sect2>
1066 <title>Locking</title>
1067 <para>
1068 Beside some lookup structures with their own locking (which is hidden
1069 behind the interface functions) most of the modeset state is protected
1070 by the <code>dev-&lt;mode_config.lock</code> mutex and additionally
1071 per-crtc locks to allow cursor updates, pageflips and similar operations
1072 to occur concurrently with background tasks like output detection.
1073 Operations which cross domains like a full modeset always grab all
1074 locks. Drivers there need to protect resources shared between crtcs with
1075 additional locking. They also need to be careful to always grab the
1076 relevant crtc locks if a modset functions touches crtc state, e.g. for
1077 load detection (which does only grab the <code>mode_config.lock</code>
1078 to allow concurrent screen updates on live crtcs).
1079 </para>
1080 </sect2>
1046 </sect1> 1081 </sect1>
1047 1082
1048 <!-- Internals: kms initialization and cleanup --> 1083 <!-- Internals: kms initialization and cleanup -->
@@ -1126,6 +1161,12 @@ int max_width, max_height;</synopsis>
1126 any new rendering to the frame buffer until the page flip completes. 1161 any new rendering to the frame buffer until the page flip completes.
1127 </para> 1162 </para>
1128 <para> 1163 <para>
1164 If a page flip can be successfully scheduled the driver must set the
1165 <code>drm_crtc-&lt;fb</code> field to the new framebuffer pointed to
1166 by <code>fb</code>. This is important so that the reference counting
1167 on framebuffers stays balanced.
1168 </para>
1169 <para>
1129 If a page flip is already pending, the 1170 If a page flip is already pending, the
1130 <methodname>page_flip</methodname> operation must return 1171 <methodname>page_flip</methodname> operation must return
1131 -<errorname>EBUSY</errorname>. 1172 -<errorname>EBUSY</errorname>.
@@ -1141,23 +1182,13 @@ int max_width, max_height;</synopsis>
1141 the <methodname>page_flip</methodname> operation will be called with a 1182 the <methodname>page_flip</methodname> operation will be called with a
1142 non-NULL <parameter>event</parameter> argument pointing to a 1183 non-NULL <parameter>event</parameter> argument pointing to a
1143 <structname>drm_pending_vblank_event</structname> instance. Upon page 1184 <structname>drm_pending_vblank_event</structname> instance. Upon page
1144 flip completion the driver must fill the 1185 flip completion the driver must call <methodname>drm_send_vblank_event</methodname>
1145 <parameter>event</parameter>::<structfield>event</structfield> 1186 to fill in the event and send to wake up any waiting processes.
1146 <structfield>sequence</structfield>, <structfield>tv_sec</structfield> 1187 This can be performed with
1147 and <structfield>tv_usec</structfield> fields with the associated
1148 vertical blanking count and timestamp, add the event to the
1149 <parameter>drm_file</parameter> list of events to be signaled, and wake
1150 up any waiting process. This can be performed with
1151 <programlisting><![CDATA[ 1188 <programlisting><![CDATA[
1152 struct timeval now;
1153
1154 event->event.sequence = drm_vblank_count_and_time(..., &now);
1155 event->event.tv_sec = now.tv_sec;
1156 event->event.tv_usec = now.tv_usec;
1157
1158 spin_lock_irqsave(&dev->event_lock, flags); 1189 spin_lock_irqsave(&dev->event_lock, flags);
1159 list_add_tail(&event->base.link, &event->base.file_priv->event_list); 1190 ...
1160 wake_up_interruptible(&event->base.file_priv->event_wait); 1191 drm_send_vblank_event(dev, pipe, event);
1161 spin_unlock_irqrestore(&dev->event_lock, flags); 1192 spin_unlock_irqrestore(&dev->event_lock, flags);
1162 ]]></programlisting> 1193 ]]></programlisting>
1163 </para> 1194 </para>
@@ -1619,12 +1650,16 @@ void intel_crt_init(struct drm_device *dev)
1619 make its properties available to applications. 1650 make its properties available to applications.
1620 </para> 1651 </para>
1621 </sect2> 1652 </sect2>
1653 <sect2>
1654 <title>KMS API Functions</title>
1655!Edrivers/gpu/drm/drm_crtc.c
1656 </sect2>
1622 </sect1> 1657 </sect1>
1623 1658
1624 <!-- Internals: mid-layer helper functions --> 1659 <!-- Internals: kms helper functions -->
1625 1660
1626 <sect1> 1661 <sect1>
1627 <title>Mid-layer Helper Functions</title> 1662 <title>Mode Setting Helper Functions</title>
1628 <para> 1663 <para>
1629 The CRTC, encoder and connector functions provided by the drivers 1664 The CRTC, encoder and connector functions provided by the drivers
1630 implement the DRM API. They're called by the DRM core and ioctl handlers 1665 implement the DRM API. They're called by the DRM core and ioctl handlers
@@ -2106,6 +2141,26 @@ void intel_crt_init(struct drm_device *dev)
2106 </listitem> 2141 </listitem>
2107 </itemizedlist> 2142 </itemizedlist>
2108 </sect2> 2143 </sect2>
2144 <sect2>
2145 <title>Modeset Helper Functions Reference</title>
2146!Edrivers/gpu/drm/drm_crtc_helper.c
2147 </sect2>
2148 <sect2>
2149 <title>fbdev Helper Functions Reference</title>
2150!Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers
2151!Edrivers/gpu/drm/drm_fb_helper.c
2152!Iinclude/drm/drm_fb_helper.h
2153 </sect2>
2154 <sect2>
2155 <title>Display Port Helper Functions Reference</title>
2156!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
2157!Iinclude/drm/drm_dp_helper.h
2158!Edrivers/gpu/drm/drm_dp_helper.c
2159 </sect2>
2160 <sect2>
2161 <title>EDID Helper Functions Reference</title>
2162!Edrivers/gpu/drm/drm_edid.c
2163 </sect2>
2109 </sect1> 2164 </sect1>
2110 2165
2111 <!-- Internals: vertical blanking --> 2166 <!-- Internals: vertical blanking -->
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index 6ef2f0073e5a..4017f147ba2f 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -671,7 +671,7 @@ than a kernel driver.
671<para>There's a USB Mass Storage class driver, which provides 671<para>There's a USB Mass Storage class driver, which provides
672a different solution for interoperability with systems such 672a different solution for interoperability with systems such
673as MS-Windows and MacOS. 673as MS-Windows and MacOS.
674That <emphasis>File-backed Storage</emphasis> driver uses a 674That <emphasis>Mass Storage</emphasis> driver uses a
675file or block device as backing store for a drive, 675file or block device as backing store for a drive,
676like the <filename>loop</filename> driver. 676like the <filename>loop</filename> driver.
677The USB host uses the BBB, CB, or CBI versions of the mass 677The USB host uses the BBB, CB, or CBI versions of the mass
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 00687ee9d363..f75ab4c1b281 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -58,6 +58,9 @@
58 58
59 <sect1><title>String Conversions</title> 59 <sect1><title>String Conversions</title>
60!Elib/vsprintf.c 60!Elib/vsprintf.c
61!Finclude/linux/kernel.h kstrtol
62!Finclude/linux/kernel.h kstrtoul
63!Elib/kstrtox.c
61 </sect1> 64 </sect1>
62 <sect1><title>String Manipulation</title> 65 <sect1><title>String Manipulation</title>
63<!-- All functions are exported at now 66<!-- All functions are exported at now
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index eee71426ecb8..d0758b241b23 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -945,7 +945,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
945 945
946 <sect1 id="sym-exportsymbols"> 946 <sect1 id="sym-exportsymbols">
947 <title><function>EXPORT_SYMBOL()</function> 947 <title><function>EXPORT_SYMBOL()</function>
948 <filename class="headerfile">include/linux/module.h</filename></title> 948 <filename class="headerfile">include/linux/export.h</filename></title>
949 949
950 <para> 950 <para>
951 This is the classic method of exporting a symbol: dynamically 951 This is the classic method of exporting a symbol: dynamically
@@ -955,7 +955,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
955 955
956 <sect1 id="sym-exportsymbols-gpl"> 956 <sect1 id="sym-exportsymbols-gpl">
957 <title><function>EXPORT_SYMBOL_GPL()</function> 957 <title><function>EXPORT_SYMBOL_GPL()</function>
958 <filename class="headerfile">include/linux/module.h</filename></title> 958 <filename class="headerfile">include/linux/export.h</filename></title>
959 959
960 <para> 960 <para>
961 Similar to <function>EXPORT_SYMBOL()</function> except that the 961 Similar to <function>EXPORT_SYMBOL()</function> except that the
@@ -1185,13 +1185,6 @@ static struct block_device_operations opt_fops = {
1185 </para> 1185 </para>
1186 1186
1187 <para> 1187 <para>
1188 You may well want to make your CONFIG option only visible if
1189 <symbol>CONFIG_EXPERIMENTAL</symbol> is enabled: this serves as a
1190 warning to users. There many other fancy things you can do: see
1191 the various <filename>Kconfig</filename> files for ideas.
1192 </para>
1193
1194 <para>
1195 In your description of the option, make sure you address both the 1188 In your description of the option, make sure you address both the
1196 expert user and the user who knows nothing about your feature. Mention 1189 expert user and the user who knows nothing about your feature. Mention
1197 incompatibilities and issues here. <emphasis> Definitely 1190 incompatibilities and issues here. <emphasis> Definitely
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index 4ee4ba3509fc..f77358f96930 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -94,10 +94,8 @@
94 <sect1 id="CompileKGDB"> 94 <sect1 id="CompileKGDB">
95 <title>Kernel config options for kgdb</title> 95 <title>Kernel config options for kgdb</title>
96 <para> 96 <para>
97 To enable <symbol>CONFIG_KGDB</symbol> you should first turn on 97 To enable <symbol>CONFIG_KGDB</symbol> you should look under
98 "Prompt for development and/or incomplete code/drivers" 98 "Kernel debugging" and select "KGDB: kernel debugger".
99 (CONFIG_EXPERIMENTAL) in "General setup", then under the
100 "Kernel debugging" select "KGDB: kernel debugger".
101 </para> 99 </para>
102 <para> 100 <para>
103 While it is not a hard requirement that you have symbols in your 101 While it is not a hard requirement that you have symbols in your
diff --git a/Documentation/DocBook/media/dvb/dvbapi.xml b/Documentation/DocBook/media/dvb/dvbapi.xml
index 757488b24f4f..0197bcc7842d 100644
--- a/Documentation/DocBook/media/dvb/dvbapi.xml
+++ b/Documentation/DocBook/media/dvb/dvbapi.xml
@@ -84,7 +84,7 @@ Added ISDB-T test originally written by Patrick Boettcher
84 84
85 85
86<title>LINUX DVB API</title> 86<title>LINUX DVB API</title>
87<subtitle>Version 5.8</subtitle> 87<subtitle>Version 5.10</subtitle>
88<!-- ADD THE CHAPTERS HERE --> 88<!-- ADD THE CHAPTERS HERE -->
89 <chapter id="dvb_introdution"> 89 <chapter id="dvb_introdution">
90 &sub-intro; 90 &sub-intro;
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml
index 957e3acaae8e..4a5eaeed0b9e 100644
--- a/Documentation/DocBook/media/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/media/dvb/dvbproperty.xml
@@ -7,14 +7,41 @@ the capability ioctls weren't implemented yet via the new way.</para>
7<para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant> 7<para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant>
8API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters"> 8API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters">
9struct <constant>dvb_frontend_parameters</constant></link> were used.</para> 9struct <constant>dvb_frontend_parameters</constant></link> were used.</para>
10<section id="dtv-stats">
11<title>DTV stats type</title>
12<programlisting>
13struct dtv_stats {
14 __u8 scale; /* enum fecap_scale_params type */
15 union {
16 __u64 uvalue; /* for counters and relative scales */
17 __s64 svalue; /* for 1/1000 dB measures */
18 };
19} __packed;
20</programlisting>
21</section>
22<section id="dtv-fe-stats">
23<title>DTV stats type</title>
24<programlisting>
25#define MAX_DTV_STATS 4
26
27struct dtv_fe_stats {
28 __u8 len;
29 struct dtv_stats stat[MAX_DTV_STATS];
30} __packed;
31</programlisting>
32</section>
33
10<section id="dtv-property"> 34<section id="dtv-property">
11<title>DTV property type</title> 35<title>DTV property type</title>
12<programlisting> 36<programlisting>
13/* Reserved fields should be set to 0 */ 37/* Reserved fields should be set to 0 */
38
14struct dtv_property { 39struct dtv_property {
15 __u32 cmd; 40 __u32 cmd;
41 __u32 reserved[3];
16 union { 42 union {
17 __u32 data; 43 __u32 data;
44 struct dtv_fe_stats st;
18 struct { 45 struct {
19 __u8 data[32]; 46 __u8 data[32];
20 __u32 len; 47 __u32 len;
@@ -440,7 +467,7 @@ typedef enum fe_delivery_system {
440 <title><constant>DTV-ISDBT-LAYER*</constant> parameters</title> 467 <title><constant>DTV-ISDBT-LAYER*</constant> parameters</title>
441 <para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in 468 <para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in
442 ISDB-T hierarchical layers can be decoded simultaneously. For that 469 ISDB-T hierarchical layers can be decoded simultaneously. For that
443 reason a ISDB-T demodulator has 3 viterbi and 3 reed-solomon-decoders.</para> 470 reason a ISDB-T demodulator has 3 Viterbi and 3 Reed-Solomon decoders.</para>
444 <para>ISDB-T has 3 hierarchical layers which each can use a part of the 471 <para>ISDB-T has 3 hierarchical layers which each can use a part of the
445 available segments. The total number of segments over all layers has 472 available segments. The total number of segments over all layers has
446 to 13 in ISDB-T.</para> 473 to 13 in ISDB-T.</para>
@@ -850,6 +877,147 @@ enum fe_interleaving {
850 <para>use the special macro LNA_AUTO to set LNA auto</para> 877 <para>use the special macro LNA_AUTO to set LNA auto</para>
851 </section> 878 </section>
852</section> 879</section>
880
881 <section id="frontend-stat-properties">
882 <title>Frontend statistics indicators</title>
883 <para>The values are returned via <constant>dtv_property.stat</constant>.
884 If the property is supported, <constant>dtv_property.stat.len</constant> is bigger than zero.</para>
885 <para>For most delivery systems, <constant>dtv_property.stat.len</constant>
886 will be 1 if the stats is supported, and the properties will
887 return a single value for each parameter.</para>
888 <para>It should be noticed, however, that new OFDM delivery systems
889 like ISDB can use different modulation types for each group of
890 carriers. On such standards, up to 3 groups of statistics can be
891 provided, and <constant>dtv_property.stat.len</constant> is updated
892 to reflect the "global" metrics, plus one metric per each carrier
893 group (called "layer" on ISDB).</para>
894 <para>So, in order to be consistent with other delivery systems, the first
895 value at <link linkend="dtv-stats"><constant>dtv_property.stat.dtv_stats</constant></link>
896 array refers to the global metric. The other elements of the array
897 represent each layer, starting from layer A(index 1),
898 layer B (index 2) and so on.</para>
899 <para>The number of filled elements are stored at <constant>dtv_property.stat.len</constant>.</para>
900 <para>Each element of the <constant>dtv_property.stat.dtv_stats</constant> array consists on two elements:</para>
901 <itemizedlist mark='opencircle'>
902 <listitem><para><constant>svalue</constant> or <constant>uvalue</constant>, where
903 <constant>svalue</constant> is for signed values of the measure (dB measures)
904 and <constant>uvalue</constant> is for unsigned values (counters, relative scale)</para></listitem>
905 <listitem><para><constant>scale</constant> - Scale for the value. It can be:</para>
906 <section id = "fecap-scale-params">
907 <itemizedlist mark='bullet'>
908 <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition)</para></listitem>
909 <listitem><para><constant>FE_SCALE_DECIBEL</constant> - parameter is a signed value, measured in 1/1000 dB</para></listitem>
910 <listitem><para><constant>FE_SCALE_RELATIVE</constant> - parameter is a unsigned value, where 0 means 0% and 65535 means 100%.</para></listitem>
911 <listitem><para><constant>FE_SCALE_COUNTER</constant> - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time.</para></listitem>
912 </itemizedlist>
913 </section>
914 </listitem>
915 </itemizedlist>
916 <section id="DTV-STAT-SIGNAL-STRENGTH">
917 <title><constant>DTV_STAT_SIGNAL_STRENGTH</constant></title>
918 <para>Indicates the signal strength level at the analog part of the tuner or of the demod.</para>
919 <para>Possible scales for this metric are:</para>
920 <itemizedlist mark='bullet'>
921 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
922 <listitem><constant>FE_SCALE_DECIBEL</constant> - signal strength is in 0.0001 dBm units, power measured in miliwatts. This value is generally negative.</listitem>
923 <listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for power (actually, 0 to 65535).</listitem>
924 </itemizedlist>
925 </section>
926 <section id="DTV-STAT-CNR">
927 <title><constant>DTV_STAT_CNR</constant></title>
928 <para>Indicates the Signal to Noise ratio for the main carrier.</para>
929 <para>Possible scales for this metric are:</para>
930 <itemizedlist mark='bullet'>
931 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
932 <listitem><constant>FE_SCALE_DECIBEL</constant> - Signal/Noise ratio is in 0.0001 dB units.</listitem>
933 <listitem><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for Signal/Noise (actually, 0 to 65535).</listitem>
934 </itemizedlist>
935 </section>
936 <section id="DTV-STAT-PRE-ERROR-BIT-COUNT">
937 <title><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></title>
938 <para>Measures the number of bit errors before the forward error correction (FEC) on the inner coding block (before Viterbi, LDPC or other inner code).</para>
939 <para>This measure is taken during the same interval as <constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant>.</para>
940 <para>In order to get the BER (Bit Error Rate) measurement, it should be divided by
941 <link linkend="DTV-STAT-PRE-TOTAL-BIT-COUNT"><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></link>.</para>
942 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
943 The frontend may reset it when a channel/transponder is tuned.</para>
944 <para>Possible scales for this metric are:</para>
945 <itemizedlist mark='bullet'>
946 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
947 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted before the inner coding.</listitem>
948 </itemizedlist>
949 </section>
950 <section id="DTV-STAT-PRE-TOTAL-BIT-COUNT">
951 <title><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></title>
952 <para>Measures the amount of bits received before the inner code block, during the same period as
953 <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
954 <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream,
955 as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para>
956 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
957 The frontend may reset it when a channel/transponder is tuned.</para>
958 <para>Possible scales for this metric are:</para>
959 <itemizedlist mark='bullet'>
960 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
961 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring
962 <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link>.</listitem>
963 </itemizedlist>
964 </section>
965 <section id="DTV-STAT-POST-ERROR-BIT-COUNT">
966 <title><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></title>
967 <para>Measures the number of bit errors after the forward error correction (FEC) done by inner code block (after Viterbi, LDPC or other inner code).</para>
968 <para>This measure is taken during the same interval as <constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant>.</para>
969 <para>In order to get the BER (Bit Error Rate) measurement, it should be divided by
970 <link linkend="DTV-STAT-POST-TOTAL-BIT-COUNT"><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></link>.</para>
971 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
972 The frontend may reset it when a channel/transponder is tuned.</para>
973 <para>Possible scales for this metric are:</para>
974 <itemizedlist mark='bullet'>
975 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
976 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error bits counted after the inner coding.</listitem>
977 </itemizedlist>
978 </section>
979 <section id="DTV-STAT-POST-TOTAL-BIT-COUNT">
980 <title><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></title>
981 <para>Measures the amount of bits received after the inner coding, during the same period as
982 <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
983 <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream,
984 as the frontend may need to manually restart the measurement, loosing some data between each measurement interval.</para>
985 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
986 The frontend may reset it when a channel/transponder is tuned.</para>
987 <para>Possible scales for this metric are:</para>
988 <itemizedlist mark='bullet'>
989 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
990 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of bits counted while measuring
991 <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link>.</listitem>
992 </itemizedlist>
993 </section>
994 <section id="DTV-STAT-ERROR-BLOCK-COUNT">
995 <title><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></title>
996 <para>Measures the number of block errors after the outer forward error correction coding (after Reed-Solomon or other outer code).</para>
997 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
998 The frontend may reset it when a channel/transponder is tuned.</para>
999 <para>Possible scales for this metric are:</para>
1000 <itemizedlist mark='bullet'>
1001 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
1002 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of error blocks counted after the outer coding.</listitem>
1003 </itemizedlist>
1004 </section>
1005 <section id="DTV-STAT-TOTAL-BLOCK-COUNT">
1006 <title><constant>DTV-STAT_TOTAL_BLOCK_COUNT</constant></title>
1007 <para>Measures the total number of blocks received during the same period as
1008 <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link> measurement was taken.</para>
1009 <para>It can be used to calculate the PER indicator, by dividing
1010 <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link>
1011 by <link linkend="DTV-STAT-TOTAL-BLOCK-COUNT"><constant>DTV-STAT-TOTAL-BLOCK-COUNT</constant></link>.</para>
1012 <para>Possible scales for this metric are:</para>
1013 <itemizedlist mark='bullet'>
1014 <listitem><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</listitem>
1015 <listitem><constant>FE_SCALE_COUNTER</constant> - Number of blocks counted while measuring
1016 <link linkend="DTV-STAT-ERROR-BLOCK-COUNT"><constant>DTV_STAT_ERROR_BLOCK_COUNT</constant></link>.</listitem>
1017 </itemizedlist>
1018 </section>
1019 </section>
1020
853 <section id="frontend-property-terrestrial-systems"> 1021 <section id="frontend-property-terrestrial-systems">
854 <title>Properties used on terrestrial delivery systems</title> 1022 <title>Properties used on terrestrial delivery systems</title>
855 <section id="dvbt-params"> 1023 <section id="dvbt-params">
@@ -871,6 +1039,7 @@ enum fe_interleaving {
871 <listitem><para><link linkend="DTV-HIERARCHY"><constant>DTV_HIERARCHY</constant></link></para></listitem> 1039 <listitem><para><link linkend="DTV-HIERARCHY"><constant>DTV_HIERARCHY</constant></link></para></listitem>
872 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1040 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
873 </itemizedlist> 1041 </itemizedlist>
1042 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
874 </section> 1043 </section>
875 <section id="dvbt2-params"> 1044 <section id="dvbt2-params">
876 <title>DVB-T2 delivery system</title> 1045 <title>DVB-T2 delivery system</title>
@@ -895,6 +1064,7 @@ enum fe_interleaving {
895 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem> 1064 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
896 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1065 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
897 </itemizedlist> 1066 </itemizedlist>
1067 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
898 </section> 1068 </section>
899 <section id="isdbt"> 1069 <section id="isdbt">
900 <title>ISDB-T delivery system</title> 1070 <title>ISDB-T delivery system</title>
@@ -948,6 +1118,7 @@ enum fe_interleaving {
948 <listitem><para><link linkend="DTV-ISDBT-LAYER-SEGMENT-COUNT"><constant>DTV_ISDBT_LAYERC_SEGMENT_COUNT</constant></link></para></listitem> 1118 <listitem><para><link linkend="DTV-ISDBT-LAYER-SEGMENT-COUNT"><constant>DTV_ISDBT_LAYERC_SEGMENT_COUNT</constant></link></para></listitem>
949 <listitem><para><link linkend="DTV-ISDBT-LAYER-TIME-INTERLEAVING"><constant>DTV_ISDBT_LAYERC_TIME_INTERLEAVING</constant></link></para></listitem> 1119 <listitem><para><link linkend="DTV-ISDBT-LAYER-TIME-INTERLEAVING"><constant>DTV_ISDBT_LAYERC_TIME_INTERLEAVING</constant></link></para></listitem>
950 </itemizedlist> 1120 </itemizedlist>
1121 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
951 </section> 1122 </section>
952 <section id="atsc-params"> 1123 <section id="atsc-params">
953 <title>ATSC delivery system</title> 1124 <title>ATSC delivery system</title>
@@ -961,6 +1132,7 @@ enum fe_interleaving {
961 <listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem> 1132 <listitem><para><link linkend="DTV-MODULATION"><constant>DTV_MODULATION</constant></link></para></listitem>
962 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem> 1133 <listitem><para><link linkend="DTV-BANDWIDTH-HZ"><constant>DTV_BANDWIDTH_HZ</constant></link></para></listitem>
963 </itemizedlist> 1134 </itemizedlist>
1135 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
964 </section> 1136 </section>
965 <section id="atscmh-params"> 1137 <section id="atscmh-params">
966 <title>ATSC-MH delivery system</title> 1138 <title>ATSC-MH delivery system</title>
@@ -988,6 +1160,7 @@ enum fe_interleaving {
988 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem> 1160 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-C"><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></link></para></listitem>
989 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem> 1161 <listitem><para><link linkend="DTV-ATSCMH-SCCC-CODE-MODE-D"><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></link></para></listitem>
990 </itemizedlist> 1162 </itemizedlist>
1163 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
991 </section> 1164 </section>
992 <section id="dtmb-params"> 1165 <section id="dtmb-params">
993 <title>DTMB delivery system</title> 1166 <title>DTMB delivery system</title>
@@ -1007,6 +1180,7 @@ enum fe_interleaving {
1007 <listitem><para><link linkend="DTV-INTERLEAVING"><constant>DTV_INTERLEAVING</constant></link></para></listitem> 1180 <listitem><para><link linkend="DTV-INTERLEAVING"><constant>DTV_INTERLEAVING</constant></link></para></listitem>
1008 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1181 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
1009 </itemizedlist> 1182 </itemizedlist>
1183 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1010 </section> 1184 </section>
1011 </section> 1185 </section>
1012 <section id="frontend-property-cable-systems"> 1186 <section id="frontend-property-cable-systems">
@@ -1028,6 +1202,7 @@ enum fe_interleaving {
1028 <listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem> 1202 <listitem><para><link linkend="DTV-INNER-FEC"><constant>DTV_INNER_FEC</constant></link></para></listitem>
1029 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1203 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
1030 </itemizedlist> 1204 </itemizedlist>
1205 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1031 </section> 1206 </section>
1032 <section id="dvbc-annex-b-params"> 1207 <section id="dvbc-annex-b-params">
1033 <title>DVB-C Annex B delivery system</title> 1208 <title>DVB-C Annex B delivery system</title>
@@ -1043,6 +1218,7 @@ enum fe_interleaving {
1043 <listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem> 1218 <listitem><para><link linkend="DTV-INVERSION"><constant>DTV_INVERSION</constant></link></para></listitem>
1044 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem> 1219 <listitem><para><link linkend="DTV-LNA"><constant>DTV_LNA</constant></link></para></listitem>
1045 </itemizedlist> 1220 </itemizedlist>
1221 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1046 </section> 1222 </section>
1047 </section> 1223 </section>
1048 <section id="frontend-property-satellital-systems"> 1224 <section id="frontend-property-satellital-systems">
@@ -1062,6 +1238,7 @@ enum fe_interleaving {
1062 <listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem> 1238 <listitem><para><link linkend="DTV-VOLTAGE"><constant>DTV_VOLTAGE</constant></link></para></listitem>
1063 <listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem> 1239 <listitem><para><link linkend="DTV-TONE"><constant>DTV_TONE</constant></link></para></listitem>
1064 </itemizedlist> 1240 </itemizedlist>
1241 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1065 <para>Future implementations might add those two missing parameters:</para> 1242 <para>Future implementations might add those two missing parameters:</para>
1066 <itemizedlist mark='opencircle'> 1243 <itemizedlist mark='opencircle'>
1067 <listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem> 1244 <listitem><para><link linkend="DTV-DISEQC-MASTER"><constant>DTV_DISEQC_MASTER</constant></link></para></listitem>
@@ -1077,6 +1254,7 @@ enum fe_interleaving {
1077 <listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem> 1254 <listitem><para><link linkend="DTV-ROLLOFF"><constant>DTV_ROLLOFF</constant></link></para></listitem>
1078 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem> 1255 <listitem><para><link linkend="DTV-STREAM-ID"><constant>DTV_STREAM_ID</constant></link></para></listitem>
1079 </itemizedlist> 1256 </itemizedlist>
1257 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1080 </section> 1258 </section>
1081 <section id="turbo-params"> 1259 <section id="turbo-params">
1082 <title>Turbo code delivery system</title> 1260 <title>Turbo code delivery system</title>
diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml
index 426c2526a454..df39ba395df0 100644
--- a/Documentation/DocBook/media/dvb/frontend.xml
+++ b/Documentation/DocBook/media/dvb/frontend.xml
@@ -230,7 +230,7 @@ typedef enum fe_status {
230<entry align="char">The frontend has found a DVB signal</entry> 230<entry align="char">The frontend has found a DVB signal</entry>
231</row><row> 231</row><row>
232<entry align="char">FE_HAS_VITERBI</entry> 232<entry align="char">FE_HAS_VITERBI</entry>
233<entry align="char">The frontend FEC code is stable</entry> 233<entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry>
234</row><row> 234</row><row>
235<entry align="char">FE_HAS_SYNC</entry> 235<entry align="char">FE_HAS_SYNC</entry>
236<entry align="char">Syncronization bytes was found</entry> 236<entry align="char">Syncronization bytes was found</entry>
diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml
index 73c6847436c9..ae06afbbb3a9 100644
--- a/Documentation/DocBook/media/v4l/common.xml
+++ b/Documentation/DocBook/media/v4l/common.xml
@@ -609,7 +609,7 @@ to zero and the <constant>VIDIOC_G_STD</constant>,
609 <para>Applications can make use of the <xref linkend="input-capabilities" /> and 609 <para>Applications can make use of the <xref linkend="input-capabilities" /> and
610<xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls 610<xref linkend="output-capabilities"/> flags to determine whether the video standard ioctls
611are available for the device.</para> 611are available for the device.</para>
612&ENOTTY;. 612
613 <para>See <xref linkend="buffer" /> for a rationale. Probably 613 <para>See <xref linkend="buffer" /> for a rationale. Probably
614even USB cameras follow some well known video standard. It might have 614even USB cameras follow some well known video standard. It might have
615been better to explicitly indicate elsewhere if a device cannot live 615been better to explicitly indicate elsewhere if a device cannot live
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index 4fdf6b562d1c..104a1a2b8849 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2477,6 +2477,22 @@ that used it. It was originally scheduled for removal in 2.6.35.
2477 </orderedlist> 2477 </orderedlist>
2478 </section> 2478 </section>
2479 2479
2480 <section>
2481 <title>V4L2 in Linux 3.9</title>
2482 <orderedlist>
2483 <listitem>
2484 <para>Added timestamp types to
2485 <structfield>flags</structfield> field in
2486 <structname>v4l2_buffer</structname>. See <xref
2487 linkend="buffer-flags" />.</para>
2488 </listitem>
2489 <listitem>
2490 <para>Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control event
2491 changes flag. See <xref linkend="changes-flags"/>.</para>
2492 </listitem>
2493 </orderedlist>
2494 </section>
2495
2480 <section id="other"> 2496 <section id="other">
2481 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2497 <title>Relation of V4L2 to other Linux multimedia APIs</title>
2482 2498
@@ -2586,6 +2602,13 @@ ioctls.</para>
2586 <para>Vendor and device specific media bus pixel formats. 2602 <para>Vendor and device specific media bus pixel formats.
2587 <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para> 2603 <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para>
2588 </listitem> 2604 </listitem>
2605 <listitem>
2606 <para>Importing DMABUF file descriptors as a new IO method described
2607 in <xref linkend="dmabuf" />.</para>
2608 </listitem>
2609 <listitem>
2610 <para>Exporting DMABUF files using &VIDIOC-EXPBUF; ioctl.</para>
2611 </listitem>
2589 </itemizedlist> 2612 </itemizedlist>
2590 </section> 2613 </section>
2591 2614
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 7fe5be1d3bbb..9e8f85498678 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -203,29 +203,6 @@ and should not be used in new drivers and applications.</entry>
203 <entry>boolean</entry> 203 <entry>boolean</entry>
204 <entry>Mirror the picture vertically.</entry> 204 <entry>Mirror the picture vertically.</entry>
205 </row> 205 </row>
206 <row>
207 <entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry>
208 <entry>integer</entry>
209 <entry>Horizontal image centering. This control is
210deprecated. New drivers and applications should use the <link
211linkend="camera-controls">Camera class controls</link>
212<constant>V4L2_CID_PAN_ABSOLUTE</constant>,
213<constant>V4L2_CID_PAN_RELATIVE</constant> and
214<constant>V4L2_CID_PAN_RESET</constant> instead.</entry>
215 </row>
216 <row>
217 <entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant>
218 (formerly <constant>V4L2_CID_VCENTER</constant>)</entry>
219 <entry>integer</entry>
220 <entry>Vertical image centering. Centering is intended to
221<emphasis>physically</emphasis> adjust cameras. For image cropping see
222<xref linkend="crop" />, for clipping <xref linkend="overlay" />. This
223control is deprecated. New drivers and applications should use the
224<link linkend="camera-controls">Camera class controls</link>
225<constant>V4L2_CID_TILT_ABSOLUTE</constant>,
226<constant>V4L2_CID_TILT_RELATIVE</constant> and
227<constant>V4L2_CID_TILT_RESET</constant> instead.</entry>
228 </row>
229 <row id="v4l2-power-line-frequency"> 206 <row id="v4l2-power-line-frequency">
230 <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry> 207 <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
231 <entry>enum</entry> 208 <entry>enum</entry>
diff --git a/Documentation/DocBook/media/v4l/driver.xml b/Documentation/DocBook/media/v4l/driver.xml
index eacafe312cd2..7c6638bacedb 100644
--- a/Documentation/DocBook/media/v4l/driver.xml
+++ b/Documentation/DocBook/media/v4l/driver.xml
@@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev,
116 return 0; /* a negative value on error, 0 on success. */ 116 return 0; /* a negative value on error, 0 on success. */
117} 117}
118 118
119static void __devexit 119static void
120my_remove (struct pci_dev * pci_dev) 120my_remove (struct pci_dev * pci_dev)
121{ 121{
122 my_device *my = pci_get_drvdata (pci_dev); 122 my_device *my = pci_get_drvdata (pci_dev);
@@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev)
124 /* Describe me. */ 124 /* Describe me. */
125} 125}
126 126
127static int __devinit 127static int
128my_probe (struct pci_dev * pci_dev, 128my_probe (struct pci_dev * pci_dev,
129 const struct pci_device_id * pci_id) 129 const struct pci_device_id * pci_id)
130{ 130{
@@ -157,7 +157,7 @@ my_pci_driver = {
157 .id_table = my_pci_device_ids, 157 .id_table = my_pci_device_ids,
158 158
159 .probe = my_probe, 159 .probe = my_probe,
160 .remove = __devexit_p (my_remove), 160 .remove = my_remove,
161 161
162 /* Power management functions. */ 162 /* Power management functions. */
163 .suspend = my_suspend, 163 .suspend = my_suspend,
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index b5d1cbdc558b..e6c58559ca6b 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -331,7 +331,7 @@ application until one or more buffers can be dequeued. By default
331outgoing queue. When the <constant>O_NONBLOCK</constant> flag was 331outgoing queue. When the <constant>O_NONBLOCK</constant> flag was
332given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> 332given to the &func-open; function, <constant>VIDIOC_DQBUF</constant>
333returns immediately with an &EAGAIN; when no buffer is available. The 333returns immediately with an &EAGAIN; when no buffer is available. The
334&func-select; or &func-poll; function are always available.</para> 334&func-select; or &func-poll; functions are always available.</para>
335 335
336 <para>To start and stop capturing or output applications call the 336 <para>To start and stop capturing or output applications call the
337&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note 337&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note
@@ -472,6 +472,165 @@ rest should be evident.</para>
472 </footnote></para> 472 </footnote></para>
473 </section> 473 </section>
474 474
475 <section id="dmabuf">
476 <title>Streaming I/O (DMA buffer importing)</title>
477
478 <note>
479 <title>Experimental</title>
480 <para>This is an <link linkend="experimental">experimental</link>
481 interface and may change in the future.</para>
482 </note>
483
484<para>The DMABUF framework provides a generic method for sharing buffers
485between multiple devices. Device drivers that support DMABUF can export a DMA
486buffer to userspace as a file descriptor (known as the exporter role), import a
487DMA buffer from userspace using a file descriptor previously exported for a
488different or the same device (known as the importer role), or both. This
489section describes the DMABUF importer role API in V4L2.</para>
490
491 <para>Refer to <link linkend="vidioc-expbuf">DMABUF exporting</link> for
492details about exporting V4L2 buffers as DMABUF file descriptors.</para>
493
494<para>Input and output devices support the streaming I/O method when the
495<constant>V4L2_CAP_STREAMING</constant> flag in the
496<structfield>capabilities</structfield> field of &v4l2-capability; returned by
497the &VIDIOC-QUERYCAP; ioctl is set. Whether importing DMA buffers through
498DMABUF file descriptors is supported is determined by calling the
499&VIDIOC-REQBUFS; ioctl with the memory type set to
500<constant>V4L2_MEMORY_DMABUF</constant>.</para>
501
502 <para>This I/O method is dedicated to sharing DMA buffers between different
503devices, which may be V4L devices or other video-related devices (e.g. DRM).
504Buffers (planes) are allocated by a driver on behalf of an application. Next,
505these buffers are exported to the application as file descriptors using an API
506which is specific for an allocator driver. Only such file descriptor are
507exchanged. The descriptors and meta-information are passed in &v4l2-buffer; (or
508in &v4l2-plane; in the multi-planar API case). The driver must be switched
509into DMABUF I/O mode by calling the &VIDIOC-REQBUFS; with the desired buffer
510type.</para>
511
512 <example>
513 <title>Initiating streaming I/O with DMABUF file descriptors</title>
514
515 <programlisting>
516&v4l2-requestbuffers; reqbuf;
517
518memset(&amp;reqbuf, 0, sizeof (reqbuf));
519reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
520reqbuf.memory = V4L2_MEMORY_DMABUF;
521reqbuf.count = 1;
522
523if (ioctl(fd, &VIDIOC-REQBUFS;, &amp;reqbuf) == -1) {
524 if (errno == EINVAL)
525 printf("Video capturing or DMABUF streaming is not supported\n");
526 else
527 perror("VIDIOC_REQBUFS");
528
529 exit(EXIT_FAILURE);
530}
531 </programlisting>
532 </example>
533
534 <para>The buffer (plane) file descriptor is passed on the fly with the
535&VIDIOC-QBUF; ioctl. In case of multiplanar buffers, every plane can be
536associated with a different DMABUF descriptor. Although buffers are commonly
537cycled, applications can pass a different DMABUF descriptor at each
538<constant>VIDIOC_QBUF</constant> call.</para>
539
540 <example>
541 <title>Queueing DMABUF using single plane API</title>
542
543 <programlisting>
544int buffer_queue(int v4lfd, int index, int dmafd)
545{
546 &v4l2-buffer; buf;
547
548 memset(&amp;buf, 0, sizeof buf);
549 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
550 buf.memory = V4L2_MEMORY_DMABUF;
551 buf.index = index;
552 buf.m.fd = dmafd;
553
554 if (ioctl(v4lfd, &VIDIOC-QBUF;, &amp;buf) == -1) {
555 perror("VIDIOC_QBUF");
556 return -1;
557 }
558
559 return 0;
560}
561 </programlisting>
562 </example>
563
564 <example>
565 <title>Queueing DMABUF using multi plane API</title>
566
567 <programlisting>
568int buffer_queue_mp(int v4lfd, int index, int dmafd[], int n_planes)
569{
570 &v4l2-buffer; buf;
571 &v4l2-plane; planes[VIDEO_MAX_PLANES];
572 int i;
573
574 memset(&amp;buf, 0, sizeof buf);
575 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
576 buf.memory = V4L2_MEMORY_DMABUF;
577 buf.index = index;
578 buf.m.planes = planes;
579 buf.length = n_planes;
580
581 memset(&amp;planes, 0, sizeof planes);
582
583 for (i = 0; i &lt; n_planes; ++i)
584 buf.m.planes[i].m.fd = dmafd[i];
585
586 if (ioctl(v4lfd, &VIDIOC-QBUF;, &amp;buf) == -1) {
587 perror("VIDIOC_QBUF");
588 return -1;
589 }
590
591 return 0;
592}
593 </programlisting>
594 </example>
595
596 <para>Captured or displayed buffers are dequeued with the
597&VIDIOC-DQBUF; ioctl. The driver can unlock the buffer at any
598time between the completion of the DMA and this ioctl. The memory is
599also unlocked when &VIDIOC-STREAMOFF; is called, &VIDIOC-REQBUFS;, or
600when the device is closed.</para>
601
602 <para>For capturing applications it is customary to enqueue a
603number of empty buffers, to start capturing and enter the read loop.
604Here the application waits until a filled buffer can be dequeued, and
605re-enqueues the buffer when the data is no longer needed. Output
606applications fill and enqueue buffers, when enough buffers are stacked
607up output is started. In the write loop, when the application
608runs out of free buffers it must wait until an empty buffer can be
609dequeued and reused. Two methods exist to suspend execution of the
610application until one or more buffers can be dequeued. By default
611<constant>VIDIOC_DQBUF</constant> blocks when no buffer is in the
612outgoing queue. When the <constant>O_NONBLOCK</constant> flag was
613given to the &func-open; function, <constant>VIDIOC_DQBUF</constant>
614returns immediately with an &EAGAIN; when no buffer is available. The
615&func-select; and &func-poll; functions are always available.</para>
616
617 <para>To start and stop capturing or displaying applications call the
618&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctls. Note that
619<constant>VIDIOC_STREAMOFF</constant> removes all buffers from both queues and
620unlocks all buffers as a side effect. Since there is no notion of doing
621anything "now" on a multitasking system, if an application needs to synchronize
622with another event it should examine the &v4l2-buffer;
623<structfield>timestamp</structfield> of captured buffers, or set the field
624before enqueuing buffers for output.</para>
625
626 <para>Drivers implementing DMABUF importing I/O must support the
627<constant>VIDIOC_REQBUFS</constant>, <constant>VIDIOC_QBUF</constant>,
628<constant>VIDIOC_DQBUF</constant>, <constant>VIDIOC_STREAMON</constant> and
629<constant>VIDIOC_STREAMOFF</constant> ioctls, and the
630<function>select()</function> and <function>poll()</function> functions.</para>
631
632 </section>
633
475 <section id="async"> 634 <section id="async">
476 <title>Asynchronous I/O</title> 635 <title>Asynchronous I/O</title>
477 636
@@ -582,17 +741,19 @@ applications when an output stream.</entry>
582 <entry>struct timeval</entry> 741 <entry>struct timeval</entry>
583 <entry><structfield>timestamp</structfield></entry> 742 <entry><structfield>timestamp</structfield></entry>
584 <entry></entry> 743 <entry></entry>
585 <entry><para>For input streams this is the 744 <entry><para>For input streams this is time when the first data
586system time (as returned by the <function>gettimeofday()</function> 745 byte was captured, as returned by the
587function) when the first data byte was captured. For output streams 746 <function>clock_gettime()</function> function for the relevant
588the data will not be displayed before this time, secondary to the 747 clock id; see <constant>V4L2_BUF_FLAG_TIMESTAMP_*</constant> in
589nominal frame rate determined by the current video standard in 748 <xref linkend="buffer-flags" />. For output streams the data
590enqueued order. Applications can for example zero this field to 749 will not be displayed before this time, secondary to the nominal
591display frames as soon as possible. The driver stores the time at 750 frame rate determined by the current video standard in enqueued
592which the first data byte was actually sent out in the 751 order. Applications can for example zero this field to display
593<structfield>timestamp</structfield> field. This permits 752 frames as soon as possible. The driver stores the time at which
594applications to monitor the drift between the video and system 753 the first data byte was actually sent out in the
595clock.</para></entry> 754 <structfield>timestamp</structfield> field. This permits
755 applications to monitor the drift between the video and system
756 clock.</para></entry>
596 </row> 757 </row>
597 <row> 758 <row>
598 <entry>&v4l2-timecode;</entry> 759 <entry>&v4l2-timecode;</entry>
@@ -673,6 +834,14 @@ memory, set by the application. See <xref linkend="userp" /> for details.
673 <structname>v4l2_buffer</structname> structure.</entry> 834 <structname>v4l2_buffer</structname> structure.</entry>
674 </row> 835 </row>
675 <row> 836 <row>
837 <entry></entry>
838 <entry>int</entry>
839 <entry><structfield>fd</structfield></entry>
840 <entry>For the single-plane API and when
841<structfield>memory</structfield> is <constant>V4L2_MEMORY_DMABUF</constant> this
842is the file descriptor associated with a DMABUF buffer.</entry>
843 </row>
844 <row>
676 <entry>__u32</entry> 845 <entry>__u32</entry>
677 <entry><structfield>length</structfield></entry> 846 <entry><structfield>length</structfield></entry>
678 <entry></entry> 847 <entry></entry>
@@ -736,7 +905,7 @@ should set this to 0.</entry>
736 </row> 905 </row>
737 <row> 906 <row>
738 <entry></entry> 907 <entry></entry>
739 <entry>__unsigned long</entry> 908 <entry>unsigned long</entry>
740 <entry><structfield>userptr</structfield></entry> 909 <entry><structfield>userptr</structfield></entry>
741 <entry>When the memory type in the containing &v4l2-buffer; is 910 <entry>When the memory type in the containing &v4l2-buffer; is
742 <constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace 911 <constant>V4L2_MEMORY_USERPTR</constant>, this is a userspace
@@ -744,6 +913,15 @@ should set this to 0.</entry>
744 </entry> 913 </entry>
745 </row> 914 </row>
746 <row> 915 <row>
916 <entry></entry>
917 <entry>int</entry>
918 <entry><structfield>fd</structfield></entry>
919 <entry>When the memory type in the containing &v4l2-buffer; is
920 <constant>V4L2_MEMORY_DMABUF</constant>, this is a file
921 descriptor associated with a DMABUF buffer, similar to the
922 <structfield>fd</structfield> field in &v4l2-buffer;.</entry>
923 </row>
924 <row>
747 <entry>__u32</entry> 925 <entry>__u32</entry>
748 <entry><structfield>data_offset</structfield></entry> 926 <entry><structfield>data_offset</structfield></entry>
749 <entry></entry> 927 <entry></entry>
@@ -923,7 +1101,7 @@ application. Drivers set or clear this flag when the
923 </row> 1101 </row>
924 <row> 1102 <row>
925 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> 1103 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry>
926 <entry>0x0400</entry> 1104 <entry>0x0800</entry>
927 <entry>Caches do not have to be invalidated for this buffer. 1105 <entry>Caches do not have to be invalidated for this buffer.
928Typically applications shall use this flag if the data captured in the buffer 1106Typically applications shall use this flag if the data captured in the buffer
929is not going to be touched by the CPU, instead the buffer will, probably, be 1107is not going to be touched by the CPU, instead the buffer will, probably, be
@@ -932,12 +1110,41 @@ passed on to a DMA-capable hardware unit for further processing or output.
932 </row> 1110 </row>
933 <row> 1111 <row>
934 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> 1112 <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry>
935 <entry>0x0800</entry> 1113 <entry>0x1000</entry>
936 <entry>Caches do not have to be cleaned for this buffer. 1114 <entry>Caches do not have to be cleaned for this buffer.
937Typically applications shall use this flag for output buffers if the data 1115Typically applications shall use this flag for output buffers if the data
938in this buffer has not been created by the CPU but by some DMA-capable unit, 1116in this buffer has not been created by the CPU but by some DMA-capable unit,
939in which case caches have not been used.</entry> 1117in which case caches have not been used.</entry>
940 </row> 1118 </row>
1119 <row>
1120 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant></entry>
1121 <entry>0xe000</entry>
1122 <entry>Mask for timestamp types below. To test the
1123 timestamp type, mask out bits not belonging to timestamp
1124 type by performing a logical and operation with buffer
1125 flags and timestamp mask.</entry>
1126 </row>
1127 <row>
1128 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN</constant></entry>
1129 <entry>0x0000</entry>
1130 <entry>Unknown timestamp type. This type is used by
1131 drivers before Linux 3.9 and may be either monotonic (see
1132 below) or realtime (wall clock). Monotonic clock has been
1133 favoured in embedded systems whereas most of the drivers
1134 use the realtime clock. Either kinds of timestamps are
1135 available in user space via
1136 <function>clock_gettime(2)</function> using clock IDs
1137 <constant>CLOCK_MONOTONIC</constant> and
1138 <constant>CLOCK_REALTIME</constant>, respectively.</entry>
1139 </row>
1140 <row>
1141 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC</constant></entry>
1142 <entry>0x2000</entry>
1143 <entry>The buffer timestamp has been taken from the
1144 <constant>CLOCK_MONOTONIC</constant> clock. To access the
1145 same clock outside V4L2, use
1146 <function>clock_gettime(2)</function> .</entry>
1147 </row>
941 </tbody> 1148 </tbody>
942 </tgroup> 1149 </tgroup>
943 </table> 1150 </table>
@@ -964,6 +1171,12 @@ pointer</link> I/O.</entry>
964 <entry>3</entry> 1171 <entry>3</entry>
965 <entry>[to do]</entry> 1172 <entry>[to do]</entry>
966 </row> 1173 </row>
1174 <row>
1175 <entry><constant>V4L2_MEMORY_DMABUF</constant></entry>
1176 <entry>4</entry>
1177 <entry>The buffer is used for <link linkend="dmabuf">DMA shared
1178buffer</link> I/O.</entry>
1179 </row>
967 </tbody> 1180 </tbody>
968 </tgroup> 1181 </tgroup>
969 </table> 1182 </table>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
index a990b34d911a..f3a3d459fcdf 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
@@ -6,7 +6,7 @@
6 <refnamediv> 6 <refnamediv>
7 <refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname> 7 <refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname>
8 <refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname> 8 <refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname>
9 <refname id="V4L2-PIX-FMT-NV12MT_16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname> 9 <refname id="V4L2-PIX-FMT-NV12MT-16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname>
10 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes 10 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes
11 non contiguous in memory. </refpurpose> 11 non contiguous in memory. </refpurpose>
12 </refnamediv> 12 </refnamediv>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
new file mode 100644
index 000000000000..29acc2098cc2
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
@@ -0,0 +1,34 @@
1 <refentry>
2 <refmeta>
3 <refentrytitle>
4 V4L2_PIX_FMT_SBGGR10ALAW8 ('aBA8'),
5 V4L2_PIX_FMT_SGBRG10ALAW8 ('aGA8'),
6 V4L2_PIX_FMT_SGRBG10ALAW8 ('agA8'),
7 V4L2_PIX_FMT_SRGGB10ALAW8 ('aRA8'),
8 </refentrytitle>
9 &manvol;
10 </refmeta>
11 <refnamediv>
12 <refname id="V4L2-PIX-FMT-SBGGR10ALAW8">
13 <constant>V4L2_PIX_FMT_SBGGR10ALAW8</constant>
14 </refname>
15 <refname id="V4L2-PIX-FMT-SGBRG10ALAW8">
16 <constant>V4L2_PIX_FMT_SGBRG10ALAW8</constant>
17 </refname>
18 <refname id="V4L2-PIX-FMT-SGRBG10ALAW8">
19 <constant>V4L2_PIX_FMT_SGRBG10ALAW8</constant>
20 </refname>
21 <refname id="V4L2-PIX-FMT-SRGGB10ALAW8">
22 <constant>V4L2_PIX_FMT_SRGGB10ALAW8</constant>
23 </refname>
24 <refpurpose>10-bit Bayer formats compressed to 8 bits</refpurpose>
25 </refnamediv>
26 <refsect1>
27 <title>Description</title>
28 <para>The following four pixel formats are raw sRGB / Bayer
29 formats with 10 bits per color compressed to 8 bits each,
30 using the A-LAW algorithm. Each color component consumes 8
31 bits of memory. In other respects this format is similar to
32 <xref linkend="V4L2-PIX-FMT-SRGGB8"></xref>.</para>
33 </refsect1>
34 </refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-uv8.xml b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
new file mode 100644
index 000000000000..c507c1f73cd0
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
@@ -0,0 +1,62 @@
1 <refentry id="V4L2-PIX-FMT-UV8">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_UV8 ('UV8')</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_UV8</constant></refname>
8 <refpurpose>UV plane interleaved</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12 <para>In this format there is no Y plane, Only CbCr plane. ie
13 (UV interleaved)</para>
14 <example>
15 <title>
16 <constant>V4L2_PIX_FMT_UV8</constant>
17 pixel image
18 </title>
19
20 <formalpara>
21 <title>Byte Order.</title>
22 <para>Each cell is one byte.
23 <informaltable frame="none">
24 <tgroup cols="5" align="center">
25 <colspec align="left" colwidth="2*" />
26 <tbody valign="top">
27 <row>
28 <entry>start&nbsp;+&nbsp;0:</entry>
29 <entry>Cb<subscript>00</subscript></entry>
30 <entry>Cr<subscript>00</subscript></entry>
31 <entry>Cb<subscript>01</subscript></entry>
32 <entry>Cr<subscript>01</subscript></entry>
33 </row>
34 <row>
35 <entry>start&nbsp;+&nbsp;4:</entry>
36 <entry>Cb<subscript>10</subscript></entry>
37 <entry>Cr<subscript>10</subscript></entry>
38 <entry>Cb<subscript>11</subscript></entry>
39 <entry>Cr<subscript>11</subscript></entry>
40 </row>
41 <row>
42 <entry>start&nbsp;+&nbsp;8:</entry>
43 <entry>Cb<subscript>20</subscript></entry>
44 <entry>Cr<subscript>20</subscript></entry>
45 <entry>Cb<subscript>21</subscript></entry>
46 <entry>Cr<subscript>21</subscript></entry>
47 </row>
48 <row>
49 <entry>start&nbsp;+&nbsp;12:</entry>
50 <entry>Cb<subscript>30</subscript></entry>
51 <entry>Cr<subscript>30</subscript></entry>
52 <entry>Cb<subscript>31</subscript></entry>
53 <entry>Cr<subscript>31</subscript></entry>
54 </row>
55 </tbody>
56 </tgroup>
57 </informaltable>
58 </para>
59 </formalpara>
60 </example>
61 </refsect1>
62 </refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index bf94f417592c..99b8d2ad6e4f 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -673,6 +673,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
673 &sub-srggb8; 673 &sub-srggb8;
674 &sub-sbggr16; 674 &sub-sbggr16;
675 &sub-srggb10; 675 &sub-srggb10;
676 &sub-srggb10alaw8;
676 &sub-srggb10dpcm8; 677 &sub-srggb10dpcm8;
677 &sub-srggb12; 678 &sub-srggb12;
678 </section> 679 </section>
@@ -701,6 +702,7 @@ information.</para>
701 &sub-y12; 702 &sub-y12;
702 &sub-y10b; 703 &sub-y10b;
703 &sub-y16; 704 &sub-y16;
705 &sub-uv8;
704 &sub-yuyv; 706 &sub-yuyv;
705 &sub-uyvy; 707 &sub-uyvy;
706 &sub-yvyu; 708 &sub-yvyu;
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
index a0a936455fae..cc51372ed5e0 100644
--- a/Documentation/DocBook/media/v4l/subdev-formats.xml
+++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
@@ -353,9 +353,9 @@
353 <listitem><para>The number of bits per pixel component. All components are 353 <listitem><para>The number of bits per pixel component. All components are
354 transferred on the same number of bits. Common values are 8, 10 and 12.</para> 354 transferred on the same number of bits. Common values are 8, 10 and 12.</para>
355 </listitem> 355 </listitem>
356 <listitem><para>If the pixel components are DPCM-compressed, a mention of the 356 <listitem><para>The compression (optional). If the pixel components are
357 DPCM compression and the number of bits per compressed pixel component.</para> 357 ALAW- or DPCM-compressed, a mention of the compression scheme and the
358 </listitem> 358 number of bits per compressed pixel component.</para></listitem>
359 <listitem><para>The number of bus samples per pixel. Pixels that are wider than 359 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
360 the bus width must be transferred in multiple samples. Common values are 360 the bus width must be transferred in multiple samples. Common values are
361 1 and 2.</para></listitem> 361 1 and 2.</para></listitem>
@@ -504,6 +504,74 @@
504 <entry>r<subscript>1</subscript></entry> 504 <entry>r<subscript>1</subscript></entry>
505 <entry>r<subscript>0</subscript></entry> 505 <entry>r<subscript>0</subscript></entry>
506 </row> 506 </row>
507 <row id="V4L2-MBUS-FMT-SBGGR10-ALAW8-1X8">
508 <entry>V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8</entry>
509 <entry>0x3015</entry>
510 <entry></entry>
511 <entry>-</entry>
512 <entry>-</entry>
513 <entry>-</entry>
514 <entry>-</entry>
515 <entry>b<subscript>7</subscript></entry>
516 <entry>b<subscript>6</subscript></entry>
517 <entry>b<subscript>5</subscript></entry>
518 <entry>b<subscript>4</subscript></entry>
519 <entry>b<subscript>3</subscript></entry>
520 <entry>b<subscript>2</subscript></entry>
521 <entry>b<subscript>1</subscript></entry>
522 <entry>b<subscript>0</subscript></entry>
523 </row>
524 <row id="V4L2-MBUS-FMT-SGBRG10-ALAW8-1X8">
525 <entry>V4L2_MBUS_FMT_SGBRG10_ALAW8_1X8</entry>
526 <entry>0x3016</entry>
527 <entry></entry>
528 <entry>-</entry>
529 <entry>-</entry>
530 <entry>-</entry>
531 <entry>-</entry>
532 <entry>g<subscript>7</subscript></entry>
533 <entry>g<subscript>6</subscript></entry>
534 <entry>g<subscript>5</subscript></entry>
535 <entry>g<subscript>4</subscript></entry>
536 <entry>g<subscript>3</subscript></entry>
537 <entry>g<subscript>2</subscript></entry>
538 <entry>g<subscript>1</subscript></entry>
539 <entry>g<subscript>0</subscript></entry>
540 </row>
541 <row id="V4L2-MBUS-FMT-SGRBG10-ALAW8-1X8">
542 <entry>V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8</entry>
543 <entry>0x3017</entry>
544 <entry></entry>
545 <entry>-</entry>
546 <entry>-</entry>
547 <entry>-</entry>
548 <entry>-</entry>
549 <entry>g<subscript>7</subscript></entry>
550 <entry>g<subscript>6</subscript></entry>
551 <entry>g<subscript>5</subscript></entry>
552 <entry>g<subscript>4</subscript></entry>
553 <entry>g<subscript>3</subscript></entry>
554 <entry>g<subscript>2</subscript></entry>
555 <entry>g<subscript>1</subscript></entry>
556 <entry>g<subscript>0</subscript></entry>
557 </row>
558 <row id="V4L2-MBUS-FMT-SRGGB10-ALAW8-1X8">
559 <entry>V4L2_MBUS_FMT_SRGGB10_ALAW8_1X8</entry>
560 <entry>0x3018</entry>
561 <entry></entry>
562 <entry>-</entry>
563 <entry>-</entry>
564 <entry>-</entry>
565 <entry>-</entry>
566 <entry>r<subscript>7</subscript></entry>
567 <entry>r<subscript>6</subscript></entry>
568 <entry>r<subscript>5</subscript></entry>
569 <entry>r<subscript>4</subscript></entry>
570 <entry>r<subscript>3</subscript></entry>
571 <entry>r<subscript>2</subscript></entry>
572 <entry>r<subscript>1</subscript></entry>
573 <entry>r<subscript>0</subscript></entry>
574 </row>
507 <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8"> 575 <row id="V4L2-MBUS-FMT-SBGGR10-DPCM8-1X8">
508 <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry> 576 <entry>V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8</entry>
509 <entry>0x300b</entry> 577 <entry>0x300b</entry>
@@ -853,10 +921,16 @@
853 <title>Packed YUV Formats</title> 921 <title>Packed YUV Formats</title>
854 922
855 <para>Those data formats transfer pixel data as (possibly downsampled) Y, U 923 <para>Those data formats transfer pixel data as (possibly downsampled) Y, U
856 and V components. The format code is made of the following information. 924 and V components. Some formats include dummy bits in some of their samples
925 and are collectively referred to as "YDYC" (Y-Dummy-Y-Chroma) formats.
926 One cannot rely on the values of these dummy bits as those are undefined.
927 </para>
928 <para>The format code is made of the following information.
857 <itemizedlist> 929 <itemizedlist>
858 <listitem><para>The Y, U and V components order code, as transferred on the 930 <listitem><para>The Y, U and V components order code, as transferred on the
859 bus. Possible values are YUYV, UYVY, YVYU and VYUY.</para></listitem> 931 bus. Possible values are YUYV, UYVY, YVYU and VYUY for formats with no
932 dummy bit, and YDYUYDYV, YDYVYDYU, YUYDYVYD and YVYDYUYD for YDYC formats.
933 </para></listitem>
860 <listitem><para>The number of bits per pixel component. All components are 934 <listitem><para>The number of bits per pixel component. All components are
861 transferred on the same number of bits. Common values are 8, 10 and 12.</para> 935 transferred on the same number of bits. Common values are 8, 10 and 12.</para>
862 </listitem> 936 </listitem>
@@ -877,7 +951,21 @@
877 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>. 951 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>.
878 </para> 952 </para>
879 953
880 <para>The following table lisst existing packet YUV formats.</para> 954 <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> list existing packet YUV
955 formats and describes the organization of each pixel data in each sample.
956 When a format pattern is split across multiple samples each of the samples
957 in the pattern is described.</para>
958
959 <para>The role of each bit transferred over the bus is identified by one
960 of the following codes.</para>
961
962 <itemizedlist>
963 <listitem><para>y<subscript>x</subscript> for luma component bit number x</para></listitem>
964 <listitem><para>u<subscript>x</subscript> for blue chroma component bit number x</para></listitem>
965 <listitem><para>v<subscript>x</subscript> for red chroma component bit number x</para></listitem>
966 <listitem><para>- for non-available bits (for positions higher than the bus width)</para></listitem>
967 <listitem><para>d for dummy bits</para></listitem>
968 </itemizedlist>
881 969
882 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-yuv8"> 970 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-yuv8">
883 <title>YUV Formats</title> 971 <title>YUV Formats</title>
@@ -885,27 +973,37 @@
885 <colspec colname="id" align="left" /> 973 <colspec colname="id" align="left" />
886 <colspec colname="code" align="center"/> 974 <colspec colname="code" align="center"/>
887 <colspec colname="bit" /> 975 <colspec colname="bit" />
888 <colspec colnum="4" colname="b19" align="center" /> 976 <colspec colnum="4" colname="b29" align="center" />
889 <colspec colnum="5" colname="b18" align="center" /> 977 <colspec colnum="5" colname="b28" align="center" />
890 <colspec colnum="6" colname="b17" align="center" /> 978 <colspec colnum="6" colname="b27" align="center" />
891 <colspec colnum="7" colname="b16" align="center" /> 979 <colspec colnum="7" colname="b26" align="center" />
892 <colspec colnum="8" colname="b15" align="center" /> 980 <colspec colnum="8" colname="b25" align="center" />
893 <colspec colnum="9" colname="b14" align="center" /> 981 <colspec colnum="9" colname="b24" align="center" />
894 <colspec colnum="10" colname="b13" align="center" /> 982 <colspec colnum="10" colname="b23" align="center" />
895 <colspec colnum="11" colname="b12" align="center" /> 983 <colspec colnum="11" colname="b22" align="center" />
896 <colspec colnum="12" colname="b11" align="center" /> 984 <colspec colnum="12" colname="b21" align="center" />
897 <colspec colnum="13" colname="b10" align="center" /> 985 <colspec colnum="13" colname="b20" align="center" />
898 <colspec colnum="14" colname="b09" align="center" /> 986 <colspec colnum="14" colname="b19" align="center" />
899 <colspec colnum="15" colname="b08" align="center" /> 987 <colspec colnum="15" colname="b18" align="center" />
900 <colspec colnum="16" colname="b07" align="center" /> 988 <colspec colnum="16" colname="b17" align="center" />
901 <colspec colnum="17" colname="b06" align="center" /> 989 <colspec colnum="17" colname="b16" align="center" />
902 <colspec colnum="18" colname="b05" align="center" /> 990 <colspec colnum="18" colname="b15" align="center" />
903 <colspec colnum="19" colname="b04" align="center" /> 991 <colspec colnum="19" colname="b14" align="center" />
904 <colspec colnum="20" colname="b03" align="center" /> 992 <colspec colnum="20" colname="b13" align="center" />
905 <colspec colnum="21" colname="b02" align="center" /> 993 <colspec colnum="21" colname="b12" align="center" />
906 <colspec colnum="22" colname="b01" align="center" /> 994 <colspec colnum="22" colname="b11" align="center" />
907 <colspec colnum="23" colname="b00" align="center" /> 995 <colspec colnum="23" colname="b10" align="center" />
908 <spanspec namest="b19" nameend="b00" spanname="b0" /> 996 <colspec colnum="24" colname="b09" align="center" />
997 <colspec colnum="25" colname="b08" align="center" />
998 <colspec colnum="26" colname="b07" align="center" />
999 <colspec colnum="27" colname="b06" align="center" />
1000 <colspec colnum="28" colname="b05" align="center" />
1001 <colspec colnum="29" colname="b04" align="center" />
1002 <colspec colnum="30" colname="b03" align="center" />
1003 <colspec colnum="31" colname="b02" align="center" />
1004 <colspec colnum="32" colname="b01" align="center" />
1005 <colspec colnum="33" colname="b00" align="center" />
1006 <spanspec namest="b29" nameend="b00" spanname="b0" />
909 <thead> 1007 <thead>
910 <row> 1008 <row>
911 <entry>Identifier</entry> 1009 <entry>Identifier</entry>
@@ -917,6 +1015,16 @@
917 <entry></entry> 1015 <entry></entry>
918 <entry></entry> 1016 <entry></entry>
919 <entry>Bit</entry> 1017 <entry>Bit</entry>
1018 <entry>29</entry>
1019 <entry>28</entry>
1020 <entry>27</entry>
1021 <entry>26</entry>
1022 <entry>25</entry>
1023 <entry>24</entry>
1024 <entry>23</entry>
1025 <entry>22</entry>
1026 <entry>21</entry>
1027 <entry>10</entry>
920 <entry>19</entry> 1028 <entry>19</entry>
921 <entry>18</entry> 1029 <entry>18</entry>
922 <entry>17</entry> 1030 <entry>17</entry>
@@ -944,16 +1052,8 @@
944 <entry>V4L2_MBUS_FMT_Y8_1X8</entry> 1052 <entry>V4L2_MBUS_FMT_Y8_1X8</entry>
945 <entry>0x2001</entry> 1053 <entry>0x2001</entry>
946 <entry></entry> 1054 <entry></entry>
947 <entry>-</entry> 1055 &dash-ent-10;
948 <entry>-</entry> 1056 &dash-ent-10;
949 <entry>-</entry>
950 <entry>-</entry>
951 <entry>-</entry>
952 <entry>-</entry>
953 <entry>-</entry>
954 <entry>-</entry>
955 <entry>-</entry>
956 <entry>-</entry>
957 <entry>-</entry> 1057 <entry>-</entry>
958 <entry>-</entry> 1058 <entry>-</entry>
959 <entry>y<subscript>7</subscript></entry> 1059 <entry>y<subscript>7</subscript></entry>
@@ -965,9 +1065,9 @@
965 <entry>y<subscript>1</subscript></entry> 1065 <entry>y<subscript>1</subscript></entry>
966 <entry>y<subscript>0</subscript></entry> 1066 <entry>y<subscript>0</subscript></entry>
967 </row> 1067 </row>
968 <row id="V4L2-MBUS-FMT-UYVY8-1_5X8"> 1068 <row id="V4L2-MBUS-FMT-UV8-1X8">
969 <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry> 1069 <entry>V4L2_MBUS_FMT_UV8_1X8</entry>
970 <entry>0x2002</entry> 1070 <entry>0x2015</entry>
971 <entry></entry> 1071 <entry></entry>
972 <entry>-</entry> 1072 <entry>-</entry>
973 <entry>-</entry> 1073 <entry>-</entry>
@@ -1006,6 +1106,40 @@
1006 <entry>-</entry> 1106 <entry>-</entry>
1007 <entry>-</entry> 1107 <entry>-</entry>
1008 <entry>-</entry> 1108 <entry>-</entry>
1109 <entry>v<subscript>7</subscript></entry>
1110 <entry>v<subscript>6</subscript></entry>
1111 <entry>v<subscript>5</subscript></entry>
1112 <entry>v<subscript>4</subscript></entry>
1113 <entry>v<subscript>3</subscript></entry>
1114 <entry>v<subscript>2</subscript></entry>
1115 <entry>v<subscript>1</subscript></entry>
1116 <entry>v<subscript>0</subscript></entry>
1117 </row>
1118 <row id="V4L2-MBUS-FMT-UYVY8-1_5X8">
1119 <entry>V4L2_MBUS_FMT_UYVY8_1_5X8</entry>
1120 <entry>0x2002</entry>
1121 <entry></entry>
1122 &dash-ent-10;
1123 &dash-ent-10;
1124 <entry>-</entry>
1125 <entry>-</entry>
1126 <entry>u<subscript>7</subscript></entry>
1127 <entry>u<subscript>6</subscript></entry>
1128 <entry>u<subscript>5</subscript></entry>
1129 <entry>u<subscript>4</subscript></entry>
1130 <entry>u<subscript>3</subscript></entry>
1131 <entry>u<subscript>2</subscript></entry>
1132 <entry>u<subscript>1</subscript></entry>
1133 <entry>u<subscript>0</subscript></entry>
1134 </row>
1135 <row>
1136 <entry></entry>
1137 <entry></entry>
1138 <entry></entry>
1139 &dash-ent-10;
1140 &dash-ent-10;
1141 <entry>-</entry>
1142 <entry>-</entry>
1009 <entry>y<subscript>7</subscript></entry> 1143 <entry>y<subscript>7</subscript></entry>
1010 <entry>y<subscript>6</subscript></entry> 1144 <entry>y<subscript>6</subscript></entry>
1011 <entry>y<subscript>5</subscript></entry> 1145 <entry>y<subscript>5</subscript></entry>
@@ -1019,16 +1153,8 @@
1019 <entry></entry> 1153 <entry></entry>
1020 <entry></entry> 1154 <entry></entry>
1021 <entry></entry> 1155 <entry></entry>
1022 <entry>-</entry> 1156 &dash-ent-10;
1023 <entry>-</entry> 1157 &dash-ent-10;
1024 <entry>-</entry>
1025 <entry>-</entry>
1026 <entry>-</entry>
1027 <entry>-</entry>
1028 <entry>-</entry>
1029 <entry>-</entry>
1030 <entry>-</entry>
1031 <entry>-</entry>
1032 <entry>-</entry> 1158 <entry>-</entry>
1033 <entry>-</entry> 1159 <entry>-</entry>
1034 <entry>y<subscript>7</subscript></entry> 1160 <entry>y<subscript>7</subscript></entry>
@@ -1044,16 +1170,8 @@
1044 <entry></entry> 1170 <entry></entry>
1045 <entry></entry> 1171 <entry></entry>
1046 <entry></entry> 1172 <entry></entry>
1047 <entry>-</entry> 1173 &dash-ent-10;
1048 <entry>-</entry> 1174 &dash-ent-10;
1049 <entry>-</entry>
1050 <entry>-</entry>
1051 <entry>-</entry>
1052 <entry>-</entry>
1053 <entry>-</entry>
1054 <entry>-</entry>
1055 <entry>-</entry>
1056 <entry>-</entry>
1057 <entry>-</entry> 1175 <entry>-</entry>
1058 <entry>-</entry> 1176 <entry>-</entry>
1059 <entry>v<subscript>7</subscript></entry> 1177 <entry>v<subscript>7</subscript></entry>
@@ -1069,16 +1187,8 @@
1069 <entry></entry> 1187 <entry></entry>
1070 <entry></entry> 1188 <entry></entry>
1071 <entry></entry> 1189 <entry></entry>
1072 <entry>-</entry> 1190 &dash-ent-10;
1073 <entry>-</entry> 1191 &dash-ent-10;
1074 <entry>-</entry>
1075 <entry>-</entry>
1076 <entry>-</entry>
1077 <entry>-</entry>
1078 <entry>-</entry>
1079 <entry>-</entry>
1080 <entry>-</entry>
1081 <entry>-</entry>
1082 <entry>-</entry> 1192 <entry>-</entry>
1083 <entry>-</entry> 1193 <entry>-</entry>
1084 <entry>y<subscript>7</subscript></entry> 1194 <entry>y<subscript>7</subscript></entry>
@@ -1094,16 +1204,8 @@
1094 <entry></entry> 1204 <entry></entry>
1095 <entry></entry> 1205 <entry></entry>
1096 <entry></entry> 1206 <entry></entry>
1097 <entry>-</entry> 1207 &dash-ent-10;
1098 <entry>-</entry> 1208 &dash-ent-10;
1099 <entry>-</entry>
1100 <entry>-</entry>
1101 <entry>-</entry>
1102 <entry>-</entry>
1103 <entry>-</entry>
1104 <entry>-</entry>
1105 <entry>-</entry>
1106 <entry>-</entry>
1107 <entry>-</entry> 1209 <entry>-</entry>
1108 <entry>-</entry> 1210 <entry>-</entry>
1109 <entry>y<subscript>7</subscript></entry> 1211 <entry>y<subscript>7</subscript></entry>
@@ -1119,16 +1221,8 @@
1119 <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry> 1221 <entry>V4L2_MBUS_FMT_VYUY8_1_5X8</entry>
1120 <entry>0x2003</entry> 1222 <entry>0x2003</entry>
1121 <entry></entry> 1223 <entry></entry>
1122 <entry>-</entry> 1224 &dash-ent-10;
1123 <entry>-</entry> 1225 &dash-ent-10;
1124 <entry>-</entry>
1125 <entry>-</entry>
1126 <entry>-</entry>
1127 <entry>-</entry>
1128 <entry>-</entry>
1129 <entry>-</entry>
1130 <entry>-</entry>
1131 <entry>-</entry>
1132 <entry>-</entry> 1226 <entry>-</entry>
1133 <entry>-</entry> 1227 <entry>-</entry>
1134 <entry>v<subscript>7</subscript></entry> 1228 <entry>v<subscript>7</subscript></entry>
@@ -1144,16 +1238,8 @@
1144 <entry></entry> 1238 <entry></entry>
1145 <entry></entry> 1239 <entry></entry>
1146 <entry></entry> 1240 <entry></entry>
1147 <entry>-</entry> 1241 &dash-ent-10;
1148 <entry>-</entry> 1242 &dash-ent-10;
1149 <entry>-</entry>
1150 <entry>-</entry>
1151 <entry>-</entry>
1152 <entry>-</entry>
1153 <entry>-</entry>
1154 <entry>-</entry>
1155 <entry>-</entry>
1156 <entry>-</entry>
1157 <entry>-</entry> 1243 <entry>-</entry>
1158 <entry>-</entry> 1244 <entry>-</entry>
1159 <entry>y<subscript>7</subscript></entry> 1245 <entry>y<subscript>7</subscript></entry>
@@ -1169,16 +1255,8 @@
1169 <entry></entry> 1255 <entry></entry>
1170 <entry></entry> 1256 <entry></entry>
1171 <entry></entry> 1257 <entry></entry>
1172 <entry>-</entry> 1258 &dash-ent-10;
1173 <entry>-</entry> 1259 &dash-ent-10;
1174 <entry>-</entry>
1175 <entry>-</entry>
1176 <entry>-</entry>
1177 <entry>-</entry>
1178 <entry>-</entry>
1179 <entry>-</entry>
1180 <entry>-</entry>
1181 <entry>-</entry>
1182 <entry>-</entry> 1260 <entry>-</entry>
1183 <entry>-</entry> 1261 <entry>-</entry>
1184 <entry>y<subscript>7</subscript></entry> 1262 <entry>y<subscript>7</subscript></entry>
@@ -1194,16 +1272,8 @@
1194 <entry></entry> 1272 <entry></entry>
1195 <entry></entry> 1273 <entry></entry>
1196 <entry></entry> 1274 <entry></entry>
1197 <entry>-</entry> 1275 &dash-ent-10;
1198 <entry>-</entry> 1276 &dash-ent-10;
1199 <entry>-</entry>
1200 <entry>-</entry>
1201 <entry>-</entry>
1202 <entry>-</entry>
1203 <entry>-</entry>
1204 <entry>-</entry>
1205 <entry>-</entry>
1206 <entry>-</entry>
1207 <entry>-</entry> 1277 <entry>-</entry>
1208 <entry>-</entry> 1278 <entry>-</entry>
1209 <entry>u<subscript>7</subscript></entry> 1279 <entry>u<subscript>7</subscript></entry>
@@ -1219,16 +1289,8 @@
1219 <entry></entry> 1289 <entry></entry>
1220 <entry></entry> 1290 <entry></entry>
1221 <entry></entry> 1291 <entry></entry>
1222 <entry>-</entry> 1292 &dash-ent-10;
1223 <entry>-</entry> 1293 &dash-ent-10;
1224 <entry>-</entry>
1225 <entry>-</entry>
1226 <entry>-</entry>
1227 <entry>-</entry>
1228 <entry>-</entry>
1229 <entry>-</entry>
1230 <entry>-</entry>
1231 <entry>-</entry>
1232 <entry>-</entry> 1294 <entry>-</entry>
1233 <entry>-</entry> 1295 <entry>-</entry>
1234 <entry>y<subscript>7</subscript></entry> 1296 <entry>y<subscript>7</subscript></entry>
@@ -1244,16 +1306,8 @@
1244 <entry></entry> 1306 <entry></entry>
1245 <entry></entry> 1307 <entry></entry>
1246 <entry></entry> 1308 <entry></entry>
1247 <entry>-</entry> 1309 &dash-ent-10;
1248 <entry>-</entry> 1310 &dash-ent-10;
1249 <entry>-</entry>
1250 <entry>-</entry>
1251 <entry>-</entry>
1252 <entry>-</entry>
1253 <entry>-</entry>
1254 <entry>-</entry>
1255 <entry>-</entry>
1256 <entry>-</entry>
1257 <entry>-</entry> 1311 <entry>-</entry>
1258 <entry>-</entry> 1312 <entry>-</entry>
1259 <entry>y<subscript>7</subscript></entry> 1313 <entry>y<subscript>7</subscript></entry>
@@ -1269,16 +1323,8 @@
1269 <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry> 1323 <entry>V4L2_MBUS_FMT_YUYV8_1_5X8</entry>
1270 <entry>0x2004</entry> 1324 <entry>0x2004</entry>
1271 <entry></entry> 1325 <entry></entry>
1272 <entry>-</entry> 1326 &dash-ent-10;
1273 <entry>-</entry> 1327 &dash-ent-10;
1274 <entry>-</entry>
1275 <entry>-</entry>
1276 <entry>-</entry>
1277 <entry>-</entry>
1278 <entry>-</entry>
1279 <entry>-</entry>
1280 <entry>-</entry>
1281 <entry>-</entry>
1282 <entry>-</entry> 1328 <entry>-</entry>
1283 <entry>-</entry> 1329 <entry>-</entry>
1284 <entry>y<subscript>7</subscript></entry> 1330 <entry>y<subscript>7</subscript></entry>
@@ -1294,16 +1340,8 @@
1294 <entry></entry> 1340 <entry></entry>
1295 <entry></entry> 1341 <entry></entry>
1296 <entry></entry> 1342 <entry></entry>
1297 <entry>-</entry> 1343 &dash-ent-10;
1298 <entry>-</entry> 1344 &dash-ent-10;
1299 <entry>-</entry>
1300 <entry>-</entry>
1301 <entry>-</entry>
1302 <entry>-</entry>
1303 <entry>-</entry>
1304 <entry>-</entry>
1305 <entry>-</entry>
1306 <entry>-</entry>
1307 <entry>-</entry> 1345 <entry>-</entry>
1308 <entry>-</entry> 1346 <entry>-</entry>
1309 <entry>y<subscript>7</subscript></entry> 1347 <entry>y<subscript>7</subscript></entry>
@@ -1319,16 +1357,8 @@
1319 <entry></entry> 1357 <entry></entry>
1320 <entry></entry> 1358 <entry></entry>
1321 <entry></entry> 1359 <entry></entry>
1322 <entry>-</entry> 1360 &dash-ent-10;
1323 <entry>-</entry> 1361 &dash-ent-10;
1324 <entry>-</entry>
1325 <entry>-</entry>
1326 <entry>-</entry>
1327 <entry>-</entry>
1328 <entry>-</entry>
1329 <entry>-</entry>
1330 <entry>-</entry>
1331 <entry>-</entry>
1332 <entry>-</entry> 1362 <entry>-</entry>
1333 <entry>-</entry> 1363 <entry>-</entry>
1334 <entry>u<subscript>7</subscript></entry> 1364 <entry>u<subscript>7</subscript></entry>
@@ -1344,16 +1374,8 @@
1344 <entry></entry> 1374 <entry></entry>
1345 <entry></entry> 1375 <entry></entry>
1346 <entry></entry> 1376 <entry></entry>
1347 <entry>-</entry> 1377 &dash-ent-10;
1348 <entry>-</entry> 1378 &dash-ent-10;
1349 <entry>-</entry>
1350 <entry>-</entry>
1351 <entry>-</entry>
1352 <entry>-</entry>
1353 <entry>-</entry>
1354 <entry>-</entry>
1355 <entry>-</entry>
1356 <entry>-</entry>
1357 <entry>-</entry> 1379 <entry>-</entry>
1358 <entry>-</entry> 1380 <entry>-</entry>
1359 <entry>y<subscript>7</subscript></entry> 1381 <entry>y<subscript>7</subscript></entry>
@@ -1369,16 +1391,8 @@
1369 <entry></entry> 1391 <entry></entry>
1370 <entry></entry> 1392 <entry></entry>
1371 <entry></entry> 1393 <entry></entry>
1372 <entry>-</entry> 1394 &dash-ent-10;
1373 <entry>-</entry> 1395 &dash-ent-10;
1374 <entry>-</entry>
1375 <entry>-</entry>
1376 <entry>-</entry>
1377 <entry>-</entry>
1378 <entry>-</entry>
1379 <entry>-</entry>
1380 <entry>-</entry>
1381 <entry>-</entry>
1382 <entry>-</entry> 1396 <entry>-</entry>
1383 <entry>-</entry> 1397 <entry>-</entry>
1384 <entry>y<subscript>7</subscript></entry> 1398 <entry>y<subscript>7</subscript></entry>
@@ -1394,16 +1408,8 @@
1394 <entry></entry> 1408 <entry></entry>
1395 <entry></entry> 1409 <entry></entry>
1396 <entry></entry> 1410 <entry></entry>
1397 <entry>-</entry> 1411 &dash-ent-10;
1398 <entry>-</entry> 1412 &dash-ent-10;
1399 <entry>-</entry>
1400 <entry>-</entry>
1401 <entry>-</entry>
1402 <entry>-</entry>
1403 <entry>-</entry>
1404 <entry>-</entry>
1405 <entry>-</entry>
1406 <entry>-</entry>
1407 <entry>-</entry> 1413 <entry>-</entry>
1408 <entry>-</entry> 1414 <entry>-</entry>
1409 <entry>v<subscript>7</subscript></entry> 1415 <entry>v<subscript>7</subscript></entry>
@@ -1419,16 +1425,8 @@
1419 <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry> 1425 <entry>V4L2_MBUS_FMT_YVYU8_1_5X8</entry>
1420 <entry>0x2005</entry> 1426 <entry>0x2005</entry>
1421 <entry></entry> 1427 <entry></entry>
1422 <entry>-</entry> 1428 &dash-ent-10;
1423 <entry>-</entry> 1429 &dash-ent-10;
1424 <entry>-</entry>
1425 <entry>-</entry>
1426 <entry>-</entry>
1427 <entry>-</entry>
1428 <entry>-</entry>
1429 <entry>-</entry>
1430 <entry>-</entry>
1431 <entry>-</entry>
1432 <entry>-</entry> 1430 <entry>-</entry>
1433 <entry>-</entry> 1431 <entry>-</entry>
1434 <entry>y<subscript>7</subscript></entry> 1432 <entry>y<subscript>7</subscript></entry>
@@ -1444,16 +1442,8 @@
1444 <entry></entry> 1442 <entry></entry>
1445 <entry></entry> 1443 <entry></entry>
1446 <entry></entry> 1444 <entry></entry>
1447 <entry>-</entry> 1445 &dash-ent-10;
1448 <entry>-</entry> 1446 &dash-ent-10;
1449 <entry>-</entry>
1450 <entry>-</entry>
1451 <entry>-</entry>
1452 <entry>-</entry>
1453 <entry>-</entry>
1454 <entry>-</entry>
1455 <entry>-</entry>
1456 <entry>-</entry>
1457 <entry>-</entry> 1447 <entry>-</entry>
1458 <entry>-</entry> 1448 <entry>-</entry>
1459 <entry>y<subscript>7</subscript></entry> 1449 <entry>y<subscript>7</subscript></entry>
@@ -1469,16 +1459,8 @@
1469 <entry></entry> 1459 <entry></entry>
1470 <entry></entry> 1460 <entry></entry>
1471 <entry></entry> 1461 <entry></entry>
1472 <entry>-</entry> 1462 &dash-ent-10;
1473 <entry>-</entry> 1463 &dash-ent-10;
1474 <entry>-</entry>
1475 <entry>-</entry>
1476 <entry>-</entry>
1477 <entry>-</entry>
1478 <entry>-</entry>
1479 <entry>-</entry>
1480 <entry>-</entry>
1481 <entry>-</entry>
1482 <entry>-</entry> 1464 <entry>-</entry>
1483 <entry>-</entry> 1465 <entry>-</entry>
1484 <entry>v<subscript>7</subscript></entry> 1466 <entry>v<subscript>7</subscript></entry>
@@ -1494,16 +1476,8 @@
1494 <entry></entry> 1476 <entry></entry>
1495 <entry></entry> 1477 <entry></entry>
1496 <entry></entry> 1478 <entry></entry>
1497 <entry>-</entry> 1479 &dash-ent-10;
1498 <entry>-</entry> 1480 &dash-ent-10;
1499 <entry>-</entry>
1500 <entry>-</entry>
1501 <entry>-</entry>
1502 <entry>-</entry>
1503 <entry>-</entry>
1504 <entry>-</entry>
1505 <entry>-</entry>
1506 <entry>-</entry>
1507 <entry>-</entry> 1481 <entry>-</entry>
1508 <entry>-</entry> 1482 <entry>-</entry>
1509 <entry>y<subscript>7</subscript></entry> 1483 <entry>y<subscript>7</subscript></entry>
@@ -1519,16 +1493,8 @@
1519 <entry></entry> 1493 <entry></entry>
1520 <entry></entry> 1494 <entry></entry>
1521 <entry></entry> 1495 <entry></entry>
1522 <entry>-</entry> 1496 &dash-ent-10;
1523 <entry>-</entry> 1497 &dash-ent-10;
1524 <entry>-</entry>
1525 <entry>-</entry>
1526 <entry>-</entry>
1527 <entry>-</entry>
1528 <entry>-</entry>
1529 <entry>-</entry>
1530 <entry>-</entry>
1531 <entry>-</entry>
1532 <entry>-</entry> 1498 <entry>-</entry>
1533 <entry>-</entry> 1499 <entry>-</entry>
1534 <entry>y<subscript>7</subscript></entry> 1500 <entry>y<subscript>7</subscript></entry>
@@ -1544,16 +1510,8 @@
1544 <entry></entry> 1510 <entry></entry>
1545 <entry></entry> 1511 <entry></entry>
1546 <entry></entry> 1512 <entry></entry>
1547 <entry>-</entry> 1513 &dash-ent-10;
1548 <entry>-</entry> 1514 &dash-ent-10;
1549 <entry>-</entry>
1550 <entry>-</entry>
1551 <entry>-</entry>
1552 <entry>-</entry>
1553 <entry>-</entry>
1554 <entry>-</entry>
1555 <entry>-</entry>
1556 <entry>-</entry>
1557 <entry>-</entry> 1515 <entry>-</entry>
1558 <entry>-</entry> 1516 <entry>-</entry>
1559 <entry>u<subscript>7</subscript></entry> 1517 <entry>u<subscript>7</subscript></entry>
@@ -1569,16 +1527,8 @@
1569 <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry> 1527 <entry>V4L2_MBUS_FMT_UYVY8_2X8</entry>
1570 <entry>0x2006</entry> 1528 <entry>0x2006</entry>
1571 <entry></entry> 1529 <entry></entry>
1572 <entry>-</entry> 1530 &dash-ent-10;
1573 <entry>-</entry> 1531 &dash-ent-10;
1574 <entry>-</entry>
1575 <entry>-</entry>
1576 <entry>-</entry>
1577 <entry>-</entry>
1578 <entry>-</entry>
1579 <entry>-</entry>
1580 <entry>-</entry>
1581 <entry>-</entry>
1582 <entry>-</entry> 1532 <entry>-</entry>
1583 <entry>-</entry> 1533 <entry>-</entry>
1584 <entry>u<subscript>7</subscript></entry> 1534 <entry>u<subscript>7</subscript></entry>
@@ -1594,16 +1544,8 @@
1594 <entry></entry> 1544 <entry></entry>
1595 <entry></entry> 1545 <entry></entry>
1596 <entry></entry> 1546 <entry></entry>
1597 <entry>-</entry> 1547 &dash-ent-10;
1598 <entry>-</entry> 1548 &dash-ent-10;
1599 <entry>-</entry>
1600 <entry>-</entry>
1601 <entry>-</entry>
1602 <entry>-</entry>
1603 <entry>-</entry>
1604 <entry>-</entry>
1605 <entry>-</entry>
1606 <entry>-</entry>
1607 <entry>-</entry> 1549 <entry>-</entry>
1608 <entry>-</entry> 1550 <entry>-</entry>
1609 <entry>y<subscript>7</subscript></entry> 1551 <entry>y<subscript>7</subscript></entry>
@@ -1619,16 +1561,8 @@
1619 <entry></entry> 1561 <entry></entry>
1620 <entry></entry> 1562 <entry></entry>
1621 <entry></entry> 1563 <entry></entry>
1622 <entry>-</entry> 1564 &dash-ent-10;
1623 <entry>-</entry> 1565 &dash-ent-10;
1624 <entry>-</entry>
1625 <entry>-</entry>
1626 <entry>-</entry>
1627 <entry>-</entry>
1628 <entry>-</entry>
1629 <entry>-</entry>
1630 <entry>-</entry>
1631 <entry>-</entry>
1632 <entry>-</entry> 1566 <entry>-</entry>
1633 <entry>-</entry> 1567 <entry>-</entry>
1634 <entry>v<subscript>7</subscript></entry> 1568 <entry>v<subscript>7</subscript></entry>
@@ -1644,16 +1578,8 @@
1644 <entry></entry> 1578 <entry></entry>
1645 <entry></entry> 1579 <entry></entry>
1646 <entry></entry> 1580 <entry></entry>
1647 <entry>-</entry> 1581 &dash-ent-10;
1648 <entry>-</entry> 1582 &dash-ent-10;
1649 <entry>-</entry>
1650 <entry>-</entry>
1651 <entry>-</entry>
1652 <entry>-</entry>
1653 <entry>-</entry>
1654 <entry>-</entry>
1655 <entry>-</entry>
1656 <entry>-</entry>
1657 <entry>-</entry> 1583 <entry>-</entry>
1658 <entry>-</entry> 1584 <entry>-</entry>
1659 <entry>y<subscript>7</subscript></entry> 1585 <entry>y<subscript>7</subscript></entry>
@@ -1669,16 +1595,8 @@
1669 <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry> 1595 <entry>V4L2_MBUS_FMT_VYUY8_2X8</entry>
1670 <entry>0x2007</entry> 1596 <entry>0x2007</entry>
1671 <entry></entry> 1597 <entry></entry>
1672 <entry>-</entry> 1598 &dash-ent-10;
1673 <entry>-</entry> 1599 &dash-ent-10;
1674 <entry>-</entry>
1675 <entry>-</entry>
1676 <entry>-</entry>
1677 <entry>-</entry>
1678 <entry>-</entry>
1679 <entry>-</entry>
1680 <entry>-</entry>
1681 <entry>-</entry>
1682 <entry>-</entry> 1600 <entry>-</entry>
1683 <entry>-</entry> 1601 <entry>-</entry>
1684 <entry>v<subscript>7</subscript></entry> 1602 <entry>v<subscript>7</subscript></entry>
@@ -1694,16 +1612,8 @@
1694 <entry></entry> 1612 <entry></entry>
1695 <entry></entry> 1613 <entry></entry>
1696 <entry></entry> 1614 <entry></entry>
1697 <entry>-</entry> 1615 &dash-ent-10;
1698 <entry>-</entry> 1616 &dash-ent-10;
1699 <entry>-</entry>
1700 <entry>-</entry>
1701 <entry>-</entry>
1702 <entry>-</entry>
1703 <entry>-</entry>
1704 <entry>-</entry>
1705 <entry>-</entry>
1706 <entry>-</entry>
1707 <entry>-</entry> 1617 <entry>-</entry>
1708 <entry>-</entry> 1618 <entry>-</entry>
1709 <entry>y<subscript>7</subscript></entry> 1619 <entry>y<subscript>7</subscript></entry>
@@ -1719,16 +1629,8 @@
1719 <entry></entry> 1629 <entry></entry>
1720 <entry></entry> 1630 <entry></entry>
1721 <entry></entry> 1631 <entry></entry>
1722 <entry>-</entry> 1632 &dash-ent-10;
1723 <entry>-</entry> 1633 &dash-ent-10;
1724 <entry>-</entry>
1725 <entry>-</entry>
1726 <entry>-</entry>
1727 <entry>-</entry>
1728 <entry>-</entry>
1729 <entry>-</entry>
1730 <entry>-</entry>
1731 <entry>-</entry>
1732 <entry>-</entry> 1634 <entry>-</entry>
1733 <entry>-</entry> 1635 <entry>-</entry>
1734 <entry>u<subscript>7</subscript></entry> 1636 <entry>u<subscript>7</subscript></entry>
@@ -1744,16 +1646,8 @@
1744 <entry></entry> 1646 <entry></entry>
1745 <entry></entry> 1647 <entry></entry>
1746 <entry></entry> 1648 <entry></entry>
1747 <entry>-</entry> 1649 &dash-ent-10;
1748 <entry>-</entry> 1650 &dash-ent-10;
1749 <entry>-</entry>
1750 <entry>-</entry>
1751 <entry>-</entry>
1752 <entry>-</entry>
1753 <entry>-</entry>
1754 <entry>-</entry>
1755 <entry>-</entry>
1756 <entry>-</entry>
1757 <entry>-</entry> 1651 <entry>-</entry>
1758 <entry>-</entry> 1652 <entry>-</entry>
1759 <entry>y<subscript>7</subscript></entry> 1653 <entry>y<subscript>7</subscript></entry>
@@ -1769,16 +1663,8 @@
1769 <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry> 1663 <entry>V4L2_MBUS_FMT_YUYV8_2X8</entry>
1770 <entry>0x2008</entry> 1664 <entry>0x2008</entry>
1771 <entry></entry> 1665 <entry></entry>
1772 <entry>-</entry> 1666 &dash-ent-10;
1773 <entry>-</entry> 1667 &dash-ent-10;
1774 <entry>-</entry>
1775 <entry>-</entry>
1776 <entry>-</entry>
1777 <entry>-</entry>
1778 <entry>-</entry>
1779 <entry>-</entry>
1780 <entry>-</entry>
1781 <entry>-</entry>
1782 <entry>-</entry> 1668 <entry>-</entry>
1783 <entry>-</entry> 1669 <entry>-</entry>
1784 <entry>y<subscript>7</subscript></entry> 1670 <entry>y<subscript>7</subscript></entry>
@@ -1794,16 +1680,8 @@
1794 <entry></entry> 1680 <entry></entry>
1795 <entry></entry> 1681 <entry></entry>
1796 <entry></entry> 1682 <entry></entry>
1797 <entry>-</entry> 1683 &dash-ent-10;
1798 <entry>-</entry> 1684 &dash-ent-10;
1799 <entry>-</entry>
1800 <entry>-</entry>
1801 <entry>-</entry>
1802 <entry>-</entry>
1803 <entry>-</entry>
1804 <entry>-</entry>
1805 <entry>-</entry>
1806 <entry>-</entry>
1807 <entry>-</entry> 1685 <entry>-</entry>
1808 <entry>-</entry> 1686 <entry>-</entry>
1809 <entry>u<subscript>7</subscript></entry> 1687 <entry>u<subscript>7</subscript></entry>
@@ -1819,16 +1697,8 @@
1819 <entry></entry> 1697 <entry></entry>
1820 <entry></entry> 1698 <entry></entry>
1821 <entry></entry> 1699 <entry></entry>
1822 <entry>-</entry> 1700 &dash-ent-10;
1823 <entry>-</entry> 1701 &dash-ent-10;
1824 <entry>-</entry>
1825 <entry>-</entry>
1826 <entry>-</entry>
1827 <entry>-</entry>
1828 <entry>-</entry>
1829 <entry>-</entry>
1830 <entry>-</entry>
1831 <entry>-</entry>
1832 <entry>-</entry> 1702 <entry>-</entry>
1833 <entry>-</entry> 1703 <entry>-</entry>
1834 <entry>y<subscript>7</subscript></entry> 1704 <entry>y<subscript>7</subscript></entry>
@@ -1844,16 +1714,8 @@
1844 <entry></entry> 1714 <entry></entry>
1845 <entry></entry> 1715 <entry></entry>
1846 <entry></entry> 1716 <entry></entry>
1847 <entry>-</entry> 1717 &dash-ent-10;
1848 <entry>-</entry> 1718 &dash-ent-10;
1849 <entry>-</entry>
1850 <entry>-</entry>
1851 <entry>-</entry>
1852 <entry>-</entry>
1853 <entry>-</entry>
1854 <entry>-</entry>
1855 <entry>-</entry>
1856 <entry>-</entry>
1857 <entry>-</entry> 1719 <entry>-</entry>
1858 <entry>-</entry> 1720 <entry>-</entry>
1859 <entry>v<subscript>7</subscript></entry> 1721 <entry>v<subscript>7</subscript></entry>
@@ -1869,16 +1731,8 @@
1869 <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry> 1731 <entry>V4L2_MBUS_FMT_YVYU8_2X8</entry>
1870 <entry>0x2009</entry> 1732 <entry>0x2009</entry>
1871 <entry></entry> 1733 <entry></entry>
1872 <entry>-</entry> 1734 &dash-ent-10;
1873 <entry>-</entry> 1735 &dash-ent-10;
1874 <entry>-</entry>
1875 <entry>-</entry>
1876 <entry>-</entry>
1877 <entry>-</entry>
1878 <entry>-</entry>
1879 <entry>-</entry>
1880 <entry>-</entry>
1881 <entry>-</entry>
1882 <entry>-</entry> 1736 <entry>-</entry>
1883 <entry>-</entry> 1737 <entry>-</entry>
1884 <entry>y<subscript>7</subscript></entry> 1738 <entry>y<subscript>7</subscript></entry>
@@ -1894,16 +1748,8 @@
1894 <entry></entry> 1748 <entry></entry>
1895 <entry></entry> 1749 <entry></entry>
1896 <entry></entry> 1750 <entry></entry>
1897 <entry>-</entry> 1751 &dash-ent-10;
1898 <entry>-</entry> 1752 &dash-ent-10;
1899 <entry>-</entry>
1900 <entry>-</entry>
1901 <entry>-</entry>
1902 <entry>-</entry>
1903 <entry>-</entry>
1904 <entry>-</entry>
1905 <entry>-</entry>
1906 <entry>-</entry>
1907 <entry>-</entry> 1753 <entry>-</entry>
1908 <entry>-</entry> 1754 <entry>-</entry>
1909 <entry>v<subscript>7</subscript></entry> 1755 <entry>v<subscript>7</subscript></entry>
@@ -1919,16 +1765,8 @@
1919 <entry></entry> 1765 <entry></entry>
1920 <entry></entry> 1766 <entry></entry>
1921 <entry></entry> 1767 <entry></entry>
1922 <entry>-</entry> 1768 &dash-ent-10;
1923 <entry>-</entry> 1769 &dash-ent-10;
1924 <entry>-</entry>
1925 <entry>-</entry>
1926 <entry>-</entry>
1927 <entry>-</entry>
1928 <entry>-</entry>
1929 <entry>-</entry>
1930 <entry>-</entry>
1931 <entry>-</entry>
1932 <entry>-</entry> 1770 <entry>-</entry>
1933 <entry>-</entry> 1771 <entry>-</entry>
1934 <entry>y<subscript>7</subscript></entry> 1772 <entry>y<subscript>7</subscript></entry>
@@ -1944,16 +1782,8 @@
1944 <entry></entry> 1782 <entry></entry>
1945 <entry></entry> 1783 <entry></entry>
1946 <entry></entry> 1784 <entry></entry>
1947 <entry>-</entry> 1785 &dash-ent-10;
1948 <entry>-</entry> 1786 &dash-ent-10;
1949 <entry>-</entry>
1950 <entry>-</entry>
1951 <entry>-</entry>
1952 <entry>-</entry>
1953 <entry>-</entry>
1954 <entry>-</entry>
1955 <entry>-</entry>
1956 <entry>-</entry>
1957 <entry>-</entry> 1787 <entry>-</entry>
1958 <entry>-</entry> 1788 <entry>-</entry>
1959 <entry>u<subscript>7</subscript></entry> 1789 <entry>u<subscript>7</subscript></entry>
@@ -1969,16 +1799,8 @@
1969 <entry>V4L2_MBUS_FMT_Y10_1X10</entry> 1799 <entry>V4L2_MBUS_FMT_Y10_1X10</entry>
1970 <entry>0x200a</entry> 1800 <entry>0x200a</entry>
1971 <entry></entry> 1801 <entry></entry>
1972 <entry>-</entry> 1802 &dash-ent-10;
1973 <entry>-</entry> 1803 &dash-ent-10;
1974 <entry>-</entry>
1975 <entry>-</entry>
1976 <entry>-</entry>
1977 <entry>-</entry>
1978 <entry>-</entry>
1979 <entry>-</entry>
1980 <entry>-</entry>
1981 <entry>-</entry>
1982 <entry>y<subscript>9</subscript></entry> 1804 <entry>y<subscript>9</subscript></entry>
1983 <entry>y<subscript>8</subscript></entry> 1805 <entry>y<subscript>8</subscript></entry>
1984 <entry>y<subscript>7</subscript></entry> 1806 <entry>y<subscript>7</subscript></entry>
@@ -1994,16 +1816,8 @@
1994 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry> 1816 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry>
1995 <entry>0x200b</entry> 1817 <entry>0x200b</entry>
1996 <entry></entry> 1818 <entry></entry>
1997 <entry>-</entry> 1819 &dash-ent-10;
1998 <entry>-</entry> 1820 &dash-ent-10;
1999 <entry>-</entry>
2000 <entry>-</entry>
2001 <entry>-</entry>
2002 <entry>-</entry>
2003 <entry>-</entry>
2004 <entry>-</entry>
2005 <entry>-</entry>
2006 <entry>-</entry>
2007 <entry>y<subscript>9</subscript></entry> 1821 <entry>y<subscript>9</subscript></entry>
2008 <entry>y<subscript>8</subscript></entry> 1822 <entry>y<subscript>8</subscript></entry>
2009 <entry>y<subscript>7</subscript></entry> 1823 <entry>y<subscript>7</subscript></entry>
@@ -2019,16 +1833,8 @@
2019 <entry></entry> 1833 <entry></entry>
2020 <entry></entry> 1834 <entry></entry>
2021 <entry></entry> 1835 <entry></entry>
2022 <entry>-</entry> 1836 &dash-ent-10;
2023 <entry>-</entry> 1837 &dash-ent-10;
2024 <entry>-</entry>
2025 <entry>-</entry>
2026 <entry>-</entry>
2027 <entry>-</entry>
2028 <entry>-</entry>
2029 <entry>-</entry>
2030 <entry>-</entry>
2031 <entry>-</entry>
2032 <entry>u<subscript>9</subscript></entry> 1838 <entry>u<subscript>9</subscript></entry>
2033 <entry>u<subscript>8</subscript></entry> 1839 <entry>u<subscript>8</subscript></entry>
2034 <entry>u<subscript>7</subscript></entry> 1840 <entry>u<subscript>7</subscript></entry>
@@ -2044,16 +1850,8 @@
2044 <entry></entry> 1850 <entry></entry>
2045 <entry></entry> 1851 <entry></entry>
2046 <entry></entry> 1852 <entry></entry>
2047 <entry>-</entry> 1853 &dash-ent-10;
2048 <entry>-</entry> 1854 &dash-ent-10;
2049 <entry>-</entry>
2050 <entry>-</entry>
2051 <entry>-</entry>
2052 <entry>-</entry>
2053 <entry>-</entry>
2054 <entry>-</entry>
2055 <entry>-</entry>
2056 <entry>-</entry>
2057 <entry>y<subscript>9</subscript></entry> 1855 <entry>y<subscript>9</subscript></entry>
2058 <entry>y<subscript>8</subscript></entry> 1856 <entry>y<subscript>8</subscript></entry>
2059 <entry>y<subscript>7</subscript></entry> 1857 <entry>y<subscript>7</subscript></entry>
@@ -2069,16 +1867,8 @@
2069 <entry></entry> 1867 <entry></entry>
2070 <entry></entry> 1868 <entry></entry>
2071 <entry></entry> 1869 <entry></entry>
2072 <entry>-</entry> 1870 &dash-ent-10;
2073 <entry>-</entry> 1871 &dash-ent-10;
2074 <entry>-</entry>
2075 <entry>-</entry>
2076 <entry>-</entry>
2077 <entry>-</entry>
2078 <entry>-</entry>
2079 <entry>-</entry>
2080 <entry>-</entry>
2081 <entry>-</entry>
2082 <entry>v<subscript>9</subscript></entry> 1872 <entry>v<subscript>9</subscript></entry>
2083 <entry>v<subscript>8</subscript></entry> 1873 <entry>v<subscript>8</subscript></entry>
2084 <entry>v<subscript>7</subscript></entry> 1874 <entry>v<subscript>7</subscript></entry>
@@ -2094,16 +1884,8 @@
2094 <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry> 1884 <entry>V4L2_MBUS_FMT_YVYU10_2X10</entry>
2095 <entry>0x200c</entry> 1885 <entry>0x200c</entry>
2096 <entry></entry> 1886 <entry></entry>
2097 <entry>-</entry> 1887 &dash-ent-10;
2098 <entry>-</entry> 1888 &dash-ent-10;
2099 <entry>-</entry>
2100 <entry>-</entry>
2101 <entry>-</entry>
2102 <entry>-</entry>
2103 <entry>-</entry>
2104 <entry>-</entry>
2105 <entry>-</entry>
2106 <entry>-</entry>
2107 <entry>y<subscript>9</subscript></entry> 1889 <entry>y<subscript>9</subscript></entry>
2108 <entry>y<subscript>8</subscript></entry> 1890 <entry>y<subscript>8</subscript></entry>
2109 <entry>y<subscript>7</subscript></entry> 1891 <entry>y<subscript>7</subscript></entry>
@@ -2119,16 +1901,8 @@
2119 <entry></entry> 1901 <entry></entry>
2120 <entry></entry> 1902 <entry></entry>
2121 <entry></entry> 1903 <entry></entry>
2122 <entry>-</entry> 1904 &dash-ent-10;
2123 <entry>-</entry> 1905 &dash-ent-10;
2124 <entry>-</entry>
2125 <entry>-</entry>
2126 <entry>-</entry>
2127 <entry>-</entry>
2128 <entry>-</entry>
2129 <entry>-</entry>
2130 <entry>-</entry>
2131 <entry>-</entry>
2132 <entry>v<subscript>9</subscript></entry> 1906 <entry>v<subscript>9</subscript></entry>
2133 <entry>v<subscript>8</subscript></entry> 1907 <entry>v<subscript>8</subscript></entry>
2134 <entry>v<subscript>7</subscript></entry> 1908 <entry>v<subscript>7</subscript></entry>
@@ -2144,16 +1918,8 @@
2144 <entry></entry> 1918 <entry></entry>
2145 <entry></entry> 1919 <entry></entry>
2146 <entry></entry> 1920 <entry></entry>
2147 <entry>-</entry> 1921 &dash-ent-10;
2148 <entry>-</entry> 1922 &dash-ent-10;
2149 <entry>-</entry>
2150 <entry>-</entry>
2151 <entry>-</entry>
2152 <entry>-</entry>
2153 <entry>-</entry>
2154 <entry>-</entry>
2155 <entry>-</entry>
2156 <entry>-</entry>
2157 <entry>y<subscript>9</subscript></entry> 1923 <entry>y<subscript>9</subscript></entry>
2158 <entry>y<subscript>8</subscript></entry> 1924 <entry>y<subscript>8</subscript></entry>
2159 <entry>y<subscript>7</subscript></entry> 1925 <entry>y<subscript>7</subscript></entry>
@@ -2169,16 +1935,8 @@
2169 <entry></entry> 1935 <entry></entry>
2170 <entry></entry> 1936 <entry></entry>
2171 <entry></entry> 1937 <entry></entry>
2172 <entry>-</entry> 1938 &dash-ent-10;
2173 <entry>-</entry> 1939 &dash-ent-10;
2174 <entry>-</entry>
2175 <entry>-</entry>
2176 <entry>-</entry>
2177 <entry>-</entry>
2178 <entry>-</entry>
2179 <entry>-</entry>
2180 <entry>-</entry>
2181 <entry>-</entry>
2182 <entry>u<subscript>9</subscript></entry> 1940 <entry>u<subscript>9</subscript></entry>
2183 <entry>u<subscript>8</subscript></entry> 1941 <entry>u<subscript>8</subscript></entry>
2184 <entry>u<subscript>7</subscript></entry> 1942 <entry>u<subscript>7</subscript></entry>
@@ -2194,6 +1952,7 @@
2194 <entry>V4L2_MBUS_FMT_Y12_1X12</entry> 1952 <entry>V4L2_MBUS_FMT_Y12_1X12</entry>
2195 <entry>0x2013</entry> 1953 <entry>0x2013</entry>
2196 <entry></entry> 1954 <entry></entry>
1955 &dash-ent-10;
2197 <entry>-</entry> 1956 <entry>-</entry>
2198 <entry>-</entry> 1957 <entry>-</entry>
2199 <entry>-</entry> 1958 <entry>-</entry>
@@ -2219,6 +1978,7 @@
2219 <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry> 1978 <entry>V4L2_MBUS_FMT_UYVY8_1X16</entry>
2220 <entry>0x200f</entry> 1979 <entry>0x200f</entry>
2221 <entry></entry> 1980 <entry></entry>
1981 &dash-ent-10;
2222 <entry>-</entry> 1982 <entry>-</entry>
2223 <entry>-</entry> 1983 <entry>-</entry>
2224 <entry>-</entry> 1984 <entry>-</entry>
@@ -2244,6 +2004,7 @@
2244 <entry></entry> 2004 <entry></entry>
2245 <entry></entry> 2005 <entry></entry>
2246 <entry></entry> 2006 <entry></entry>
2007 &dash-ent-10;
2247 <entry>-</entry> 2008 <entry>-</entry>
2248 <entry>-</entry> 2009 <entry>-</entry>
2249 <entry>-</entry> 2010 <entry>-</entry>
@@ -2269,6 +2030,7 @@
2269 <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry> 2030 <entry>V4L2_MBUS_FMT_VYUY8_1X16</entry>
2270 <entry>0x2010</entry> 2031 <entry>0x2010</entry>
2271 <entry></entry> 2032 <entry></entry>
2033 &dash-ent-10;
2272 <entry>-</entry> 2034 <entry>-</entry>
2273 <entry>-</entry> 2035 <entry>-</entry>
2274 <entry>-</entry> 2036 <entry>-</entry>
@@ -2294,6 +2056,7 @@
2294 <entry></entry> 2056 <entry></entry>
2295 <entry></entry> 2057 <entry></entry>
2296 <entry></entry> 2058 <entry></entry>
2059 &dash-ent-10;
2297 <entry>-</entry> 2060 <entry>-</entry>
2298 <entry>-</entry> 2061 <entry>-</entry>
2299 <entry>-</entry> 2062 <entry>-</entry>
@@ -2319,6 +2082,7 @@
2319 <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry> 2082 <entry>V4L2_MBUS_FMT_YUYV8_1X16</entry>
2320 <entry>0x2011</entry> 2083 <entry>0x2011</entry>
2321 <entry></entry> 2084 <entry></entry>
2085 &dash-ent-10;
2322 <entry>-</entry> 2086 <entry>-</entry>
2323 <entry>-</entry> 2087 <entry>-</entry>
2324 <entry>-</entry> 2088 <entry>-</entry>
@@ -2344,6 +2108,7 @@
2344 <entry></entry> 2108 <entry></entry>
2345 <entry></entry> 2109 <entry></entry>
2346 <entry></entry> 2110 <entry></entry>
2111 &dash-ent-10;
2347 <entry>-</entry> 2112 <entry>-</entry>
2348 <entry>-</entry> 2113 <entry>-</entry>
2349 <entry>-</entry> 2114 <entry>-</entry>
@@ -2369,6 +2134,7 @@
2369 <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry> 2134 <entry>V4L2_MBUS_FMT_YVYU8_1X16</entry>
2370 <entry>0x2012</entry> 2135 <entry>0x2012</entry>
2371 <entry></entry> 2136 <entry></entry>
2137 &dash-ent-10;
2372 <entry>-</entry> 2138 <entry>-</entry>
2373 <entry>-</entry> 2139 <entry>-</entry>
2374 <entry>-</entry> 2140 <entry>-</entry>
@@ -2394,6 +2160,57 @@
2394 <entry></entry> 2160 <entry></entry>
2395 <entry></entry> 2161 <entry></entry>
2396 <entry></entry> 2162 <entry></entry>
2163 &dash-ent-10;
2164 <entry>-</entry>
2165 <entry>-</entry>
2166 <entry>-</entry>
2167 <entry>-</entry>
2168 <entry>y<subscript>7</subscript></entry>
2169 <entry>y<subscript>6</subscript></entry>
2170 <entry>y<subscript>5</subscript></entry>
2171 <entry>y<subscript>4</subscript></entry>
2172 <entry>y<subscript>3</subscript></entry>
2173 <entry>y<subscript>2</subscript></entry>
2174 <entry>y<subscript>1</subscript></entry>
2175 <entry>y<subscript>0</subscript></entry>
2176 <entry>u<subscript>7</subscript></entry>
2177 <entry>u<subscript>6</subscript></entry>
2178 <entry>u<subscript>5</subscript></entry>
2179 <entry>u<subscript>4</subscript></entry>
2180 <entry>u<subscript>3</subscript></entry>
2181 <entry>u<subscript>2</subscript></entry>
2182 <entry>u<subscript>1</subscript></entry>
2183 <entry>u<subscript>0</subscript></entry>
2184 </row>
2185 <row id="V4L2-MBUS-FMT-YDYUYDYV8-1X16">
2186 <entry>V4L2_MBUS_FMT_YDYUYDYV8_1X16</entry>
2187 <entry>0x2014</entry>
2188 <entry></entry>
2189 <entry>-</entry>
2190 <entry>-</entry>
2191 <entry>-</entry>
2192 <entry>-</entry>
2193 <entry>y<subscript>7</subscript></entry>
2194 <entry>y<subscript>6</subscript></entry>
2195 <entry>y<subscript>5</subscript></entry>
2196 <entry>y<subscript>4</subscript></entry>
2197 <entry>y<subscript>3</subscript></entry>
2198 <entry>y<subscript>2</subscript></entry>
2199 <entry>y<subscript>1</subscript></entry>
2200 <entry>y<subscript>0</subscript></entry>
2201 <entry>d</entry>
2202 <entry>d</entry>
2203 <entry>d</entry>
2204 <entry>d</entry>
2205 <entry>d</entry>
2206 <entry>d</entry>
2207 <entry>d</entry>
2208 <entry>d</entry>
2209 </row>
2210 <row>
2211 <entry></entry>
2212 <entry></entry>
2213 <entry></entry>
2397 <entry>-</entry> 2214 <entry>-</entry>
2398 <entry>-</entry> 2215 <entry>-</entry>
2399 <entry>-</entry> 2216 <entry>-</entry>
@@ -2415,10 +2232,61 @@
2415 <entry>u<subscript>1</subscript></entry> 2232 <entry>u<subscript>1</subscript></entry>
2416 <entry>u<subscript>0</subscript></entry> 2233 <entry>u<subscript>0</subscript></entry>
2417 </row> 2234 </row>
2235 <row>
2236 <entry></entry>
2237 <entry></entry>
2238 <entry></entry>
2239 <entry>-</entry>
2240 <entry>-</entry>
2241 <entry>-</entry>
2242 <entry>-</entry>
2243 <entry>y<subscript>7</subscript></entry>
2244 <entry>y<subscript>6</subscript></entry>
2245 <entry>y<subscript>5</subscript></entry>
2246 <entry>y<subscript>4</subscript></entry>
2247 <entry>y<subscript>3</subscript></entry>
2248 <entry>y<subscript>2</subscript></entry>
2249 <entry>y<subscript>1</subscript></entry>
2250 <entry>y<subscript>0</subscript></entry>
2251 <entry>d</entry>
2252 <entry>d</entry>
2253 <entry>d</entry>
2254 <entry>d</entry>
2255 <entry>d</entry>
2256 <entry>d</entry>
2257 <entry>d</entry>
2258 <entry>d</entry>
2259 </row>
2260 <row>
2261 <entry></entry>
2262 <entry></entry>
2263 <entry></entry>
2264 <entry>-</entry>
2265 <entry>-</entry>
2266 <entry>-</entry>
2267 <entry>-</entry>
2268 <entry>y<subscript>7</subscript></entry>
2269 <entry>y<subscript>6</subscript></entry>
2270 <entry>y<subscript>5</subscript></entry>
2271 <entry>y<subscript>4</subscript></entry>
2272 <entry>y<subscript>3</subscript></entry>
2273 <entry>y<subscript>2</subscript></entry>
2274 <entry>y<subscript>1</subscript></entry>
2275 <entry>y<subscript>0</subscript></entry>
2276 <entry>v<subscript>7</subscript></entry>
2277 <entry>v<subscript>6</subscript></entry>
2278 <entry>v<subscript>5</subscript></entry>
2279 <entry>v<subscript>4</subscript></entry>
2280 <entry>v<subscript>3</subscript></entry>
2281 <entry>v<subscript>2</subscript></entry>
2282 <entry>v<subscript>1</subscript></entry>
2283 <entry>v<subscript>0</subscript></entry>
2284 </row>
2418 <row id="V4L2-MBUS-FMT-YUYV10-1X20"> 2285 <row id="V4L2-MBUS-FMT-YUYV10-1X20">
2419 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry> 2286 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry>
2420 <entry>0x200d</entry> 2287 <entry>0x200d</entry>
2421 <entry></entry> 2288 <entry></entry>
2289 &dash-ent-10;
2422 <entry>y<subscript>9</subscript></entry> 2290 <entry>y<subscript>9</subscript></entry>
2423 <entry>y<subscript>8</subscript></entry> 2291 <entry>y<subscript>8</subscript></entry>
2424 <entry>y<subscript>7</subscript></entry> 2292 <entry>y<subscript>7</subscript></entry>
@@ -2444,6 +2312,7 @@
2444 <entry></entry> 2312 <entry></entry>
2445 <entry></entry> 2313 <entry></entry>
2446 <entry></entry> 2314 <entry></entry>
2315 &dash-ent-10;
2447 <entry>y<subscript>9</subscript></entry> 2316 <entry>y<subscript>9</subscript></entry>
2448 <entry>y<subscript>8</subscript></entry> 2317 <entry>y<subscript>8</subscript></entry>
2449 <entry>y<subscript>7</subscript></entry> 2318 <entry>y<subscript>7</subscript></entry>
@@ -2469,6 +2338,7 @@
2469 <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry> 2338 <entry>V4L2_MBUS_FMT_YVYU10_1X20</entry>
2470 <entry>0x200e</entry> 2339 <entry>0x200e</entry>
2471 <entry></entry> 2340 <entry></entry>
2341 &dash-ent-10;
2472 <entry>y<subscript>9</subscript></entry> 2342 <entry>y<subscript>9</subscript></entry>
2473 <entry>y<subscript>8</subscript></entry> 2343 <entry>y<subscript>8</subscript></entry>
2474 <entry>y<subscript>7</subscript></entry> 2344 <entry>y<subscript>7</subscript></entry>
@@ -2494,6 +2364,7 @@
2494 <entry></entry> 2364 <entry></entry>
2495 <entry></entry> 2365 <entry></entry>
2496 <entry></entry> 2366 <entry></entry>
2367 &dash-ent-10;
2497 <entry>y<subscript>9</subscript></entry> 2368 <entry>y<subscript>9</subscript></entry>
2498 <entry>y<subscript>8</subscript></entry> 2369 <entry>y<subscript>8</subscript></entry>
2499 <entry>y<subscript>7</subscript></entry> 2370 <entry>y<subscript>7</subscript></entry>
@@ -2515,6 +2386,41 @@
2515 <entry>u<subscript>1</subscript></entry> 2386 <entry>u<subscript>1</subscript></entry>
2516 <entry>u<subscript>0</subscript></entry> 2387 <entry>u<subscript>0</subscript></entry>
2517 </row> 2388 </row>
2389 <row id="V4L2-MBUS-FMT-YUV10-1X30">
2390 <entry>V4L2_MBUS_FMT_YUV10_1X30</entry>
2391 <entry>0x2014</entry>
2392 <entry></entry>
2393 <entry>y<subscript>9</subscript></entry>
2394 <entry>y<subscript>8</subscript></entry>
2395 <entry>y<subscript>7</subscript></entry>
2396 <entry>y<subscript>6</subscript></entry>
2397 <entry>y<subscript>5</subscript></entry>
2398 <entry>y<subscript>4</subscript></entry>
2399 <entry>y<subscript>3</subscript></entry>
2400 <entry>y<subscript>2</subscript></entry>
2401 <entry>y<subscript>1</subscript></entry>
2402 <entry>y<subscript>0</subscript></entry>
2403 <entry>u<subscript>9</subscript></entry>
2404 <entry>u<subscript>8</subscript></entry>
2405 <entry>u<subscript>7</subscript></entry>
2406 <entry>u<subscript>6</subscript></entry>
2407 <entry>u<subscript>5</subscript></entry>
2408 <entry>u<subscript>4</subscript></entry>
2409 <entry>u<subscript>3</subscript></entry>
2410 <entry>u<subscript>2</subscript></entry>
2411 <entry>u<subscript>1</subscript></entry>
2412 <entry>u<subscript>0</subscript></entry>
2413 <entry>v<subscript>9</subscript></entry>
2414 <entry>v<subscript>8</subscript></entry>
2415 <entry>v<subscript>7</subscript></entry>
2416 <entry>v<subscript>6</subscript></entry>
2417 <entry>v<subscript>5</subscript></entry>
2418 <entry>v<subscript>4</subscript></entry>
2419 <entry>v<subscript>3</subscript></entry>
2420 <entry>v<subscript>2</subscript></entry>
2421 <entry>v<subscript>1</subscript></entry>
2422 <entry>v<subscript>0</subscript></entry>
2423 </row>
2518 </tbody> 2424 </tbody>
2519 </tgroup> 2425 </tgroup>
2520 </table> 2426 </table>
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index 10ccde9d16d0..a3cce18384e9 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -140,6 +140,16 @@ structs, ioctls) must be noted in more detail in the history chapter
140applications. --> 140applications. -->
141 141
142 <revision> 142 <revision>
143 <revnumber>3.9</revnumber>
144 <date>2012-12-03</date>
145 <authorinitials>sa, sn</authorinitials>
146 <revremark>Added timestamp types to v4l2_buffer.
147 Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control
148 event changes flag, see <xref linkend="changes-flags"/>.
149 </revremark>
150 </revision>
151
152 <revision>
143 <revnumber>3.6</revnumber> 153 <revnumber>3.6</revnumber>
144 <date>2012-07-02</date> 154 <date>2012-07-02</date>
145 <authorinitials>hv</authorinitials> 155 <authorinitials>hv</authorinitials>
@@ -472,7 +482,7 @@ and discussions on the V4L mailing list.</revremark>
472</partinfo> 482</partinfo>
473 483
474<title>Video for Linux Two API Specification</title> 484<title>Video for Linux Two API Specification</title>
475 <subtitle>Revision 3.6</subtitle> 485 <subtitle>Revision 3.9</subtitle>
476 486
477 <chapter id="common"> 487 <chapter id="common">
478 &sub-common; 488 &sub-common;
@@ -543,6 +553,7 @@ and discussions on the V4L mailing list.</revremark>
543 &sub-enuminput; 553 &sub-enuminput;
544 &sub-enumoutput; 554 &sub-enumoutput;
545 &sub-enumstd; 555 &sub-enumstd;
556 &sub-expbuf;
546 &sub-g-audio; 557 &sub-g-audio;
547 &sub-g-audioout; 558 &sub-g-audioout;
548 &sub-g-crop; 559 &sub-g-crop;
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
index a8cda1acacd9..cd9943672434 100644
--- a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
@@ -6,7 +6,8 @@
6 6
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_CREATE_BUFS</refname> 8 <refname>VIDIOC_CREATE_BUFS</refname>
9 <refpurpose>Create buffers for Memory Mapped or User Pointer I/O</refpurpose> 9 <refpurpose>Create buffers for Memory Mapped or User Pointer or DMA Buffer
10 I/O</refpurpose>
10 </refnamediv> 11 </refnamediv>
11 12
12 <refsynopsisdiv> 13 <refsynopsisdiv>
@@ -55,11 +56,11 @@
55 </note> 56 </note>
56 57
57 <para>This ioctl is used to create buffers for <link linkend="mmap">memory 58 <para>This ioctl is used to create buffers for <link linkend="mmap">memory
58mapped</link> or <link linkend="userp">user pointer</link> 59mapped</link> or <link linkend="userp">user pointer</link> or <link
59I/O. It can be used as an alternative or in addition to the 60linkend="dmabuf">DMA buffer</link> I/O. It can be used as an alternative or in
60<constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter control over buffers 61addition to the <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter
61is required. This ioctl can be called multiple times to create buffers of 62control over buffers is required. This ioctl can be called multiple times to
62different sizes.</para> 63create buffers of different sizes.</para>
63 64
64 <para>To allocate device buffers applications initialize relevant fields of 65 <para>To allocate device buffers applications initialize relevant fields of
65the <structname>v4l2_create_buffers</structname> structure. They set the 66the <structname>v4l2_create_buffers</structname> structure. They set the
@@ -109,7 +110,8 @@ information.</para>
109 <entry>__u32</entry> 110 <entry>__u32</entry>
110 <entry><structfield>memory</structfield></entry> 111 <entry><structfield>memory</structfield></entry>
111 <entry>Applications set this field to 112 <entry>Applications set this field to
112<constant>V4L2_MEMORY_MMAP</constant> or 113<constant>V4L2_MEMORY_MMAP</constant>,
114<constant>V4L2_MEMORY_DMABUF</constant> or
113<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" 115<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
114/></entry> 116/></entry>
115 </row> 117 </row>
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
index 98a856f9ec30..89891adb928a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
@@ -261,6 +261,12 @@
261 <entry>This control event was triggered because the control flags 261 <entry>This control event was triggered because the control flags
262 changed.</entry> 262 changed.</entry>
263 </row> 263 </row>
264 <row>
265 <entry><constant>V4L2_EVENT_CTRL_CH_RANGE</constant></entry>
266 <entry>0x0004</entry>
267 <entry>This control event was triggered because the minimum,
268 maximum, step or the default value of the control changed.</entry>
269 </row>
264 </tbody> 270 </tbody>
265 </tgroup> 271 </tgroup>
266 </table> 272 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
new file mode 100644
index 000000000000..e287c8fc803b
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
@@ -0,0 +1,208 @@
1<refentry id="vidioc-expbuf">
2
3 <refmeta>
4 <refentrytitle>ioctl VIDIOC_EXPBUF</refentrytitle>
5 &manvol;
6 </refmeta>
7
8 <refnamediv>
9 <refname>VIDIOC_EXPBUF</refname>
10 <refpurpose>Export a buffer as a DMABUF file descriptor.</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct v4l2_exportbuffer *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_EXPBUF</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <note>
53 <title>Experimental</title>
54 <para>This is an <link linkend="experimental"> experimental </link>
55 interface and may change in the future.</para>
56 </note>
57
58<para>This ioctl is an extension to the <link linkend="mmap">memory
59mapping</link> I/O method, therefore it is available only for
60<constant>V4L2_MEMORY_MMAP</constant> buffers. It can be used to export a
61buffer as a DMABUF file at any time after buffers have been allocated with the
62&VIDIOC-REQBUFS; ioctl.</para>
63
64<para> To export a buffer, applications fill &v4l2-exportbuffer;. The
65<structfield> type </structfield> field is set to the same buffer type as was
66previously used with &v4l2-requestbuffers;<structfield> type </structfield>.
67Applications must also set the <structfield> index </structfield> field. Valid
68index numbers range from zero to the number of buffers allocated with
69&VIDIOC-REQBUFS; (&v4l2-requestbuffers;<structfield> count </structfield>)
70minus one. For the multi-planar API, applications set the <structfield> plane
71</structfield> field to the index of the plane to be exported. Valid planes
72range from zero to the maximal number of valid planes for the currently active
73format. For the single-planar API, applications must set <structfield> plane
74</structfield> to zero. Additional flags may be posted in the <structfield>
75flags </structfield> field. Refer to a manual for open() for details.
76Currently only O_CLOEXEC is supported. All other fields must be set to zero.
77In the case of multi-planar API, every plane is exported separately using
78multiple <constant> VIDIOC_EXPBUF </constant> calls. </para>
79
80<para> After calling <constant>VIDIOC_EXPBUF</constant> the <structfield> fd
81</structfield> field will be set by a driver. This is a DMABUF file
82descriptor. The application may pass it to other DMABUF-aware devices. Refer to
83<link linkend="dmabuf">DMABUF importing</link> for details about importing
84DMABUF files into V4L2 nodes. It is recommended to close a DMABUF file when it
85is no longer used to allow the associated memory to be reclaimed. </para>
86 </refsect1>
87
88 <refsect1>
89 <title>Examples</title>
90
91 <example>
92 <title>Exporting a buffer.</title>
93 <programlisting>
94int buffer_export(int v4lfd, &v4l2-buf-type; bt, int index, int *dmafd)
95{
96 &v4l2-exportbuffer; expbuf;
97
98 memset(&amp;expbuf, 0, sizeof(expbuf));
99 expbuf.type = bt;
100 expbuf.index = index;
101 if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &amp;expbuf) == -1) {
102 perror("VIDIOC_EXPBUF");
103 return -1;
104 }
105
106 *dmafd = expbuf.fd;
107
108 return 0;
109}
110 </programlisting>
111 </example>
112
113 <example>
114 <title>Exporting a buffer using the multi-planar API.</title>
115 <programlisting>
116int buffer_export_mp(int v4lfd, &v4l2-buf-type; bt, int index,
117 int dmafd[], int n_planes)
118{
119 int i;
120
121 for (i = 0; i &lt; n_planes; ++i) {
122 &v4l2-exportbuffer; expbuf;
123
124 memset(&amp;expbuf, 0, sizeof(expbuf));
125 expbuf.type = bt;
126 expbuf.index = index;
127 expbuf.plane = i;
128 if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &amp;expbuf) == -1) {
129 perror("VIDIOC_EXPBUF");
130 while (i)
131 close(dmafd[--i]);
132 return -1;
133 }
134 dmafd[i] = expbuf.fd;
135 }
136
137 return 0;
138}
139 </programlisting>
140 </example>
141
142 <table pgwide="1" frame="none" id="v4l2-exportbuffer">
143 <title>struct <structname>v4l2_exportbuffer</structname></title>
144 <tgroup cols="3">
145 &cs-str;
146 <tbody valign="top">
147 <row>
148 <entry>__u32</entry>
149 <entry><structfield>type</structfield></entry>
150 <entry>Type of the buffer, same as &v4l2-format;
151<structfield>type</structfield> or &v4l2-requestbuffers;
152<structfield>type</structfield>, set by the application. See <xref
153linkend="v4l2-buf-type" /></entry>
154 </row>
155 <row>
156 <entry>__u32</entry>
157 <entry><structfield>index</structfield></entry>
158 <entry>Number of the buffer, set by the application. This field is
159only used for <link linkend="mmap">memory mapping</link> I/O and can range from
160zero to the number of buffers allocated with the &VIDIOC-REQBUFS; and/or
161&VIDIOC-CREATE-BUFS; ioctls. </entry>
162 </row>
163 <row>
164 <entry>__u32</entry>
165 <entry><structfield>plane</structfield></entry>
166 <entry>Index of the plane to be exported when using the
167multi-planar API. Otherwise this value must be set to zero. </entry>
168 </row>
169 <row>
170 <entry>__u32</entry>
171 <entry><structfield>flags</structfield></entry>
172 <entry>Flags for the newly created file, currently only <constant>
173O_CLOEXEC </constant> is supported, refer to the manual of open() for more
174details.</entry>
175 </row>
176 <row>
177 <entry>__s32</entry>
178 <entry><structfield>fd</structfield></entry>
179 <entry>The DMABUF file descriptor associated with a buffer. Set by
180 the driver.</entry>
181 </row>
182 <row>
183 <entry>__u32</entry>
184 <entry><structfield>reserved[11]</structfield></entry>
185 <entry>Reserved field for future use. Must be set to zero.</entry>
186 </row>
187 </tbody>
188 </tgroup>
189 </table>
190
191 </refsect1>
192
193 <refsect1>
194 &return-value;
195 <variablelist>
196 <varlistentry>
197 <term><errorcode>EINVAL</errorcode></term>
198 <listitem>
199 <para>A queue is not in MMAP mode or DMABUF exporting is not
200supported or <structfield> flags </structfield> or <structfield> type
201</structfield> or <structfield> index </structfield> or <structfield> plane
202</structfield> fields are invalid.</para>
203 </listitem>
204 </varlistentry>
205 </variablelist>
206 </refsect1>
207
208</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml b/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml
index 12b1d0503e26..ee2820d6ca66 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-ctrl.xml
@@ -64,7 +64,9 @@ return an &EINVAL;. When the <structfield>value</structfield> is out
64of bounds drivers can choose to take the closest valid value or return 64of bounds drivers can choose to take the closest valid value or return
65an &ERANGE;, whatever seems more appropriate. However, 65an &ERANGE;, whatever seems more appropriate. However,
66<constant>VIDIOC_S_CTRL</constant> is a write-only ioctl, it does not 66<constant>VIDIOC_S_CTRL</constant> is a write-only ioctl, it does not
67return the actual new value.</para> 67return the actual new value. If the <structfield>value</structfield>
68is inappropriate for the control (e.g. if it refers to an unsupported
69menu index of a menu control), then &EINVAL; is returned as well.</para>
68 70
69 <para>These ioctls work only with user controls. For other 71 <para>These ioctls work only with user controls. For other
70control classes the &VIDIOC-G-EXT-CTRLS;, &VIDIOC-S-EXT-CTRLS; or 72control classes the &VIDIOC-G-EXT-CTRLS;, &VIDIOC-S-EXT-CTRLS; or
@@ -99,7 +101,9 @@ application.</entry>
99 <term><errorcode>EINVAL</errorcode></term> 101 <term><errorcode>EINVAL</errorcode></term>
100 <listitem> 102 <listitem>
101 <para>The &v4l2-control; <structfield>id</structfield> is 103 <para>The &v4l2-control; <structfield>id</structfield> is
102invalid.</para> 104invalid or the <structfield>value</structfield> is inappropriate for
105the given control (i.e. if a menu item is selected that is not supported
106by the driver according to &VIDIOC-QUERYMENU;).</para>
103 </listitem> 107 </listitem>
104 </varlistentry> 108 </varlistentry>
105 <varlistentry> 109 <varlistentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
index 0a4b90fcf2da..4e16112df992 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
@@ -106,7 +106,9 @@ value or if an error is returned.</para>
106&EINVAL;. When the value is out of bounds drivers can choose to take 106&EINVAL;. When the value is out of bounds drivers can choose to take
107the closest valid value or return an &ERANGE;, whatever seems more 107the closest valid value or return an &ERANGE;, whatever seems more
108appropriate. In the first case the new value is set in 108appropriate. In the first case the new value is set in
109&v4l2-ext-control;.</para> 109&v4l2-ext-control;. If the new control value is inappropriate (e.g. the
110given menu index is not supported by the menu control), then this will
111also result in an &EINVAL; error.</para>
110 112
111 <para>The driver will only set/get these controls if all control 113 <para>The driver will only set/get these controls if all control
112values are correct. This prevents the situation where only some of the 114values are correct. This prevents the situation where only some of the
@@ -199,13 +201,46 @@ also be zero.</entry>
199 <row> 201 <row>
200 <entry>__u32</entry> 202 <entry>__u32</entry>
201 <entry><structfield>error_idx</structfield></entry> 203 <entry><structfield>error_idx</structfield></entry>
202 <entry>Set by the driver in case of an error. If it is equal 204 <entry><para>Set by the driver in case of an error. If the error is
203to <structfield>count</structfield>, then no actual changes were made to 205associated with a particular control, then <structfield>error_idx</structfield>
204controls. In other words, the error was not associated with setting a particular 206is set to the index of that control. If the error is not related to a specific
205control. If it is another value, then only the controls up to <structfield>error_idx-1</structfield> 207control, or the validation step failed (see below), then
206were modified and control <structfield>error_idx</structfield> is the one that 208<structfield>error_idx</structfield> is set to <structfield>count</structfield>.
207caused the error. The <structfield>error_idx</structfield> value is undefined 209The value is undefined if the ioctl returned 0 (success).</para>
208if the ioctl returned 0 (success).</entry> 210
211<para>Before controls are read from/written to hardware a validation step
212takes place: this checks if all controls in the list are valid controls,
213if no attempt is made to write to a read-only control or read from a write-only
214control, and any other up-front checks that can be done without accessing the
215hardware. The exact validations done during this step are driver dependent
216since some checks might require hardware access for some devices, thus making
217it impossible to do those checks up-front. However, drivers should make a
218best-effort to do as many up-front checks as possible.</para>
219
220<para>This check is done to avoid leaving the hardware in an inconsistent state due
221to easy-to-avoid problems. But it leads to another problem: the application needs to
222know whether an error came from the validation step (meaning that the hardware
223was not touched) or from an error during the actual reading from/writing to hardware.</para>
224
225<para>The, in hindsight quite poor, solution for that is to set <structfield>error_idx</structfield>
226to <structfield>count</structfield> if the validation failed. This has the
227unfortunate side-effect that it is not possible to see which control failed the
228validation. If the validation was successful and the error happened while
229accessing the hardware, then <structfield>error_idx</structfield> is less than
230<structfield>count</structfield> and only the controls up to
231<structfield>error_idx-1</structfield> were read or written correctly, and the
232state of the remaining controls is undefined.</para>
233
234<para>Since <constant>VIDIOC_TRY_EXT_CTRLS</constant> does not access hardware
235there is also no need to handle the validation step in this special way,
236so <structfield>error_idx</structfield> will just be set to the control that
237failed the validation step instead of to <structfield>count</structfield>.
238This means that if <constant>VIDIOC_S_EXT_CTRLS</constant> fails with
239<structfield>error_idx</structfield> set to <structfield>count</structfield>,
240then you can call <constant>VIDIOC_TRY_EXT_CTRLS</constant> to try to discover
241the actual control that failed the validation step. Unfortunately, there
242is no <constant>TRY</constant> equivalent for <constant>VIDIOC_G_EXT_CTRLS</constant>.
243</para></entry>
209 </row> 244 </row>
210 <row> 245 <row>
211 <entry>__u32</entry> 246 <entry>__u32</entry>
@@ -298,8 +333,10 @@ These controls are described in <xref
298 <term><errorcode>EINVAL</errorcode></term> 333 <term><errorcode>EINVAL</errorcode></term>
299 <listitem> 334 <listitem>
300 <para>The &v4l2-ext-control; <structfield>id</structfield> 335 <para>The &v4l2-ext-control; <structfield>id</structfield>
301is invalid or the &v4l2-ext-controls; 336is invalid, the &v4l2-ext-controls;
302<structfield>ctrl_class</structfield> is invalid. This error code is 337<structfield>ctrl_class</structfield> is invalid, or the &v4l2-ext-control;
338<structfield>value</structfield> was inappropriate (e.g. the given menu
339index is not supported by the driver). This error code is
303also returned by the <constant>VIDIOC_S_EXT_CTRLS</constant> and 340also returned by the <constant>VIDIOC_S_EXT_CTRLS</constant> and
304<constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctls if two or more 341<constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctls if two or more
305control values are in conflict.</para> 342control values are in conflict.</para>
diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
index 2d37abefce13..3504a7f2f382 100644
--- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
@@ -109,6 +109,23 @@ they cannot be swapped out to disk. Buffers remain locked until
109dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is 109dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is
110called, or until the device is closed.</para> 110called, or until the device is closed.</para>
111 111
112 <para>To enqueue a <link linkend="dmabuf">DMABUF</link> buffer applications
113set the <structfield>memory</structfield> field to
114<constant>V4L2_MEMORY_DMABUF</constant> and the <structfield>m.fd</structfield>
115field to a file descriptor associated with a DMABUF buffer. When the
116multi-planar API is used the <structfield>m.fd</structfield> fields of the
117passed array of &v4l2-plane; have to be used instead. When
118<constant>VIDIOC_QBUF</constant> is called with a pointer to this structure the
119driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the
120<constant>V4L2_BUF_FLAG_MAPPED</constant> and
121<constant>V4L2_BUF_FLAG_DONE</constant> flags in the
122<structfield>flags</structfield> field, or it returns an error code. This
123ioctl locks the buffer. Locking a buffer means passing it to a driver for a
124hardware access (usually DMA). If an application accesses (reads/writes) a
125locked buffer then the result is undefined. Buffers remain locked until
126dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is called, or
127until the device is closed.</para>
128
112 <para>Applications call the <constant>VIDIOC_DQBUF</constant> 129 <para>Applications call the <constant>VIDIOC_DQBUF</constant>
113ioctl to dequeue a filled (capturing) or displayed (output) buffer 130ioctl to dequeue a filled (capturing) or displayed (output) buffer
114from the driver's outgoing queue. They just set the 131from the driver's outgoing queue. They just set the
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
index 4c70215ae03f..d5a3c97b206a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
@@ -76,7 +76,7 @@ make sure the strings are properly NUL-terminated.</para></entry>
76 <row> 76 <row>
77 <entry>__u8</entry> 77 <entry>__u8</entry>
78 <entry><structfield>card</structfield>[32]</entry> 78 <entry><structfield>card</structfield>[32]</entry>
79 <entry>Name of the device, a NUL-terminated ASCII string. 79 <entry>Name of the device, a NUL-terminated UTF-8 string.
80For example: "Yoyodyne TV/FM". One driver may support different brands 80For example: "Yoyodyne TV/FM". One driver may support different brands
81or models of video hardware. This information is intended for users, 81or models of video hardware. This information is intended for users,
82for example in a menu of available devices. Since multiple TV cards of 82for example in a menu of available devices. Since multiple TV cards of
diff --git a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
index 2b50ef2007f3..78a06a9a5ece 100644
--- a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
@@ -48,28 +48,30 @@
48 <refsect1> 48 <refsect1>
49 <title>Description</title> 49 <title>Description</title>
50 50
51 <para>This ioctl is used to initiate <link linkend="mmap">memory 51<para>This ioctl is used to initiate <link linkend="mmap">memory mapped</link>,
52mapped</link> or <link linkend="userp">user pointer</link> 52<link linkend="userp">user pointer</link> or <link
53I/O. Memory mapped buffers are located in device memory and must be 53linkend="dmabuf">DMABUF</link> based I/O. Memory mapped buffers are located in
54allocated with this ioctl before they can be mapped into the 54device memory and must be allocated with this ioctl before they can be mapped
55application's address space. User buffers are allocated by 55into the application's address space. User buffers are allocated by
56applications themselves, and this ioctl is merely used to switch the 56applications themselves, and this ioctl is merely used to switch the driver
57driver into user pointer I/O mode and to setup some internal structures.</para> 57into user pointer I/O mode and to setup some internal structures.
58Similarly, DMABUF buffers are allocated by applications through a device
59driver, and this ioctl only configures the driver into DMABUF I/O mode without
60performing any direct allocation.</para>
58 61
59 <para>To allocate device buffers applications initialize all 62 <para>To allocate device buffers applications initialize all fields of the
60fields of the <structname>v4l2_requestbuffers</structname> structure. 63<structname>v4l2_requestbuffers</structname> structure. They set the
61They set the <structfield>type</structfield> field to the respective 64<structfield>type</structfield> field to the respective stream or buffer type,
62stream or buffer type, the <structfield>count</structfield> field to 65the <structfield>count</structfield> field to the desired number of buffers,
63the desired number of buffers, <structfield>memory</structfield> 66<structfield>memory</structfield> must be set to the requested I/O method and
64must be set to the requested I/O method and the <structfield>reserved</structfield> array 67the <structfield>reserved</structfield> array must be zeroed. When the ioctl is
65must be zeroed. When the ioctl 68called with a pointer to this structure the driver will attempt to allocate the
66is called with a pointer to this structure the driver will attempt to allocate 69requested number of buffers and it stores the actual number allocated in the
67the requested number of buffers and it stores the actual number 70<structfield>count</structfield> field. It can be smaller than the number
68allocated in the <structfield>count</structfield> field. It can be 71requested, even zero, when the driver runs out of free memory. A larger number
69smaller than the number requested, even zero, when the driver runs out 72is also possible when the driver requires more buffers to function correctly.
70of free memory. A larger number is also possible when the driver requires 73For example video output requires at least two buffers, one displayed and one
71more buffers to function correctly. For example video output requires at least two buffers, 74filled by the application.</para>
72one displayed and one filled by the application.</para>
73 <para>When the I/O method is not supported the ioctl 75 <para>When the I/O method is not supported the ioctl
74returns an &EINVAL;.</para> 76returns an &EINVAL;.</para>
75 77
@@ -102,7 +104,8 @@ as the &v4l2-format; <structfield>type</structfield> field. See <xref
102 <entry>__u32</entry> 104 <entry>__u32</entry>
103 <entry><structfield>memory</structfield></entry> 105 <entry><structfield>memory</structfield></entry>
104 <entry>Applications set this field to 106 <entry>Applications set this field to
105<constant>V4L2_MEMORY_MMAP</constant> or 107<constant>V4L2_MEMORY_MMAP</constant>,
108<constant>V4L2_MEMORY_DMABUF</constant> or
106<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" 109<constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory"
107/>.</entry> 110/>.</entry>
108 </row> 111 </row>
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index f2413acfe241..1f6593deb995 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -22,6 +22,7 @@
22 22
23<!-- LinuxTV v4l-dvb repository. --> 23<!-- LinuxTV v4l-dvb repository. -->
24<!ENTITY v4l-dvb "<ulink url='http://linuxtv.org/repo/'>http://linuxtv.org/repo/</ulink>"> 24<!ENTITY v4l-dvb "<ulink url='http://linuxtv.org/repo/'>http://linuxtv.org/repo/</ulink>">
25<!ENTITY dash-ent-10 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>">
25]> 26]>
26 27
27<book id="media_api"> 28<book id="media_api">
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index ac3d0018140c..95618159e29b 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -719,6 +719,62 @@ framework to set up sysfs files for this region. Simply leave it alone.
719 </para> 719 </para>
720</sect1> 720</sect1>
721 721
722<sect1 id="using uio_dmem_genirq">
723<title>Using uio_dmem_genirq for platform devices</title>
724 <para>
725 In addition to statically allocated memory ranges, they may also be
726 a desire to use dynamically allocated regions in a user space driver.
727 In particular, being able to access memory made available through the
728 dma-mapping API, may be particularly useful. The
729 <varname>uio_dmem_genirq</varname> driver provides a way to accomplish
730 this.
731 </para>
732 <para>
733 This driver is used in a similar manner to the
734 <varname>"uio_pdrv_genirq"</varname> driver with respect to interrupt
735 configuration and handling.
736 </para>
737 <para>
738 Set the <varname>.name</varname> element of
739 <varname>struct platform_device</varname> to
740 <varname>"uio_dmem_genirq"</varname> to use this driver.
741 </para>
742 <para>
743 When using this driver, fill in the <varname>.platform_data</varname>
744 element of <varname>struct platform_device</varname>, which is of type
745 <varname>struct uio_dmem_genirq_pdata</varname> and which contains the
746 following elements:
747 </para>
748 <itemizedlist>
749 <listitem><varname>struct uio_info uioinfo</varname>: The same
750 structure used as the <varname>uio_pdrv_genirq</varname> platform
751 data</listitem>
752 <listitem><varname>unsigned int *dynamic_region_sizes</varname>:
753 Pointer to list of sizes of dynamic memory regions to be mapped into
754 user space.
755 </listitem>
756 <listitem><varname>unsigned int num_dynamic_regions</varname>:
757 Number of elements in <varname>dynamic_region_sizes</varname> array.
758 </listitem>
759 </itemizedlist>
760 <para>
761 The dynamic regions defined in the platform data will be appended to
762 the <varname> mem[] </varname> array after the platform device
763 resources, which implies that the total number of static and dynamic
764 memory regions cannot exceed <varname>MAX_UIO_MAPS</varname>.
765 </para>
766 <para>
767 The dynamic memory regions will be allocated when the UIO device file,
768 <varname>/dev/uioX</varname> is opened.
769 Simiar to static memory resources, the memory region information for
770 dynamic regions is then visible via sysfs at
771 <varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
772 The dynmaic memory regions will be freed when the UIO device file is
773 closed. When no processes are holding the device file open, the address
774 returned to userspace is ~0.
775 </para>
776</sect1>
777
722</chapter> 778</chapter>
723 779
724<chapter id="userspace_driver" xreflabel="Writing a driver in user space"> 780<chapter id="userspace_driver" xreflabel="Writing a driver in user space">
@@ -928,7 +984,7 @@ int main()
928 return errno; 984 return errno;
929 } 985 }
930 configfd = open(&quot;/sys/class/uio/uio0/device/config&quot;, O_RDWR); 986 configfd = open(&quot;/sys/class/uio/uio0/device/config&quot;, O_RDWR);
931 if (uiofd &lt; 0) { 987 if (configfd &lt; 0) {
932 perror(&quot;config open:&quot;); 988 perror(&quot;config open:&quot;);
933 return errno; 989 return errno;
934 } 990 }
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index cab4ec58e46e..bd6fee22c4dd 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -433,9 +433,9 @@
433 /* chip-specific constructor 433 /* chip-specific constructor
434 * (see "Management of Cards and Components") 434 * (see "Management of Cards and Components")
435 */ 435 */
436 static int __devinit snd_mychip_create(struct snd_card *card, 436 static int snd_mychip_create(struct snd_card *card,
437 struct pci_dev *pci, 437 struct pci_dev *pci,
438 struct mychip **rchip) 438 struct mychip **rchip)
439 { 439 {
440 struct mychip *chip; 440 struct mychip *chip;
441 int err; 441 int err;
@@ -475,8 +475,8 @@
475 } 475 }
476 476
477 /* constructor -- see "Constructor" sub-section */ 477 /* constructor -- see "Constructor" sub-section */
478 static int __devinit snd_mychip_probe(struct pci_dev *pci, 478 static int snd_mychip_probe(struct pci_dev *pci,
479 const struct pci_device_id *pci_id) 479 const struct pci_device_id *pci_id)
480 { 480 {
481 static int dev; 481 static int dev;
482 struct snd_card *card; 482 struct snd_card *card;
@@ -526,7 +526,7 @@
526 } 526 }
527 527
528 /* destructor -- see the "Destructor" sub-section */ 528 /* destructor -- see the "Destructor" sub-section */
529 static void __devexit snd_mychip_remove(struct pci_dev *pci) 529 static void snd_mychip_remove(struct pci_dev *pci)
530 { 530 {
531 snd_card_free(pci_get_drvdata(pci)); 531 snd_card_free(pci_get_drvdata(pci));
532 pci_set_drvdata(pci, NULL); 532 pci_set_drvdata(pci, NULL);
@@ -542,9 +542,8 @@
542 <para> 542 <para>
543 The real constructor of PCI drivers is the <function>probe</function> callback. 543 The real constructor of PCI drivers is the <function>probe</function> callback.
544 The <function>probe</function> callback and other component-constructors which are called 544 The <function>probe</function> callback and other component-constructors which are called
545 from the <function>probe</function> callback should be defined with 545 from the <function>probe</function> callback cannot be used with
546 the <parameter>__devinit</parameter> prefix. You 546 the <parameter>__init</parameter> prefix
547 cannot use the <parameter>__init</parameter> prefix for them,
548 because any PCI device could be a hotplug device. 547 because any PCI device could be a hotplug device.
549 </para> 548 </para>
550 549
@@ -728,7 +727,7 @@
728 <informalexample> 727 <informalexample>
729 <programlisting> 728 <programlisting>
730<![CDATA[ 729<![CDATA[
731 static void __devexit snd_mychip_remove(struct pci_dev *pci) 730 static void snd_mychip_remove(struct pci_dev *pci)
732 { 731 {
733 snd_card_free(pci_get_drvdata(pci)); 732 snd_card_free(pci_get_drvdata(pci));
734 pci_set_drvdata(pci, NULL); 733 pci_set_drvdata(pci, NULL);
@@ -872,9 +871,8 @@
872 <para> 871 <para>
873 This function itself doesn't allocate the data space. The data 872 This function itself doesn't allocate the data space. The data
874 must be allocated manually beforehand, and its pointer is passed 873 must be allocated manually beforehand, and its pointer is passed
875 as the argument. This pointer is used as the 874 as the argument. This pointer (<parameter>chip</parameter> in the
876 (<parameter>chip</parameter> identifier in the above example) 875 above example) is used as the identifier for the instance.
877 for the instance.
878 </para> 876 </para>
879 877
880 <para> 878 <para>
@@ -1059,14 +1057,6 @@
1059 </para> 1057 </para>
1060 1058
1061 <para> 1059 <para>
1062 As further notes, the destructors (both
1063 <function>snd_mychip_dev_free</function> and
1064 <function>snd_mychip_free</function>) cannot be defined with
1065 the <parameter>__devexit</parameter> prefix, because they may be
1066 called from the constructor, too, at the false path.
1067 </para>
1068
1069 <para>
1070 For a device which allows hotplugging, you can use 1060 For a device which allows hotplugging, you can use
1071 <function>snd_card_free_when_closed</function>. This one will 1061 <function>snd_card_free_when_closed</function>. This one will
1072 postpone the destruction until all devices are closed. 1062 postpone the destruction until all devices are closed.
@@ -1120,9 +1110,9 @@
1120 } 1110 }
1121 1111
1122 /* chip-specific constructor */ 1112 /* chip-specific constructor */
1123 static int __devinit snd_mychip_create(struct snd_card *card, 1113 static int snd_mychip_create(struct snd_card *card,
1124 struct pci_dev *pci, 1114 struct pci_dev *pci,
1125 struct mychip **rchip) 1115 struct mychip **rchip)
1126 { 1116 {
1127 struct mychip *chip; 1117 struct mychip *chip;
1128 int err; 1118 int err;
@@ -1200,7 +1190,7 @@
1200 .name = KBUILD_MODNAME, 1190 .name = KBUILD_MODNAME,
1201 .id_table = snd_mychip_ids, 1191 .id_table = snd_mychip_ids,
1202 .probe = snd_mychip_probe, 1192 .probe = snd_mychip_probe,
1203 .remove = __devexit_p(snd_mychip_remove), 1193 .remove = snd_mychip_remove,
1204 }; 1194 };
1205 1195
1206 /* module initialization */ 1196 /* module initialization */
@@ -1465,11 +1455,6 @@
1465 </para> 1455 </para>
1466 1456
1467 <para> 1457 <para>
1468 Again, remember that you cannot
1469 use the <parameter>__devexit</parameter> prefix for this destructor.
1470 </para>
1471
1472 <para>
1473 We didn't implement the hardware disabling part in the above. 1458 We didn't implement the hardware disabling part in the above.
1474 If you need to do this, please note that the destructor may be 1459 If you need to do this, please note that the destructor may be
1475 called even before the initialization of the chip is completed. 1460 called even before the initialization of the chip is completed.
@@ -1619,7 +1604,7 @@
1619 .name = KBUILD_MODNAME, 1604 .name = KBUILD_MODNAME,
1620 .id_table = snd_mychip_ids, 1605 .id_table = snd_mychip_ids,
1621 .probe = snd_mychip_probe, 1606 .probe = snd_mychip_probe,
1622 .remove = __devexit_p(snd_mychip_remove), 1607 .remove = snd_mychip_remove,
1623 }; 1608 };
1624]]> 1609]]>
1625 </programlisting> 1610 </programlisting>
@@ -1630,11 +1615,7 @@
1630 The <structfield>probe</structfield> and 1615 The <structfield>probe</structfield> and
1631 <structfield>remove</structfield> functions have already 1616 <structfield>remove</structfield> functions have already
1632 been defined in the previous sections. 1617 been defined in the previous sections.
1633 The <structfield>remove</structfield> function should 1618 The <structfield>name</structfield>
1634 be defined with the
1635 <function>__devexit_p()</function> macro, so that it's not
1636 defined for built-in (and non-hot-pluggable) case. The
1637 <structfield>name</structfield>
1638 field is the name string of this device. Note that you must not 1619 field is the name string of this device. Note that you must not
1639 use a slash <quote>/</quote> in this string. 1620 use a slash <quote>/</quote> in this string.
1640 </para> 1621 </para>
@@ -1665,9 +1646,7 @@
1665 <para> 1646 <para>
1666 Note that these module entries are tagged with 1647 Note that these module entries are tagged with
1667 <parameter>__init</parameter> and 1648 <parameter>__init</parameter> and
1668 <parameter>__exit</parameter> prefixes, not 1649 <parameter>__exit</parameter> prefixes.
1669 <parameter>__devinit</parameter> nor
1670 <parameter>__devexit</parameter>.
1671 </para> 1650 </para>
1672 1651
1673 <para> 1652 <para>
@@ -1918,7 +1897,7 @@
1918 */ 1897 */
1919 1898
1920 /* create a pcm device */ 1899 /* create a pcm device */
1921 static int __devinit snd_mychip_new_pcm(struct mychip *chip) 1900 static int snd_mychip_new_pcm(struct mychip *chip)
1922 { 1901 {
1923 struct snd_pcm *pcm; 1902 struct snd_pcm *pcm;
1924 int err; 1903 int err;
@@ -1957,7 +1936,7 @@
1957 <informalexample> 1936 <informalexample>
1958 <programlisting> 1937 <programlisting>
1959<![CDATA[ 1938<![CDATA[
1960 static int __devinit snd_mychip_new_pcm(struct mychip *chip) 1939 static int snd_mychip_new_pcm(struct mychip *chip)
1961 { 1940 {
1962 struct snd_pcm *pcm; 1941 struct snd_pcm *pcm;
1963 int err; 1942 int err;
@@ -2124,7 +2103,7 @@
2124 .... 2103 ....
2125 } 2104 }
2126 2105
2127 static int __devinit snd_mychip_new_pcm(struct mychip *chip) 2106 static int snd_mychip_new_pcm(struct mychip *chip)
2128 { 2107 {
2129 struct snd_pcm *pcm; 2108 struct snd_pcm *pcm;
2130 .... 2109 ....
@@ -2324,7 +2303,7 @@ struct _snd_pcm_runtime {
2324 <constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you 2303 <constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you
2325 have to specify whether the mmap is supported and which 2304 have to specify whether the mmap is supported and which
2326 interleaved format is supported. 2305 interleaved format is supported.
2327 When the is supported, add the 2306 When the hardware supports mmap, add the
2328 <constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the 2307 <constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the
2329 hardware supports the interleaved or the non-interleaved 2308 hardware supports the interleaved or the non-interleaved
2330 formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or 2309 formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or
@@ -2918,7 +2897,7 @@ struct _snd_pcm_runtime {
2918 2897
2919 <para> 2898 <para>
2920 When the pcm supports the pause operation (given in the info 2899 When the pcm supports the pause operation (given in the info
2921 field of the hardware table), the <constant>PAUSE_PUSE</constant> 2900 field of the hardware table), the <constant>PAUSE_PUSH</constant>
2922 and <constant>PAUSE_RELEASE</constant> commands must be 2901 and <constant>PAUSE_RELEASE</constant> commands must be
2923 handled here, too. The former is the command to pause the pcm, 2902 handled here, too. The former is the command to pause the pcm,
2924 and the latter to restart the pcm again. 2903 and the latter to restart the pcm again.
@@ -3105,7 +3084,7 @@ struct _snd_pcm_runtime {
3105 <section id="pcm-interface-interrupt-handler-timer"> 3084 <section id="pcm-interface-interrupt-handler-timer">
3106 <title>High frequency timer interrupts</title> 3085 <title>High frequency timer interrupts</title>
3107 <para> 3086 <para>
3108 This happense when the hardware doesn't generate interrupts 3087 This happens when the hardware doesn't generate interrupts
3109 at the period boundary but issues timer interrupts at a fixed 3088 at the period boundary but issues timer interrupts at a fixed
3110 timer rate (e.g. es1968 or ymfpci drivers). 3089 timer rate (e.g. es1968 or ymfpci drivers).
3111 In this case, you need to check the current hardware 3090 In this case, you need to check the current hardware
@@ -3271,18 +3250,19 @@ struct _snd_pcm_runtime {
3271 <title>Example of Hardware Constraints for Channels</title> 3250 <title>Example of Hardware Constraints for Channels</title>
3272 <programlisting> 3251 <programlisting>
3273<![CDATA[ 3252<![CDATA[
3274 static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params, 3253 static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
3275 struct snd_pcm_hw_rule *rule) 3254 struct snd_pcm_hw_rule *rule)
3276 { 3255 {
3277 struct snd_interval *c = hw_param_interval(params, 3256 struct snd_interval *c = hw_param_interval(params,
3278 SNDRV_PCM_HW_PARAM_CHANNELS); 3257 SNDRV_PCM_HW_PARAM_CHANNELS);
3279 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 3258 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3280 struct snd_mask fmt; 3259 struct snd_interval ch;
3281 3260
3282 snd_mask_any(&fmt); /* Init the struct */ 3261 snd_interval_any(&ch);
3283 if (c->min < 2) { 3262 if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
3284 fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE; 3263 ch.min = ch.max = 1;
3285 return snd_mask_refine(f, &fmt); 3264 ch.integer = 1;
3265 return snd_interval_refine(c, &ch);
3286 } 3266 }
3287 return 0; 3267 return 0;
3288 } 3268 }
@@ -3298,35 +3278,35 @@ struct _snd_pcm_runtime {
3298 <programlisting> 3278 <programlisting>
3299<![CDATA[ 3279<![CDATA[
3300 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 3280 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
3301 hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT, 3281 hw_rule_channels_by_format, NULL,
3302 -1); 3282 SNDRV_PCM_HW_PARAM_FORMAT, -1);
3303]]> 3283]]>
3304 </programlisting> 3284 </programlisting>
3305 </informalexample> 3285 </informalexample>
3306 </para> 3286 </para>
3307 3287
3308 <para> 3288 <para>
3309 The rule function is called when an application sets the number of 3289 The rule function is called when an application sets the PCM
3310 channels. But an application can set the format before the number of 3290 format, and it refines the number of channels accordingly.
3311 channels. Thus you also need to define the inverse rule: 3291 But an application may set the number of channels before
3292 setting the format. Thus you also need to define the inverse rule:
3312 3293
3313 <example> 3294 <example>
3314 <title>Example of Hardware Constraints for Channels</title> 3295 <title>Example of Hardware Constraints for Formats</title>
3315 <programlisting> 3296 <programlisting>
3316<![CDATA[ 3297<![CDATA[
3317 static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params, 3298 static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
3318 struct snd_pcm_hw_rule *rule) 3299 struct snd_pcm_hw_rule *rule)
3319 { 3300 {
3320 struct snd_interval *c = hw_param_interval(params, 3301 struct snd_interval *c = hw_param_interval(params,
3321 SNDRV_PCM_HW_PARAM_CHANNELS); 3302 SNDRV_PCM_HW_PARAM_CHANNELS);
3322 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 3303 struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3323 struct snd_interval ch; 3304 struct snd_mask fmt;
3324 3305
3325 snd_interval_any(&ch); 3306 snd_mask_any(&fmt); /* Init the struct */
3326 if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) { 3307 if (c->min < 2) {
3327 ch.min = ch.max = 1; 3308 fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
3328 ch.integer = 1; 3309 return snd_mask_refine(f, &fmt);
3329 return snd_interval_refine(c, &ch);
3330 } 3310 }
3331 return 0; 3311 return 0;
3332 } 3312 }
@@ -3341,8 +3321,8 @@ struct _snd_pcm_runtime {
3341 <programlisting> 3321 <programlisting>
3342<![CDATA[ 3322<![CDATA[
3343 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT, 3323 snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
3344 hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 3324 hw_rule_format_by_channels, NULL,
3345 -1); 3325 SNDRV_PCM_HW_PARAM_CHANNELS, -1);
3346]]> 3326]]>
3347 </programlisting> 3327 </programlisting>
3348 </informalexample> 3328 </informalexample>
@@ -3399,7 +3379,7 @@ struct _snd_pcm_runtime {
3399 <title>Definition of a Control</title> 3379 <title>Definition of a Control</title>
3400 <programlisting> 3380 <programlisting>
3401<![CDATA[ 3381<![CDATA[
3402 static struct snd_kcontrol_new my_control __devinitdata = { 3382 static struct snd_kcontrol_new my_control = {
3403 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3383 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
3404 .name = "PCM Playback Switch", 3384 .name = "PCM Playback Switch",
3405 .index = 0, 3385 .index = 0,
@@ -3415,13 +3395,6 @@ struct _snd_pcm_runtime {
3415 </para> 3395 </para>
3416 3396
3417 <para> 3397 <para>
3418 Most likely the control is created via
3419 <function>snd_ctl_new1()</function>, and in such a case, you can
3420 add the <parameter>__devinitdata</parameter> prefix to the
3421 definition as above.
3422 </para>
3423
3424 <para>
3425 The <structfield>iface</structfield> field specifies the control 3398 The <structfield>iface</structfield> field specifies the control
3426 type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which 3399 type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which
3427 is usually <constant>MIXER</constant>. 3400 is usually <constant>MIXER</constant>.
@@ -3847,10 +3820,8 @@ struct _snd_pcm_runtime {
3847 3820
3848 <para> 3821 <para>
3849 <function>snd_ctl_new1()</function> allocates a new 3822 <function>snd_ctl_new1()</function> allocates a new
3850 <structname>snd_kcontrol</structname> instance (that's why the definition 3823 <structname>snd_kcontrol</structname> instance,
3851 of <parameter>my_control</parameter> can be with 3824 and <function>snd_ctl_add</function> assigns the given
3852 the <parameter>__devinitdata</parameter>
3853 prefix), and <function>snd_ctl_add</function> assigns the given
3854 control component to the card. 3825 control component to the card.
3855 </para> 3826 </para>
3856 </section> 3827 </section>
@@ -3896,7 +3867,7 @@ struct _snd_pcm_runtime {
3896<![CDATA[ 3867<![CDATA[
3897 static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0); 3868 static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0);
3898 3869
3899 static struct snd_kcontrol_new my_control __devinitdata = { 3870 static struct snd_kcontrol_new my_control = {
3900 ... 3871 ...
3901 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | 3872 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
3902 SNDRV_CTL_ELEM_ACCESS_TLV_READ, 3873 SNDRV_CTL_ELEM_ACCESS_TLV_READ,
@@ -5761,8 +5732,8 @@ struct _snd_pcm_runtime {
5761 <informalexample> 5732 <informalexample>
5762 <programlisting> 5733 <programlisting>
5763<![CDATA[ 5734<![CDATA[
5764 static int __devinit snd_mychip_probe(struct pci_dev *pci, 5735 static int snd_mychip_probe(struct pci_dev *pci,
5765 const struct pci_device_id *pci_id) 5736 const struct pci_device_id *pci_id)
5766 { 5737 {
5767 .... 5738 ....
5768 struct snd_card *card; 5739 struct snd_card *card;
@@ -5787,8 +5758,8 @@ struct _snd_pcm_runtime {
5787 <informalexample> 5758 <informalexample>
5788 <programlisting> 5759 <programlisting>
5789<![CDATA[ 5760<![CDATA[
5790 static int __devinit snd_mychip_probe(struct pci_dev *pci, 5761 static int snd_mychip_probe(struct pci_dev *pci,
5791 const struct pci_device_id *pci_id) 5762 const struct pci_device_id *pci_id)
5792 { 5763 {
5793 .... 5764 ....
5794 struct snd_card *card; 5765 struct snd_card *card;
@@ -5825,7 +5796,7 @@ struct _snd_pcm_runtime {
5825 .name = KBUILD_MODNAME, 5796 .name = KBUILD_MODNAME,
5826 .id_table = snd_my_ids, 5797 .id_table = snd_my_ids,
5827 .probe = snd_my_probe, 5798 .probe = snd_my_probe,
5828 .remove = __devexit_p(snd_my_remove), 5799 .remove = snd_my_remove,
5829 #ifdef CONFIG_PM 5800 #ifdef CONFIG_PM
5830 .suspend = snd_my_suspend, 5801 .suspend = snd_my_suspend,
5831 .resume = snd_my_resume, 5802 .resume = snd_my_resume,