summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-31 12:31:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-31 12:31:14 -0500
commitb399c46ea0070671f3abbe1915d26076101a42f2 (patch)
tree8945606976fc46c3446c09f8a9e0d4f45f6c408e /Documentation
parentb890eb4ecc718907223a3b7b7b069b59b33f28ef (diff)
parent6c3df5da67f1f53df78c7e20cd53a481dc28eade (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - a new jpeg codec driver for Samsung Exynos (jpeg-hw-exynos4) - a new dvb frontend for ds2103 chipset (m88ds2103) - a new sensor driver for Samsung S5K5BAF UXGA (s5k5baf) - new drivers for R-Car VSP1 - a new radio driver: radio-raremono - a new tuner driver for ts2022 chipset (m88ts2022) - the analog part of em28xx is now a separate module that only load/runs if the device is not a pure digital TV device - added a staging driver for bcm2048 radio devices - the omap 2 video driver (omap24xx) was moved to staging. This driver is for an old hardware and uses a deprecated Kernel internal API. If nobody cares enough to fix it, it would be removed on a couple Kernel releases - the sn9c102 driver was moved to staging. This driver was replaced by gspca, and disabled on some distros, as almost all devices are known to work properly with gspca. It should be removed from kernel on a couple Kernel releases - lots of driver fixes, improvements and cleanups * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (421 commits) [media] media: v4l2-dev: fix video device index assignment [media] rc-core: reuse device numbers [media] em28xx-cards: properly initialize the device bitmap [media] Staging: media: Fix line length exceeding 80 characters in as102_drv.c [media] Staging: media: Fix line length exceeding 80 characters in as102_fe.c [media] Staging: media: Fix quoted string split across line in as102_fe.c [media] media: st-rc: Add reset support [media] m2m-deinterlace: fix allocated struct type [media] radio-usb-si4713: fix sparse non static symbol warnings [media] em28xx-audio: remove needless check before usb_free_coherent() [media] au0828: Fix sparse non static symbol warning Revert "[media] go7007-usb: only use go->dev after allocated" [media] em28xx-audio: provide an error code when URB submit fails [media] em28xx: fix check for audio only usb interfaces when changing the usb alternate setting [media] em28xx: fix usb alternate setting for analog and digital video endpoints > 0 [media] em28xx: make 'em28xx_ctrl_ops' static em28xx-alsa: Fix error patch for init/fini [media] em28xx-audio: flush work at .fini [media] drxk: remove the option to load firmware asynchronously [media] em28xx: adjust period size at runtime ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml12
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml41
-rw-r--r--Documentation/DocBook/media/v4l/dev-overlay.xml9
-rw-r--r--Documentation/DocBook/media/v4l/media-ioc-enum-links.xml9
-rw-r--r--Documentation/DocBook/media/v4l/subdev-formats.xml163
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml10
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-cropcap.xml10
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-streamon.xml2
-rw-r--r--Documentation/cgroups/resource_counter.txt2
-rw-r--r--Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt11
-rw-r--r--Documentation/devicetree/bindings/media/samsung-s5k5baf.txt58
-rw-r--r--Documentation/video4linux/omap4_camera.txt60
-rw-r--r--Documentation/video4linux/si476x.txt2
-rw-r--r--Documentation/video4linux/sn9c102.txt592
14 files changed, 369 insertions, 612 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index 0c7195e3e093..c4cac6dbf9af 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2523,6 +2523,18 @@ that used it. It was originally scheduled for removal in 2.6.35.
2523 </orderedlist> 2523 </orderedlist>
2524 </section> 2524 </section>
2525 2525
2526 <section>
2527 <title>V4L2 in Linux 3.14</title>
2528 <orderedlist>
2529 <listitem>
2530 <para> In struct <structname>v4l2_rect</structname>, the type
2531of <structfield>width</structfield> and <structfield>height</structfield>
2532fields changed from _s32 to _u32.
2533 </para>
2534 </listitem>
2535 </orderedlist>
2536 </section>
2537
2526 <section id="other"> 2538 <section id="other">
2527 <title>Relation of V4L2 to other Linux multimedia APIs</title> 2539 <title>Relation of V4L2 to other Linux multimedia APIs</title>
2528 2540
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 7a3b49b3cc3b..a5a3188e5af7 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -3161,6 +3161,47 @@ V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD as a golden frame.</entry>
3161 </entrytbl> 3161 </entrytbl>
3162 </row> 3162 </row>
3163 3163
3164 <row><entry></entry></row>
3165 <row>
3166 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_MIN_QP</constant></entry>
3167 <entry>integer</entry>
3168 </row>
3169 <row><entry spanname="descr">Minimum quantization parameter for VP8.</entry>
3170 </row>
3171
3172 <row><entry></entry></row>
3173 <row>
3174 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_MAX_QP</constant></entry>
3175 <entry>integer</entry>
3176 </row>
3177 <row><entry spanname="descr">Maximum quantization parameter for VP8.</entry>
3178 </row>
3179
3180 <row><entry></entry></row>
3181 <row>
3182 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP</constant>&nbsp;</entry>
3183 <entry>integer</entry>
3184 </row>
3185 <row><entry spanname="descr">Quantization parameter for an I frame for VP8.</entry>
3186 </row>
3187
3188 <row><entry></entry></row>
3189 <row>
3190 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP</constant>&nbsp;</entry>
3191 <entry>integer</entry>
3192 </row>
3193 <row><entry spanname="descr">Quantization parameter for a P frame for VP8.</entry>
3194 </row>
3195
3196 <row><entry></entry></row>
3197 <row>
3198 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_PROFILE</constant>&nbsp;</entry>
3199 <entry>integer</entry>
3200 </row>
3201 <row><entry spanname="descr">Select the desired profile for VPx encoder.
3202Acceptable values are 0, 1, 2 and 3 corresponding to encoder profiles 0, 1, 2 and 3.</entry>
3203 </row>
3204
3164 <row><entry></entry></row> 3205 <row><entry></entry></row>
3165 </tbody> 3206 </tbody>
3166 </tgroup> 3207 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/dev-overlay.xml b/Documentation/DocBook/media/v4l/dev-overlay.xml
index 40d1d7681439..cc6e0c5c960c 100644
--- a/Documentation/DocBook/media/v4l/dev-overlay.xml
+++ b/Documentation/DocBook/media/v4l/dev-overlay.xml
@@ -346,17 +346,14 @@ rectangle, in pixels.</entry>
346rectangle, in pixels. Offsets increase to the right and down.</entry> 346rectangle, in pixels. Offsets increase to the right and down.</entry>
347 </row> 347 </row>
348 <row> 348 <row>
349 <entry>__s32</entry> 349 <entry>__u32</entry>
350 <entry><structfield>width</structfield></entry> 350 <entry><structfield>width</structfield></entry>
351 <entry>Width of the rectangle, in pixels.</entry> 351 <entry>Width of the rectangle, in pixels.</entry>
352 </row> 352 </row>
353 <row> 353 <row>
354 <entry>__s32</entry> 354 <entry>__u32</entry>
355 <entry><structfield>height</structfield></entry> 355 <entry><structfield>height</structfield></entry>
356 <entry>Height of the rectangle, in pixels. Width and 356 <entry>Height of the rectangle, in pixels.</entry>
357height cannot be negative, the fields are signed for hysterical
358reasons. <!-- video4linux-list@redhat.com on 22 Oct 2002 subject
359"Re:[V4L][patches!] Re:v4l2/kernel-2.5" --></entry>
360 </row> 357 </row>
361 </tbody> 358 </tbody>
362 </tgroup> 359 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml b/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml
index 355df43badc5..cf8548556c7d 100644
--- a/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml
+++ b/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml
@@ -134,6 +134,15 @@
134 <entry>Output pad, relative to the entity. Output pads source data 134 <entry>Output pad, relative to the entity. Output pads source data
135 and are origins of links.</entry> 135 and are origins of links.</entry>
136 </row> 136 </row>
137 <row>
138 <entry><constant>MEDIA_PAD_FL_MUST_CONNECT</constant></entry>
139 <entry>If this flag is set and the pad is linked to any other
140 pad, then at least one of those links must be enabled for the
141 entity to be able to stream. There could be temporary reasons
142 (e.g. device configuration dependent) for the pad to need
143 enabled links even when this flag isn't set; the absence of the
144 flag doesn't imply there is none.</entry>
145 </row>
137 </tbody> 146 </tbody>
138 </tgroup> 147 </tgroup>
139 </table> 148 </table>
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
index f72c1cc93a9b..7331ce116f4c 100644
--- a/Documentation/DocBook/media/v4l/subdev-formats.xml
+++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
@@ -89,7 +89,7 @@
89 <constant>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</constant>. 89 <constant>V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE</constant>.
90 </para> 90 </para>
91 91
92 <para>The following tables list existing packet RGB formats.</para> 92 <para>The following tables list existing packed RGB formats.</para>
93 93
94 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-rgb"> 94 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-rgb">
95 <title>RGB formats</title> 95 <title>RGB formats</title>
@@ -615,7 +615,7 @@
615 </mediaobject> 615 </mediaobject>
616 </figure> 616 </figure>
617 617
618 <para>The following table lists existing packet Bayer formats. The data 618 <para>The following table lists existing packed Bayer formats. The data
619 organization is given as an example for the first pixel only.</para> 619 organization is given as an example for the first pixel only.</para>
620 620
621 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-bayer"> 621 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-bayer">
@@ -1178,7 +1178,7 @@
1178 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>. 1178 U, Y, V, Y order will be named <constant>V4L2_MBUS_FMT_UYVY8_2X8</constant>.
1179 </para> 1179 </para>
1180 1180
1181 <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> list existing packet YUV 1181 <para><xref linkend="v4l2-mbus-pixelcode-yuv8"/> lists existing packed YUV
1182 formats and describes the organization of each pixel data in each sample. 1182 formats and describes the organization of each pixel data in each sample.
1183 When a format pattern is split across multiple samples each of the samples 1183 When a format pattern is split across multiple samples each of the samples
1184 in the pattern is described.</para> 1184 in the pattern is described.</para>
@@ -2492,6 +2492,163 @@
2492 </section> 2492 </section>
2493 2493
2494 <section> 2494 <section>
2495 <title>HSV/HSL Formats</title>
2496
2497 <para>Those formats transfer pixel data as RGB values in a cylindrical-coordinate
2498 system using Hue-Saturation-Value or Hue-Saturation-Lightness components. The
2499 format code is made of the following information.
2500 <itemizedlist>
2501 <listitem><para>The hue, saturation, value or lightness and optional alpha
2502 components order code, as encoded in a pixel sample. The only currently
2503 supported value is AHSV.
2504 </para></listitem>
2505 <listitem><para>The number of bits per component, for each component. The values
2506 can be different for all components. The only currently supported value is 8888.
2507 </para></listitem>
2508 <listitem><para>The number of bus samples per pixel. Pixels that are wider than
2509 the bus width must be transferred in multiple samples. The only currently
2510 supported value is 1.</para></listitem>
2511 <listitem><para>The bus width.</para></listitem>
2512 <listitem><para>For formats where the total number of bits per pixel is smaller
2513 than the number of bus samples per pixel times the bus width, a padding
2514 value stating if the bytes are padded in their most high order bits
2515 (PADHI) or low order bits (PADLO).</para></listitem>
2516 <listitem><para>For formats where the number of bus samples per pixel is larger
2517 than 1, an endianness value stating if the pixel is transferred MSB first
2518 (BE) or LSB first (LE).</para></listitem>
2519 </itemizedlist>
2520 </para>
2521
2522 <para>The following table lists existing HSV/HSL formats.</para>
2523
2524 <table pgwide="0" frame="none" id="v4l2-mbus-pixelcode-hsv">
2525 <title>HSV/HSL formats</title>
2526 <tgroup cols="27">
2527 <colspec colname="id" align="left" />
2528 <colspec colname="code" align="center"/>
2529 <colspec colname="bit" />
2530 <colspec colnum="4" colname="b31" align="center" />
2531 <colspec colnum="5" colname="b20" align="center" />
2532 <colspec colnum="6" colname="b29" align="center" />
2533 <colspec colnum="7" colname="b28" align="center" />
2534 <colspec colnum="8" colname="b27" align="center" />
2535 <colspec colnum="9" colname="b26" align="center" />
2536 <colspec colnum="10" colname="b25" align="center" />
2537 <colspec colnum="11" colname="b24" align="center" />
2538 <colspec colnum="12" colname="b23" align="center" />
2539 <colspec colnum="13" colname="b22" align="center" />
2540 <colspec colnum="14" colname="b21" align="center" />
2541 <colspec colnum="15" colname="b20" align="center" />
2542 <colspec colnum="16" colname="b19" align="center" />
2543 <colspec colnum="17" colname="b18" align="center" />
2544 <colspec colnum="18" colname="b17" align="center" />
2545 <colspec colnum="19" colname="b16" align="center" />
2546 <colspec colnum="20" colname="b15" align="center" />
2547 <colspec colnum="21" colname="b14" align="center" />
2548 <colspec colnum="22" colname="b13" align="center" />
2549 <colspec colnum="23" colname="b12" align="center" />
2550 <colspec colnum="24" colname="b11" align="center" />
2551 <colspec colnum="25" colname="b10" align="center" />
2552 <colspec colnum="26" colname="b09" align="center" />
2553 <colspec colnum="27" colname="b08" align="center" />
2554 <colspec colnum="28" colname="b07" align="center" />
2555 <colspec colnum="29" colname="b06" align="center" />
2556 <colspec colnum="30" colname="b05" align="center" />
2557 <colspec colnum="31" colname="b04" align="center" />
2558 <colspec colnum="32" colname="b03" align="center" />
2559 <colspec colnum="33" colname="b02" align="center" />
2560 <colspec colnum="34" colname="b01" align="center" />
2561 <colspec colnum="35" colname="b00" align="center" />
2562 <spanspec namest="b31" nameend="b00" spanname="b0" />
2563 <thead>
2564 <row>
2565 <entry>Identifier</entry>
2566 <entry>Code</entry>
2567 <entry></entry>
2568 <entry spanname="b0">Data organization</entry>
2569 </row>
2570 <row>
2571 <entry></entry>
2572 <entry></entry>
2573 <entry>Bit</entry>
2574 <entry>31</entry>
2575 <entry>30</entry>
2576 <entry>29</entry>
2577 <entry>28</entry>
2578 <entry>27</entry>
2579 <entry>26</entry>
2580 <entry>25</entry>
2581 <entry>24</entry>
2582 <entry>23</entry>
2583 <entry>22</entry>
2584 <entry>21</entry>
2585 <entry>20</entry>
2586 <entry>19</entry>
2587 <entry>18</entry>
2588 <entry>17</entry>
2589 <entry>16</entry>
2590 <entry>15</entry>
2591 <entry>14</entry>
2592 <entry>13</entry>
2593 <entry>12</entry>
2594 <entry>11</entry>
2595 <entry>10</entry>
2596 <entry>9</entry>
2597 <entry>8</entry>
2598 <entry>7</entry>
2599 <entry>6</entry>
2600 <entry>5</entry>
2601 <entry>4</entry>
2602 <entry>3</entry>
2603 <entry>2</entry>
2604 <entry>1</entry>
2605 <entry>0</entry>
2606 </row>
2607 </thead>
2608 <tbody valign="top">
2609 <row id="V4L2-MBUS-FMT-AHSV8888-1X32">
2610 <entry>V4L2_MBUS_FMT_AHSV8888_1X32</entry>
2611 <entry>0x6001</entry>
2612 <entry></entry>
2613 <entry>a<subscript>7</subscript></entry>
2614 <entry>a<subscript>6</subscript></entry>
2615 <entry>a<subscript>5</subscript></entry>
2616 <entry>a<subscript>4</subscript></entry>
2617 <entry>a<subscript>3</subscript></entry>
2618 <entry>a<subscript>2</subscript></entry>
2619 <entry>a<subscript>1</subscript></entry>
2620 <entry>a<subscript>0</subscript></entry>
2621 <entry>h<subscript>7</subscript></entry>
2622 <entry>h<subscript>6</subscript></entry>
2623 <entry>h<subscript>5</subscript></entry>
2624 <entry>h<subscript>4</subscript></entry>
2625 <entry>h<subscript>3</subscript></entry>
2626 <entry>h<subscript>2</subscript></entry>
2627 <entry>h<subscript>1</subscript></entry>
2628 <entry>h<subscript>0</subscript></entry>
2629 <entry>s<subscript>7</subscript></entry>
2630 <entry>s<subscript>6</subscript></entry>
2631 <entry>s<subscript>5</subscript></entry>
2632 <entry>s<subscript>4</subscript></entry>
2633 <entry>s<subscript>3</subscript></entry>
2634 <entry>s<subscript>2</subscript></entry>
2635 <entry>s<subscript>1</subscript></entry>
2636 <entry>s<subscript>0</subscript></entry>
2637 <entry>v<subscript>7</subscript></entry>
2638 <entry>v<subscript>6</subscript></entry>
2639 <entry>v<subscript>5</subscript></entry>
2640 <entry>v<subscript>4</subscript></entry>
2641 <entry>v<subscript>3</subscript></entry>
2642 <entry>v<subscript>2</subscript></entry>
2643 <entry>v<subscript>1</subscript></entry>
2644 <entry>v<subscript>0</subscript></entry>
2645 </row>
2646 </tbody>
2647 </tgroup>
2648 </table>
2649 </section>
2650
2651 <section>
2495 <title>JPEG Compressed Formats</title> 2652 <title>JPEG Compressed Formats</title>
2496 2653
2497 <para>Those data formats consist of an ordered sequence of 8-bit bytes 2654 <para>Those data formats consist of an ordered sequence of 8-bit bytes
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index 8469fe13945c..74b7f27af71a 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -141,6 +141,14 @@ structs, ioctls) must be noted in more detail in the history chapter
141applications. --> 141applications. -->
142 142
143 <revision> 143 <revision>
144 <revnumber>3.14</revnumber>
145 <date>2013-11-25</date>
146 <authorinitials>rr</authorinitials>
147 <revremark>Set width and height as unsigned on v4l2_rect.
148 </revremark>
149 </revision>
150
151 <revision>
144 <revnumber>3.11</revnumber> 152 <revnumber>3.11</revnumber>
145 <date>2013-05-26</date> 153 <date>2013-05-26</date>
146 <authorinitials>hv</authorinitials> 154 <authorinitials>hv</authorinitials>
@@ -501,7 +509,7 @@ and discussions on the V4L mailing list.</revremark>
501</partinfo> 509</partinfo>
502 510
503<title>Video for Linux Two API Specification</title> 511<title>Video for Linux Two API Specification</title>
504 <subtitle>Revision 3.11</subtitle> 512 <subtitle>Revision 3.14</subtitle>
505 513
506 <chapter id="common"> 514 <chapter id="common">
507 &sub-common; 515 &sub-common;
diff --git a/Documentation/DocBook/media/v4l/vidioc-cropcap.xml b/Documentation/DocBook/media/v4l/vidioc-cropcap.xml
index bf7cc979fdfa..1f5ed64cd75a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-cropcap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-cropcap.xml
@@ -133,18 +133,14 @@ rectangle, in pixels.</entry>
133rectangle, in pixels.</entry> 133rectangle, in pixels.</entry>
134 </row> 134 </row>
135 <row> 135 <row>
136 <entry>__s32</entry> 136 <entry>__u32</entry>
137 <entry><structfield>width</structfield></entry> 137 <entry><structfield>width</structfield></entry>
138 <entry>Width of the rectangle, in pixels.</entry> 138 <entry>Width of the rectangle, in pixels.</entry>
139 </row> 139 </row>
140 <row> 140 <row>
141 <entry>__s32</entry> 141 <entry>__u32</entry>
142 <entry><structfield>height</structfield></entry> 142 <entry><structfield>height</structfield></entry>
143 <entry>Height of the rectangle, in pixels. Width 143 <entry>Height of the rectangle, in pixels.</entry>
144and height cannot be negative, the fields are signed for
145hysterical reasons. <!-- video4linux-list@redhat.com
146on 22 Oct 2002 subject "Re:[V4L][patches!] Re:v4l2/kernel-2.5" -->
147</entry>
148 </row> 144 </row>
149 </tbody> 145 </tbody>
150 </tgroup> 146 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-streamon.xml b/Documentation/DocBook/media/v4l/vidioc-streamon.xml
index 716ea15e54a1..65dff55079d7 100644
--- a/Documentation/DocBook/media/v4l/vidioc-streamon.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-streamon.xml
@@ -59,7 +59,7 @@ buffers are filled (if there are any empty buffers in the incoming
59queue) until <constant>VIDIOC_STREAMON</constant> has been called. 59queue) until <constant>VIDIOC_STREAMON</constant> has been called.
60Accordingly the output hardware is disabled, no video signal is 60Accordingly the output hardware is disabled, no video signal is
61produced until <constant>VIDIOC_STREAMON</constant> has been called. 61produced until <constant>VIDIOC_STREAMON</constant> has been called.
62The ioctl will succeed only when at least one output buffer is in the 62The ioctl will succeed when at least one output buffer is in the
63incoming queue.</para> 63incoming queue.</para>
64 64
65 <para>The <constant>VIDIOC_STREAMOFF</constant> ioctl, apart of 65 <para>The <constant>VIDIOC_STREAMOFF</constant> ioctl, apart of
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
index 52e1da16a309..5108afb3645c 100644
--- a/Documentation/cgroups/resource_counter.txt
+++ b/Documentation/cgroups/resource_counter.txt
@@ -95,7 +95,7 @@ to work with it.
95 95
96 f. u64 res_counter_uncharge_until 96 f. u64 res_counter_uncharge_until
97 (struct res_counter *rc, struct res_counter *top, 97 (struct res_counter *rc, struct res_counter *top,
98 unsinged long val) 98 unsigned long val)
99 99
100 Almost same as res_counter_uncharge() but propagation of uncharge 100 Almost same as res_counter_uncharge() but propagation of uncharge
101 stops when rc == top. This is useful when kill a res_counter in 101 stops when rc == top. This is useful when kill a res_counter in
diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
new file mode 100644
index 000000000000..937b755baf8f
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
@@ -0,0 +1,11 @@
1Samsung S5P/EXYNOS SoC series JPEG codec
2
3Required properties:
4
5- compatible : should be one of:
6 "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg";
7- reg : address and length of the JPEG codec IP register set;
8- interrupts : specifies the JPEG codec IP interrupt;
9- clocks : should contain the JPEG codec IP gate clock specifier, from the
10 common clock bindings;
11- clock-names : should contain "jpeg" entry.
diff --git a/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt b/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt
new file mode 100644
index 000000000000..1f51e0439c96
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt
@@ -0,0 +1,58 @@
1Samsung S5K5BAF UXGA 1/5" 2M CMOS Image Sensor with embedded SoC ISP
2--------------------------------------------------------------------
3
4Required properties:
5
6- compatible : "samsung,s5k5baf";
7- reg : I2C slave address of the sensor;
8- vdda-supply : analog power supply 2.8V (2.6V to 3.0V);
9- vddreg-supply : regulator input power supply 1.8V (1.7V to 1.9V)
10 or 2.8V (2.6V to 3.0);
11- vddio-supply : I/O power supply 1.8V (1.65V to 1.95V)
12 or 2.8V (2.5V to 3.1V);
13- stbyn-gpios : GPIO connected to STDBYN pin;
14- rstn-gpios : GPIO connected to RSTN pin;
15- clocks : list of phandle and clock specifier pairs
16 according to common clock bindings for the
17 clocks described in clock-names;
18- clock-names : should include "mclk" for the sensor's master clock;
19
20Optional properties:
21
22- clock-frequency : the frequency at which the "mclk" clock should be
23 configured to operate, in Hz; if this property is not
24 specified default 24 MHz value will be used.
25
26The device node should contain one 'port' child node with one child 'endpoint'
27node, according to the bindings defined in Documentation/devicetree/bindings/
28media/video-interfaces.txt. The following are properties specific to those
29nodes.
30
31endpoint node
32-------------
33
34- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in
35 video-interfaces.txt. If present it should be <1> - the device
36 supports only one data lane without re-mapping.
37
38Example:
39
40s5k5bafx@2d {
41 compatible = "samsung,s5k5baf";
42 reg = <0x2d>;
43 vdda-supply = <&cam_io_en_reg>;
44 vddreg-supply = <&vt_core_15v_reg>;
45 vddio-supply = <&vtcam_reg>;
46 stbyn-gpios = <&gpl2 0 1>;
47 rstn-gpios = <&gpl2 1 1>;
48 clock-names = "mclk";
49 clocks = <&clock_cam 0>;
50 clock-frequency = <24000000>;
51
52 port {
53 s5k5bafx_ep: endpoint {
54 remote-endpoint = <&csis1_ep>;
55 data-lanes = <1>;
56 };
57 };
58};
diff --git a/Documentation/video4linux/omap4_camera.txt b/Documentation/video4linux/omap4_camera.txt
new file mode 100644
index 000000000000..25d9b40a4651
--- /dev/null
+++ b/Documentation/video4linux/omap4_camera.txt
@@ -0,0 +1,60 @@
1 OMAP4 ISS Driver
2 ================
3
4Introduction
5------------
6
7The OMAP44XX family of chips contains the Imaging SubSystem (a.k.a. ISS),
8Which contains several components that can be categorized in 3 big groups:
9
10- Interfaces (2 Interfaces: CSI2-A & CSI2-B/CCP2)
11- ISP (Image Signal Processor)
12- SIMCOP (Still Image Coprocessor)
13
14For more information, please look in [1] for latest version of:
15 "OMAP4430 Multimedia Device Silicon Revision 2.x"
16
17As of Revision AB, the ISS is described in detail in section 8.
18
19This driver is supporting _only_ the CSI2-A/B interfaces for now.
20
21It makes use of the Media Controller framework [2], and inherited most of the
22code from OMAP3 ISP driver (found under drivers/media/platform/omap3isp/*),
23except that it doesn't need an IOMMU now for ISS buffers memory mapping.
24
25Supports usage of MMAP buffers only (for now).
26
27Tested platforms
28----------------
29
30- OMAP4430SDP, w/ ES2.1 GP & SEVM4430-CAM-V1-0 (Contains IMX060 & OV5640, in
31 which only the last one is supported, outputting YUV422 frames).
32
33- TI Blaze MDP, w/ OMAP4430 ES2.2 EMU (Contains 1 IMX060 & 2 OV5650 sensors, in
34 which only the OV5650 are supported, outputting RAW10 frames).
35
36- PandaBoard, Rev. A2, w/ OMAP4430 ES2.1 GP & OV adapter board, tested with
37 following sensors:
38 * OV5640
39 * OV5650
40
41- Tested on mainline kernel:
42
43 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=summary
44
45 Tag: v3.3 (commit c16fa4f2ad19908a47c63d8fa436a1178438c7e7)
46
47File list
48---------
49drivers/staging/media/omap4iss/
50include/media/omap4iss.h
51
52References
53----------
54
55[1] http://focus.ti.com/general/docs/wtbu/wtbudocumentcenter.tsp?navigationId=12037&templateId=6123#62
56[2] http://lwn.net/Articles/420485/
57[3] http://www.spinics.net/lists/linux-media/msg44370.html
58--
59Author: Sergio Aguirre <sergio.a.aguirre@gmail.com>
60Copyright (C) 2012, Texas Instruments
diff --git a/Documentation/video4linux/si476x.txt b/Documentation/video4linux/si476x.txt
index 2f9b4875ab8a..616607955aaf 100644
--- a/Documentation/video4linux/si476x.txt
+++ b/Documentation/video4linux/si476x.txt
@@ -147,7 +147,7 @@ The drivers exposes following files:
147 -------------------------------------------------------------------- 147 --------------------------------------------------------------------
148 0x12 | readfreq | Current tuned frequency 148 0x12 | readfreq | Current tuned frequency
149 -------------------------------------------------------------------- 149 --------------------------------------------------------------------
150 0x14 | freqoff | Singed frequency offset in units of 150 0x14 | freqoff | Signed frequency offset in units of
151 | | 2ppm 151 | | 2ppm
152 -------------------------------------------------------------------- 152 --------------------------------------------------------------------
153 0x15 | rssi | Signed value of RSSI in dBuV 153 0x15 | rssi | Signed value of RSSI in dBuV
diff --git a/Documentation/video4linux/sn9c102.txt b/Documentation/video4linux/sn9c102.txt
deleted file mode 100644
index b4f67040403a..000000000000
--- a/Documentation/video4linux/sn9c102.txt
+++ /dev/null
@@ -1,592 +0,0 @@
1
2 SN9C1xx PC Camera Controllers
3 Driver for Linux
4 =============================
5
6 - Documentation -
7
8
9Index
10=====
111. Copyright
122. Disclaimer
133. License
144. Overview and features
155. Module dependencies
166. Module loading
177. Module parameters
188. Optional device control through "sysfs"
199. Supported devices
2010. Notes for V4L2 application developers
2111. Video frame formats
2212. Contact information
2313. Credits
24
25
261. Copyright
27============
28Copyright (C) 2004-2007 by Luca Risolia <luca.risolia@studio.unibo.it>
29
30
312. Disclaimer
32=============
33SONiX is a trademark of SONiX Technology Company Limited, inc.
34This software is not sponsored or developed by SONiX.
35
36
373. License
38==========
39This program is free software; you can redistribute it and/or modify
40it under the terms of the GNU General Public License as published by
41the Free Software Foundation; either version 2 of the License, or
42(at your option) any later version.
43
44This program is distributed in the hope that it will be useful,
45but WITHOUT ANY WARRANTY; without even the implied warranty of
46MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47GNU General Public License for more details.
48
49You should have received a copy of the GNU General Public License
50along with this program; if not, write to the Free Software
51Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
52
53
544. Overview and features
55========================
56This driver attempts to support the video interface of the devices assembling
57the SONiX SN9C101, SN9C102, SN9C103, SN9C105 and SN9C120 PC Camera Controllers
58("SN9C1xx" from now on).
59
60The driver relies on the Video4Linux2 and USB core modules. It has been
61designed to run properly on SMP systems as well.
62
63The latest version of the SN9C1xx driver can be found at the following URL:
64http://www.linux-projects.org/
65
66Some of the features of the driver are:
67
68- full compliance with the Video4Linux2 API (see also "Notes for V4L2
69 application developers" paragraph);
70- available mmap or read/poll methods for video streaming through isochronous
71 data transfers;
72- automatic detection of image sensor;
73- support for built-in microphone interface;
74- support for any window resolutions and optional panning within the maximum
75 pixel area of image sensor;
76- image downscaling with arbitrary scaling factors from 1, 2 and 4 in both
77 directions (see "Notes for V4L2 application developers" paragraph);
78- two different video formats for uncompressed or compressed data in low or
79 high compression quality (see also "Notes for V4L2 application developers"
80 and "Video frame formats" paragraphs);
81- full support for the capabilities of many of the possible image sensors that
82 can be connected to the SN9C1xx bridges, including, for instance, red, green,
83 blue and global gain adjustments and exposure (see "Supported devices"
84 paragraph for details);
85- use of default color settings for sunlight conditions;
86- dynamic I/O interface for both SN9C1xx and image sensor control and
87 monitoring (see "Optional device control through 'sysfs'" paragraph);
88- dynamic driver control thanks to various module parameters (see "Module
89 parameters" paragraph);
90- up to 64 cameras can be handled at the same time; they can be connected and
91 disconnected from the host many times without turning off the computer, if
92 the system supports hotplugging;
93- no known bugs.
94
95
965. Module dependencies
97======================
98For it to work properly, the driver needs kernel support for Video4Linux and
99USB.
100
101The following options of the kernel configuration file must be enabled and
102corresponding modules must be compiled:
103
104 # Multimedia devices
105 #
106 CONFIG_VIDEO_DEV=m
107
108To enable advanced debugging functionality on the device through /sysfs:
109
110 # Multimedia devices
111 #
112 CONFIG_VIDEO_ADV_DEBUG=y
113
114 # USB support
115 #
116 CONFIG_USB=m
117
118In addition, depending on the hardware being used, the modules below are
119necessary:
120
121 # USB Host Controller Drivers
122 #
123 CONFIG_USB_EHCI_HCD=m
124 CONFIG_USB_UHCI_HCD=m
125 CONFIG_USB_OHCI_HCD=m
126
127The SN9C103, SN9c105 and SN9C120 controllers also provide a built-in microphone
128interface. It is supported by the USB Audio driver thanks to the ALSA API:
129
130 # Sound
131 #
132 CONFIG_SOUND=y
133
134 # Advanced Linux Sound Architecture
135 #
136 CONFIG_SND=m
137
138 # USB devices
139 #
140 CONFIG_SND_USB_AUDIO=m
141
142And finally:
143
144 # USB Multimedia devices
145 #
146 CONFIG_USB_SN9C102=m
147
148
1496. Module loading
150=================
151To use the driver, it is necessary to load the "sn9c102" module into memory
152after every other module required: "videodev", "v4l2_common", "compat_ioctl32",
153"usbcore" and, depending on the USB host controller you have, "ehci-hcd",
154"uhci-hcd" or "ohci-hcd".
155
156Loading can be done as shown below:
157
158 [root@localhost home]# modprobe sn9c102
159
160Note that the module is called "sn9c102" for historic reasons, although it
161does not just support the SN9C102.
162
163At this point all the devices supported by the driver and connected to the USB
164ports should be recognized. You can invoke "dmesg" to analyze kernel messages
165and verify that the loading process has gone well:
166
167 [user@localhost home]$ dmesg
168
169or, to isolate all the kernel messages generated by the driver:
170
171 [user@localhost home]$ dmesg | grep sn9c102
172
173
1747. Module parameters
175====================
176Module parameters are listed below:
177-------------------------------------------------------------------------------
178Name: video_nr
179Type: short array (min = 0, max = 64)
180Syntax: <-1|n[,...]>
181Description: Specify V4L2 minor mode number:
182 -1 = use next available
183 n = use minor number n
184 You can specify up to 64 cameras this way.
185 For example:
186 video_nr=-1,2,-1 would assign minor number 2 to the second
187 recognized camera and use auto for the first one and for every
188 other camera.
189Default: -1
190-------------------------------------------------------------------------------
191Name: force_munmap
192Type: bool array (min = 0, max = 64)
193Syntax: <0|1[,...]>
194Description: Force the application to unmap previously mapped buffer memory
195 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not
196 all the applications support this feature. This parameter is
197 specific for each detected camera.
198 0 = do not force memory unmapping
199 1 = force memory unmapping (save memory)
200Default: 0
201-------------------------------------------------------------------------------
202Name: frame_timeout
203Type: uint array (min = 0, max = 64)
204Syntax: <0|n[,...]>
205Description: Timeout for a video frame in seconds before returning an I/O
206 error; 0 for infinity. This parameter is specific for each
207 detected camera and can be changed at runtime thanks to the
208 /sys filesystem interface.
209Default: 2
210-------------------------------------------------------------------------------
211Name: debug
212Type: ushort
213Syntax: <n>
214Description: Debugging information level, from 0 to 3:
215 0 = none (use carefully)
216 1 = critical errors
217 2 = significant information
218 3 = more verbose messages
219 Level 3 is useful for testing only. It also shows some more
220 information about the hardware being detected.
221 This parameter can be changed at runtime thanks to the /sys
222 filesystem interface.
223Default: 2
224-------------------------------------------------------------------------------
225
226
2278. Optional device control through "sysfs" [1]
228==========================================
229If the kernel has been compiled with the CONFIG_VIDEO_ADV_DEBUG option enabled,
230it is possible to read and write both the SN9C1xx and the image sensor
231registers by using the "sysfs" filesystem interface.
232
233Every time a supported device is recognized, a write-only file named "green" is
234created in the /sys/class/video4linux/videoX directory. You can set the green
235channel's gain by writing the desired value to it. The value may range from 0
236to 15 for the SN9C101 or SN9C102 bridges, from 0 to 127 for the SN9C103,
237SN9C105 and SN9C120 bridges.
238Similarly, only for the SN9C103, SN9C105 and SN9C120 controllers, blue and red
239gain control files are available in the same directory, for which accepted
240values may range from 0 to 127.
241
242There are other four entries in the directory above for each registered camera:
243"reg", "val", "i2c_reg" and "i2c_val". The first two files control the
244SN9C1xx bridge, while the other two control the sensor chip. "reg" and
245"i2c_reg" hold the values of the current register index where the following
246reading/writing operations are addressed at through "val" and "i2c_val". Their
247use is not intended for end-users. Note that "i2c_reg" and "i2c_val" will not
248be created if the sensor does not actually support the standard I2C protocol or
249its registers are not 8-bit long. Also, remember that you must be logged in as
250root before writing to them.
251
252As an example, suppose we were to want to read the value contained in the
253register number 1 of the sensor register table - which is usually the product
254identifier - of the camera registered as "/dev/video0":
255
256 [root@localhost #] cd /sys/class/video4linux/video0
257 [root@localhost #] echo 1 > i2c_reg
258 [root@localhost #] cat i2c_val
259
260Note that "cat" will fail if sensor registers cannot be read.
261
262Now let's set the green gain's register of the SN9C101 or SN9C102 chips to 2:
263
264 [root@localhost #] echo 0x11 > reg
265 [root@localhost #] echo 2 > val
266
267Note that the SN9C1xx always returns 0 when some of its registers are read.
268To avoid race conditions, all the I/O accesses to the above files are
269serialized.
270The sysfs interface also provides the "frame_header" entry, which exports the
271frame header of the most recent requested and captured video frame. The header
272is always 18-bytes long and is appended to every video frame by the SN9C1xx
273controllers. As an example, this additional information can be used by the user
274application for implementing auto-exposure features via software.
275
276The following table describes the frame header exported by the SN9C101 and
277SN9C102:
278
279Byte # Value or bits Description
280------ ------------- -----------
2810x00 0xFF Frame synchronisation pattern
2820x01 0xFF Frame synchronisation pattern
2830x02 0x00 Frame synchronisation pattern
2840x03 0xC4 Frame synchronisation pattern
2850x04 0xC4 Frame synchronisation pattern
2860x05 0x96 Frame synchronisation pattern
2870x06 [3:0] Read channel gain control = (1+R_GAIN/8)
288 [7:4] Blue channel gain control = (1+B_GAIN/8)
2890x07 [ 0 ] Compression mode. 0=No compression, 1=Compression enabled
290 [2:1] Maximum scale factor for compression
291 [ 3 ] 1 = USB fifo(2K bytes) is full
292 [ 4 ] 1 = Digital gain is finish
293 [ 5 ] 1 = Exposure is finish
294 [7:6] Frame index
2950x08 [7:0] Y sum inside Auto-Exposure area (low-byte)
2960x09 [7:0] Y sum inside Auto-Exposure area (high-byte)
297 where Y sum = (R/4 + 5G/16 + B/8) / 32
2980x0A [7:0] Y sum outside Auto-Exposure area (low-byte)
2990x0B [7:0] Y sum outside Auto-Exposure area (high-byte)
300 where Y sum = (R/4 + 5G/16 + B/8) / 128
3010x0C 0xXX Not used
3020x0D 0xXX Not used
3030x0E 0xXX Not used
3040x0F 0xXX Not used
3050x10 0xXX Not used
3060x11 0xXX Not used
307
308The following table describes the frame header exported by the SN9C103:
309
310Byte # Value or bits Description
311------ ------------- -----------
3120x00 0xFF Frame synchronisation pattern
3130x01 0xFF Frame synchronisation pattern
3140x02 0x00 Frame synchronisation pattern
3150x03 0xC4 Frame synchronisation pattern
3160x04 0xC4 Frame synchronisation pattern
3170x05 0x96 Frame synchronisation pattern
3180x06 [6:0] Read channel gain control = (1/2+R_GAIN/64)
3190x07 [6:0] Blue channel gain control = (1/2+B_GAIN/64)
320 [7:4]
3210x08 [ 0 ] Compression mode. 0=No compression, 1=Compression enabled
322 [2:1] Maximum scale factor for compression
323 [ 3 ] 1 = USB fifo(2K bytes) is full
324 [ 4 ] 1 = Digital gain is finish
325 [ 5 ] 1 = Exposure is finish
326 [7:6] Frame index
3270x09 [7:0] Y sum inside Auto-Exposure area (low-byte)
3280x0A [7:0] Y sum inside Auto-Exposure area (high-byte)
329 where Y sum = (R/4 + 5G/16 + B/8) / 32
3300x0B [7:0] Y sum outside Auto-Exposure area (low-byte)
3310x0C [7:0] Y sum outside Auto-Exposure area (high-byte)
332 where Y sum = (R/4 + 5G/16 + B/8) / 128
3330x0D [1:0] Audio frame number
334 [ 2 ] 1 = Audio is recording
3350x0E [7:0] Audio summation (low-byte)
3360x0F [7:0] Audio summation (high-byte)
3370x10 [7:0] Audio sample count
3380x11 [7:0] Audio peak data in audio frame
339
340The AE area (sx, sy, ex, ey) in the active window can be set by programming the
341registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C1xx controllers, where one unit
342corresponds to 32 pixels.
343
344[1] The frame headers exported by the SN9C105 and SN9C120 are not described.
345
346
3479. Supported devices
348====================
349None of the names of the companies as well as their products will be mentioned
350here. They have never collaborated with the author, so no advertising.
351
352From the point of view of a driver, what unambiguously identify a device are
353its vendor and product USB identifiers. Below is a list of known identifiers of
354devices assembling the SN9C1xx PC camera controllers:
355
356Vendor ID Product ID
357--------- ----------
3580x0458 0x7025
3590x045e 0x00f5
3600x045e 0x00f7
3610x0471 0x0327
3620x0471 0x0328
3630x0c45 0x6001
3640x0c45 0x6005
3650x0c45 0x6007
3660x0c45 0x6009
3670x0c45 0x600d
3680x0c45 0x6011
3690x0c45 0x6019
3700x0c45 0x6024
3710x0c45 0x6025
3720x0c45 0x6028
3730x0c45 0x6029
3740x0c45 0x602a
3750x0c45 0x602b
3760x0c45 0x602c
3770x0c45 0x602d
3780x0c45 0x602e
3790x0c45 0x6030
3800x0c45 0x603f
3810x0c45 0x6080
3820x0c45 0x6082
3830x0c45 0x6083
3840x0c45 0x6088
3850x0c45 0x608a
3860x0c45 0x608b
3870x0c45 0x608c
3880x0c45 0x608e
3890x0c45 0x608f
3900x0c45 0x60a0
3910x0c45 0x60a2
3920x0c45 0x60a3
3930x0c45 0x60a8
3940x0c45 0x60aa
3950x0c45 0x60ab
3960x0c45 0x60ac
3970x0c45 0x60ae
3980x0c45 0x60af
3990x0c45 0x60b0
4000x0c45 0x60b2
4010x0c45 0x60b3
4020x0c45 0x60b8
4030x0c45 0x60ba
4040x0c45 0x60bb
4050x0c45 0x60bc
4060x0c45 0x60be
4070x0c45 0x60c0
4080x0c45 0x60c2
4090x0c45 0x60c8
4100x0c45 0x60cc
4110x0c45 0x60ea
4120x0c45 0x60ec
4130x0c45 0x60ef
4140x0c45 0x60fa
4150x0c45 0x60fb
4160x0c45 0x60fc
4170x0c45 0x60fe
4180x0c45 0x6102
4190x0c45 0x6108
4200x0c45 0x610f
4210x0c45 0x6130
4220x0c45 0x6138
4230x0c45 0x613a
4240x0c45 0x613b
4250x0c45 0x613c
4260x0c45 0x613e
427
428The list above does not imply that all those devices work with this driver: up
429until now only the ones that assemble the following pairs of SN9C1xx bridges
430and image sensors are supported; kernel messages will always tell you whether
431this is the case (see "Module loading" paragraph):
432
433Image sensor / SN9C1xx bridge | SN9C10[12] SN9C103 SN9C105 SN9C120
434-------------------------------------------------------------------------------
435HV7131D Hynix Semiconductor | Yes No No No
436HV7131R Hynix Semiconductor | No Yes Yes Yes
437MI-0343 Micron Technology | Yes No No No
438MI-0360 Micron Technology | No Yes Yes Yes
439OV7630 OmniVision Technologies | Yes Yes Yes Yes
440OV7660 OmniVision Technologies | No No Yes Yes
441PAS106B PixArt Imaging | Yes No No No
442PAS202B PixArt Imaging | Yes Yes No No
443TAS5110C1B Taiwan Advanced Sensor | Yes No No No
444TAS5110D Taiwan Advanced Sensor | Yes No No No
445TAS5130D1B Taiwan Advanced Sensor | Yes No No No
446
447"Yes" means that the pair is supported by the driver, while "No" means that the
448pair does not exist or is not supported by the driver.
449
450Only some of the available control settings of each image sensor are supported
451through the V4L2 interface.
452
453Donations of new models for further testing and support would be much
454appreciated. Non-available hardware will not be supported by the author of this
455driver.
456
457
45810. Notes for V4L2 application developers
459=========================================
460This driver follows the V4L2 API specifications. In particular, it enforces two
461rules:
462
463- exactly one I/O method, either "mmap" or "read", is associated with each
464file descriptor. Once it is selected, the application must close and reopen the
465device to switch to the other I/O method;
466
467- although it is not mandatory, previously mapped buffer memory should always
468be unmapped before calling any "VIDIOC_S_CROP" or "VIDIOC_S_FMT" ioctl's.
469The same number of buffers as before will be allocated again to match the size
470of the new video frames, so you have to map the buffers again before any I/O
471attempts on them.
472
473Consistently with the hardware limits, this driver also supports image
474downscaling with arbitrary scaling factors from 1, 2 and 4 in both directions.
475However, the V4L2 API specifications don't correctly define how the scaling
476factor can be chosen arbitrarily by the "negotiation" of the "source" and
477"target" rectangles. To work around this flaw, we have added the convention
478that, during the negotiation, whenever the "VIDIOC_S_CROP" ioctl is issued, the
479scaling factor is restored to 1.
480
481This driver supports two different video formats: the first one is the "8-bit
482Sequential Bayer" format and can be used to obtain uncompressed video data
483from the device through the current I/O method, while the second one provides
484either "raw" compressed video data (without frame headers not related to the
485compressed data) or standard JPEG (with frame headers). The compression quality
486may vary from 0 to 1 and can be selected or queried thanks to the
487VIDIOC_S_JPEGCOMP and VIDIOC_G_JPEGCOMP V4L2 ioctl's. For maximum flexibility,
488both the default active video format and the default compression quality
489depend on how the image sensor being used is initialized.
490
491
49211. Video frame formats [1]
493=======================
494The SN9C1xx PC Camera Controllers can send images in two possible video
495formats over the USB: either native "Sequential RGB Bayer" or compressed.
496The compression is used to achieve high frame rates. With regard to the
497SN9C101, SN9C102 and SN9C103, the compression is based on the Huffman encoding
498algorithm described below, while with regard to the SN9C105 and SN9C120 the
499compression is based on the JPEG standard.
500The current video format may be selected or queried from the user application
501by calling the VIDIOC_S_FMT or VIDIOC_G_FMT ioctl's, as described in the V4L2
502API specifications.
503
504The name "Sequential Bayer" indicates the organization of the red, green and
505blue pixels in one video frame. Each pixel is associated with a 8-bit long
506value and is disposed in memory according to the pattern shown below:
507
508B[0] G[1] B[2] G[3] ... B[m-2] G[m-1]
509G[m] R[m+1] G[m+2] R[m+2] ... G[2m-2] R[2m-1]
510...
511... B[(n-1)(m-2)] G[(n-1)(m-1)]
512... G[n(m-2)] R[n(m-1)]
513
514The above matrix also represents the sequential or progressive read-out mode of
515the (n, m) Bayer color filter array used in many CCD or CMOS image sensors.
516
517The Huffman compressed video frame consists of a bitstream that encodes for
518every R, G, or B pixel the difference between the value of the pixel itself and
519some reference pixel value. Pixels are organised in the Bayer pattern and the
520Bayer sub-pixels are tracked individually and alternatingly. For example, in
521the first line values for the B and G1 pixels are alternatingly encoded, while
522in the second line values for the G2 and R pixels are alternatingly encoded.
523
524The pixel reference value is calculated as follows:
525- the 4 top left pixels are encoded in raw uncompressed 8-bit format;
526- the value in the top two rows is the value of the pixel left of the current
527 pixel;
528- the value in the left column is the value of the pixel above the current
529 pixel;
530- for all other pixels, the reference value is the average of the value of the
531 pixel on the left and the value of the pixel above the current pixel;
532- there is one code in the bitstream that specifies the value of a pixel
533 directly (in 4-bit resolution);
534- pixel values need to be clamped inside the range [0..255] for proper
535 decoding.
536
537The algorithm purely describes the conversion from compressed Bayer code used
538in the SN9C101, SN9C102 and SN9C103 chips to uncompressed Bayer. Additional
539steps are required to convert this to a color image (i.e. a color interpolation
540algorithm).
541
542The following Huffman codes have been found:
5430: +0 (relative to reference pixel value)
544100: +4
545101: -4?
5461110xxxx: set absolute value to xxxx.0000
5471101: +11
5481111: -11
54911001: +20
550110000: -20
551110001: ??? - these codes are apparently not used
552
553[1] The Huffman compression algorithm has been reverse-engineered and
554 documented by Bertrik Sikken.
555
556
55712. Contact information
558=======================
559The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
560
561GPG/PGP encrypted e-mail's are accepted. The GPG key ID of the author is
562'FCE635A4'; the public 1024-bit key should be available at any keyserver;
563the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'.
564
565
56613. Credits
567===========
568Many thanks to following persons for their contribute (listed in alphabetical
569order):
570
571- David Anderson for the donation of a webcam;
572- Luca Capello for the donation of a webcam;
573- Philippe Coval for having helped testing the PAS202BCA image sensor;
574- Joao Rodrigo Fuzaro, Joao Limirio, Claudio Filho and Caio Begotti for the
575 donation of a webcam;
576- Dennis Heitmann for the donation of a webcam;
577- Jon Hollstrom for the donation of a webcam;
578- Nick McGill for the donation of a webcam;
579- Carlos Eduardo Medaglia Dyonisio, who added the support for the PAS202BCB
580 image sensor;
581- Stefano Mozzi, who donated 45 EU;
582- Andrew Pearce for the donation of a webcam;
583- John Pullan for the donation of a webcam;
584- Bertrik Sikken, who reverse-engineered and documented the Huffman compression
585 algorithm used in the SN9C101, SN9C102 and SN9C103 controllers and
586 implemented the first decoder;
587- Ronny Standke for the donation of a webcam;
588- Mizuno Takafumi for the donation of a webcam;
589- an "anonymous" donator (who didn't want his name to be revealed) for the
590 donation of a webcam.
591- an anonymous donator for the donation of four webcams and two boards with ten
592 image sensors.