提交 0851668f 编写于 作者: L Linus Torvalds

Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits)
  [media] af9015: Fix max I2C message size when used with tda18271
  [media] IR: initialize ir_raw_event in few more drivers
  [media] Guard a divide in v4l1 compat layer
  [media] imon: fix nomouse modprobe option
  [media] imon: remove redundant change_protocol call
  [media] imon: fix my egregious brown paper bag w/rdev/idev split
  [media] cafe_ccic: Configure ov7670 correctly
  [media] ov7670: allow configuration of image size, clock speed, and I/O method
  [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016]
  [media] af9015: map DigitalNow TinyTwin v2 remote
  [media] DigitalNow TinyTwin remote controller
  [media] af9015: RC fixes and improvements
  videodev2.h.xml: Update to reflect the latest changes at videodev2.h
  [media] v4l: document new Bayer and monochrome pixel formats
  [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028
  [media] firedtv: add parameter to fake ca_system_ids in CA_INFO
  [media] tm6000: fix a macro coding style issue
  tm6000: Remove some ugly debug code
  [media] Nova-S-Plus audio line input
  [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers
  ...
...@@ -250,6 +250,9 @@ ...@@ -250,6 +250,9 @@
<!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> <!ENTITY sub-yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
<!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> <!ENTITY sub-yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
<!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> <!ENTITY sub-yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
<!ENTITY sub-srggb10 SYSTEM "v4l/pixfmt-srggb10.xml">
<!ENTITY sub-srggb8 SYSTEM "v4l/pixfmt-srggb8.xml">
<!ENTITY sub-y10 SYSTEM "v4l/pixfmt-y10.xml">
<!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml"> <!ENTITY sub-pixfmt SYSTEM "v4l/pixfmt.xml">
<!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml"> <!ENTITY sub-cropcap SYSTEM "v4l/vidioc-cropcap.xml">
<!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> <!ENTITY sub-dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml">
...@@ -347,6 +350,9 @@ ...@@ -347,6 +350,9 @@
<!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml"> <!ENTITY yuv422p SYSTEM "v4l/pixfmt-yuv422p.xml">
<!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml"> <!ENTITY yuyv SYSTEM "v4l/pixfmt-yuyv.xml">
<!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml"> <!ENTITY yvyu SYSTEM "v4l/pixfmt-yvyu.xml">
<!ENTITY srggb10 SYSTEM "v4l/pixfmt-srggb10.xml">
<!ENTITY srggb8 SYSTEM "v4l/pixfmt-srggb8.xml">
<!ENTITY y10 SYSTEM "v4l/pixfmt-y10.xml">
<!ENTITY cropcap SYSTEM "v4l/vidioc-cropcap.xml"> <!ENTITY cropcap SYSTEM "v4l/vidioc-cropcap.xml">
<!ENTITY dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml"> <!ENTITY dbg-g-register SYSTEM "v4l/vidioc-dbg-g-register.xml">
<!ENTITY encoder-cmd SYSTEM "v4l/vidioc-encoder-cmd.xml"> <!ENTITY encoder-cmd SYSTEM "v4l/vidioc-encoder-cmd.xml">
......
...@@ -21,11 +21,15 @@ API.</para> ...@@ -21,11 +21,15 @@ API.</para>
<title>Opening and Closing Devices</title> <title>Opening and Closing Devices</title>
<para>For compatibility reasons the character device file names <para>For compatibility reasons the character device file names
recommended for V4L2 video capture, overlay, radio, teletext and raw recommended for V4L2 video capture, overlay, radio and raw
vbi capture devices did not change from those used by V4L. They are vbi capture devices did not change from those used by V4L. They are
listed in <xref linkend="devices" /> and below in <xref listed in <xref linkend="devices" /> and below in <xref
linkend="v4l-dev" />.</para> linkend="v4l-dev" />.</para>
<para>The teletext devices (minor range 192-223) have been removed in
V4L2 and no longer exist. There is no hardware available anymore for handling
pure teletext. Instead raw or sliced VBI is used.</para>
<para>The V4L <filename>videodev</filename> module automatically <para>The V4L <filename>videodev</filename> module automatically
assigns minor numbers to drivers in load order, depending on the assigns minor numbers to drivers in load order, depending on the
registered device type. We recommend that V4L2 drivers by default registered device type. We recommend that V4L2 drivers by default
...@@ -65,13 +69,6 @@ not compatible with V4L or V4L2.</para> </footnote>, ...@@ -65,13 +69,6 @@ not compatible with V4L or V4L2.</para> </footnote>,
<filename>/dev/radio63</filename></para></entry> <filename>/dev/radio63</filename></para></entry>
<entry>64-127</entry> <entry>64-127</entry>
</row> </row>
<row>
<entry>Teletext decoder</entry>
<entry><para><filename>/dev/vtx</filename>,
<filename>/dev/vtx0</filename> to
<filename>/dev/vtx31</filename></para></entry>
<entry>192-223</entry>
</row>
<row> <row>
<entry>Raw VBI capture</entry> <entry>Raw VBI capture</entry>
<entry><para><filename>/dev/vbi</filename>, <entry><para><filename>/dev/vbi</filename>,
...@@ -2345,6 +2342,17 @@ more information.</para> ...@@ -2345,6 +2342,17 @@ more information.</para>
</listitem> </listitem>
</orderedlist> </orderedlist>
</section> </section>
<section>
<title>V4L2 in Linux 2.6.37</title>
<orderedlist>
<listitem>
<para>Remove the vtx (videotext/teletext) API. This API was no longer
used and no hardware exists to verify the API. Nor were any userspace applications found
that used it. It was originally scheduled for removal in 2.6.35.
</para>
</listitem>
</orderedlist>
</section>
<section id="other"> <section id="other">
<title>Relation of V4L2 to other Linux multimedia APIs</title> <title>Relation of V4L2 to other Linux multimedia APIs</title>
......
...@@ -311,11 +311,18 @@ minimum value disables backlight compensation.</entry> ...@@ -311,11 +311,18 @@ minimum value disables backlight compensation.</entry>
bits 8-15 Green color information, bits 16-23 Blue color bits 8-15 Green color information, bits 16-23 Blue color
information and bits 24-31 must be zero.</entry> information and bits 24-31 must be zero.</entry>
</row> </row>
<row>
<entry><constant>V4L2_CID_ILLUMINATORS_1</constant>
<constant>V4L2_CID_ILLUMINATORS_2</constant></entry>
<entry>boolean</entry>
<entry>Switch on or off the illuminator 1 or 2 of the device
(usually a microscope).</entry>
</row>
<row> <row>
<entry><constant>V4L2_CID_LASTP1</constant></entry> <entry><constant>V4L2_CID_LASTP1</constant></entry>
<entry></entry> <entry></entry>
<entry>End of the predefined control IDs (currently <entry>End of the predefined control IDs (currently
<constant>V4L2_CID_BG_COLOR</constant> + 1).</entry> <constant>V4L2_CID_ILLUMINATORS_2</constant> + 1).</entry>
</row> </row>
<row> <row>
<entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
...@@ -357,9 +364,6 @@ enumerate_menu (void) ...@@ -357,9 +364,6 @@ enumerate_menu (void)
querymenu.index++) { querymenu.index++) {
if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) { if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) {
printf (" %s\n", querymenu.name); printf (" %s\n", querymenu.name);
} else {
perror ("VIDIOC_QUERYMENU");
exit (EXIT_FAILURE);
} }
} }
} }
......
...@@ -3,15 +3,16 @@ ...@@ -3,15 +3,16 @@
<para>The Radio Data System transmits supplementary <para>The Radio Data System transmits supplementary
information in binary format, for example the station name or travel information in binary format, for example the station name or travel
information, on an inaudible audio subcarrier of a radio program. This information, on an inaudible audio subcarrier of a radio program. This
interface is aimed at devices capable of receiving and decoding RDS interface is aimed at devices capable of receiving and/or transmitting RDS
information.</para> information.</para>
<para>For more information see the core RDS standard <xref linkend="en50067" /> <para>For more information see the core RDS standard <xref linkend="en50067" />
and the RBDS standard <xref linkend="nrsc4" />.</para> and the RBDS standard <xref linkend="nrsc4" />.</para>
<para>Note that the RBDS standard as is used in the USA is almost identical <para>Note that the RBDS standard as is used in the USA is almost identical
to the RDS standard. Any RDS decoder can also handle RBDS. Only some of the fields to the RDS standard. Any RDS decoder/encoder can also handle RBDS. Only some of the
have slightly different meanings. See the RBDS standard for more information.</para> fields have slightly different meanings. See the RBDS standard for more
information.</para>
<para>The RBDS standard also specifies support for MMBS (Modified Mobile Search). <para>The RBDS standard also specifies support for MMBS (Modified Mobile Search).
This is a proprietary format which seems to be discontinued. The RDS interface does not This is a proprietary format which seems to be discontinued. The RDS interface does not
...@@ -21,16 +22,25 @@ be needed, then please contact the linux-media mailing list: &v4l-ml;.</para> ...@@ -21,16 +22,25 @@ be needed, then please contact the linux-media mailing list: &v4l-ml;.</para>
<section> <section>
<title>Querying Capabilities</title> <title>Querying Capabilities</title>
<para>Devices supporting the RDS capturing API <para>Devices supporting the RDS capturing API set
set the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in the <constant>V4L2_CAP_RDS_CAPTURE</constant> flag in
the <structfield>capabilities</structfield> field of &v4l2-capability; the <structfield>capabilities</structfield> field of &v4l2-capability;
returned by the &VIDIOC-QUERYCAP; ioctl. returned by the &VIDIOC-QUERYCAP; ioctl. Any tuner that supports RDS
Any tuner that supports RDS will set the will set the <constant>V4L2_TUNER_CAP_RDS</constant> flag in
<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> the <structfield>capability</structfield> field of &v4l2-tuner;. If
field of &v4l2-tuner;. the driver only passes RDS blocks without interpreting the data
Whether an RDS signal is present can be detected by looking at the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be
the <structfield>rxsubchans</structfield> field of &v4l2-tuner;: the set, see <link linkend="reading-rds-data">Reading RDS data</link>.
<constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data was detected.</para> For future use the
flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> has also been
defined. However, a driver for a radio tuner with this capability does
not yet exist, so if you are planning to write such a driver you
should discuss this on the linux-media mailing list: &v4l-ml;.</para>
<para> Whether an RDS signal is present can be detected by looking
at the <structfield>rxsubchans</structfield> field of &v4l2-tuner;:
the <constant>V4L2_TUNER_SUB_RDS</constant> will be set if RDS data
was detected.</para>
<para>Devices supporting the RDS output API <para>Devices supporting the RDS output API
set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in set the <constant>V4L2_CAP_RDS_OUTPUT</constant> flag in
...@@ -40,16 +50,31 @@ Any modulator that supports RDS will set the ...@@ -40,16 +50,31 @@ Any modulator that supports RDS will set the
<constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield> <constant>V4L2_TUNER_CAP_RDS</constant> flag in the <structfield>capability</structfield>
field of &v4l2-modulator;. field of &v4l2-modulator;.
In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant> In order to enable the RDS transmission one must set the <constant>V4L2_TUNER_SUB_RDS</constant>
bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;.</para> bit in the <structfield>txsubchans</structfield> field of &v4l2-modulator;.
If the driver only passes RDS blocks without interpreting the data
the <constant>V4L2_TUNER_SUB_RDS_BLOCK_IO</constant> flag has to be set. If the
tuner is capable of handling RDS entities like program identification codes and radio
text, the flag <constant>V4L2_TUNER_SUB_RDS_CONTROLS</constant> should be set,
see <link linkend="writing-rds-data">Writing RDS data</link> and
<link linkend="fm-tx-controls">FM Transmitter Control Reference</link>.</para>
</section> </section>
<section> <section id="reading-rds-data">
<title>Reading RDS data</title> <title>Reading RDS data</title>
<para>RDS data can be read from the radio device <para>RDS data can be read from the radio device
with the &func-read; function. The data is packed in groups of three bytes, with the &func-read; function. The data is packed in groups of three bytes.</para>
</section>
<section id="writing-rds-data">
<title>Writing RDS data</title>
<para>RDS data can be written to the radio device
with the &func-write; function. The data is packed in groups of three bytes,
as follows:</para> as follows:</para>
</section>
<section>
<table frame="none" pgwide="1" id="v4l2-rds-data"> <table frame="none" pgwide="1" id="v4l2-rds-data">
<title>struct <title>struct
<structname>v4l2_rds_data</structname></title> <structname>v4l2_rds_data</structname></title>
...@@ -111,48 +136,57 @@ as follows:</para> ...@@ -111,48 +136,57 @@ as follows:</para>
<tbody valign="top"> <tbody valign="top">
<row> <row>
<entry>V4L2_RDS_BLOCK_MSK</entry> <entry>V4L2_RDS_BLOCK_MSK</entry>
<entry> </entry>
<entry>7</entry> <entry>7</entry>
<entry>Mask for bits 0-2 to get the block ID.</entry> <entry>Mask for bits 0-2 to get the block ID.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_A</entry> <entry>V4L2_RDS_BLOCK_A</entry>
<entry> </entry>
<entry>0</entry> <entry>0</entry>
<entry>Block A.</entry> <entry>Block A.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_B</entry> <entry>V4L2_RDS_BLOCK_B</entry>
<entry> </entry>
<entry>1</entry> <entry>1</entry>
<entry>Block B.</entry> <entry>Block B.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_C</entry> <entry>V4L2_RDS_BLOCK_C</entry>
<entry> </entry>
<entry>2</entry> <entry>2</entry>
<entry>Block C.</entry> <entry>Block C.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_D</entry> <entry>V4L2_RDS_BLOCK_D</entry>
<entry> </entry>
<entry>3</entry> <entry>3</entry>
<entry>Block D.</entry> <entry>Block D.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_C_ALT</entry> <entry>V4L2_RDS_BLOCK_C_ALT</entry>
<entry> </entry>
<entry>4</entry> <entry>4</entry>
<entry>Block C'.</entry> <entry>Block C'.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_INVALID</entry> <entry>V4L2_RDS_BLOCK_INVALID</entry>
<entry>read-only</entry>
<entry>7</entry> <entry>7</entry>
<entry>An invalid block.</entry> <entry>An invalid block.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_CORRECTED</entry> <entry>V4L2_RDS_BLOCK_CORRECTED</entry>
<entry>read-only</entry>
<entry>0x40</entry> <entry>0x40</entry>
<entry>A bit error was detected but corrected.</entry> <entry>A bit error was detected but corrected.</entry>
</row> </row>
<row> <row>
<entry>V4L2_RDS_BLOCK_ERROR</entry> <entry>V4L2_RDS_BLOCK_ERROR</entry>
<entry>read-only</entry>
<entry>0x80</entry> <entry>0x80</entry>
<entry>An incorrectable error occurred.</entry> <entry>An uncorrectable error occurred.</entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
......
<title>Teletext Interface</title> <title>Teletext Interface</title>
<para>This interface aims at devices receiving and demodulating <para>This interface was aimed at devices receiving and demodulating
Teletext data [<xref linkend="ets300706" />, <xref linkend="itu653" />], evaluating the Teletext data [<xref linkend="ets300706" />, <xref linkend="itu653" />], evaluating the
Teletext packages and storing formatted pages in cache memory. Such Teletext packages and storing formatted pages in cache memory. Such
devices are usually implemented as microcontrollers with serial devices are usually implemented as microcontrollers with serial
interface (I<superscript>2</superscript>C) and can be found on older interface (I<superscript>2</superscript>C) and could be found on old
TV cards, dedicated Teletext decoding cards and home-brew devices TV cards, dedicated Teletext decoding cards and home-brew devices
connected to the PC parallel port.</para> connected to the PC parallel port.</para>
<para>The Teletext API was designed by Martin Buck. It is defined in <para>The Teletext API was designed by Martin Buck. It was defined in
the kernel header file <filename>linux/videotext.h</filename>, the the kernel header file <filename>linux/videotext.h</filename>, the
specification is available from <ulink url="ftp://ftp.gwdg.de/pub/linux/misc/videotext/"> specification is available from <ulink url="ftp://ftp.gwdg.de/pub/linux/misc/videotext/">
ftp://ftp.gwdg.de/pub/linux/misc/videotext/</ulink>. (Videotext is the name of ftp://ftp.gwdg.de/pub/linux/misc/videotext/</ulink>. (Videotext is the name of
the German public television Teletext service.) Conventional character the German public television Teletext service.)</para>
device file names are <filename>/dev/vtx</filename> and
<filename>/dev/vttuner</filename>, with device number 83, 0 and 83, 16
respectively. A similar interface exists for the Philips SAA5249
Teletext decoder [specification?] with character device file names
<filename>/dev/tlkN</filename>, device number 102, N.</para>
<para>Eventually the Teletext API was integrated into the V4L API <para>Eventually the Teletext API was integrated into the V4L API
with character device file names <filename>/dev/vtx0</filename> to with character device file names <filename>/dev/vtx0</filename> to
<filename>/dev/vtx31</filename>, device major number 81, minor numbers <filename>/dev/vtx31</filename>, device major number 81, minor numbers
192 to 223. For reference the V4L Teletext API specification is 192 to 223.</para>
reproduced here in full: "Teletext interfaces talk the existing VTX
API." Teletext devices with major number 83 and 102 will be removed in
Linux 2.6.</para>
<para>There are no plans to replace the Teletext API or to integrate <para>However, teletext decoders were quickly replaced by more
it into V4L2. Please write to the linux-media mailing list: &v4l-ml; generic VBI demodulators and those dedicated teletext decoders no longer exist.
when the need arises.</para> For many years the vtx devices were still around, even though nobody used
them. So the decision was made to finally remove support for the Teletext API in
kernel 2.6.37.</para>
<para>Modern devices all use the <link linkend="raw-vbi">raw</link> or
<link linkend="sliced">sliced</link> VBI API.</para>
<!-- <!--
Local Variables: Local Variables:
......
...@@ -739,7 +739,7 @@ defined in error. Drivers may interpret them as in <xref ...@@ -739,7 +739,7 @@ defined in error. Drivers may interpret them as in <xref
<entry>b<subscript>1</subscript></entry> <entry>b<subscript>1</subscript></entry>
<entry>b<subscript>0</subscript></entry> <entry>b<subscript>0</subscript></entry>
</row> </row>
<row id="V4L2-PIX-FMT-BGR666"> <row><!-- id="V4L2-PIX-FMT-BGR666" -->
<entry><constant>V4L2_PIX_FMT_BGR666</constant></entry> <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry>
<entry>'BGRH'</entry> <entry>'BGRH'</entry>
<entry></entry> <entry></entry>
......
<refentry>
<refmeta>
<refentrytitle>V4L2_PIX_FMT_SRGGB10 ('RG10'),
V4L2_PIX_FMT_SGRBG10 ('BA10'),
V4L2_PIX_FMT_SGBRG10 ('GB10'),
V4L2_PIX_FMT_SBGGR10 ('BG10'),
</refentrytitle>
&manvol;
</refmeta>
<refnamediv>
<refname id="V4L2-PIX-FMT-SRGGB10"><constant>V4L2_PIX_FMT_SRGGB10</constant></refname>
<refname id="V4L2-PIX-FMT-SGRBG10"><constant>V4L2_PIX_FMT_SGRBG10</constant></refname>
<refname id="V4L2-PIX-FMT-SGBRG10"><constant>V4L2_PIX_FMT_SGBRG10</constant></refname>
<refname id="V4L2-PIX-FMT-SBGGR10"><constant>V4L2_PIX_FMT_SBGGR10</constant></refname>
<refpurpose>10-bit Bayer formats expanded to 16 bits</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>The following four pixel formats are raw sRGB / Bayer formats with
10 bits per colour. Each colour component is stored in a 16-bit word, with 6
unused high bits filled with zeros. Each n-pixel row contains n/2 green samples
and n/2 blue or red samples, with alternating red and blue rows. Bytes are
stored in memory in little endian order. They are conventionally described
as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these
formats</para>
<example>
<title><constant>V4L2_PIX_FMT_SBGGR10</constant> 4 &times; 4
pixel image</title>
<formalpara>
<title>Byte Order.</title>
<para>Each cell is one byte, high 6 bits in high bytes are 0.
<informaltable frame="none">
<tgroup cols="5" align="center">
<colspec align="left" colwidth="2*" />
<tbody valign="top">
<row>
<entry>start&nbsp;+&nbsp;0:</entry>
<entry>B<subscript>00low</subscript></entry>
<entry>B<subscript>00high</subscript></entry>
<entry>G<subscript>01low</subscript></entry>
<entry>G<subscript>01high</subscript></entry>
<entry>B<subscript>02low</subscript></entry>
<entry>B<subscript>02high</subscript></entry>
<entry>G<subscript>03low</subscript></entry>
<entry>G<subscript>03high</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;8:</entry>
<entry>G<subscript>10low</subscript></entry>
<entry>G<subscript>10high</subscript></entry>
<entry>R<subscript>11low</subscript></entry>
<entry>R<subscript>11high</subscript></entry>
<entry>G<subscript>12low</subscript></entry>
<entry>G<subscript>12high</subscript></entry>
<entry>R<subscript>13low</subscript></entry>
<entry>R<subscript>13high</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;16:</entry>
<entry>B<subscript>20low</subscript></entry>
<entry>B<subscript>20high</subscript></entry>
<entry>G<subscript>21low</subscript></entry>
<entry>G<subscript>21high</subscript></entry>
<entry>B<subscript>22low</subscript></entry>
<entry>B<subscript>22high</subscript></entry>
<entry>G<subscript>23low</subscript></entry>
<entry>G<subscript>23high</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;24:</entry>
<entry>G<subscript>30low</subscript></entry>
<entry>G<subscript>30high</subscript></entry>
<entry>R<subscript>31low</subscript></entry>
<entry>R<subscript>31high</subscript></entry>
<entry>G<subscript>32low</subscript></entry>
<entry>G<subscript>32high</subscript></entry>
<entry>R<subscript>33low</subscript></entry>
<entry>R<subscript>33high</subscript></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</formalpara>
</example>
</refsect1>
</refentry>
<refentry id="V4L2-PIX-FMT-SRGGB8">
<refmeta>
<refentrytitle>V4L2_PIX_FMT_SRGGB8 ('RGGB')</refentrytitle>
&manvol;
</refmeta>
<refnamediv>
<refname><constant>V4L2_PIX_FMT_SRGGB8</constant></refname>
<refpurpose>Bayer RGB format</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>This is commonly the native format of digital cameras,
reflecting the arrangement of sensors on the CCD device. Only one red,
green or blue value is given for each pixel. Missing components must
be interpolated from neighbouring pixels. From left to right the first
row consists of a red and green value, the second row of a green and
blue value. This scheme repeats to the right and down for every two
columns and rows.</para>
<example>
<title><constant>V4L2_PIX_FMT_SRGGB8</constant> 4 &times; 4
pixel image</title>
<formalpara>
<title>Byte Order.</title>
<para>Each cell is one byte.
<informaltable frame="none">
<tgroup cols="5" align="center">
<colspec align="left" colwidth="2*" />
<tbody valign="top">
<row>
<entry>start&nbsp;+&nbsp;0:</entry>
<entry>R<subscript>00</subscript></entry>
<entry>G<subscript>01</subscript></entry>
<entry>R<subscript>02</subscript></entry>
<entry>G<subscript>03</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;4:</entry>
<entry>G<subscript>10</subscript></entry>
<entry>B<subscript>11</subscript></entry>
<entry>G<subscript>12</subscript></entry>
<entry>B<subscript>13</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;8:</entry>
<entry>R<subscript>20</subscript></entry>
<entry>G<subscript>21</subscript></entry>
<entry>R<subscript>22</subscript></entry>
<entry>G<subscript>23</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;12:</entry>
<entry>G<subscript>30</subscript></entry>
<entry>B<subscript>31</subscript></entry>
<entry>G<subscript>32</subscript></entry>
<entry>B<subscript>33</subscript></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</formalpara>
</example>
</refsect1>
</refentry>
<refentry id="V4L2-PIX-FMT-Y10">
<refmeta>
<refentrytitle>V4L2_PIX_FMT_Y10 ('Y10 ')</refentrytitle>
&manvol;
</refmeta>
<refnamediv>
<refname><constant>V4L2_PIX_FMT_Y10</constant></refname>
<refpurpose>Grey-scale image</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>This is a grey-scale image with a depth of 10 bits per pixel. Pixels
are stored in 16-bit words with unused high bits padded with 0. The least
significant byte is stored at lower memory addresses (little-endian).</para>
<example>
<title><constant>V4L2_PIX_FMT_Y10</constant> 4 &times; 4
pixel image</title>
<formalpara>
<title>Byte Order.</title>
<para>Each cell is one byte.
<informaltable frame="none">
<tgroup cols="9" align="center">
<colspec align="left" colwidth="2*" />
<tbody valign="top">
<row>
<entry>start&nbsp;+&nbsp;0:</entry>
<entry>Y'<subscript>00low</subscript></entry>
<entry>Y'<subscript>00high</subscript></entry>
<entry>Y'<subscript>01low</subscript></entry>
<entry>Y'<subscript>01high</subscript></entry>
<entry>Y'<subscript>02low</subscript></entry>
<entry>Y'<subscript>02high</subscript></entry>
<entry>Y'<subscript>03low</subscript></entry>
<entry>Y'<subscript>03high</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;8:</entry>
<entry>Y'<subscript>10low</subscript></entry>
<entry>Y'<subscript>10high</subscript></entry>
<entry>Y'<subscript>11low</subscript></entry>
<entry>Y'<subscript>11high</subscript></entry>
<entry>Y'<subscript>12low</subscript></entry>
<entry>Y'<subscript>12high</subscript></entry>
<entry>Y'<subscript>13low</subscript></entry>
<entry>Y'<subscript>13high</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;16:</entry>
<entry>Y'<subscript>20low</subscript></entry>
<entry>Y'<subscript>20high</subscript></entry>
<entry>Y'<subscript>21low</subscript></entry>
<entry>Y'<subscript>21high</subscript></entry>
<entry>Y'<subscript>22low</subscript></entry>
<entry>Y'<subscript>22high</subscript></entry>
<entry>Y'<subscript>23low</subscript></entry>
<entry>Y'<subscript>23high</subscript></entry>
</row>
<row>
<entry>start&nbsp;+&nbsp;24:</entry>
<entry>Y'<subscript>30low</subscript></entry>
<entry>Y'<subscript>30high</subscript></entry>
<entry>Y'<subscript>31low</subscript></entry>
<entry>Y'<subscript>31high</subscript></entry>
<entry>Y'<subscript>32low</subscript></entry>
<entry>Y'<subscript>32high</subscript></entry>
<entry>Y'<subscript>33low</subscript></entry>
<entry>Y'<subscript>33high</subscript></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</formalpara>
</example>
</refsect1>
</refentry>
...@@ -566,7 +566,9 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< ...@@ -566,7 +566,9 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
&sub-sbggr8; &sub-sbggr8;
&sub-sgbrg8; &sub-sgbrg8;
&sub-sgrbg8; &sub-sgrbg8;
&sub-srggb8;
&sub-sbggr16; &sub-sbggr16;
&sub-srggb10;
</section> </section>
<section id="yuv-formats"> <section id="yuv-formats">
...@@ -589,6 +591,7 @@ information.</para> ...@@ -589,6 +591,7 @@ information.</para>
&sub-packed-yuv; &sub-packed-yuv;
&sub-grey; &sub-grey;
&sub-y10;
&sub-y16; &sub-y16;
&sub-yuyv; &sub-yuyv;
&sub-uyvy; &sub-uyvy;
...@@ -685,6 +688,11 @@ http://www.ivtvdriver.org/</ulink></para><para>The format is documented in the ...@@ -685,6 +688,11 @@ http://www.ivtvdriver.org/</ulink></para><para>The format is documented in the
kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm12</filename> kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm12</filename>
</para></entry> </para></entry>
</row> </row>
<row id="V4L2-PIX-FMT-CPIA1">
<entry><constant>V4L2_PIX_FMT_CPIA1</constant></entry>
<entry>'CPIA'</entry>
<entry>YUV format used by the gspca cpia1 driver.</entry>
</row>
<row id="V4L2-PIX-FMT-SPCA501"> <row id="V4L2-PIX-FMT-SPCA501">
<entry><constant>V4L2_PIX_FMT_SPCA501</constant></entry> <entry><constant>V4L2_PIX_FMT_SPCA501</constant></entry>
<entry>'S501'</entry> <entry>'S501'</entry>
...@@ -705,11 +713,6 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm ...@@ -705,11 +713,6 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm
<entry>'S561'</entry> <entry>'S561'</entry>
<entry>Compressed GBRG Bayer format used by the gspca driver.</entry> <entry>Compressed GBRG Bayer format used by the gspca driver.</entry>
</row> </row>
<row id="V4L2-PIX-FMT-SGRBG10">
<entry><constant>V4L2_PIX_FMT_SGRBG10</constant></entry>
<entry>'DA10'</entry>
<entry>10 bit raw Bayer, expanded to 16 bits.</entry>
</row>
<row id="V4L2-PIX-FMT-SGRBG10DPCM8"> <row id="V4L2-PIX-FMT-SGRBG10DPCM8">
<entry><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></entry> <entry><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></entry>
<entry>'DB10'</entry> <entry>'DB10'</entry>
...@@ -770,6 +773,11 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm ...@@ -770,6 +773,11 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm
<entry>'S920'</entry> <entry>'S920'</entry>
<entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry>
</row> </row>
<row id="V4L2-PIX-FMT-SN9C2028">
<entry><constant>V4L2_PIX_FMT_SN9C2028</constant></entry>
<entry>'SONX'</entry>
<entry>Compressed GBRG bayer format of the gspca sn9c2028 driver.</entry>
</row>
<row id="V4L2-PIX-FMT-STV0680"> <row id="V4L2-PIX-FMT-STV0680">
<entry><constant>V4L2_PIX_FMT_STV0680</constant></entry> <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry>
<entry>'S680'</entry> <entry>'S680'</entry>
...@@ -787,6 +795,20 @@ http://www.thedirks.org/winnov/</ulink></para></entry> ...@@ -787,6 +795,20 @@ http://www.thedirks.org/winnov/</ulink></para></entry>
<entry>'TM60'</entry> <entry>'TM60'</entry>
<entry><para>Used by Trident tm6000</para></entry> <entry><para>Used by Trident tm6000</para></entry>
</row> </row>
<row id="V4L2-PIX-FMT-CIT-YYVYUY">
<entry><constant>V4L2_PIX_FMT_CIT_YYVYUY</constant></entry>
<entry>'CITV'</entry>
<entry><para>Used by xirlink CIT, found at IBM webcams.</para>
<para>Uses one line of Y then 1 line of VYUY</para>
</entry>
</row>
<row id="V4L2-PIX-FMT-KONICA420">
<entry><constant>V4L2_PIX_FMT_KONICA420</constant></entry>
<entry>'KONI'</entry>
<entry><para>Used by Konica webcams.</para>
<para>YUV420 planar in blocks of 256 pixels.</para>
</entry>
</row>
<row id="V4L2-PIX-FMT-YYUV"> <row id="V4L2-PIX-FMT-YYUV">
<entry><constant>V4L2_PIX_FMT_YYUV</constant></entry> <entry><constant>V4L2_PIX_FMT_YYUV</constant></entry>
<entry>'YYUV'</entry> <entry>'YYUV'</entry>
......
...@@ -99,6 +99,7 @@ Remote Controller chapter.</contrib> ...@@ -99,6 +99,7 @@ Remote Controller chapter.</contrib>
<year>2007</year> <year>2007</year>
<year>2008</year> <year>2008</year>
<year>2009</year> <year>2009</year>
<year>2010</year>
<holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder>
</copyright> </copyright>
...@@ -110,9 +111,16 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> ...@@ -110,9 +111,16 @@ Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder>
<!-- Put document revisions here, newest first. --> <!-- Put document revisions here, newest first. -->
<!-- API revisions (changes and additions of defines, enums, <!-- API revisions (changes and additions of defines, enums,
structs, ioctls) must be noted in more detail in the history chapter structs, ioctls) must be noted in more detail in the history chapter
(compat.sgml), along with the possible impact on existing drivers and (compat.xml), along with the possible impact on existing drivers and
applications. --> applications. -->
<revision>
<revnumber>2.6.37</revnumber>
<date>2010-08-06</date>
<authorinitials>hv</authorinitials>
<revremark>Removed obsolete vtx (videotext) API.</revremark>
</revision>
<revision> <revision>
<revnumber>2.6.33</revnumber> <revnumber>2.6.33</revnumber>
<date>2009-12-03</date> <date>2009-12-03</date>
......
...@@ -154,23 +154,13 @@ enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> { ...@@ -154,23 +154,13 @@ enum <link linkend="v4l2-buf-type">v4l2_buf_type</link> {
V4L2_BUF_TYPE_VBI_OUTPUT = 5, V4L2_BUF_TYPE_VBI_OUTPUT = 5,
V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
#if 1 /*KEEP*/ #if 1
/* Experimental */ /* Experimental */
V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
#endif #endif
V4L2_BUF_TYPE_PRIVATE = 0x80, V4L2_BUF_TYPE_PRIVATE = 0x80,
}; };
enum <link linkend="v4l2-ctrl-type">v4l2_ctrl_type</link> {
V4L2_CTRL_TYPE_INTEGER = 1,
V4L2_CTRL_TYPE_BOOLEAN = 2,
V4L2_CTRL_TYPE_MENU = 3,
V4L2_CTRL_TYPE_BUTTON = 4,
V4L2_CTRL_TYPE_INTEGER64 = 5,
V4L2_CTRL_TYPE_CTRL_CLASS = 6,
V4L2_CTRL_TYPE_STRING = 7,
};
enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> { enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> {
V4L2_TUNER_RADIO = 1, V4L2_TUNER_RADIO = 1,
V4L2_TUNER_ANALOG_TV = 2, V4L2_TUNER_ANALOG_TV = 2,
...@@ -288,6 +278,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { ...@@ -288,6 +278,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
#define <link linkend="V4L2-PIX-FMT-RGB565">V4L2_PIX_FMT_RGB565</link> v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ #define <link linkend="V4L2-PIX-FMT-RGB565">V4L2_PIX_FMT_RGB565</link> v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
#define <link linkend="V4L2-PIX-FMT-RGB555X">V4L2_PIX_FMT_RGB555X</link> v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define <link linkend="V4L2-PIX-FMT-RGB555X">V4L2_PIX_FMT_RGB555X</link> v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
#define <link linkend="V4L2-PIX-FMT-RGB565X">V4L2_PIX_FMT_RGB565X</link> v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define <link linkend="V4L2-PIX-FMT-RGB565X">V4L2_PIX_FMT_RGB565X</link> v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
#define <link linkend="V4L2-PIX-FMT-BGR666">V4L2_PIX_FMT_BGR666</link> v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */
#define <link linkend="V4L2-PIX-FMT-BGR24">V4L2_PIX_FMT_BGR24</link> v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define <link linkend="V4L2-PIX-FMT-BGR24">V4L2_PIX_FMT_BGR24</link> v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
#define <link linkend="V4L2-PIX-FMT-RGB24">V4L2_PIX_FMT_RGB24</link> v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define <link linkend="V4L2-PIX-FMT-RGB24">V4L2_PIX_FMT_RGB24</link> v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
#define <link linkend="V4L2-PIX-FMT-BGR32">V4L2_PIX_FMT_BGR32</link> v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ #define <link linkend="V4L2-PIX-FMT-BGR32">V4L2_PIX_FMT_BGR32</link> v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
...@@ -295,6 +286,9 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { ...@@ -295,6 +286,9 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
/* Grey formats */ /* Grey formats */
#define <link linkend="V4L2-PIX-FMT-GREY">V4L2_PIX_FMT_GREY</link> v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ #define <link linkend="V4L2-PIX-FMT-GREY">V4L2_PIX_FMT_GREY</link> v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
#define <link linkend="V4L2-PIX-FMT-Y4">V4L2_PIX_FMT_Y4</link> v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */
#define <link linkend="V4L2-PIX-FMT-Y6">V4L2_PIX_FMT_Y6</link> v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */
#define <link linkend="V4L2-PIX-FMT-Y10">V4L2_PIX_FMT_Y10</link> v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
#define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ #define <link linkend="V4L2-PIX-FMT-Y16">V4L2_PIX_FMT_Y16</link> v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
/* Palette formats */ /* Palette formats */
...@@ -330,7 +324,11 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { ...@@ -330,7 +324,11 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
#define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ #define <link linkend="V4L2-PIX-FMT-SBGGR8">V4L2_PIX_FMT_SBGGR8</link> v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
#define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ #define <link linkend="V4L2-PIX-FMT-SGBRG8">V4L2_PIX_FMT_SGBRG8</link> v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
#define <link linkend="V4L2-PIX-FMT-SGRBG8">V4L2_PIX_FMT_SGRBG8</link> v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ #define <link linkend="V4L2-PIX-FMT-SGRBG8">V4L2_PIX_FMT_SGRBG8</link> v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */
#define <link linkend="V4L2-PIX-FMT-SGRBG10">V4L2_PIX_FMT_SGRBG10</link> v4l2_fourcc('B', 'A', '1', '0') /* 10bit raw bayer */ #define <link linkend="V4L2-PIX-FMT-SRGGB8">V4L2_PIX_FMT_SRGGB8</link> v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */
#define <link linkend="V4L2-PIX-FMT-SBGGR10">V4L2_PIX_FMT_SBGGR10</link> v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */
#define <link linkend="V4L2-PIX-FMT-SGBRG10">V4L2_PIX_FMT_SGBRG10</link> v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */
#define <link linkend="V4L2-PIX-FMT-SGRBG10">V4L2_PIX_FMT_SGRBG10</link> v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */
#define <link linkend="V4L2-PIX-FMT-SRGGB10">V4L2_PIX_FMT_SRGGB10</link> v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */
/* 10bit raw bayer DPCM compressed to 8 bits */ /* 10bit raw bayer DPCM compressed to 8 bits */
#define <link linkend="V4L2-PIX-FMT-SGRBG10DPCM8">V4L2_PIX_FMT_SGRBG10DPCM8</link> v4l2_fourcc('B', 'D', '1', '0') #define <link linkend="V4L2-PIX-FMT-SGRBG10DPCM8">V4L2_PIX_FMT_SGRBG10DPCM8</link> v4l2_fourcc('B', 'D', '1', '0')
/* /*
...@@ -346,6 +344,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { ...@@ -346,6 +344,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
#define <link linkend="V4L2-PIX-FMT-MPEG">V4L2_PIX_FMT_MPEG</link> v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ #define <link linkend="V4L2-PIX-FMT-MPEG">V4L2_PIX_FMT_MPEG</link> v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */
/* Vendor-specific formats */ /* Vendor-specific formats */
#define <link linkend="V4L2-PIX-FMT-CPIA1">V4L2_PIX_FMT_CPIA1</link> v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
#define <link linkend="V4L2-PIX-FMT-WNVA">V4L2_PIX_FMT_WNVA</link> v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ #define <link linkend="V4L2-PIX-FMT-WNVA">V4L2_PIX_FMT_WNVA</link> v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
#define <link linkend="V4L2-PIX-FMT-SN9C10X">V4L2_PIX_FMT_SN9C10X</link> v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ #define <link linkend="V4L2-PIX-FMT-SN9C10X">V4L2_PIX_FMT_SN9C10X</link> v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
#define <link linkend="V4L2-PIX-FMT-SN9C20X-I420">V4L2_PIX_FMT_SN9C20X_I420</link> v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ #define <link linkend="V4L2-PIX-FMT-SN9C20X-I420">V4L2_PIX_FMT_SN9C20X_I420</link> v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */
...@@ -358,12 +357,15 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { ...@@ -358,12 +357,15 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> {
#define <link linkend="V4L2-PIX-FMT-SPCA561">V4L2_PIX_FMT_SPCA561</link> v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ #define <link linkend="V4L2-PIX-FMT-SPCA561">V4L2_PIX_FMT_SPCA561</link> v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
#define <link linkend="V4L2-PIX-FMT-PAC207">V4L2_PIX_FMT_PAC207</link> v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ #define <link linkend="V4L2-PIX-FMT-PAC207">V4L2_PIX_FMT_PAC207</link> v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */
#define <link linkend="V4L2-PIX-FMT-MR97310A">V4L2_PIX_FMT_MR97310A</link> v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ #define <link linkend="V4L2-PIX-FMT-MR97310A">V4L2_PIX_FMT_MR97310A</link> v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
#define <link linkend="V4L2-PIX-FMT-SN9C2028">V4L2_PIX_FMT_SN9C2028</link> v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */
#define <link linkend="V4L2-PIX-FMT-SQ905C">V4L2_PIX_FMT_SQ905C</link> v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ #define <link linkend="V4L2-PIX-FMT-SQ905C">V4L2_PIX_FMT_SQ905C</link> v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
#define <link linkend="V4L2-PIX-FMT-PJPG">V4L2_PIX_FMT_PJPG</link> v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ #define <link linkend="V4L2-PIX-FMT-PJPG">V4L2_PIX_FMT_PJPG</link> v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
#define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ #define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
#define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ #define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
#define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
#define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ #define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
#define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
#define <link linkend="V4L2-PIX-FMT-CIT-YYVYUY">V4L2_PIX_FMT_CIT_YYVYUY</link> v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */
#define <link linkend="V4L2-PIX-FMT-KONICA420">V4L2_PIX_FMT_KONICA420</link> v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
/* /*
* F O R M A T E N U M E R A T I O N * F O R M A T E N U M E R A T I O N
...@@ -380,7 +382,7 @@ struct <link linkend="v4l2-fmtdesc">v4l2_fmtdesc</link> { ...@@ -380,7 +382,7 @@ struct <link linkend="v4l2-fmtdesc">v4l2_fmtdesc</link> {
#define V4L2_FMT_FLAG_COMPRESSED 0x0001 #define V4L2_FMT_FLAG_COMPRESSED 0x0001
#define V4L2_FMT_FLAG_EMULATED 0x0002 #define V4L2_FMT_FLAG_EMULATED 0x0002
#if 1 /*KEEP*/ #if 1
/* Experimental Frame Size and frame rate enumeration */ /* Experimental Frame Size and frame rate enumeration */
/* /*
* F R A M E S I Z E E N U M E R A T I O N * F R A M E S I Z E E N U M E R A T I O N
...@@ -544,6 +546,8 @@ struct <link linkend="v4l2-buffer">v4l2_buffer</link> { ...@@ -544,6 +546,8 @@ struct <link linkend="v4l2-buffer">v4l2_buffer</link> {
#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */
#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */
#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */
/* Buffer is ready, but the data contained within is corrupted. */
#define V4L2_BUF_FLAG_ERROR 0x0040
#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */
#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */
...@@ -934,6 +938,16 @@ struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link> { ...@@ -934,6 +938,16 @@ struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link> {
#define V4L2_CTRL_ID2CLASS(id) ((id) &amp; 0x0fff0000UL) #define V4L2_CTRL_ID2CLASS(id) ((id) &amp; 0x0fff0000UL)
#define V4L2_CTRL_DRIVER_PRIV(id) (((id) &amp; 0xffff) &gt;= 0x1000) #define V4L2_CTRL_DRIVER_PRIV(id) (((id) &amp; 0xffff) &gt;= 0x1000)
enum <link linkend="v4l2-ctrl-type">v4l2_ctrl_type</link> {
V4L2_CTRL_TYPE_INTEGER = 1,
V4L2_CTRL_TYPE_BOOLEAN = 2,
V4L2_CTRL_TYPE_MENU = 3,
V4L2_CTRL_TYPE_BUTTON = 4,
V4L2_CTRL_TYPE_INTEGER64 = 5,
V4L2_CTRL_TYPE_CTRL_CLASS = 6,
V4L2_CTRL_TYPE_STRING = 7,
};
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
struct <link linkend="v4l2-queryctrl">v4l2_queryctrl</link> { struct <link linkend="v4l2-queryctrl">v4l2_queryctrl</link> {
__u32 id; __u32 id;
...@@ -1018,21 +1032,27 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> { ...@@ -1018,21 +1032,27 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> {
V4L2_COLORFX_NONE = 0, V4L2_COLORFX_NONE = 0,
V4L2_COLORFX_BW = 1, V4L2_COLORFX_BW = 1,
V4L2_COLORFX_SEPIA = 2, V4L2_COLORFX_SEPIA = 2,
V4L2_COLORFX_NEGATIVE = 3, V4L2_COLORFX_NEGATIVE = 3,
V4L2_COLORFX_EMBOSS = 4, V4L2_COLORFX_EMBOSS = 4,
V4L2_COLORFX_SKETCH = 5, V4L2_COLORFX_SKETCH = 5,
V4L2_COLORFX_SKY_BLUE = 6, V4L2_COLORFX_SKY_BLUE = 6,
V4L2_COLORFX_GRASS_GREEN = 7, V4L2_COLORFX_GRASS_GREEN = 7,
V4L2_COLORFX_SKIN_WHITEN = 8, V4L2_COLORFX_SKIN_WHITEN = 8,
V4L2_COLORFX_VIVID = 9. V4L2_COLORFX_VIVID = 9,
}; };
#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
#define V4L2_CID_ROTATE (V4L2_CID_BASE+34) #define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
/* last CID + 1 */ /* last CID + 1 */
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) #define V4L2_CID_LASTP1 (V4L2_CID_BASE+39)
/* MPEG-class control IDs defined by V4L2 */ /* MPEG-class control IDs defined by V4L2 */
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
...@@ -1349,6 +1369,8 @@ struct <link linkend="v4l2-modulator">v4l2_modulator</link> { ...@@ -1349,6 +1369,8 @@ struct <link linkend="v4l2-modulator">v4l2_modulator</link> {
#define V4L2_TUNER_CAP_SAP 0x0020 #define V4L2_TUNER_CAP_SAP 0x0020
#define V4L2_TUNER_CAP_LANG1 0x0040 #define V4L2_TUNER_CAP_LANG1 0x0040
#define V4L2_TUNER_CAP_RDS 0x0080 #define V4L2_TUNER_CAP_RDS 0x0080
#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100
#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200
/* Flags for the 'rxsubchans' field */ /* Flags for the 'rxsubchans' field */
#define V4L2_TUNER_SUB_MONO 0x0001 #define V4L2_TUNER_SUB_MONO 0x0001
...@@ -1378,7 +1400,8 @@ struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link> { ...@@ -1378,7 +1400,8 @@ struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link> {
enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> type; enum <link linkend="v4l2-tuner-type">v4l2_tuner_type</link> type;
__u32 seek_upward; __u32 seek_upward;
__u32 wrap_around; __u32 wrap_around;
__u32 reserved[8]; __u32 spacing;
__u32 reserved[7];
}; };
/* /*
...@@ -1433,7 +1456,7 @@ struct <link linkend="v4l2-audioout">v4l2_audioout</link> { ...@@ -1433,7 +1456,7 @@ struct <link linkend="v4l2-audioout">v4l2_audioout</link> {
* *
* NOTE: EXPERIMENTAL API * NOTE: EXPERIMENTAL API
*/ */
#if 1 /*KEEP*/ #if 1
#define V4L2_ENC_IDX_FRAME_I (0) #define V4L2_ENC_IDX_FRAME_I (0)
#define V4L2_ENC_IDX_FRAME_P (1) #define V4L2_ENC_IDX_FRAME_P (1)
#define V4L2_ENC_IDX_FRAME_B (2) #define V4L2_ENC_IDX_FRAME_B (2)
...@@ -1625,6 +1648,38 @@ struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> { ...@@ -1625,6 +1648,38 @@ struct <link linkend="v4l2-streamparm">v4l2_streamparm</link> {
} parm; } parm;
}; };
/*
* E V E N T S
*/
#define V4L2_EVENT_ALL 0
#define V4L2_EVENT_VSYNC 1
#define V4L2_EVENT_EOS 2
#define V4L2_EVENT_PRIVATE_START 0x08000000
/* Payload for V4L2_EVENT_VSYNC */
struct <link linkend="v4l2-event-vsync">v4l2_event_vsync</link> {
/* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
__u8 field;
} __attribute__ ((packed));
struct <link linkend="v4l2-event">v4l2_event</link> {
__u32 type;
union {
struct <link linkend="v4l2-event-vsync">v4l2_event_vsync</link> vsync;
__u8 data[64];
} u;
__u32 pending;
__u32 sequence;
struct timespec timestamp;
__u32 reserved[9];
};
struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link> {
__u32 type;
__u32 reserved[7];
};
/* /*
* A D V A N C E D D E B U G G I N G * A D V A N C E D D E B U G G I N G
* *
...@@ -1720,7 +1775,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { ...@@ -1720,7 +1775,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) #define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>)
#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) #define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>)
#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>) #define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct <link linkend="v4l2-ext-controls">v4l2_ext_controls</link>)
#if 1 /*KEEP*/ #if 1
#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct <link linkend="v4l2-frmsizeenum">v4l2_frmsizeenum</link>) #define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct <link linkend="v4l2-frmsizeenum">v4l2_frmsizeenum</link>)
#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct <link linkend="v4l2-frmivalenum">v4l2_frmivalenum</link>) #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct <link linkend="v4l2-frmivalenum">v4l2_frmivalenum</link>)
#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct <link linkend="v4l2-enc-idx">v4l2_enc_idx</link>) #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct <link linkend="v4l2-enc-idx">v4l2_enc_idx</link>)
...@@ -1728,7 +1783,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { ...@@ -1728,7 +1783,7 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct <link linkend="v4l2-encoder-cmd">v4l2_encoder_cmd</link>) #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct <link linkend="v4l2-encoder-cmd">v4l2_encoder_cmd</link>)
#endif #endif
#if 1 /*KEEP*/ #if 1
/* Experimental, meant for debugging, testing and internal use. /* Experimental, meant for debugging, testing and internal use.
Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
You must be root to use these ioctls. Never use these in applications! */ You must be root to use these ioctls. Never use these in applications! */
...@@ -1747,6 +1802,9 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { ...@@ -1747,6 +1802,9 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
#define VIDIOC_DQEVENT _IOR('V', 89, struct <link linkend="v4l2-event">v4l2_event</link>)
#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link>)
#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct <link linkend="v4l2-event-subscription">v4l2_event_subscription</link>)
/* Reminder: when adding new ioctls please add support for them to /* Reminder: when adding new ioctls please add support for them to
drivers/media/video/v4l2-compat-ioctl32.c as well! */ drivers/media/video/v4l2-compat-ioctl32.c as well! */
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
<funcdef>int <function>ioctl</function></funcdef> <funcdef>int <function>ioctl</function></funcdef>
<paramdef>int <parameter>fd</parameter></paramdef> <paramdef>int <parameter>fd</parameter></paramdef>
<paramdef>int <parameter>request</parameter></paramdef> <paramdef>int <parameter>request</parameter></paramdef>
<paramdef>&v4l2-dv-preset; <paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef>
*<parameter>argp</parameter></paramdef>
</funcprototype> </funcprototype>
</funcsynopsis> </funcsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
<funcdef>int <function>ioctl</function></funcdef> <funcdef>int <function>ioctl</function></funcdef>
<paramdef>int <parameter>fd</parameter></paramdef> <paramdef>int <parameter>fd</parameter></paramdef>
<paramdef>int <parameter>request</parameter></paramdef> <paramdef>int <parameter>request</parameter></paramdef>
<paramdef>&v4l2-dv-timings; <paramdef>struct v4l2_dv_timings *<parameter>argp</parameter></paramdef>
*<parameter>argp</parameter></paramdef>
</funcprototype> </funcprototype>
</funcsynopsis> </funcsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
......
...@@ -16,7 +16,7 @@ input</refpurpose> ...@@ -16,7 +16,7 @@ input</refpurpose>
<funcdef>int <function>ioctl</function></funcdef> <funcdef>int <function>ioctl</function></funcdef>
<paramdef>int <parameter>fd</parameter></paramdef> <paramdef>int <parameter>fd</parameter></paramdef>
<paramdef>int <parameter>request</parameter></paramdef> <paramdef>int <parameter>request</parameter></paramdef>
<paramdef>&v4l2-dv-preset; *<parameter>argp</parameter></paramdef> <paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef>
</funcprototype> </funcprototype>
</funcsynopsis> </funcsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
......
...@@ -184,7 +184,7 @@ data.</entry> ...@@ -184,7 +184,7 @@ data.</entry>
<row> <row>
<entry><constant>V4L2_CAP_RDS_CAPTURE</constant></entry> <entry><constant>V4L2_CAP_RDS_CAPTURE</constant></entry>
<entry>0x00000100</entry> <entry>0x00000100</entry>
<entry>The device supports the <link linkend="rds">RDS</link> interface.</entry> <entry>The device supports the <link linkend="rds">RDS</link> capture interface.</entry>
</row> </row>
<row> <row>
<entry><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant></entry> <entry><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant></entry>
...@@ -205,6 +205,11 @@ driver capabilities.</para></footnote></entry> ...@@ -205,6 +205,11 @@ driver capabilities.</para></footnote></entry>
<entry>The device supports the &VIDIOC-S-HW-FREQ-SEEK; ioctl for <entry>The device supports the &VIDIOC-S-HW-FREQ-SEEK; ioctl for
hardware frequency seeking.</entry> hardware frequency seeking.</entry>
</row> </row>
<row>
<entry><constant>V4L2_CAP_RDS_OUTPUT</constant></entry>
<entry>0x00000800</entry>
<entry>The device supports the <link linkend="rds">RDS</link> output interface.</entry>
</row>
<row> <row>
<entry><constant>V4L2_CAP_TUNER</constant></entry> <entry><constant>V4L2_CAP_TUNER</constant></entry>
<entry>0x00010000</entry> <entry>0x00010000</entry>
......
...@@ -103,8 +103,12 @@ structure. The driver fills the rest of the structure or returns an ...@@ -103,8 +103,12 @@ structure. The driver fills the rest of the structure or returns an
<structfield>index</structfield> is invalid. Menu items are enumerated <structfield>index</structfield> is invalid. Menu items are enumerated
by calling <constant>VIDIOC_QUERYMENU</constant> with successive by calling <constant>VIDIOC_QUERYMENU</constant> with successive
<structfield>index</structfield> values from &v4l2-queryctrl; <structfield>index</structfield> values from &v4l2-queryctrl;
<structfield>minimum</structfield> (0) to <structfield>minimum</structfield> to
<structfield>maximum</structfield>, inclusive.</para> <structfield>maximum</structfield>, inclusive. Note that it is possible
for <constant>VIDIOC_QUERYMENU</constant> to return an &EINVAL; for some
indices between <structfield>minimum</structfield> and <structfield>maximum</structfield>.
In that case that particular menu item is not supported by this driver. Also note that
the <structfield>minimum</structfield> value is not necessarily 0.</para>
<para>See also the examples in <xref linkend="control" />.</para> <para>See also the examples in <xref linkend="control" />.</para>
...@@ -139,7 +143,7 @@ string. This information is intended for the user.</entry> ...@@ -139,7 +143,7 @@ string. This information is intended for the user.</entry>
<entry><structfield>minimum</structfield></entry> <entry><structfield>minimum</structfield></entry>
<entry>Minimum value, inclusive. This field gives a lower <entry>Minimum value, inclusive. This field gives a lower
bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the bound for <constant>V4L2_CTRL_TYPE_INTEGER</constant> controls and the
lowest valid index (always 0) for <constant>V4L2_CTRL_TYPE_MENU</constant> controls. lowest valid index for <constant>V4L2_CTRL_TYPE_MENU</constant> controls.
For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the minimum value For <constant>V4L2_CTRL_TYPE_STRING</constant> controls the minimum value
gives the minimum length of the string. This length <emphasis>does not include the terminating gives the minimum length of the string. This length <emphasis>does not include the terminating
zero</emphasis>. It may not be valid for any other type of control, including zero</emphasis>. It may not be valid for any other type of control, including
...@@ -279,7 +283,7 @@ values which are actually different on the hardware.</entry> ...@@ -279,7 +283,7 @@ values which are actually different on the hardware.</entry>
</row> </row>
<row> <row>
<entry><constant>V4L2_CTRL_TYPE_MENU</constant></entry> <entry><constant>V4L2_CTRL_TYPE_MENU</constant></entry>
<entry>0</entry> <entry>&ge; 0</entry>
<entry>1</entry> <entry>1</entry>
<entry>N-1</entry> <entry>N-1</entry>
<entry>The control has a menu of N choices. The names of <entry>The control has a menu of N choices. The names of
...@@ -405,8 +409,10 @@ writing a value will cause the device to carry out a given action ...@@ -405,8 +409,10 @@ writing a value will cause the device to carry out a given action
<term><errorcode>EINVAL</errorcode></term> <term><errorcode>EINVAL</errorcode></term>
<listitem> <listitem>
<para>The &v4l2-queryctrl; <structfield>id</structfield> <para>The &v4l2-queryctrl; <structfield>id</structfield>
is invalid. The &v4l2-querymenu; <structfield>id</structfield> or is invalid. The &v4l2-querymenu; <structfield>id</structfield> is
<structfield>index</structfield> is invalid.</para> invalid or <structfield>index</structfield> is out of range (less than
<structfield>minimum</structfield> or greater than <structfield>maximum</structfield>)
or this particular menu item is not supported by the driver.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
......
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
<para>Start a hardware frequency seek from the current frequency. <para>Start a hardware frequency seek from the current frequency.
To do this applications initialize the <structfield>tuner</structfield>, To do this applications initialize the <structfield>tuner</structfield>,
<structfield>type</structfield>, <structfield>seek_upward</structfield> and <structfield>type</structfield>, <structfield>seek_upward</structfield>,
<structfield>spacing</structfield> and
<structfield>wrap_around</structfield> fields, and zero out the <structfield>wrap_around</structfield> fields, and zero out the
<structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and <structfield>reserved</structfield> array of a &v4l2-hw-freq-seek; and
call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer call the <constant>VIDIOC_S_HW_FREQ_SEEK</constant> ioctl with a pointer
...@@ -89,7 +90,12 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry> ...@@ -89,7 +90,12 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
</row> </row>
<row> <row>
<entry>__u32</entry> <entry>__u32</entry>
<entry><structfield>reserved</structfield>[8]</entry> <entry><structfield>spacing</structfield></entry>
<entry>If non-zero, defines the hardware seek resolution in Hz. The driver selects the nearest value that is supported by the device. If spacing is zero a reasonable default value is used.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>reserved</structfield>[7]</entry>
<entry>Reserved for future extensions. Drivers and <entry>Reserved for future extensions. Drivers and
applications must set the array to zero.</entry> applications must set the array to zero.</entry>
</row> </row>
......
...@@ -1496,9 +1496,6 @@ Your cooperation is appreciated. ...@@ -1496,9 +1496,6 @@ Your cooperation is appreciated.
64 = /dev/radio0 Radio device 64 = /dev/radio0 Radio device
... ...
127 = /dev/radio63 Radio device 127 = /dev/radio63 Radio device
192 = /dev/vtx0 Teletext device
...
223 = /dev/vtx31 Teletext device
224 = /dev/vbi0 Vertical blank interrupt 224 = /dev/vbi0 Vertical blank interrupt
... ...
255 = /dev/vbi31 Vertical blank interrupt 255 = /dev/vbi31 Vertical blank interrupt
......
...@@ -26,7 +26,8 @@ use IO::Handle; ...@@ -26,7 +26,8 @@ use IO::Handle;
"dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
"or51211", "or51132_qam", "or51132_vsb", "bluebird", "or51211", "or51132_qam", "or51132_vsb", "bluebird",
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718", "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718",
"af9015", "ngene", "az6027"); "af9015", "ngene", "az6027", "lme2510_lg", "lme2510c_s7395",
"lme2510c_s7395_old");
# Check args # Check args
syntax() if (scalar(@ARGV) != 1); syntax() if (scalar(@ARGV) != 1);
...@@ -584,6 +585,49 @@ sub az6027{ ...@@ -584,6 +585,49 @@ sub az6027{
$firmware; $firmware;
} }
sub lme2510_lg {
my $sourcefile = "LMEBDA_DVBS.sys";
my $hash = "fc6017ad01e79890a97ec53bea157ed2";
my $outfile = "dvb-usb-lme2510-lg.fw";
my $hasho = "caa065d5fdbd2c09ad57b399bbf55cad";
checkstandard();
verify($sourcefile, $hash);
extract($sourcefile, 4168, 3841, $outfile);
verify($outfile, $hasho);
$outfile;
}
sub lme2510c_s7395 {
my $sourcefile = "US2A0D.sys";
my $hash = "b0155a8083fb822a3bd47bc360e74601";
my $outfile = "dvb-usb-lme2510c-s7395.fw";
my $hasho = "3a3cf1aeebd17b6ddc04cebe131e94cf";
checkstandard();
verify($sourcefile, $hash);
extract($sourcefile, 37248, 3720, $outfile);
verify($outfile, $hasho);
$outfile;
}
sub lme2510c_s7395_old {
my $sourcefile = "LMEBDA_DVBS7395C.sys";
my $hash = "7572ae0eb9cdf91baabd7c0ba9e09b31";
my $outfile = "dvb-usb-lme2510c-s7395.fw";
my $hasho = "90430c5b435eb5c6f88fd44a9d950674";
checkstandard();
verify($sourcefile, $hash);
extract($sourcefile, 4208, 3881, $outfile);
verify($outfile, $hasho);
$outfile;
}
# --------------------------------------------------------------- # ---------------------------------------------------------------
# Utilities # Utilities
......
To extract firmware for the DM04/QQBOX you need to copy the
following file(s) to this directory.
for DM04+/QQBOX LME2510C (Sharp 7395 Tuner)
-------------------------------------------
The Sharp 7395 driver can be found in windows/system32/driver
US2A0D.sys (dated 17 Mar 2009)
and run
./get_dvb_firmware lme2510c_s7395
will produce
dvb-usb-lme2510c-s7395.fw
An alternative but older firmware can be found on the driver
disk DVB-S_EN_3.5A in BDADriver/driver
LMEBDA_DVBS7395C.sys (dated 18 Jan 2008)
and run
./get_dvb_firmware lme2510c_s7395_old
will produce
dvb-usb-lme2510c-s7395.fw
--------------------------------------------------------------------
The LG firmware can be found on the driver
disk DM04+_5.1A[LG] in BDADriver/driver
for DM04 LME2510 (LG Tuner)
---------------------------
LMEBDA_DVBS.sys (dated 13 Nov 2007)
and run
./get_dvb_firmware lme2510_lg
will produce
dvb-usb-lme2510-lg.fw
Other LG firmware can be extracted manually from US280D.sys
only found in windows/system32/driver.
dd if=US280D.sys ibs=1 skip=42616 count=3668 of=dvb-usb-lme2510-lg.fw
for DM04 LME2510C (LG Tuner)
---------------------------
dd if=US280D.sys ibs=1 skip=35200 count=3850 of=dvb-usb-lme2510c-lg.fw
---------------------------------------------------------------------
Copy the firmware file(s) to /lib/firmware
...@@ -98,7 +98,7 @@ Who: Pavel Machek <pavel@ucw.cz> ...@@ -98,7 +98,7 @@ Who: Pavel Machek <pavel@ucw.cz>
--------------------------- ---------------------------
What: Video4Linux API 1 ioctls and from Video devices. What: Video4Linux API 1 ioctls and from Video devices.
When: July 2009 When: kernel 2.6.38
Files: include/linux/videodev.h Files: include/linux/videodev.h
Check: include/linux/videodev.h Check: include/linux/videodev.h
Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6
...@@ -116,6 +116,21 @@ Who: Mauro Carvalho Chehab <mchehab@infradead.org> ...@@ -116,6 +116,21 @@ Who: Mauro Carvalho Chehab <mchehab@infradead.org>
--------------------------- ---------------------------
What: Video4Linux obsolete drivers using V4L1 API
When: kernel 2.6.38
Files: drivers/staging/cpia/* drivers/staging/stradis/*
Check: drivers/staging/cpia/cpia.c drivers/staging/stradis/stradis.c
Why: There are some drivers still using V4L1 API, despite all efforts we've done
to migrate. Those drivers are for obsolete hardware that the old maintainer
didn't care (or not have the hardware anymore), and that no other developer
could find any hardware to buy. They probably have no practical usage today,
and people with such old hardware could probably keep using an older version
of the kernel. Those drivers will be moved to staging on 2.6.37 and, if nobody
care enough to port and test them with V4L2 API, they'll be removed on 2.6.38.
Who: Mauro Carvalho Chehab <mchehab@infradead.org>
---------------------------
What: sys_sysctl What: sys_sysctl
When: September 2010 When: September 2010
Option: CONFIG_SYSCTL_SYSCALL Option: CONFIG_SYSCTL_SYSCALL
...@@ -470,29 +485,6 @@ When: April 2011 ...@@ -470,29 +485,6 @@ When: April 2011
Why: Superseded by xt_CT Why: Superseded by xt_CT
Who: Netfilter developer team <netfilter-devel@vger.kernel.org> Who: Netfilter developer team <netfilter-devel@vger.kernel.org>
---------------------------
What: video4linux /dev/vtx teletext API support
When: 2.6.35
Files: drivers/media/video/saa5246a.c drivers/media/video/saa5249.c
include/linux/videotext.h
Why: The vtx device nodes have been superseded by vbi device nodes
for many years. No applications exist that use the vtx support.
Of the two i2c drivers that actually support this API the saa5249
has been impossible to use for a year now and no known hardware
that supports this device exists. The saa5246a is theoretically
supported by the old mxb boards, but it never actually worked.
In summary: there is no hardware that can use this API and there
are no applications actually implementing this API.
The vtx support still reserves minors 192-223 and we would really
like to reuse those for upcoming new functionality. In the unlikely
event that new hardware appears that wants to use the functionality
provided by the vtx API, then that functionality should be build
around the sliced VBI API instead.
Who: Hans Verkuil <hverkuil@xs4all.nl>
---------------------------- ----------------------------
What: IRQF_DISABLED What: IRQF_DISABLED
......
...@@ -278,7 +278,6 @@ Code Seq#(hex) Include File Comments ...@@ -278,7 +278,6 @@ Code Seq#(hex) Include File Comments
<mailto:oe@port.de> <mailto:oe@port.de>
'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict!
0x80 00-1F linux/fb.h 0x80 00-1F linux/fb.h
0x81 00-1F linux/videotext.h
0x88 00-3F media/ovcamchip.h 0x88 00-3F media/ovcamchip.h
0x89 00-06 arch/x86/include/asm/sockios.h 0x89 00-06 arch/x86/include/asm/sockios.h
0x89 0B-DF linux/sockios.h 0x89 0B-DF linux/sockios.h
......
...@@ -83,3 +83,4 @@ ...@@ -83,3 +83,4 @@
82 -> WinFast DTV2000 H rev. J [107d:6f2b] 82 -> WinFast DTV2000 H rev. J [107d:6f2b]
83 -> Prof 7301 DVB-S/S2 [b034:3034] 83 -> Prof 7301 DVB-S/S2 [b034:3034]
84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd] 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd]
85 -> Twinhan VP-1027 DVB-S [1822:0023]
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840)
31 -> Usbgear VD204v9 (em2821) 31 -> Usbgear VD204v9 (em2821)
32 -> Supercomp USB 2.0 TV (em2821) 32 -> Supercomp USB 2.0 TV (em2821)
33 -> Elgato Video Capture (em2860) [0fd9:0033]
34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f]
35 -> Typhoon DVD Maker (em2860) 35 -> Typhoon DVD Maker (em2860)
36 -> NetGMBH Cam (em2860) 36 -> NetGMBH Cam (em2860)
...@@ -45,7 +46,7 @@ ...@@ -45,7 +46,7 @@
45 -> Pinnacle PCTV DVB-T (em2870) 45 -> Pinnacle PCTV DVB-T (em2870)
46 -> Compro, VideoMate U3 (em2870) [185b:2870] 46 -> Compro, VideoMate U3 (em2870) [185b:2870]
47 -> KWorld DVB-T 305U (em2880) [eb1a:e305] 47 -> KWorld DVB-T 305U (em2880) [eb1a:e305]
48 -> KWorld DVB-T 310U (em2880) [eb1a:e310] 48 -> KWorld DVB-T 310U (em2880)
49 -> MSI DigiVox A/D (em2880) [eb1a:e310] 49 -> MSI DigiVox A/D (em2880) [eb1a:e310]
50 -> MSI DigiVox A/D II (em2880) [eb1a:e320] 50 -> MSI DigiVox A/D II (em2880) [eb1a:e320]
51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c] 51 -> Terratec Hybrid XS Secam (em2880) [0ccd:004c]
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
125 -> Beholder BeholdTV 409 [0000:4090] 125 -> Beholder BeholdTV 409 [0000:4090]
126 -> Beholder BeholdTV 505 FM [5ace:5050] 126 -> Beholder BeholdTV 505 FM [5ace:5050]
127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090] 127 -> Beholder BeholdTV 507 FM / BeholdTV 509 FM [5ace:5070,5ace:5090]
128 -> Beholder BeholdTV Columbus TVFM [0000:5201] 128 -> Beholder BeholdTV Columbus TV/FM [0000:5201]
129 -> Beholder BeholdTV 607 FM [5ace:6070] 129 -> Beholder BeholdTV 607 FM [5ace:6070]
130 -> Beholder BeholdTV M6 [5ace:6190] 130 -> Beholder BeholdTV M6 [5ace:6190]
131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022]
......
...@@ -19,7 +19,6 @@ function makedev () { ...@@ -19,7 +19,6 @@ function makedev () {
echo "*** new device names ***" echo "*** new device names ***"
makedev video 0 makedev video 0
makedev radio 64 makedev radio 64
makedev vtx 192
makedev vbi 224 makedev vbi 224
#echo "*** old device names (for compatibility only) ***" #echo "*** old device names (for compatibility only) ***"
......
...@@ -302,12 +302,14 @@ sonixj 0c45:60fb Surfer NoName ...@@ -302,12 +302,14 @@ sonixj 0c45:60fb Surfer NoName
sonixj 0c45:60fc LG-LIC300 sonixj 0c45:60fc LG-LIC300
sonixj 0c45:60fe Microdia Audio sonixj 0c45:60fe Microdia Audio
sonixj 0c45:6100 PC Camera (SN9C128) sonixj 0c45:6100 PC Camera (SN9C128)
sonixj 0c45:6102 PC Camera (SN9C128)
sonixj 0c45:610a PC Camera (SN9C128) sonixj 0c45:610a PC Camera (SN9C128)
sonixj 0c45:610b PC Camera (SN9C128) sonixj 0c45:610b PC Camera (SN9C128)
sonixj 0c45:610c PC Camera (SN9C128) sonixj 0c45:610c PC Camera (SN9C128)
sonixj 0c45:610e PC Camera (SN9C128) sonixj 0c45:610e PC Camera (SN9C128)
sonixj 0c45:6128 Microdia/Sonix SNP325 sonixj 0c45:6128 Microdia/Sonix SNP325
sonixj 0c45:612a Avant Camera sonixj 0c45:612a Avant Camera
sonixj 0c45:612b Speed-Link REFLECT2
sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix sonixj 0c45:612c Typhoon Rasy Cam 1.3MPix
sonixj 0c45:6130 Sonix Pccam sonixj 0c45:6130 Sonix Pccam
sonixj 0c45:6138 Sn9c120 Mo4000 sonixj 0c45:6138 Sn9c120 Mo4000
......
...@@ -44,8 +44,8 @@ All drivers have the following structure: ...@@ -44,8 +44,8 @@ All drivers have the following structure:
2) A way of initializing and commanding sub-devices (if any). 2) A way of initializing and commanding sub-devices (if any).
3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and 3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX and /dev/radioX)
/dev/vtxX) and keeping track of device-node specific data. and keeping track of device-node specific data.
4) Filehandle-specific structs containing per-filehandle data; 4) Filehandle-specific structs containing per-filehandle data;
...@@ -192,6 +192,11 @@ You also need a way to go from the low-level struct to v4l2_subdev. For the ...@@ -192,6 +192,11 @@ You also need a way to go from the low-level struct to v4l2_subdev. For the
common i2c_client struct the i2c_set_clientdata() call is used to store a common i2c_client struct the i2c_set_clientdata() call is used to store a
v4l2_subdev pointer, for other busses you may have to use other methods. v4l2_subdev pointer, for other busses you may have to use other methods.
Bridges might also need to store per-subdev private data, such as a pointer to
bridge-specific per-subdev private data. The v4l2_subdev structure provides
host private data for that purpose that can be accessed with
v4l2_get_subdev_hostdata() and v4l2_set_subdev_hostdata().
From the bridge driver perspective you load the sub-device module and somehow From the bridge driver perspective you load the sub-device module and somehow
obtain the v4l2_subdev pointer. For i2c devices this is easy: you call obtain the v4l2_subdev pointer. For i2c devices this is easy: you call
i2c_get_clientdata(). For other busses something similar needs to be done. i2c_get_clientdata(). For other busses something similar needs to be done.
...@@ -448,6 +453,10 @@ You should also set these fields: ...@@ -448,6 +453,10 @@ You should also set these fields:
- ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
(highly recommended to use this and it might become compulsory in the (highly recommended to use this and it might become compulsory in the
future!), then set this to your v4l2_ioctl_ops struct. future!), then set this to your v4l2_ioctl_ops struct.
- lock: leave to NULL if you want to do all the locking in the driver.
Otherwise you give it a pointer to a struct mutex_lock and before any
of the v4l2_file_operations is called this lock will be taken by the
core and released afterwards.
- parent: you only set this if v4l2_device was registered with NULL as - parent: you only set this if v4l2_device was registered with NULL as
the parent device struct. This only happens in cases where one hardware the parent device struct. This only happens in cases where one hardware
device has multiple PCI devices that all share the same v4l2_device core. device has multiple PCI devices that all share the same v4l2_device core.
...@@ -464,6 +473,22 @@ If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or ...@@ -464,6 +473,22 @@ If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or
The v4l2_file_operations struct is a subset of file_operations. The main The v4l2_file_operations struct is a subset of file_operations. The main
difference is that the inode argument is omitted since it is never used. difference is that the inode argument is omitted since it is never used.
v4l2_file_operations and locking
--------------------------------
You can set a pointer to a mutex_lock in struct video_device. Usually this
will be either a top-level mutex or a mutex per device node. If you want
finer-grained locking then you have to set it to NULL and do you own locking.
If a lock is specified then all file operations will be serialized on that
lock. If you use videobuf then you must pass the same lock to the videobuf
queue initialize function: if videobuf has to wait for a frame to arrive, then
it will temporarily unlock the lock and relock it afterwards. If your driver
also waits in the code, then you should do the same to allow other processes
to access the device node while the first process is waiting for something.
The implementation of a hotplug disconnect should also take the lock before
calling v4l2_device_disconnect.
video_device registration video_device registration
------------------------- -------------------------
...@@ -483,7 +508,6 @@ types exist: ...@@ -483,7 +508,6 @@ types exist:
VFL_TYPE_GRABBER: videoX for video input/output devices VFL_TYPE_GRABBER: videoX for video input/output devices
VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext) VFL_TYPE_VBI: vbiX for vertical blank data (i.e. closed captions, teletext)
VFL_TYPE_RADIO: radioX for radio tuners VFL_TYPE_RADIO: radioX for radio tuners
VFL_TYPE_VTX: vtxX for teletext devices (deprecated, don't use)
The last argument gives you a certain amount of control over the device The last argument gives you a certain amount of control over the device
device node number used (i.e. the X in videoX). Normally you will pass -1 device node number used (i.e. the X in videoX). Normally you will pass -1
...@@ -547,9 +571,8 @@ from /dev). ...@@ -547,9 +571,8 @@ from /dev).
After video_unregister_device() returns no new opens can be done. However, After video_unregister_device() returns no new opens can be done. However,
in the case of USB devices some application might still have one of these in the case of USB devices some application might still have one of these
device nodes open. So after the unregister all file operations will return device nodes open. So after the unregister all file operations (except
an error as well, except for the ioctl and unlocked_ioctl file operations: release, of course) will return an error as well.
those will still be passed on since some buffer ioctls may still be needed.
When the last user of the video device node exits, then the vdev->release() When the last user of the video device node exits, then the vdev->release()
callback is called and you can do the final cleanup there. callback is called and you can do the final cleanup there.
......
...@@ -311,7 +311,6 @@ static struct soc_camera_link iclink_mt9v022 = { ...@@ -311,7 +311,6 @@ static struct soc_camera_link iclink_mt9v022 = {
.bus_id = 0, /* Must match with the camera ID */ .bus_id = 0, /* Must match with the camera ID */
.board_info = &pcm037_i2c_camera[1], .board_info = &pcm037_i2c_camera[1],
.i2c_adapter_id = 2, .i2c_adapter_id = 2,
.module_name = "mt9v022",
}; };
static struct soc_camera_link iclink_mt9t031 = { static struct soc_camera_link iclink_mt9t031 = {
...@@ -319,7 +318,6 @@ static struct soc_camera_link iclink_mt9t031 = { ...@@ -319,7 +318,6 @@ static struct soc_camera_link iclink_mt9t031 = {
.power = pcm037_camera_power, .power = pcm037_camera_power,
.board_info = &pcm037_i2c_camera[0], .board_info = &pcm037_i2c_camera[0],
.i2c_adapter_id = 2, .i2c_adapter_id = 2,
.module_name = "mt9t031",
}; };
static struct i2c_board_info pcm037_i2c_devices[] = { static struct i2c_board_info pcm037_i2c_devices[] = {
......
...@@ -179,7 +179,6 @@ static struct soc_camera_link base_iclink = { ...@@ -179,7 +179,6 @@ static struct soc_camera_link base_iclink = {
.reset = marxbot_basecam_reset, .reset = marxbot_basecam_reset,
.board_info = &marxbot_i2c_devices[0], .board_info = &marxbot_i2c_devices[0],
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.module_name = "mt9t031",
}; };
static struct platform_device marxbot_camera[] = { static struct platform_device marxbot_camera[] = {
......
...@@ -88,7 +88,6 @@ static struct soc_camera_link base_iclink = { ...@@ -88,7 +88,6 @@ static struct soc_camera_link base_iclink = {
.reset = smartbot_cam_reset, .reset = smartbot_cam_reset,
.board_info = &smartbot_i2c_devices[0], .board_info = &smartbot_i2c_devices[0],
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.module_name = "mt9t031",
}; };
static struct platform_device smartbot_camera[] = { static struct platform_device smartbot_camera[] = {
......
...@@ -1015,7 +1015,6 @@ static struct soc_camera_link iclink = { ...@@ -1015,7 +1015,6 @@ static struct soc_camera_link iclink = {
.power = em_x270_sensor_power, .power = em_x270_sensor_power,
.board_info = &em_x270_i2c_cam_info[0], .board_info = &em_x270_i2c_cam_info[0],
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.module_name = "mt9m111",
}; };
static struct platform_device em_x270_camera = { static struct platform_device em_x270_camera = {
......
...@@ -755,7 +755,6 @@ static struct soc_camera_link a780_iclink = { ...@@ -755,7 +755,6 @@ static struct soc_camera_link a780_iclink = {
.flags = SOCAM_SENSOR_INVERT_PCLK, .flags = SOCAM_SENSOR_INVERT_PCLK,
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.board_info = &a780_camera_i2c_board_info, .board_info = &a780_camera_i2c_board_info,
.module_name = "mt9m111",
.power = a780_camera_power, .power = a780_camera_power,
.reset = a780_camera_reset, .reset = a780_camera_reset,
}; };
...@@ -1024,7 +1023,6 @@ static struct soc_camera_link a910_iclink = { ...@@ -1024,7 +1023,6 @@ static struct soc_camera_link a910_iclink = {
.bus_id = 0, .bus_id = 0,
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.board_info = &a910_camera_i2c_board_info, .board_info = &a910_camera_i2c_board_info,
.module_name = "mt9m111",
.power = a910_camera_power, .power = a910_camera_power,
.reset = a910_camera_reset, .reset = a910_camera_reset,
}; };
......
...@@ -711,7 +711,6 @@ static struct soc_camera_link iclink = { ...@@ -711,7 +711,6 @@ static struct soc_camera_link iclink = {
.bus_id = 0, /* Match id in pxa27x_device_camera in device.c */ .bus_id = 0, /* Match id in pxa27x_device_camera in device.c */
.board_info = &mioa701_i2c_devices[0], .board_info = &mioa701_i2c_devices[0],
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.module_name = "mt9m111",
}; };
struct i2c_pxa_platform_data i2c_pdata = { struct i2c_pxa_platform_data i2c_pdata = {
......
...@@ -453,7 +453,6 @@ static struct soc_camera_link iclink[] = { ...@@ -453,7 +453,6 @@ static struct soc_camera_link iclink[] = {
.query_bus_param = pcm990_camera_query_bus_param, .query_bus_param = pcm990_camera_query_bus_param,
.set_bus_param = pcm990_camera_set_bus_param, .set_bus_param = pcm990_camera_set_bus_param,
.free_bus = pcm990_camera_free_bus, .free_bus = pcm990_camera_free_bus,
.module_name = "mt9v022",
}, { }, {
.bus_id = 0, /* Must match with the camera ID */ .bus_id = 0, /* Must match with the camera ID */
.board_info = &pcm990_camera_i2c[1], .board_info = &pcm990_camera_i2c[1],
...@@ -461,7 +460,6 @@ static struct soc_camera_link iclink[] = { ...@@ -461,7 +460,6 @@ static struct soc_camera_link iclink[] = {
.query_bus_param = pcm990_camera_query_bus_param, .query_bus_param = pcm990_camera_query_bus_param,
.set_bus_param = pcm990_camera_set_bus_param, .set_bus_param = pcm990_camera_set_bus_param,
.free_bus = pcm990_camera_free_bus, .free_bus = pcm990_camera_free_bus,
.module_name = "mt9m001",
}, },
}; };
......
...@@ -481,7 +481,6 @@ static struct soc_camera_link ov7725_link = { ...@@ -481,7 +481,6 @@ static struct soc_camera_link ov7725_link = {
.power = ov7725_power, .power = ov7725_power,
.board_info = &ap325rxa_i2c_camera[0], .board_info = &ap325rxa_i2c_camera[0],
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.module_name = "ov772x",
.priv = &ov7725_info, .priv = &ov7725_info,
}; };
......
...@@ -620,7 +620,6 @@ static struct soc_camera_link tw9910_link = { ...@@ -620,7 +620,6 @@ static struct soc_camera_link tw9910_link = {
.bus_id = 1, .bus_id = 1,
.power = tw9910_power, .power = tw9910_power,
.board_info = &i2c_camera[0], .board_info = &i2c_camera[0],
.module_name = "tw9910",
.priv = &tw9910_info, .priv = &tw9910_info,
}; };
...@@ -644,7 +643,6 @@ static struct soc_camera_link mt9t112_link1 = { ...@@ -644,7 +643,6 @@ static struct soc_camera_link mt9t112_link1 = {
.power = mt9t112_power1, .power = mt9t112_power1,
.bus_id = 0, .bus_id = 0,
.board_info = &i2c_camera[1], .board_info = &i2c_camera[1],
.module_name = "mt9t112",
.priv = &mt9t112_info1, .priv = &mt9t112_info1,
}; };
...@@ -667,7 +665,6 @@ static struct soc_camera_link mt9t112_link2 = { ...@@ -667,7 +665,6 @@ static struct soc_camera_link mt9t112_link2 = {
.power = mt9t112_power2, .power = mt9t112_power2,
.bus_id = 1, .bus_id = 1,
.board_info = &i2c_camera[2], .board_info = &i2c_camera[2],
.module_name = "mt9t112",
.priv = &mt9t112_info2, .priv = &mt9t112_info2,
}; };
...@@ -793,7 +790,6 @@ static struct sh_vou_pdata sh_vou_pdata = { ...@@ -793,7 +790,6 @@ static struct sh_vou_pdata sh_vou_pdata = {
.flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW, .flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW,
.board_info = &ak8813, .board_info = &ak8813,
.i2c_adap = 0, .i2c_adap = 0,
.module_name = "ak881x",
}; };
static struct resource sh_vou_resources[] = { static struct resource sh_vou_resources[] = {
......
...@@ -333,7 +333,6 @@ static struct soc_camera_link rj54n1_link = { ...@@ -333,7 +333,6 @@ static struct soc_camera_link rj54n1_link = {
.power = camera_power, .power = camera_power,
.board_info = &kfr2r09_i2c_camera, .board_info = &kfr2r09_i2c_camera,
.i2c_adapter_id = 1, .i2c_adapter_id = 1,
.module_name = "rj54n1cb0c",
.priv = &rj54n1_priv, .priv = &rj54n1_priv,
}; };
......
...@@ -450,7 +450,6 @@ static struct soc_camera_link ov7725_link = { ...@@ -450,7 +450,6 @@ static struct soc_camera_link ov7725_link = {
.power = ov7725_power, .power = ov7725_power,
.board_info = &migor_i2c_camera[0], .board_info = &migor_i2c_camera[0],
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.module_name = "ov772x",
.priv = &ov7725_info, .priv = &ov7725_info,
}; };
...@@ -463,7 +462,6 @@ static struct soc_camera_link tw9910_link = { ...@@ -463,7 +462,6 @@ static struct soc_camera_link tw9910_link = {
.power = tw9910_power, .power = tw9910_power,
.board_info = &migor_i2c_camera[1], .board_info = &migor_i2c_camera[1],
.i2c_adapter_id = 0, .i2c_adapter_id = 0,
.module_name = "tw9910",
.priv = &tw9910_info, .priv = &tw9910_info,
}; };
......
...@@ -550,7 +550,6 @@ static struct sh_vou_pdata sh_vou_pdata = { ...@@ -550,7 +550,6 @@ static struct sh_vou_pdata sh_vou_pdata = {
.flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW, .flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW,
.board_info = &ak8813, .board_info = &ak8813,
.i2c_adap = 0, .i2c_adap = 0,
.module_name = "ak881x",
}; };
static struct resource sh_vou_resources[] = { static struct resource sh_vou_resources[] = {
......
...@@ -79,6 +79,18 @@ config IR_SONY_DECODER ...@@ -79,6 +79,18 @@ config IR_SONY_DECODER
Enable this option if you have an infrared remote control which Enable this option if you have an infrared remote control which
uses the Sony protocol, and you need software decoding support. uses the Sony protocol, and you need software decoding support.
config IR_RC5_SZ_DECODER
tristate "Enable IR raw decoder for the RC-5 (streamzap) protocol"
depends on IR_CORE
select BITREVERSE
default y
---help---
Enable this option if you have IR with RC-5 (streamzap) protocol,
and if the IR is decoded in software. (The Streamzap PC Remote
uses an IR protocol that is almost standard RC-5, but not quite,
as it uses an additional bit).
config IR_LIRC_CODEC config IR_LIRC_CODEC
tristate "Enable IR to LIRC bridge" tristate "Enable IR to LIRC bridge"
depends on IR_CORE depends on IR_CORE
...@@ -89,6 +101,20 @@ config IR_LIRC_CODEC ...@@ -89,6 +101,20 @@ config IR_LIRC_CODEC
Enable this option to pass raw IR to and from userspace via Enable this option to pass raw IR to and from userspace via
the LIRC interface. the LIRC interface.
config IR_ENE
tristate "ENE eHome Receiver/Transceiver (pnp id: ENE0100/ENE02xxx)"
depends on PNP
depends on IR_CORE
---help---
Say Y here to enable support for integrated infrared receiver
/transceiver made by ENE.
You can see if you have it by looking at lspnp output.
Output should include ENE0100 ENE0200 or something similar.
To compile this driver as a module, choose M here: the
module will be called ene_ir.
config IR_IMON config IR_IMON
tristate "SoundGraph iMON Receiver and Display" tristate "SoundGraph iMON Receiver and Display"
depends on USB_ARCH_HAS_HCD depends on USB_ARCH_HAS_HCD
...@@ -113,19 +139,18 @@ config IR_MCEUSB ...@@ -113,19 +139,18 @@ config IR_MCEUSB
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called mceusb. module will be called mceusb.
config IR_ENE config IR_NUVOTON
tristate "ENE eHome Receiver/Transciever (pnp id: ENE0100/ENE02xxx)" tristate "Nuvoton w836x7hg Consumer Infrared Transceiver"
depends on PNP depends on PNP
depends on IR_CORE depends on IR_CORE
---help--- ---help---
Say Y here to enable support for integrated infrared receiver Say Y here to enable support for integrated infrared receiver
/transciever made by ENE. /transciever made by Nuvoton (formerly Winbond). This chip is
found in the ASRock ION 330HT, as well as assorted Intel
You can see if you have it by looking at lspnp output. DP55-series motherboards (and of course, possibly others).
Output should include ENE0100 ENE0200 or something similiar.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called ene_ir. module will be called nuvoton-cir.
config IR_STREAMZAP config IR_STREAMZAP
tristate "Streamzap PC Remote IR Receiver" tristate "Streamzap PC Remote IR Receiver"
......
...@@ -11,10 +11,12 @@ obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o ...@@ -11,10 +11,12 @@ obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o
obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o
obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o
obj-$(CONFIG_IR_RC5_SZ_DECODER) += ir-rc5-sz-decoder.o
obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o
# stand-alone IR receivers/transmitters # stand-alone IR receivers/transmitters
obj-$(CONFIG_IR_IMON) += imon.o obj-$(CONFIG_IR_IMON) += imon.o
obj-$(CONFIG_IR_MCEUSB) += mceusb.o obj-$(CONFIG_IR_MCEUSB) += mceusb.o
obj-$(CONFIG_IR_NUVOTON) += nuvoton-cir.o
obj-$(CONFIG_IR_ENE) += ene_ir.o obj-$(CONFIG_IR_ENE) += ene_ir.o
obj-$(CONFIG_IR_STREAMZAP) += streamzap.o obj-$(CONFIG_IR_STREAMZAP) += streamzap.o
此差异已折叠。
/* /*
* driver for ENE KB3926 B/C/D CIR (also known as ENE0XXX) * driver for ENE KB3926 B/C/D/E/F CIR (also known as ENE0XXX)
* *
* Copyright (C) 2010 Maxim Levitsky <maximlevitsky@gmail.com> * Copyright (C) 2010 Maxim Levitsky <maximlevitsky@gmail.com>
* *
...@@ -26,43 +26,50 @@ ...@@ -26,43 +26,50 @@
#define ENE_ADDR_HI 1 /* hi byte of register address */ #define ENE_ADDR_HI 1 /* hi byte of register address */
#define ENE_ADDR_LO 2 /* low byte of register address */ #define ENE_ADDR_LO 2 /* low byte of register address */
#define ENE_IO 3 /* read/write window */ #define ENE_IO 3 /* read/write window */
#define ENE_MAX_IO 4 #define ENE_IO_SIZE 4
/* 8 bytes of samples, divided in 2 halfs*/ /* 8 bytes of samples, divided in 2 packets*/
#define ENE_SAMPLE_BUFFER 0xF8F0 /* regular sample buffer */ #define ENE_FW_SAMPLE_BUFFER 0xF8F0 /* sample buffer */
#define ENE_SAMPLE_SPC_MASK 0x80 /* sample is space */ #define ENE_FW_SAMPLE_SPACE 0x80 /* sample is space */
#define ENE_SAMPLE_VALUE_MASK 0x7F #define ENE_FW_PACKET_SIZE 4
#define ENE_SAMPLE_OVERFLOW 0x7F
#define ENE_SAMPLES_SIZE 4 /* first firmware flag register */
#define ENE_FW1 0xF8F8 /* flagr */
/* fan input sample buffer */
#define ENE_SAMPLE_BUFFER_FAN 0xF8FB /* this buffer holds high byte of */
/* each sample of normal buffer */
#define ENE_FAN_SMPL_PULS_MSK 0x8000 /* this bit of combined sample */
/* if set, says that sample is pulse */
#define ENE_FAN_VALUE_MASK 0x0FFF /* mask for valid bits of the value */
/* first firmware register */
#define ENE_FW1 0xF8F8
#define ENE_FW1_ENABLE 0x01 /* enable fw processing */ #define ENE_FW1_ENABLE 0x01 /* enable fw processing */
#define ENE_FW1_TXIRQ 0x02 /* TX interrupt pending */ #define ENE_FW1_TXIRQ 0x02 /* TX interrupt pending */
#define ENE_FW1_HAS_EXTRA_BUF 0x04 /* fw uses extra buffer*/
#define ENE_FW1_EXTRA_BUF_HND 0x08 /* extra buffer handshake bit*/
#define ENE_FW1_LED_ON 0x10 /* turn on a led */
#define ENE_FW1_WPATTERN 0x20 /* enable wake pattern */
#define ENE_FW1_WAKE 0x40 /* enable wake from S3 */ #define ENE_FW1_WAKE 0x40 /* enable wake from S3 */
#define ENE_FW1_IRQ 0x80 /* enable interrupt */ #define ENE_FW1_IRQ 0x80 /* enable interrupt */
/* second firmware register */ /* second firmware flag register */
#define ENE_FW2 0xF8F9 #define ENE_FW2 0xF8F9 /* flagw */
#define ENE_FW2_BUF_HIGH 0x01 /* which half of the buffer to read */ #define ENE_FW2_BUF_WPTR 0x01 /* which half of the buffer to read */
#define ENE_FW2_IRQ_CLR 0x04 /* clear this on IRQ */ #define ENE_FW2_RXIRQ 0x04 /* RX IRQ pending*/
#define ENE_FW2_GP40_AS_LEARN 0x08 /* normal input is used as */ #define ENE_FW2_GP0A 0x08 /* Use GPIO0A for demodulated input */
/* learning input */ #define ENE_FW2_EMMITER1_CONN 0x10 /* TX emmiter 1 connected */
#define ENE_FW2_FAN_AS_NRML_IN 0x40 /* fan is used as normal input */ #define ENE_FW2_EMMITER2_CONN 0x20 /* TX emmiter 2 connected */
#define ENE_FW2_FAN_INPUT 0x40 /* fan input used for demodulated data*/
#define ENE_FW2_LEARNING 0x80 /* hardware supports learning and TX */ #define ENE_FW2_LEARNING 0x80 /* hardware supports learning and TX */
/* firmware RX pointer for new style buffer */
#define ENE_FW_RX_POINTER 0xF8FA
/* high parts of samples for fan input (8 samples)*/
#define ENE_FW_SMPL_BUF_FAN 0xF8FB
#define ENE_FW_SMPL_BUF_FAN_PLS 0x8000 /* combined sample is pulse */
#define ENE_FW_SMPL_BUF_FAN_MSK 0x0FFF /* combined sample maximum value */
#define ENE_FW_SAMPLE_PERIOD_FAN 61 /* fan input has fixed sample period */
/* transmitter ports */ /* transmitter ports */
#define ENE_TX_PORT2 0xFC01 /* this enables one or both */ #define ENE_GPIOFS1 0xFC01
#define ENE_TX_PORT2_EN 0x20 /* TX ports */ #define ENE_GPIOFS1_GPIO0D 0x20 /* enable tx output on GPIO0D */
#define ENE_TX_PORT1 0xFC08 #define ENE_GPIOFS8 0xFC08
#define ENE_TX_PORT1_EN 0x02 #define ENE_GPIOFS8_GPIO41 0x02 /* enable tx output on GPIO40 */
/* IRQ registers block (for revision B) */ /* IRQ registers block (for revision B) */
#define ENEB_IRQ 0xFD09 /* IRQ number */ #define ENEB_IRQ 0xFD09 /* IRQ number */
...@@ -70,97 +77,99 @@ ...@@ -70,97 +77,99 @@
#define ENEB_IRQ_STATUS 0xFD80 /* irq status */ #define ENEB_IRQ_STATUS 0xFD80 /* irq status */
#define ENEB_IRQ_STATUS_IR 0x20 /* IR irq */ #define ENEB_IRQ_STATUS_IR 0x20 /* IR irq */
/* fan as input settings - only if learning capable */ /* fan as input settings */
#define ENE_FAN_AS_IN1 0xFE30 /* fan init reg 1 */ #define ENE_FAN_AS_IN1 0xFE30 /* fan init reg 1 */
#define ENE_FAN_AS_IN1_EN 0xCD #define ENE_FAN_AS_IN1_EN 0xCD
#define ENE_FAN_AS_IN2 0xFE31 /* fan init reg 2 */ #define ENE_FAN_AS_IN2 0xFE31 /* fan init reg 2 */
#define ENE_FAN_AS_IN2_EN 0x03 #define ENE_FAN_AS_IN2_EN 0x03
#define ENE_SAMPLE_PERIOD_FAN 61 /* fan input has fixed sample period */
/* IRQ registers block (for revision C,D) */ /* IRQ registers block (for revision C,D) */
#define ENEC_IRQ 0xFE9B /* new irq settings register */ #define ENE_IRQ 0xFE9B /* new irq settings register */
#define ENEC_IRQ_MASK 0x0F /* irq number mask */ #define ENE_IRQ_MASK 0x0F /* irq number mask */
#define ENEC_IRQ_UNK_EN 0x10 /* always enabled */ #define ENE_IRQ_UNK_EN 0x10 /* always enabled */
#define ENEC_IRQ_STATUS 0x20 /* irq status and ACK */ #define ENE_IRQ_STATUS 0x20 /* irq status and ACK */
/* CIR block settings */ /* CIR Config register #1 */
#define ENE_CIR_CONF1 0xFEC0 #define ENE_CIRCFG 0xFEC0
#define ENE_CIR_CONF1_TX_CLEAR 0x01 /* clear that on revC */ #define ENE_CIRCFG_RX_EN 0x01 /* RX enable */
/* while transmitting */ #define ENE_CIRCFG_RX_IRQ 0x02 /* Enable hardware interrupt */
#define ENE_CIR_CONF1_RX_ON 0x07 /* normal receiver enabled */ #define ENE_CIRCFG_REV_POL 0x04 /* Input polarity reversed */
#define ENE_CIR_CONF1_LEARN1 0x08 /* enabled on learning mode */ #define ENE_CIRCFG_CARR_DEMOD 0x08 /* Enable carrier demodulator */
#define ENE_CIR_CONF1_TX_ON 0x30 /* enabled on transmit */
#define ENE_CIR_CONF1_TX_CARR 0x80 /* send TX carrier or not */ #define ENE_CIRCFG_TX_EN 0x10 /* TX enable */
#define ENE_CIRCFG_TX_IRQ 0x20 /* Send interrupt on TX done */
#define ENE_CIR_CONF2 0xFEC1 /* unknown setting = 0 */ #define ENE_CIRCFG_TX_POL_REV 0x40 /* TX polarity reversed */
#define ENE_CIR_CONF2_LEARN2 0x10 /* set on enable learning */ #define ENE_CIRCFG_TX_CARR 0x80 /* send TX carrier or not */
#define ENE_CIR_CONF2_GPIO40DIS 0x20 /* disable input via gpio40 */
/* CIR config register #2 */
#define ENE_CIR_SAMPLE_PERIOD 0xFEC8 /* sample period in us */ #define ENE_CIRCFG2 0xFEC1
#define ENE_CIR_SAMPLE_OVERFLOW 0x80 /* interrupt on overflows if set */ #define ENE_CIRCFG2_RLC 0x00
#define ENE_CIRCFG2_RC5 0x01
#define ENE_CIRCFG2_RC6 0x02
/* Two byte tx buffer */ #define ENE_CIRCFG2_NEC 0x03
#define ENE_TX_INPUT1 0xFEC9 #define ENE_CIRCFG2_CARR_DETECT 0x10 /* Enable carrier detection */
#define ENE_TX_INPUT2 0xFECA #define ENE_CIRCFG2_GPIO0A 0x20 /* Use GPIO0A instead of GPIO40 for input */
#define ENE_TX_PULSE_MASK 0x80 /* Transmitted sample is pulse */ #define ENE_CIRCFG2_FAST_SAMPL1 0x40 /* Fast leading pulse detection for RC6 */
#define ENE_TX_SMLP_MASK 0x7F #define ENE_CIRCFG2_FAST_SAMPL2 0x80 /* Fast data detection for RC6 */
#define ENE_TX_SMPL_PERIOD 50 /* transmit sample period - fixed */
/* Knobs for protocol decoding - will document when/if will use them */
#define ENE_CIRPF 0xFEC2
#define ENE_CIRHIGH 0xFEC3
#define ENE_CIRBIT 0xFEC4
#define ENE_CIRSTART 0xFEC5
#define ENE_CIRSTART2 0xFEC6
/* Actual register which contains RLC RX data - read by firmware */
#define ENE_CIRDAT_IN 0xFEC7
/* RLC configuration - sample period (1us resulution) + idle mode */
#define ENE_CIRRLC_CFG 0xFEC8
#define ENE_CIRRLC_CFG_OVERFLOW 0x80 /* interrupt on overflows if set */
#define ENE_DEFAULT_SAMPLE_PERIOD 50
/* Two byte RLC TX buffer */
#define ENE_CIRRLC_OUT0 0xFEC9
#define ENE_CIRRLC_OUT1 0xFECA
#define ENE_CIRRLC_OUT_PULSE 0x80 /* Transmitted sample is pulse */
#define ENE_CIRRLC_OUT_MASK 0x7F
/* Carrier detect setting
* Low nibble - number of carrier pulses to average
* High nibble - number of initial carrier pulses to discard
*/
#define ENE_CIRCAR_PULS 0xFECB
/* detected RX carrier period (resolution: 500 ns) */
#define ENE_CIRCAR_PRD 0xFECC
#define ENE_CIRCAR_PRD_VALID 0x80 /* data valid content valid */
/* Unknown TX setting - TX sample period ??? */ /* detected RX carrier pulse width (resolution: 500 ns) */
#define ENE_TX_UNK1 0xFECB /* set to 0x63 */ #define ENE_CIRCAR_HPRD 0xFECD
/* Current received carrier period */ /* TX period (resolution: 500 ns, minimum 2)*/
#define ENE_RX_CARRIER 0xFECC /* RX period (500 ns) */ #define ENE_CIRMOD_PRD 0xFECE
#define ENE_RX_CARRIER_VALID 0x80 /* Register content valid */ #define ENE_CIRMOD_PRD_POL 0x80 /* TX carrier polarity*/
#define ENE_CIRMOD_PRD_MAX 0x7F /* 15.87 kHz */
#define ENE_CIRMOD_PRD_MIN 0x02 /* 1 Mhz */
/* TX period (1/carrier) */ /* TX pulse width (resolution: 500 ns)*/
#define ENE_TX_PERIOD 0xFECE /* TX period (500 ns) */ #define ENE_CIRMOD_HPRD 0xFECF
#define ENE_TX_PERIOD_UNKBIT 0x80 /* This bit set on transmit*/
#define ENE_TX_PERIOD_PULSE 0xFECF /* TX pulse period (500 ns)*/
/* Hardware versions */ /* Hardware versions */
#define ENE_HW_VERSION 0xFF00 /* hardware revision */ #define ENE_ECHV 0xFF00 /* hardware revision */
#define ENE_PLLFRH 0xFF16 #define ENE_PLLFRH 0xFF16
#define ENE_PLLFRL 0xFF17 #define ENE_PLLFRL 0xFF17
#define ENE_DEFAULT_PLL_FREQ 1000
#define ENE_HW_UNK 0xFF1D #define ENE_ECSTS 0xFF1D
#define ENE_HW_UNK_CLR 0x04 #define ENE_ECSTS_RSRVD 0x04
#define ENE_HW_VER_MAJOR 0xFF1E /* chip version */
#define ENE_HW_VER_MINOR 0xFF1F
#define ENE_HW_VER_OLD 0xFD00
/* Normal/Learning carrier ranges - only valid if we have learning input*/
/* TODO: test */
#define ENE_NORMAL_RX_LOW 34
#define ENE_NORMAL_RX_HI 38
/* Tx carrier range */ #define ENE_ECVER_MAJOR 0xFF1E /* chip version */
/* Hardware might be able to do more, but this range is enough for #define ENE_ECVER_MINOR 0xFF1F
all purposes */ #define ENE_HW_VER_OLD 0xFD00
#define ENE_TX_PERIOD_MAX 32 /* corresponds to 29.4 kHz */
#define ENE_TX_PERIOD_MIN 16 /* corrsponds to 62.5 kHz */
/* Minimal and maximal gaps */
/* Normal case:
Minimal gap is 0x7F * sample period
Maximum gap depends on hardware.
For KB3926B, it is unlimited, for newer models its around
250000, after which HW stops sending samples, and that is
not possible to change */
/* Fan case:
Both minimal and maximal gaps are same, and equal to 0xFFF * 0x61
And there is nothing to change this setting
*/
#define ENE_MAXGAP 250000
#define ENE_MINGAP (127 * sample_period)
/******************************************************************************/ /******************************************************************************/
...@@ -171,46 +180,60 @@ ...@@ -171,46 +180,60 @@
#define ENE_HW_B 1 /* 3926B */ #define ENE_HW_B 1 /* 3926B */
#define ENE_HW_C 2 /* 3926C */ #define ENE_HW_C 2 /* 3926C */
#define ENE_HW_D 3 /* 3926D */ #define ENE_HW_D 3 /* 3926D or later */
#define ene_printk(level, text, ...) \ #define ene_printk(level, text, ...) \
printk(level ENE_DRIVER_NAME ": " text, ## __VA_ARGS__) printk(level ENE_DRIVER_NAME ": " text "\n", ## __VA_ARGS__)
#define ene_dbg(text, ...) \ #define ene_notice(text, ...) ene_printk(KERN_NOTICE, text, ## __VA_ARGS__)
if (debug) \ #define ene_warn(text, ...) ene_printk(KERN_WARNING, text, ## __VA_ARGS__)
printk(KERN_DEBUG \
ENE_DRIVER_NAME ": " text "\n" , ## __VA_ARGS__)
#define ene_dbg_verbose(text, ...) \
if (debug > 1) \
printk(KERN_DEBUG \
ENE_DRIVER_NAME ": " text "\n" , ## __VA_ARGS__)
#define __dbg(level, format, ...) \
do { \
if (debug >= level) \
printk(KERN_DEBUG ENE_DRIVER_NAME \
": " format "\n", ## __VA_ARGS__); \
} while (0)
#define dbg(format, ...) __dbg(1, format, ## __VA_ARGS__)
#define dbg_verbose(format, ...) __dbg(2, format, ## __VA_ARGS__)
#define dbg_regs(format, ...) __dbg(3, format, ## __VA_ARGS__)
#define MS_TO_NS(msec) ((msec) * 1000)
struct ene_device { struct ene_device {
struct pnp_dev *pnp_dev; struct pnp_dev *pnp_dev;
struct input_dev *idev; struct input_dev *idev;
struct ir_dev_props *props; struct ir_dev_props *props;
int in_use;
/* hw IO settings */ /* hw IO settings */
unsigned long hw_io; long hw_io;
int irq; int irq;
spinlock_t hw_lock; spinlock_t hw_lock;
/* HW features */ /* HW features */
int hw_revision; /* hardware revision */ int hw_revision; /* hardware revision */
bool hw_learning_and_tx_capable; /* learning capable */ bool hw_use_gpio_0a; /* gpio0a is demodulated input*/
bool hw_gpio40_learning; /* gpio40 is learning */ bool hw_extra_buffer; /* hardware has 'extra buffer' */
bool hw_fan_as_normal_input; /* fan input is used as */ bool hw_fan_input; /* fan input is IR data source */
/* regular input */ bool hw_learning_and_tx_capable; /* learning & tx capable */
int pll_freq;
int buffer_len;
/* Extra RX buffer location */
int extra_buf1_address;
int extra_buf1_len;
int extra_buf2_address;
int extra_buf2_len;
/* HW state*/ /* HW state*/
int rx_pointer; /* hw pointer to rx buffer */ int r_pointer; /* pointer to next sample to read */
int w_pointer; /* pointer to next sample hw will write */
bool rx_fan_input_inuse; /* is fan input in use for rx*/ bool rx_fan_input_inuse; /* is fan input in use for rx*/
int tx_reg; /* current reg used for TX */ int tx_reg; /* current reg used for TX */
u8 saved_conf1; /* saved FEC0 reg */ u8 saved_conf1; /* saved FEC0 reg */
/* TX sample handling */
unsigned int tx_sample; /* current sample for TX */ unsigned int tx_sample; /* current sample for TX */
bool tx_sample_pulse; /* current sample is pulse */ bool tx_sample_pulse; /* current sample is pulse */
...@@ -229,7 +252,11 @@ struct ene_device { ...@@ -229,7 +252,11 @@ struct ene_device {
int transmitter_mask; int transmitter_mask;
/* RX settings */ /* RX settings */
bool learning_enabled; /* learning input enabled */ bool learning_mode_enabled; /* learning input enabled */
bool carrier_detect_enabled; /* carrier detect enabled */ bool carrier_detect_enabled; /* carrier detect enabled */
int rx_period_adjust; int rx_period_adjust;
bool rx_enabled;
}; };
static int ene_irq_status(struct ene_device *dev);
static void ene_rx_read_hw_pointer(struct ene_device *dev);
此差异已折叠。
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#define _IR_RAW_EVENT #define _IR_RAW_EVENT
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h>
#include <media/ir-core.h> #include <media/ir-core.h>
struct ir_raw_handler { struct ir_raw_handler {
...@@ -33,6 +34,7 @@ struct ir_raw_handler { ...@@ -33,6 +34,7 @@ struct ir_raw_handler {
struct ir_raw_event_ctrl { struct ir_raw_event_ctrl {
struct list_head list; /* to keep track of raw clients */ struct list_head list; /* to keep track of raw clients */
struct task_struct *thread; struct task_struct *thread;
spinlock_t lock;
struct kfifo kfifo; /* fifo for the pulse/space durations */ struct kfifo kfifo; /* fifo for the pulse/space durations */
ktime_t last_event; /* when last event occurred */ ktime_t last_event; /* when last event occurred */
enum raw_event_type last_type; /* last event type */ enum raw_event_type last_type; /* last event type */
...@@ -76,10 +78,22 @@ struct ir_raw_event_ctrl { ...@@ -76,10 +78,22 @@ struct ir_raw_event_ctrl {
bool first; bool first;
bool toggle; bool toggle;
} jvc; } jvc;
struct rc5_sz_dec {
int state;
u32 bits;
unsigned count;
unsigned wanted_bits;
} rc5_sz;
struct lirc_codec { struct lirc_codec {
struct ir_input_dev *ir_dev; struct ir_input_dev *ir_dev;
struct lirc_driver *drv; struct lirc_driver *drv;
int carrier_low; int carrier_low;
ktime_t gap_start;
u64 gap_duration;
bool gap;
bool send_timeout_reports;
} lirc; } lirc;
}; };
...@@ -107,13 +121,19 @@ static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration) ...@@ -107,13 +121,19 @@ static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration)
ev->duration -= duration; ev->duration -= duration;
} }
/* Returns true if event is normal pulse/space event */
static inline bool is_timing_event(struct ir_raw_event ev)
{
return !ev.carrier_report && !ev.reset;
}
#define TO_US(duration) DIV_ROUND_CLOSEST((duration), 1000) #define TO_US(duration) DIV_ROUND_CLOSEST((duration), 1000)
#define TO_STR(is_pulse) ((is_pulse) ? "pulse" : "space") #define TO_STR(is_pulse) ((is_pulse) ? "pulse" : "space")
#define IS_RESET(ev) (ev.duration == 0)
/* /*
* Routines from ir-sysfs.c - Meant to be called only internally inside * Routines from ir-sysfs.c - Meant to be called only internally inside
* ir-core * ir-core
*/ */
int ir_register_input(struct input_dev *input_dev);
int ir_register_class(struct input_dev *input_dev); int ir_register_class(struct input_dev *input_dev);
void ir_unregister_class(struct input_dev *input_dev); void ir_unregister_class(struct input_dev *input_dev);
......
...@@ -50,8 +50,9 @@ static int ir_jvc_decode(struct input_dev *input_dev, struct ir_raw_event ev) ...@@ -50,8 +50,9 @@ static int ir_jvc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_JVC)) if (!(ir_dev->raw->enabled_protocols & IR_TYPE_JVC))
return 0; return 0;
if (IS_RESET(ev)) { if (!is_timing_event(ev)) {
data->state = STATE_INACTIVE; if (ev.reset)
data->state = STATE_INACTIVE;
return 0; return 0;
} }
......
...@@ -435,7 +435,7 @@ EXPORT_SYMBOL_GPL(ir_g_keycode_from_table); ...@@ -435,7 +435,7 @@ EXPORT_SYMBOL_GPL(ir_g_keycode_from_table);
* This routine is used to signal that a key has been released on the * This routine is used to signal that a key has been released on the
* remote control. It reports a keyup input event via input_report_key(). * remote control. It reports a keyup input event via input_report_key().
*/ */
static void ir_keyup(struct ir_input_dev *ir) void ir_keyup(struct ir_input_dev *ir)
{ {
if (!ir->keypressed) if (!ir->keypressed)
return; return;
...@@ -445,6 +445,7 @@ static void ir_keyup(struct ir_input_dev *ir) ...@@ -445,6 +445,7 @@ static void ir_keyup(struct ir_input_dev *ir)
input_sync(ir->input_dev); input_sync(ir->input_dev);
ir->keypressed = false; ir->keypressed = false;
} }
EXPORT_SYMBOL_GPL(ir_keyup);
/** /**
* ir_timer_keyup() - generates a keyup event after a timeout * ir_timer_keyup() - generates a keyup event after a timeout
...@@ -640,6 +641,10 @@ int __ir_input_register(struct input_dev *input_dev, ...@@ -640,6 +641,10 @@ int __ir_input_register(struct input_dev *input_dev,
goto out_event; goto out_event;
} }
rc = ir_register_input(input_dev);
if (rc < 0)
goto out_event;
IR_dprintk(1, "Registered input device on %s for %s remote%s.\n", IR_dprintk(1, "Registered input device on %s for %s remote%s.\n",
driver_name, rc_tab->name, driver_name, rc_tab->name,
(ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ? (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ?
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
static int ir_lirc_decode(struct input_dev *input_dev, struct ir_raw_event ev) static int ir_lirc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
{ {
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
struct lirc_codec *lirc = &ir_dev->raw->lirc;
int sample; int sample;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_LIRC)) if (!(ir_dev->raw->enabled_protocols & IR_TYPE_LIRC))
...@@ -40,21 +41,57 @@ static int ir_lirc_decode(struct input_dev *input_dev, struct ir_raw_event ev) ...@@ -40,21 +41,57 @@ static int ir_lirc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
if (!ir_dev->raw->lirc.drv || !ir_dev->raw->lirc.drv->rbuf) if (!ir_dev->raw->lirc.drv || !ir_dev->raw->lirc.drv->rbuf)
return -EINVAL; return -EINVAL;
if (IS_RESET(ev)) /* Packet start */
if (ev.reset)
return 0; return 0;
IR_dprintk(2, "LIRC data transfer started (%uus %s)\n", /* Carrier reports */
TO_US(ev.duration), TO_STR(ev.pulse)); if (ev.carrier_report) {
sample = LIRC_FREQUENCY(ev.carrier);
/* Packet end */
} else if (ev.timeout) {
if (lirc->gap)
return 0;
lirc->gap_start = ktime_get();
lirc->gap = true;
lirc->gap_duration = ev.duration;
if (!lirc->send_timeout_reports)
return 0;
sample = LIRC_TIMEOUT(ev.duration / 1000);
sample = ev.duration / 1000; /* Normal sample */
if (ev.pulse) } else {
sample |= PULSE_BIT;
if (lirc->gap) {
int gap_sample;
lirc->gap_duration += ktime_to_ns(ktime_sub(ktime_get(),
lirc->gap_start));
/* Convert to ms and cap by LIRC_VALUE_MASK */
do_div(lirc->gap_duration, 1000);
lirc->gap_duration = min(lirc->gap_duration,
(u64)LIRC_VALUE_MASK);
gap_sample = LIRC_SPACE(lirc->gap_duration);
lirc_buffer_write(ir_dev->raw->lirc.drv->rbuf,
(unsigned char *) &gap_sample);
lirc->gap = false;
}
sample = ev.pulse ? LIRC_PULSE(ev.duration / 1000) :
LIRC_SPACE(ev.duration / 1000);
}
lirc_buffer_write(ir_dev->raw->lirc.drv->rbuf, lirc_buffer_write(ir_dev->raw->lirc.drv->rbuf,
(unsigned char *) &sample); (unsigned char *) &sample);
wake_up(&ir_dev->raw->lirc.drv->rbuf->wait_poll); wake_up(&ir_dev->raw->lirc.drv->rbuf->wait_poll);
return 0; return 0;
} }
...@@ -102,7 +139,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, ...@@ -102,7 +139,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
struct ir_input_dev *ir_dev; struct ir_input_dev *ir_dev;
int ret = 0; int ret = 0;
void *drv_data; void *drv_data;
unsigned long val = 0; __u32 val = 0, tmp;
lirc = lirc_get_pdata(filep); lirc = lirc_get_pdata(filep);
if (!lirc) if (!lirc)
...@@ -115,7 +152,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, ...@@ -115,7 +152,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
drv_data = ir_dev->props->priv; drv_data = ir_dev->props->priv;
if (_IOC_DIR(cmd) & _IOC_WRITE) { if (_IOC_DIR(cmd) & _IOC_WRITE) {
ret = get_user(val, (unsigned long *)arg); ret = get_user(val, (__u32 *)arg);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -130,22 +167,20 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, ...@@ -130,22 +167,20 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
case LIRC_SET_SEND_MODE: case LIRC_SET_SEND_MODE:
if (val != (LIRC_MODE_PULSE & LIRC_CAN_SEND_MASK)) if (val != (LIRC_MODE_PULSE & LIRC_CAN_SEND_MASK))
return -EINVAL; return -EINVAL;
break; return 0;
/* TX settings */ /* TX settings */
case LIRC_SET_TRANSMITTER_MASK: case LIRC_SET_TRANSMITTER_MASK:
if (ir_dev->props->s_tx_mask) if (!ir_dev->props->s_tx_mask)
ret = ir_dev->props->s_tx_mask(drv_data, (u32)val);
else
return -EINVAL; return -EINVAL;
break;
return ir_dev->props->s_tx_mask(drv_data, val);
case LIRC_SET_SEND_CARRIER: case LIRC_SET_SEND_CARRIER:
if (ir_dev->props->s_tx_carrier) if (!ir_dev->props->s_tx_carrier)
ir_dev->props->s_tx_carrier(drv_data, (u32)val);
else
return -EINVAL; return -EINVAL;
break;
return ir_dev->props->s_tx_carrier(drv_data, val);
case LIRC_SET_SEND_DUTY_CYCLE: case LIRC_SET_SEND_DUTY_CYCLE:
if (!ir_dev->props->s_tx_duty_cycle) if (!ir_dev->props->s_tx_duty_cycle)
...@@ -154,39 +189,42 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, ...@@ -154,39 +189,42 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
if (val <= 0 || val >= 100) if (val <= 0 || val >= 100)
return -EINVAL; return -EINVAL;
ir_dev->props->s_tx_duty_cycle(ir_dev->props->priv, val); return ir_dev->props->s_tx_duty_cycle(drv_data, val);
break;
/* RX settings */ /* RX settings */
case LIRC_SET_REC_CARRIER: case LIRC_SET_REC_CARRIER:
if (ir_dev->props->s_rx_carrier_range) if (!ir_dev->props->s_rx_carrier_range)
ret = ir_dev->props->s_rx_carrier_range(
ir_dev->props->priv,
ir_dev->raw->lirc.carrier_low, val);
else
return -ENOSYS; return -ENOSYS;
if (!ret) if (val <= 0)
ir_dev->raw->lirc.carrier_low = 0; return -EINVAL;
break;
return ir_dev->props->s_rx_carrier_range(drv_data,
ir_dev->raw->lirc.carrier_low, val);
case LIRC_SET_REC_CARRIER_RANGE: case LIRC_SET_REC_CARRIER_RANGE:
if (val >= 0) if (val <= 0)
ir_dev->raw->lirc.carrier_low = val; return -EINVAL;
break;
ir_dev->raw->lirc.carrier_low = val;
return 0;
case LIRC_GET_REC_RESOLUTION: case LIRC_GET_REC_RESOLUTION:
val = ir_dev->props->rx_resolution; val = ir_dev->props->rx_resolution;
break; break;
case LIRC_SET_WIDEBAND_RECEIVER: case LIRC_SET_WIDEBAND_RECEIVER:
if (ir_dev->props->s_learning_mode) if (!ir_dev->props->s_learning_mode)
return ir_dev->props->s_learning_mode(
ir_dev->props->priv, !!val);
else
return -ENOSYS; return -ENOSYS;
return ir_dev->props->s_learning_mode(drv_data, !!val);
case LIRC_SET_MEASURE_CARRIER_MODE:
if (!ir_dev->props->s_carrier_report)
return -ENOSYS;
return ir_dev->props->s_carrier_report(drv_data, !!val);
/* Generic timeout support */ /* Generic timeout support */
case LIRC_GET_MIN_TIMEOUT: case LIRC_GET_MIN_TIMEOUT:
if (!ir_dev->props->max_timeout) if (!ir_dev->props->max_timeout)
...@@ -201,10 +239,20 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, ...@@ -201,10 +239,20 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
break; break;
case LIRC_SET_REC_TIMEOUT: case LIRC_SET_REC_TIMEOUT:
if (val < ir_dev->props->min_timeout || if (!ir_dev->props->max_timeout)
val > ir_dev->props->max_timeout) return -ENOSYS;
return -EINVAL;
ir_dev->props->timeout = val * 1000; tmp = val * 1000;
if (tmp < ir_dev->props->min_timeout ||
tmp > ir_dev->props->max_timeout)
return -EINVAL;
ir_dev->props->timeout = tmp;
break;
case LIRC_SET_REC_TIMEOUT_REPORTS:
lirc->send_timeout_reports = !!val;
break; break;
default: default:
...@@ -212,7 +260,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd, ...@@ -212,7 +260,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
} }
if (_IOC_DIR(cmd) & _IOC_READ) if (_IOC_DIR(cmd) & _IOC_READ)
ret = put_user(val, (unsigned long *)arg); ret = put_user(val, (__u32 *)arg);
return ret; return ret;
} }
...@@ -231,6 +279,9 @@ static struct file_operations lirc_fops = { ...@@ -231,6 +279,9 @@ static struct file_operations lirc_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = ir_lirc_transmit_ir, .write = ir_lirc_transmit_ir,
.unlocked_ioctl = ir_lirc_ioctl, .unlocked_ioctl = ir_lirc_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ir_lirc_ioctl,
#endif
.read = lirc_dev_fop_read, .read = lirc_dev_fop_read,
.poll = lirc_dev_fop_poll, .poll = lirc_dev_fop_poll,
.open = lirc_dev_fop_open, .open = lirc_dev_fop_open,
...@@ -278,6 +329,10 @@ static int ir_lirc_register(struct input_dev *input_dev) ...@@ -278,6 +329,10 @@ static int ir_lirc_register(struct input_dev *input_dev)
if (ir_dev->props->s_learning_mode) if (ir_dev->props->s_learning_mode)
features |= LIRC_CAN_USE_WIDEBAND_RECEIVER; features |= LIRC_CAN_USE_WIDEBAND_RECEIVER;
if (ir_dev->props->s_carrier_report)
features |= LIRC_CAN_MEASURE_CARRIER;
if (ir_dev->props->max_timeout) if (ir_dev->props->max_timeout)
features |= LIRC_CAN_SET_REC_TIMEOUT; features |= LIRC_CAN_SET_REC_TIMEOUT;
......
...@@ -54,8 +54,9 @@ static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev) ...@@ -54,8 +54,9 @@ static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev)
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_NEC)) if (!(ir_dev->raw->enabled_protocols & IR_TYPE_NEC))
return 0; return 0;
if (IS_RESET(ev)) { if (!is_timing_event(ev)) {
data->state = STATE_INACTIVE; if (ev.reset)
data->state = STATE_INACTIVE;
return 0; return 0;
} }
......
此差异已折叠。
...@@ -55,8 +55,9 @@ static int ir_rc5_decode(struct input_dev *input_dev, struct ir_raw_event ev) ...@@ -55,8 +55,9 @@ static int ir_rc5_decode(struct input_dev *input_dev, struct ir_raw_event ev)
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5)) if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5))
return 0; return 0;
if (IS_RESET(ev)) { if (!is_timing_event(ev)) {
data->state = STATE_INACTIVE; if (ev.reset)
data->state = STATE_INACTIVE;
return 0; return 0;
} }
......
此差异已折叠。
...@@ -85,8 +85,9 @@ static int ir_rc6_decode(struct input_dev *input_dev, struct ir_raw_event ev) ...@@ -85,8 +85,9 @@ static int ir_rc6_decode(struct input_dev *input_dev, struct ir_raw_event ev)
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC6)) if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC6))
return 0; return 0;
if (IS_RESET(ev)) { if (!is_timing_event(ev)) {
data->state = STATE_INACTIVE; if (ev.reset)
data->state = STATE_INACTIVE;
return 0; return 0;
} }
......
...@@ -48,8 +48,9 @@ static int ir_sony_decode(struct input_dev *input_dev, struct ir_raw_event ev) ...@@ -48,8 +48,9 @@ static int ir_sony_decode(struct input_dev *input_dev, struct ir_raw_event ev)
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_SONY)) if (!(ir_dev->raw->enabled_protocols & IR_TYPE_SONY))
return 0; return 0;
if (IS_RESET(ev)) { if (!is_timing_event(ev)) {
data->state = STATE_INACTIVE; if (ev.reset)
data->state = STATE_INACTIVE;
return 0; return 0;
} }
......
此差异已折叠。
obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-alink-dtu-m.o \
rc-anysee.o \
rc-apac-viewcomp.o \ rc-apac-viewcomp.o \
rc-asus-pc39.o \ rc-asus-pc39.o \
rc-ati-tv-wonder-hd-600.o \ rc-ati-tv-wonder-hd-600.o \
...@@ -8,7 +10,9 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ ...@@ -8,7 +10,9 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-avermedia-dvbt.o \ rc-avermedia-dvbt.o \
rc-avermedia-m135a.o \ rc-avermedia-m135a.o \
rc-avermedia-m733a-rm-k6.o \ rc-avermedia-m733a-rm-k6.o \
rc-avermedia-rm-ks.o \
rc-avertv-303.o \ rc-avertv-303.o \
rc-azurewave-ad-tu700.o \
rc-behold.o \ rc-behold.o \
rc-behold-columbus.o \ rc-behold-columbus.o \
rc-budget-ci-old.o \ rc-budget-ci-old.o \
...@@ -16,6 +20,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ ...@@ -16,6 +20,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-cinergy.o \ rc-cinergy.o \
rc-dib0700-nec.o \ rc-dib0700-nec.o \
rc-dib0700-rc5.o \ rc-dib0700-rc5.o \
rc-digitalnow-tinytwin.o \
rc-digittrade.o \
rc-dm1105-nec.o \ rc-dm1105-nec.o \
rc-dntv-live-dvb-t.o \ rc-dntv-live-dvb-t.o \
rc-dntv-live-dvbt-pro.o \ rc-dntv-live-dvbt-pro.o \
...@@ -38,8 +44,12 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ ...@@ -38,8 +44,12 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-kaiomy.o \ rc-kaiomy.o \
rc-kworld-315u.o \ rc-kworld-315u.o \
rc-kworld-plus-tv-analog.o \ rc-kworld-plus-tv-analog.o \
rc-leadtek-y04g0051.o \
rc-lirc.o \ rc-lirc.o \
rc-lme2510.o \
rc-manli.o \ rc-manli.o \
rc-msi-digivox-ii.o \
rc-msi-digivox-iii.o \
rc-msi-tvanywhere.o \ rc-msi-tvanywhere.o \
rc-msi-tvanywhere-plus.o \ rc-msi-tvanywhere-plus.o \
rc-nebula.o \ rc-nebula.o \
...@@ -58,14 +68,18 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ ...@@ -58,14 +68,18 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-purpletv.o \ rc-purpletv.o \
rc-pv951.o \ rc-pv951.o \
rc-rc5-hauppauge-new.o \ rc-rc5-hauppauge-new.o \
rc-rc5-streamzap.o \
rc-rc5-tv.o \ rc-rc5-tv.o \
rc-rc6-mce.o \ rc-rc6-mce.o \
rc-real-audio-220-32-keys.o \ rc-real-audio-220-32-keys.o \
rc-streamzap.o \
rc-tbs-nec.o \ rc-tbs-nec.o \
rc-terratec-cinergy-xs.o \ rc-terratec-cinergy-xs.o \
rc-terratec-slim.o \
rc-tevii-nec.o \ rc-tevii-nec.o \
rc-total-media-in-hand.o \
rc-trekstor.o \
rc-tt-1500.o \ rc-tt-1500.o \
rc-twinhan1027.o \
rc-videomate-s350.o \ rc-videomate-s350.o \
rc-videomate-tv-pvr.o \ rc-videomate-tv-pvr.o \
rc-winfast.o \ rc-winfast.o \
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册