mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-12 08:00:09 +00:00
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (534 commits) V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers V4L/DVB: vivi and mem2mem_testdev need slab.h to build V4L/DVB: tm6000: bugfix image position V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSET V4L/DVB: tm6000: README - add vbi V4L/DVB: Fix unlock logic at medusa_video_init V4L/DVB: fix dvb frontend lockup V4L/DVB: s2255drv: remove dead code V4L/DVB: s2255drv: return if vdev not found V4L/DVB: ov511: cleanup: remove unneeded null check V4L/DVB: media/mem2mem: dereferencing free memory V4L/DVB: media/IR: Add missing include file to rc-map.c V4L/DVB: dvb/stv6110x: cleanup error handling V4L/DVB: ngene: Add lgdt3303 and mt2131 deps to Kconfig V4L/DVB: ngene: start separating out DVB functions into separate file V4L/DVB: ngene: split out card specific code into a separate file V4L/DVB: ngene: split out i2c code into a separate file V4L/DVB: ngene: add initial support for digital side of Avermedia m780 V4L/DVB: ngene: properly support boards where channel 0 isn't a TS input V4L-DVB: ngene: make sure that tuner headers are included ...
This commit is contained in:
commit
fb091be08d
@ -17,6 +17,7 @@
|
||||
<!ENTITY VIDIOC-DBG-G-REGISTER "<link linkend='vidioc-dbg-g-register'><constant>VIDIOC_DBG_G_REGISTER</constant></link>">
|
||||
<!ENTITY VIDIOC-DBG-S-REGISTER "<link linkend='vidioc-dbg-g-register'><constant>VIDIOC_DBG_S_REGISTER</constant></link>">
|
||||
<!ENTITY VIDIOC-DQBUF "<link linkend='vidioc-qbuf'><constant>VIDIOC_DQBUF</constant></link>">
|
||||
<!ENTITY VIDIOC-DQEVENT "<link linkend='vidioc-dqevent'><constant>VIDIOC_DQEVENT</constant></link>">
|
||||
<!ENTITY VIDIOC-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_ENCODER_CMD</constant></link>">
|
||||
<!ENTITY VIDIOC-ENUMAUDIO "<link linkend='vidioc-enumaudio'><constant>VIDIOC_ENUMAUDIO</constant></link>">
|
||||
<!ENTITY VIDIOC-ENUMAUDOUT "<link linkend='vidioc-enumaudioout'><constant>VIDIOC_ENUMAUDOUT</constant></link>">
|
||||
@ -60,6 +61,7 @@
|
||||
<!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>">
|
||||
<!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>">
|
||||
<!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>">
|
||||
<!ENTITY VIDIOC-SUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_SUBSCRIBE_EVENT</constant></link>">
|
||||
<!ENTITY VIDIOC-S-AUDIO "<link linkend='vidioc-g-audio'><constant>VIDIOC_S_AUDIO</constant></link>">
|
||||
<!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>">
|
||||
<!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>">
|
||||
@ -83,6 +85,7 @@
|
||||
<!ENTITY VIDIOC-TRY-ENCODER-CMD "<link linkend='vidioc-encoder-cmd'><constant>VIDIOC_TRY_ENCODER_CMD</constant></link>">
|
||||
<!ENTITY VIDIOC-TRY-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_TRY_EXT_CTRLS</constant></link>">
|
||||
<!ENTITY VIDIOC-TRY-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_TRY_FMT</constant></link>">
|
||||
<!ENTITY VIDIOC-UNSUBSCRIBE-EVENT "<link linkend='vidioc-subscribe-event'><constant>VIDIOC_UNSUBSCRIBE_EVENT</constant></link>">
|
||||
|
||||
<!-- Types -->
|
||||
<!ENTITY v4l2-std-id "<link linkend='v4l2-std-id'>v4l2_std_id</link>">
|
||||
@ -141,6 +144,9 @@
|
||||
<!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>">
|
||||
<!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>">
|
||||
<!ENTITY v4l2-encoder-cmd "struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>">
|
||||
<!ENTITY v4l2-event "struct <link linkend='v4l2-event'>v4l2_event</link>">
|
||||
<!ENTITY v4l2-event-subscription "struct <link linkend='v4l2-event-subscription'>v4l2_event_subscription</link>">
|
||||
<!ENTITY v4l2-event-vsync "struct <link linkend='v4l2-event-vsync'>v4l2_event_vsync</link>">
|
||||
<!ENTITY v4l2-ext-control "struct <link linkend='v4l2-ext-control'>v4l2_ext_control</link>">
|
||||
<!ENTITY v4l2-ext-controls "struct <link linkend='v4l2-ext-controls'>v4l2_ext_controls</link>">
|
||||
<!ENTITY v4l2-fmtdesc "struct <link linkend='v4l2-fmtdesc'>v4l2_fmtdesc</link>">
|
||||
@ -200,6 +206,7 @@
|
||||
<!ENTITY sub-controls SYSTEM "v4l/controls.xml">
|
||||
<!ENTITY sub-dev-capture SYSTEM "v4l/dev-capture.xml">
|
||||
<!ENTITY sub-dev-codec SYSTEM "v4l/dev-codec.xml">
|
||||
<!ENTITY sub-dev-event SYSTEM "v4l/dev-event.xml">
|
||||
<!ENTITY sub-dev-effect SYSTEM "v4l/dev-effect.xml">
|
||||
<!ENTITY sub-dev-osd SYSTEM "v4l/dev-osd.xml">
|
||||
<!ENTITY sub-dev-output SYSTEM "v4l/dev-output.xml">
|
||||
@ -292,6 +299,8 @@
|
||||
<!ENTITY sub-v4l2grab-c SYSTEM "v4l/v4l2grab.c.xml">
|
||||
<!ENTITY sub-videodev2-h SYSTEM "v4l/videodev2.h.xml">
|
||||
<!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml">
|
||||
<!ENTITY sub-dqevent SYSTEM "v4l/vidioc-dqevent.xml">
|
||||
<!ENTITY sub-subscribe-event SYSTEM "v4l/vidioc-subscribe-event.xml">
|
||||
<!ENTITY sub-intro SYSTEM "dvb/intro.xml">
|
||||
<!ENTITY sub-frontend SYSTEM "dvb/frontend.xml">
|
||||
<!ENTITY sub-dvbproperty SYSTEM "dvb/dvbproperty.xml">
|
||||
@ -381,3 +390,5 @@
|
||||
<!ENTITY reqbufs SYSTEM "v4l/vidioc-reqbufs.xml">
|
||||
<!ENTITY s-hw-freq-seek SYSTEM "v4l/vidioc-s-hw-freq-seek.xml">
|
||||
<!ENTITY streamon SYSTEM "v4l/vidioc-streamon.xml">
|
||||
<!ENTITY dqevent SYSTEM "v4l/vidioc-dqevent.xml">
|
||||
<!ENTITY subscribe_event SYSTEM "v4l/vidioc-subscribe-event.xml">
|
||||
|
@ -2332,15 +2332,26 @@ more information.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<title>V4L2 in Linux 2.6.34</title>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Added
|
||||
<constant>V4L2_CID_IRIS_ABSOLUTE</constant> and
|
||||
<constant>V4L2_CID_IRIS_RELATIVE</constant> controls to the
|
||||
<link linkend="camera-controls">Camera controls class</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
|
||||
<section id="other">
|
||||
<title>Relation of V4L2 to other Linux multimedia APIs</title>
|
||||
<section id="other">
|
||||
<title>Relation of V4L2 to other Linux multimedia APIs</title>
|
||||
|
||||
<section id="xvideo">
|
||||
<title>X Video Extension</title>
|
||||
<section id="xvideo">
|
||||
<title>X Video Extension</title>
|
||||
|
||||
<para>The X Video Extension (abbreviated XVideo or just Xv) is
|
||||
<para>The X Video Extension (abbreviated XVideo or just Xv) is
|
||||
an extension of the X Window system, implemented for example by the
|
||||
XFree86 project. Its scope is similar to V4L2, an API to video capture
|
||||
and output devices for X clients. Xv allows applications to display
|
||||
@ -2351,7 +2362,7 @@ capture or output still images in XPixmaps<footnote>
|
||||
extension available across many operating systems and
|
||||
architectures.</para>
|
||||
|
||||
<para>Because the driver is embedded into the X server Xv has a
|
||||
<para>Because the driver is embedded into the X server Xv has a
|
||||
number of advantages over the V4L2 <link linkend="overlay">video
|
||||
overlay interface</link>. The driver can easily determine the overlay
|
||||
target, &ie; visible graphics memory or off-screen buffers for a
|
||||
@ -2360,16 +2371,16 @@ overlay, scaling or color-keying, or the clipping functions of the
|
||||
video capture hardware, always in sync with drawing operations or
|
||||
windows moving or changing their stacking order.</para>
|
||||
|
||||
<para>To combine the advantages of Xv and V4L a special Xv
|
||||
<para>To combine the advantages of Xv and V4L a special Xv
|
||||
driver exists in XFree86 and XOrg, just programming any overlay capable
|
||||
Video4Linux device it finds. To enable it
|
||||
<filename>/etc/X11/XF86Config</filename> must contain these lines:</para>
|
||||
<para><screen>
|
||||
<para><screen>
|
||||
Section "Module"
|
||||
Load "v4l"
|
||||
EndSection</screen></para>
|
||||
|
||||
<para>As of XFree86 4.2 this driver still supports only V4L
|
||||
<para>As of XFree86 4.2 this driver still supports only V4L
|
||||
ioctls, however it should work just fine with all V4L2 devices through
|
||||
the V4L2 backward-compatibility layer. Since V4L2 permits multiple
|
||||
opens it is possible (if supported by the V4L2 driver) to capture
|
||||
@ -2377,83 +2388,84 @@ video while an X client requested video overlay. Restrictions of
|
||||
simultaneous capturing and overlay are discussed in <xref
|
||||
linkend="overlay" /> apply.</para>
|
||||
|
||||
<para>Only marginally related to V4L2, XFree86 extended Xv to
|
||||
<para>Only marginally related to V4L2, XFree86 extended Xv to
|
||||
support hardware YUV to RGB conversion and scaling for faster video
|
||||
playback, and added an interface to MPEG-2 decoding hardware. This API
|
||||
is useful to display images captured with V4L2 devices.</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Digital Video</title>
|
||||
<section>
|
||||
<title>Digital Video</title>
|
||||
|
||||
<para>V4L2 does not support digital terrestrial, cable or
|
||||
<para>V4L2 does not support digital terrestrial, cable or
|
||||
satellite broadcast. A separate project aiming at digital receivers
|
||||
exists. You can find its homepage at <ulink
|
||||
url="http://linuxtv.org">http://linuxtv.org</ulink>. The Linux DVB API
|
||||
has no connection to the V4L2 API except that drivers for hybrid
|
||||
hardware may support both.</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Audio Interfaces</title>
|
||||
|
||||
<para>[to do - OSS/ALSA]</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Audio Interfaces</title>
|
||||
<section id="experimental">
|
||||
<title>Experimental API Elements</title>
|
||||
|
||||
<para>[to do - OSS/ALSA]</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id="experimental">
|
||||
<title>Experimental API Elements</title>
|
||||
|
||||
<para>The following V4L2 API elements are currently experimental
|
||||
<para>The following V4L2 API elements are currently experimental
|
||||
and may change in the future.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Video Output Overlay (OSD) Interface, <xref
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Video Output Overlay (OSD) Interface, <xref
|
||||
linkend="osd" />.</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY</constant>,
|
||||
<para><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY</constant>,
|
||||
&v4l2-buf-type;, <xref linkend="v4l2-buf-type" />.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant>,
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant>,
|
||||
&VIDIOC-QUERYCAP; ioctl, <xref linkend="device-capabilities" />.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-ENUM-FRAMESIZES; and
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-ENUM-FRAMESIZES; and
|
||||
&VIDIOC-ENUM-FRAMEINTERVALS; ioctls.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-G-ENC-INDEX; ioctl.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-ENCODER-CMD; and &VIDIOC-TRY-ENCODER-CMD;
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-G-ENC-INDEX; ioctl.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-ENCODER-CMD; and &VIDIOC-TRY-ENCODER-CMD;
|
||||
ioctls.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER;
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER;
|
||||
ioctls.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
<section id="obsolete">
|
||||
<title>Obsolete API Elements</title>
|
||||
<section id="obsolete">
|
||||
<title>Obsolete API Elements</title>
|
||||
|
||||
<para>The following V4L2 API elements were superseded by new
|
||||
<para>The following V4L2 API elements were superseded by new
|
||||
interfaces and should not be implemented in new drivers.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><constant>VIDIOC_G_MPEGCOMP</constant> and
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><constant>VIDIOC_G_MPEGCOMP</constant> and
|
||||
<constant>VIDIOC_S_MPEGCOMP</constant> ioctls. Use Extended Controls,
|
||||
<xref linkend="extended-controls" />.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!--
|
||||
|
@ -266,6 +266,12 @@ minimum value disables backlight compensation.</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>Chroma automatic gain control.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry>
|
||||
<entry>integer</entry>
|
||||
<entry>Adjusts the Chroma gain control (for use when chroma AGC
|
||||
is disabled).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
|
||||
<entry>boolean</entry>
|
||||
@ -277,8 +283,15 @@ minimum value disables backlight compensation.</entry>
|
||||
<entry>Selects a color effect. Possible values for
|
||||
<constant>enum v4l2_colorfx</constant> are:
|
||||
<constant>V4L2_COLORFX_NONE</constant> (0),
|
||||
<constant>V4L2_COLORFX_BW</constant> (1) and
|
||||
<constant>V4L2_COLORFX_SEPIA</constant> (2).</entry>
|
||||
<constant>V4L2_COLORFX_BW</constant> (1),
|
||||
<constant>V4L2_COLORFX_SEPIA</constant> (2),
|
||||
<constant>V4L2_COLORFX_NEGATIVE</constant> (3),
|
||||
<constant>V4L2_COLORFX_EMBOSS</constant> (4),
|
||||
<constant>V4L2_COLORFX_SKETCH</constant> (5),
|
||||
<constant>V4L2_COLORFX_SKY_BLUE</constant> (6),
|
||||
<constant>V4L2_COLORFX_GRASS_GREEN</constant> (7),
|
||||
<constant>V4L2_COLORFX_SKIN_WHITEN</constant> (8) and
|
||||
<constant>V4L2_COLORFX_VIVID</constant> (9).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_CID_ROTATE</constant></entry>
|
||||
@ -1824,6 +1837,25 @@ wide-angle direction. The zoom speed unit is driver-specific.</entry>
|
||||
</row>
|
||||
<row><entry></entry></row>
|
||||
|
||||
<row>
|
||||
<entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant> </entry>
|
||||
<entry>integer</entry>
|
||||
</row><row><entry spanname="descr">This control sets the
|
||||
camera's aperture to the specified value. The unit is undefined.
|
||||
Larger values open the iris wider, smaller values close it.</entry>
|
||||
</row>
|
||||
<row><entry></entry></row>
|
||||
|
||||
<row>
|
||||
<entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant> </entry>
|
||||
<entry>integer</entry>
|
||||
</row><row><entry spanname="descr">This control modifies the
|
||||
camera's aperture by the specified amount. The unit is undefined.
|
||||
Positive values open the iris one step further, negative values close
|
||||
it one step further. This is a write-only control.</entry>
|
||||
</row>
|
||||
<row><entry></entry></row>
|
||||
|
||||
<row>
|
||||
<entry spanname="id"><constant>V4L2_CID_PRIVACY</constant> </entry>
|
||||
<entry>boolean</entry>
|
||||
|
31
Documentation/DocBook/v4l/dev-event.xml
Normal file
31
Documentation/DocBook/v4l/dev-event.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<title>Event Interface</title>
|
||||
|
||||
<para>The V4L2 event interface provides means for user to get
|
||||
immediately notified on certain conditions taking place on a device.
|
||||
This might include start of frame or loss of signal events, for
|
||||
example.
|
||||
</para>
|
||||
|
||||
<para>To receive events, the events the user is interested in first must
|
||||
be subscribed using the &VIDIOC-SUBSCRIBE-EVENT; ioctl. Once an event is
|
||||
subscribed, the events of subscribed types are dequeueable using the
|
||||
&VIDIOC-DQEVENT; ioctl. Events may be unsubscribed using
|
||||
VIDIOC_UNSUBSCRIBE_EVENT ioctl. The special event type V4L2_EVENT_ALL may
|
||||
be used to unsubscribe all the events the driver supports.</para>
|
||||
|
||||
<para>The event subscriptions and event queues are specific to file
|
||||
handles. Subscribing an event on one file handle does not affect
|
||||
other file handles.
|
||||
</para>
|
||||
|
||||
<para>The information on dequeueable events is obtained by using select or
|
||||
poll system calls on video devices. The V4L2 events use POLLPRI events on
|
||||
poll system call and exceptions on select system call. </para>
|
||||
|
||||
<!--
|
||||
Local Variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: "v4l2.sgml"
|
||||
indent-tabs-mode: nil
|
||||
End:
|
||||
-->
|
@ -701,6 +701,16 @@ buffer cannot be on both queues at the same time, the
|
||||
They can be both cleared however, then the buffer is in "dequeued"
|
||||
state, in the application domain to say so.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_BUF_FLAG_ERROR</constant></entry>
|
||||
<entry>0x0040</entry>
|
||||
<entry>When this flag is set, the buffer has been dequeued
|
||||
successfully, although the data might have been corrupted.
|
||||
This is recoverable, streaming may continue as normal and
|
||||
the buffer may be reused normally.
|
||||
Drivers set this flag when the <constant>VIDIOC_DQBUF</constant>
|
||||
ioctl is called.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_BUF_FLAG_KEYFRAME</constant></entry>
|
||||
<entry>0x0008</entry>
|
||||
@ -918,8 +928,8 @@ order</emphasis>.</para>
|
||||
|
||||
<para>When the driver provides or accepts images field by field
|
||||
rather than interleaved, it is also important applications understand
|
||||
how the fields combine to frames. We distinguish between top and
|
||||
bottom fields, the <emphasis>spatial order</emphasis>: The first line
|
||||
how the fields combine to frames. We distinguish between top (aka odd) and
|
||||
bottom (aka even) fields, the <emphasis>spatial order</emphasis>: The first line
|
||||
of the top field is the first line of an interlaced frame, the first
|
||||
line of the bottom field is the second line of that frame.</para>
|
||||
|
||||
@ -972,12 +982,12 @@ between <constant>V4L2_FIELD_TOP</constant> and
|
||||
<row>
|
||||
<entry><constant>V4L2_FIELD_TOP</constant></entry>
|
||||
<entry>2</entry>
|
||||
<entry>Images consist of the top field only.</entry>
|
||||
<entry>Images consist of the top (aka odd) field only.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_FIELD_BOTTOM</constant></entry>
|
||||
<entry>3</entry>
|
||||
<entry>Images consist of the bottom field only.
|
||||
<entry>Images consist of the bottom (aka even) field only.
|
||||
Applications may wish to prevent a device from capturing interlaced
|
||||
images because they will have "comb" or "feathering" artefacts around
|
||||
moving objects.</entry>
|
||||
|
@ -792,6 +792,18 @@ http://www.thedirks.org/winnov/</ulink></para></entry>
|
||||
<entry>'YYUV'</entry>
|
||||
<entry>unknown</entry>
|
||||
</row>
|
||||
<row id="V4L2-PIX-FMT-Y4">
|
||||
<entry><constant>V4L2_PIX_FMT_Y4</constant></entry>
|
||||
<entry>'Y04 '</entry>
|
||||
<entry>Old 4-bit greyscale format. Only the least significant 4 bits of each byte are used,
|
||||
the other bits are set to 0.</entry>
|
||||
</row>
|
||||
<row id="V4L2-PIX-FMT-Y6">
|
||||
<entry><constant>V4L2_PIX_FMT_Y6</constant></entry>
|
||||
<entry>'Y06 '</entry>
|
||||
<entry>Old 6-bit greyscale format. Only the least significant 6 bits of each byte are used,
|
||||
the other bits are set to 0.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
@ -401,6 +401,7 @@ and discussions on the V4L mailing list.</revremark>
|
||||
<section id="ttx"> &sub-dev-teletext; </section>
|
||||
<section id="radio"> &sub-dev-radio; </section>
|
||||
<section id="rds"> &sub-dev-rds; </section>
|
||||
<section id="event"> &sub-dev-event; </section>
|
||||
</chapter>
|
||||
|
||||
<chapter id="driver">
|
||||
@ -426,6 +427,7 @@ and discussions on the V4L mailing list.</revremark>
|
||||
&sub-cropcap;
|
||||
&sub-dbg-g-chip-ident;
|
||||
&sub-dbg-g-register;
|
||||
&sub-dqevent;
|
||||
&sub-encoder-cmd;
|
||||
&sub-enumaudio;
|
||||
&sub-enumaudioout;
|
||||
@ -467,6 +469,7 @@ and discussions on the V4L mailing list.</revremark>
|
||||
&sub-reqbufs;
|
||||
&sub-s-hw-freq-seek;
|
||||
&sub-streamon;
|
||||
&sub-subscribe-event;
|
||||
<!-- End of ioctls. -->
|
||||
&sub-mmap;
|
||||
&sub-munmap;
|
||||
|
@ -1018,6 +1018,13 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> {
|
||||
V4L2_COLORFX_NONE = 0,
|
||||
V4L2_COLORFX_BW = 1,
|
||||
V4L2_COLORFX_SEPIA = 2,
|
||||
V4L2_COLORFX_NEGATIVE = 3,
|
||||
V4L2_COLORFX_EMBOSS = 4,
|
||||
V4L2_COLORFX_SKETCH = 5,
|
||||
V4L2_COLORFX_SKY_BLUE = 6,
|
||||
V4L2_COLORFX_GRASS_GREEN = 7,
|
||||
V4L2_COLORFX_SKIN_WHITEN = 8,
|
||||
V4L2_COLORFX_VIVID = 9.
|
||||
};
|
||||
#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
|
||||
#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
|
||||
@ -1271,6 +1278,9 @@ enum <link linkend="v4l2-exposure-auto-type">v4l2_exposure_auto_type</link> {
|
||||
|
||||
#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
|
||||
|
||||
#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
|
||||
#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
|
||||
|
||||
/* FM Modulator class control IDs */
|
||||
#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
|
||||
#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
|
||||
|
131
Documentation/DocBook/v4l/vidioc-dqevent.xml
Normal file
131
Documentation/DocBook/v4l/vidioc-dqevent.xml
Normal file
@ -0,0 +1,131 @@
|
||||
<refentry id="vidioc-dqevent">
|
||||
<refmeta>
|
||||
<refentrytitle>ioctl VIDIOC_DQEVENT</refentrytitle>
|
||||
&manvol;
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>VIDIOC_DQEVENT</refname>
|
||||
<refpurpose>Dequeue event</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>ioctl</function></funcdef>
|
||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||
<paramdef>int <parameter>request</parameter></paramdef>
|
||||
<paramdef>struct v4l2_event
|
||||
*<parameter>argp</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>Arguments</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>&fd;</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>request</parameter></term>
|
||||
<listitem>
|
||||
<para>VIDIOC_DQEVENT</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>argp</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<para>Dequeue an event from a video device. No input is required
|
||||
for this ioctl. All the fields of the &v4l2-event; structure are
|
||||
filled by the driver. The file handle will also receive exceptions
|
||||
which the application may get by e.g. using the select system
|
||||
call.</para>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event">
|
||||
<title>struct <structname>v4l2_event</structname></title>
|
||||
<tgroup cols="4">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>type</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>Type of the event.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>union</entry>
|
||||
<entry><structfield>u</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>&v4l2-event-vsync;</entry>
|
||||
<entry><structfield>vsync</structfield></entry>
|
||||
<entry>Event data for event V4L2_EVENT_VSYNC.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry></entry>
|
||||
<entry>__u8</entry>
|
||||
<entry><structfield>data</structfield>[64]</entry>
|
||||
<entry>Event data. Defined by the event type. The union
|
||||
should be used to define easily accessible type for
|
||||
events.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>pending</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>Number of pending events excluding this one.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>sequence</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>Event sequence number. The sequence number is
|
||||
incremented for every subscribed event that takes place.
|
||||
If sequence numbers are not contiguous it means that
|
||||
events have been lost.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>struct timespec</entry>
|
||||
<entry><structfield>timestamp</structfield></entry>
|
||||
<entry></entry>
|
||||
<entry>Event timestamp.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>reserved</structfield>[9]</entry>
|
||||
<entry></entry>
|
||||
<entry>Reserved for future extensions. Drivers must set
|
||||
the array to zero.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!--
|
||||
Local Variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: "v4l2.sgml"
|
||||
indent-tabs-mode: nil
|
||||
End:
|
||||
-->
|
@ -283,7 +283,7 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
|
||||
<entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry>
|
||||
<entry><constant>V4L2_IN_CAP_CUSTOM_TIMINGS</constant></entry>
|
||||
<entry>0x00000002</entry>
|
||||
<entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry>
|
||||
</row>
|
||||
|
@ -111,7 +111,11 @@ from the driver's outgoing queue. They just set the
|
||||
and <structfield>reserved</structfield>
|
||||
fields of a &v4l2-buffer; as above, when <constant>VIDIOC_DQBUF</constant>
|
||||
is called with a pointer to this structure the driver fills the
|
||||
remaining fields or returns an error code.</para>
|
||||
remaining fields or returns an error code. The driver may also set
|
||||
<constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield>
|
||||
field. It indicates a non-critical (recoverable) streaming error. In such case
|
||||
the application may continue as normal, but should be aware that data in the
|
||||
dequeued buffer might be corrupted.</para>
|
||||
|
||||
<para>By default <constant>VIDIOC_DQBUF</constant> blocks when no
|
||||
buffer is in the outgoing queue. When the
|
||||
@ -158,7 +162,13 @@ enqueue a user pointer buffer.</para>
|
||||
<para><constant>VIDIOC_DQBUF</constant> failed due to an
|
||||
internal error. Can also indicate temporary problems like signal
|
||||
loss. Note the driver might dequeue an (empty) buffer despite
|
||||
returning an error, or even stop capturing.</para>
|
||||
returning an error, or even stop capturing. Reusing such buffer may be unsafe
|
||||
though and its details (e.g. <structfield>index</structfield>) may not be
|
||||
returned either. It is recommended that drivers indicate recoverable errors
|
||||
by setting the <constant>V4L2_BUF_FLAG_ERROR</constant> and returning 0 instead.
|
||||
In that case the application should be able to safely reuse the buffer and
|
||||
continue streaming.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -325,7 +325,7 @@ should be part of the control documentation.</entry>
|
||||
<entry>n/a</entry>
|
||||
<entry>This is not a control. When
|
||||
<constant>VIDIOC_QUERYCTRL</constant> is called with a control ID
|
||||
equal to a control class code (see <xref linkend="ctrl-class" />), the
|
||||
equal to a control class code (see <xref linkend="ctrl-class" />) + 1, the
|
||||
ioctl returns the name of the control class and this control type.
|
||||
Older drivers which do not support this feature return an
|
||||
&EINVAL;.</entry>
|
||||
|
@ -61,7 +61,7 @@ fields of the <structname>v4l2_requestbuffers</structname> structure.
|
||||
They set the <structfield>type</structfield> field to the respective
|
||||
stream or buffer type, the <structfield>count</structfield> field to
|
||||
the desired number of buffers, <structfield>memory</structfield>
|
||||
must be set to the requested I/O method and the reserved array
|
||||
must be set to the requested I/O method and the <structfield>reserved</structfield> array
|
||||
must be zeroed. When the ioctl
|
||||
is called with a pointer to this structure the driver will attempt to allocate
|
||||
the requested number of buffers and it stores the actual number
|
||||
|
133
Documentation/DocBook/v4l/vidioc-subscribe-event.xml
Normal file
133
Documentation/DocBook/v4l/vidioc-subscribe-event.xml
Normal file
@ -0,0 +1,133 @@
|
||||
<refentry id="vidioc-subscribe-event">
|
||||
<refmeta>
|
||||
<refentrytitle>ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</refentrytitle>
|
||||
&manvol;
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</refname>
|
||||
<refpurpose>Subscribe or unsubscribe event</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>ioctl</function></funcdef>
|
||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||
<paramdef>int <parameter>request</parameter></paramdef>
|
||||
<paramdef>struct v4l2_event_subscription
|
||||
*<parameter>argp</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>Arguments</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>fd</parameter></term>
|
||||
<listitem>
|
||||
<para>&fd;</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>request</parameter></term>
|
||||
<listitem>
|
||||
<para>VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>argp</parameter></term>
|
||||
<listitem>
|
||||
<para></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<para>Subscribe or unsubscribe V4L2 event. Subscribed events are
|
||||
dequeued by using the &VIDIOC-DQEVENT; ioctl.</para>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event-subscription">
|
||||
<title>struct <structname>v4l2_event_subscription</structname></title>
|
||||
<tgroup cols="3">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>type</structfield></entry>
|
||||
<entry>Type of the event.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>__u32</entry>
|
||||
<entry><structfield>reserved</structfield>[7]</entry>
|
||||
<entry>Reserved for future extensions. Drivers and applications
|
||||
must set the array to zero.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table frame="none" pgwide="1" id="event-type">
|
||||
<title>Event Types</title>
|
||||
<tgroup cols="3">
|
||||
&cs-def;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_ALL</constant></entry>
|
||||
<entry>0</entry>
|
||||
<entry>All events. V4L2_EVENT_ALL is valid only for
|
||||
VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_VSYNC</constant></entry>
|
||||
<entry>1</entry>
|
||||
<entry>This event is triggered on the vertical sync.
|
||||
This event has &v4l2-event-vsync; associated with it.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_EOS</constant></entry>
|
||||
<entry>2</entry>
|
||||
<entry>This event is triggered when the end of a stream is reached.
|
||||
This is typically used with MPEG decoders to report to the application
|
||||
when the last of the MPEG stream has been decoded.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry>
|
||||
<entry>0x08000000</entry>
|
||||
<entry>Base event number for driver-private events.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table frame="none" pgwide="1" id="v4l2-event-vsync">
|
||||
<title>struct <structname>v4l2_event_vsync</structname></title>
|
||||
<tgroup cols="3">
|
||||
&cs-str;
|
||||
<tbody valign="top">
|
||||
<row>
|
||||
<entry>__u8</entry>
|
||||
<entry><structfield>field</structfield></entry>
|
||||
<entry>The upcoming field. See &v4l2-field;.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!--
|
||||
Local Variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: "v4l2.sgml"
|
||||
indent-tabs-mode: nil
|
||||
End:
|
||||
-->
|
@ -100,7 +100,7 @@
|
||||
99 -> AD-TVK503
|
||||
100 -> Hercules Smart TV Stereo
|
||||
101 -> Pace TV & Radio Card
|
||||
102 -> IVC-200 [0000:a155,0001:a155,0002:a155,0003:a155,0100:a155,0101:a155,0102:a155,0103:a155]
|
||||
102 -> IVC-200 [0000:a155,0001:a155,0002:a155,0003:a155,0100:a155,0101:a155,0102:a155,0103:a155,0800:a155,0801:a155,0802:a155,0803:a155]
|
||||
103 -> Grand X-Guard / Trust 814PCI [0304:0102]
|
||||
104 -> Nebula Electronics DigiTV [0071:0101]
|
||||
105 -> ProVideo PV143 [aa00:1430,aa00:1431,aa00:1432,aa00:1433,aa03:1433]
|
||||
|
@ -82,3 +82,4 @@
|
||||
81 -> Leadtek WinFast DTV1800 Hybrid [107d:6654]
|
||||
82 -> WinFast DTV2000 H rev. J [107d:6f2b]
|
||||
83 -> Prof 7301 DVB-S/S2 [b034:3034]
|
||||
84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd]
|
||||
|
@ -1,5 +1,5 @@
|
||||
0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800]
|
||||
1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868]
|
||||
1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868]
|
||||
2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036]
|
||||
3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208]
|
||||
4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201]
|
||||
@ -27,6 +27,7 @@
|
||||
26 -> Hercules Smart TV USB 2.0 (em2820/em2840)
|
||||
27 -> Pinnacle PCTV USB 2 (Philips FM1216ME) (em2820/em2840)
|
||||
28 -> Leadtek Winfast USB II Deluxe (em2820/em2840)
|
||||
29 -> EM2860/TVP5150 Reference Design (em2860)
|
||||
30 -> Videology 20K14XUSB USB2.0 (em2820/em2840)
|
||||
31 -> Usbgear VD204v9 (em2821)
|
||||
32 -> Supercomp USB 2.0 TV (em2821)
|
||||
@ -70,3 +71,4 @@
|
||||
72 -> Gadmei UTV330+ (em2861)
|
||||
73 -> Reddo DVB-C USB TV Box (em2870)
|
||||
74 -> Actionmaster/LinXcel/Digitus VC211A (em2800)
|
||||
75 -> Dikom DK300 (em2882)
|
||||
|
@ -175,3 +175,6 @@
|
||||
174 -> Asus Europa Hybrid OEM [1043:4847]
|
||||
175 -> Leadtek Winfast DTV1000S [107d:6655]
|
||||
176 -> Beholder BeholdTV 505 RDS [0000:5051]
|
||||
177 -> Hawell HW-404M7
|
||||
179 -> Beholder BeholdTV H7 [5ace:7190]
|
||||
180 -> Beholder BeholdTV A7 [5ace:7090]
|
||||
|
@ -5,12 +5,18 @@
|
||||
#
|
||||
# In order to use, you need to:
|
||||
# 1) Download the windows driver with something like:
|
||||
# Version 2.4
|
||||
# wget http://www.twinhan.com/files/AW/BDA T/20080303_V1.0.6.7.zip
|
||||
# or wget http://www.stefanringel.de/pub/20080303_V1.0.6.7.zip
|
||||
# Version 2.7
|
||||
# wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
|
||||
# 2) Extract the file hcw85bda.sys from the zip into the current dir:
|
||||
# 2) Extract the files from the zip into the current dir:
|
||||
# unzip -j 20080303_V1.0.6.7.zip 20080303_v1.0.6.7/UDXTTM6000.sys
|
||||
# unzip -j HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip Driver85/hcw85bda.sys
|
||||
# 3) run the script:
|
||||
# ./extract_xc3028.pl
|
||||
# 4) copy the generated file:
|
||||
# 4) copy the generated files:
|
||||
# cp xc3028-v24.fw /lib/firmware
|
||||
# cp xc3028-v27.fw /lib/firmware
|
||||
|
||||
#use strict;
|
||||
@ -135,7 +141,7 @@ sub write_hunk_fix_endian($$)
|
||||
}
|
||||
}
|
||||
|
||||
sub main_firmware($$$$)
|
||||
sub main_firmware_24($$$$)
|
||||
{
|
||||
my $out;
|
||||
my $j=0;
|
||||
@ -146,8 +152,774 @@ sub main_firmware($$$$)
|
||||
|
||||
for ($j = length($name); $j <32; $j++) {
|
||||
$name = $name.chr(0);
|
||||
}
|
||||
|
||||
open OUTFILE, ">$outfile";
|
||||
syswrite(OUTFILE, $name);
|
||||
write_le16($version);
|
||||
write_le16($nr_desc);
|
||||
|
||||
#
|
||||
# Firmware 0, type: BASE FW F8MHZ (0x00000003), id: (0000000000000000), size: 6635
|
||||
#
|
||||
|
||||
write_le32(0x00000003); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(6635); # Size
|
||||
write_hunk_fix_endian(257752, 6635);
|
||||
|
||||
#
|
||||
# Firmware 1, type: BASE FW F8MHZ MTS (0x00000007), id: (0000000000000000), size: 6635
|
||||
#
|
||||
|
||||
write_le32(0x00000007); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(6635); # Size
|
||||
write_hunk_fix_endian(264392, 6635);
|
||||
|
||||
#
|
||||
# Firmware 2, type: BASE FW FM (0x00000401), id: (0000000000000000), size: 6525
|
||||
#
|
||||
|
||||
write_le32(0x00000401); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(6525); # Size
|
||||
write_hunk_fix_endian(271040, 6525);
|
||||
|
||||
#
|
||||
# Firmware 3, type: BASE FW FM INPUT1 (0x00000c01), id: (0000000000000000), size: 6539
|
||||
#
|
||||
|
||||
write_le32(0x00000c01); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(6539); # Size
|
||||
write_hunk_fix_endian(277568, 6539);
|
||||
|
||||
#
|
||||
# Firmware 4, type: BASE FW (0x00000001), id: (0000000000000000), size: 6633
|
||||
#
|
||||
|
||||
write_le32(0x00000001); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(6633); # Size
|
||||
write_hunk_fix_endian(284120, 6633);
|
||||
|
||||
#
|
||||
# Firmware 5, type: BASE FW MTS (0x00000005), id: (0000000000000000), size: 6617
|
||||
#
|
||||
|
||||
write_le32(0x00000005); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(6617); # Size
|
||||
write_hunk_fix_endian(290760, 6617);
|
||||
|
||||
#
|
||||
# Firmware 6, type: STD FW (0x00000000), id: PAL/BG A2/A (0000000100000007), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000001, 0x00000007); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(297384, 161);
|
||||
|
||||
#
|
||||
# Firmware 7, type: STD FW MTS (0x00000004), id: PAL/BG A2/A (0000000100000007), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000001, 0x00000007); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(297552, 169);
|
||||
|
||||
#
|
||||
# Firmware 8, type: STD FW (0x00000000), id: PAL/BG A2/B (0000000200000007), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000002, 0x00000007); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(297728, 161);
|
||||
|
||||
#
|
||||
# Firmware 9, type: STD FW MTS (0x00000004), id: PAL/BG A2/B (0000000200000007), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000002, 0x00000007); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(297896, 169);
|
||||
|
||||
#
|
||||
# Firmware 10, type: STD FW (0x00000000), id: PAL/BG NICAM/A (0000000400000007), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000004, 0x00000007); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(298072, 161);
|
||||
|
||||
#
|
||||
# Firmware 11, type: STD FW MTS (0x00000004), id: PAL/BG NICAM/A (0000000400000007), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000004, 0x00000007); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(298240, 169);
|
||||
|
||||
#
|
||||
# Firmware 12, type: STD FW (0x00000000), id: PAL/BG NICAM/B (0000000800000007), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000008, 0x00000007); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(298416, 161);
|
||||
|
||||
#
|
||||
# Firmware 13, type: STD FW MTS (0x00000004), id: PAL/BG NICAM/B (0000000800000007), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000008, 0x00000007); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(298584, 169);
|
||||
|
||||
#
|
||||
# Firmware 14, type: STD FW (0x00000000), id: PAL/DK A2 (00000003000000e0), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000003, 0x000000e0); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(298760, 161);
|
||||
|
||||
#
|
||||
# Firmware 15, type: STD FW MTS (0x00000004), id: PAL/DK A2 (00000003000000e0), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000003, 0x000000e0); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(298928, 169);
|
||||
|
||||
#
|
||||
# Firmware 16, type: STD FW (0x00000000), id: PAL/DK NICAM (0000000c000000e0), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x0000000c, 0x000000e0); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(299104, 161);
|
||||
|
||||
#
|
||||
# Firmware 17, type: STD FW MTS (0x00000004), id: PAL/DK NICAM (0000000c000000e0), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x0000000c, 0x000000e0); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(299272, 169);
|
||||
|
||||
#
|
||||
# Firmware 18, type: STD FW (0x00000000), id: SECAM/K1 (0000000000200000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000000, 0x00200000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(299448, 161);
|
||||
|
||||
#
|
||||
# Firmware 19, type: STD FW MTS (0x00000004), id: SECAM/K1 (0000000000200000), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000000, 0x00200000); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(299616, 169);
|
||||
|
||||
#
|
||||
# Firmware 20, type: STD FW (0x00000000), id: SECAM/K3 (0000000004000000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000000, 0x04000000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(299792, 161);
|
||||
|
||||
#
|
||||
# Firmware 21, type: STD FW MTS (0x00000004), id: SECAM/K3 (0000000004000000), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000000, 0x04000000); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(299960, 169);
|
||||
|
||||
#
|
||||
# Firmware 22, type: STD FW D2633 DTV6 ATSC (0x00010030), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00010030); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(300136, 149);
|
||||
|
||||
#
|
||||
# Firmware 23, type: STD FW D2620 DTV6 QAM (0x00000068), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000068); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(300296, 149);
|
||||
|
||||
#
|
||||
# Firmware 24, type: STD FW D2633 DTV6 QAM (0x00000070), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000070); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(300448, 149);
|
||||
|
||||
#
|
||||
# Firmware 25, type: STD FW D2620 DTV7 (0x00000088), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000088); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(300608, 149);
|
||||
|
||||
#
|
||||
# Firmware 26, type: STD FW D2633 DTV7 (0x00000090), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000090); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(300760, 149);
|
||||
|
||||
#
|
||||
# Firmware 27, type: STD FW D2620 DTV78 (0x00000108), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000108); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(300920, 149);
|
||||
|
||||
#
|
||||
# Firmware 28, type: STD FW D2633 DTV78 (0x00000110), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000110); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(301072, 149);
|
||||
|
||||
#
|
||||
# Firmware 29, type: STD FW D2620 DTV8 (0x00000208), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000208); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(301232, 149);
|
||||
|
||||
#
|
||||
# Firmware 30, type: STD FW D2633 DTV8 (0x00000210), id: (0000000000000000), size: 149
|
||||
#
|
||||
|
||||
write_le32(0x00000210); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(149); # Size
|
||||
write_hunk_fix_endian(301384, 149);
|
||||
|
||||
#
|
||||
# Firmware 31, type: STD FW FM (0x00000400), id: (0000000000000000), size: 135
|
||||
#
|
||||
|
||||
write_le32(0x00000400); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le32(135); # Size
|
||||
write_hunk_fix_endian(301554, 135);
|
||||
|
||||
#
|
||||
# Firmware 32, type: STD FW (0x00000000), id: PAL/I (0000000000000010), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000000, 0x00000010); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(301688, 161);
|
||||
|
||||
#
|
||||
# Firmware 33, type: STD FW MTS (0x00000004), id: PAL/I (0000000000000010), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000000, 0x00000010); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(301856, 169);
|
||||
|
||||
#
|
||||
# Firmware 34, type: STD FW (0x00000000), id: SECAM/L AM (0000001000400000), size: 169
|
||||
#
|
||||
|
||||
#
|
||||
# Firmware 35, type: STD FW (0x00000000), id: SECAM/L NICAM (0000000c00400000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x0000000c, 0x00400000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(302032, 161);
|
||||
|
||||
#
|
||||
# Firmware 36, type: STD FW (0x00000000), id: SECAM/Lc (0000000000800000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000000, 0x00800000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(302200, 161);
|
||||
|
||||
#
|
||||
# Firmware 37, type: STD FW (0x00000000), id: NTSC/M Kr (0000000000008000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000000, 0x00008000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(302368, 161);
|
||||
|
||||
#
|
||||
# Firmware 38, type: STD FW LCD (0x00001000), id: NTSC/M Kr (0000000000008000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00001000); # Type
|
||||
write_le64(0x00000000, 0x00008000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(302536, 161);
|
||||
|
||||
#
|
||||
# Firmware 39, type: STD FW LCD NOGD (0x00003000), id: NTSC/M Kr (0000000000008000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00003000); # Type
|
||||
write_le64(0x00000000, 0x00008000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(302704, 161);
|
||||
|
||||
#
|
||||
# Firmware 40, type: STD FW MTS (0x00000004), id: NTSC/M Kr (0000000000008000), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000000, 0x00008000); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(302872, 169);
|
||||
|
||||
#
|
||||
# Firmware 41, type: STD FW (0x00000000), id: NTSC PAL/M PAL/N (000000000000b700), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000000, 0x0000b700); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(303048, 161);
|
||||
|
||||
#
|
||||
# Firmware 42, type: STD FW LCD (0x00001000), id: NTSC PAL/M PAL/N (000000000000b700), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00001000); # Type
|
||||
write_le64(0x00000000, 0x0000b700); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(303216, 161);
|
||||
|
||||
#
|
||||
# Firmware 43, type: STD FW LCD NOGD (0x00003000), id: NTSC PAL/M PAL/N (000000000000b700), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00003000); # Type
|
||||
write_le64(0x00000000, 0x0000b700); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(303384, 161);
|
||||
|
||||
#
|
||||
# Firmware 44, type: STD FW (0x00000000), id: NTSC/M Jp (0000000000002000), size: 161
|
||||
#
|
||||
|
||||
write_le32(0x00000000); # Type
|
||||
write_le64(0x00000000, 0x00002000); # ID
|
||||
write_le32(161); # Size
|
||||
write_hunk_fix_endian(303552, 161);
|
||||
|
||||
#
|
||||
# Firmware 45, type: STD FW MTS (0x00000004), id: NTSC PAL/M PAL/N (000000000000b700), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00000004); # Type
|
||||
write_le64(0x00000000, 0x0000b700); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(303720, 169);
|
||||
|
||||
#
|
||||
# Firmware 46, type: STD FW MTS LCD (0x00001004), id: NTSC PAL/M PAL/N (000000000000b700), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00001004); # Type
|
||||
write_le64(0x00000000, 0x0000b700); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(303896, 169);
|
||||
|
||||
#
|
||||
# Firmware 47, type: STD FW MTS LCD NOGD (0x00003004), id: NTSC PAL/M PAL/N (000000000000b700), size: 169
|
||||
#
|
||||
|
||||
write_le32(0x00003004); # Type
|
||||
write_le64(0x00000000, 0x0000b700); # ID
|
||||
write_le32(169); # Size
|
||||
write_hunk_fix_endian(304072, 169);
|
||||
|
||||
#
|
||||
# Firmware 48, type: SCODE FW HAS IF (0x60000000), IF = 3.28 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(3280); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(309048, 192);
|
||||
|
||||
#
|
||||
# Firmware 49, type: SCODE FW HAS IF (0x60000000), IF = 3.30 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
# write_le32(0x60000000); # Type
|
||||
# write_le64(0x00000000, 0x00000000); # ID
|
||||
# write_le16(3300); # IF
|
||||
# write_le32(192); # Size
|
||||
# write_hunk(304440, 192);
|
||||
|
||||
#
|
||||
# Firmware 50, type: SCODE FW HAS IF (0x60000000), IF = 3.44 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(3440); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(309432, 192);
|
||||
|
||||
#
|
||||
# Firmware 51, type: SCODE FW HAS IF (0x60000000), IF = 3.46 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(3460); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(309624, 192);
|
||||
|
||||
#
|
||||
# Firmware 52, type: SCODE FW DTV6 ATSC OREN36 HAS IF (0x60210020), IF = 3.80 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60210020); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(3800); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(306936, 192);
|
||||
|
||||
#
|
||||
# Firmware 53, type: SCODE FW HAS IF (0x60000000), IF = 4.00 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(4000); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(309240, 192);
|
||||
|
||||
#
|
||||
# Firmware 54, type: SCODE FW DTV6 ATSC TOYOTA388 HAS IF (0x60410020), IF = 4.08 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60410020); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(4080); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(307128, 192);
|
||||
|
||||
#
|
||||
# Firmware 55, type: SCODE FW HAS IF (0x60000000), IF = 4.20 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(4200); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(308856, 192);
|
||||
|
||||
#
|
||||
# Firmware 56, type: SCODE FW MONO HAS IF (0x60008000), IF = 4.32 MHz id: NTSC/M Kr (0000000000008000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60008000); # Type
|
||||
write_le64(0x00000000, 0x00008000); # ID
|
||||
write_le16(4320); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(305208, 192);
|
||||
|
||||
#
|
||||
# Firmware 57, type: SCODE FW HAS IF (0x60000000), IF = 4.45 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(4450); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(309816, 192);
|
||||
|
||||
#
|
||||
# Firmware 58, type: SCODE FW MTS LCD NOGD MONO IF HAS IF (0x6002b004), IF = 4.50 MHz id: NTSC PAL/M PAL/N (000000000000b700), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x6002b004); # Type
|
||||
write_le64(0x00000000, 0x0000b700); # ID
|
||||
write_le16(4500); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(304824, 192);
|
||||
|
||||
#
|
||||
# Firmware 59, type: SCODE FW LCD NOGD IF HAS IF (0x60023000), IF = 4.60 MHz id: NTSC/M Kr (0000000000008000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60023000); # Type
|
||||
write_le64(0x00000000, 0x00008000); # ID
|
||||
write_le16(4600); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(305016, 192);
|
||||
|
||||
#
|
||||
# Firmware 60, type: SCODE FW DTV6 QAM DTV7 DTV78 DTV8 ZARLINK456 HAS IF (0x620003e0), IF = 4.76 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x620003e0); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(4760); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(304440, 192);
|
||||
|
||||
#
|
||||
# Firmware 61, type: SCODE FW HAS IF (0x60000000), IF = 4.94 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(4940); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(308664, 192);
|
||||
|
||||
#
|
||||
# Firmware 62, type: SCODE FW HAS IF (0x60000000), IF = 5.26 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(5260); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(307704, 192);
|
||||
|
||||
#
|
||||
# Firmware 63, type: SCODE FW MONO HAS IF (0x60008000), IF = 5.32 MHz id: PAL/BG A2 NICAM (0000000f00000007), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60008000); # Type
|
||||
write_le64(0x0000000f, 0x00000007); # ID
|
||||
write_le16(5320); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(307896, 192);
|
||||
|
||||
#
|
||||
# Firmware 64, type: SCODE FW DTV7 DTV78 DTV8 DIBCOM52 CHINA HAS IF (0x65000380), IF = 5.40 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x65000380); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(5400); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(304248, 192);
|
||||
|
||||
#
|
||||
# Firmware 65, type: SCODE FW DTV6 ATSC OREN538 HAS IF (0x60110020), IF = 5.58 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60110020); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(5580); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(306744, 192);
|
||||
|
||||
#
|
||||
# Firmware 66, type: SCODE FW HAS IF (0x60000000), IF = 5.64 MHz id: PAL/BG A2 (0000000300000007), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000003, 0x00000007); # ID
|
||||
write_le16(5640); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(305592, 192);
|
||||
|
||||
#
|
||||
# Firmware 67, type: SCODE FW HAS IF (0x60000000), IF = 5.74 MHz id: PAL/BG NICAM (0000000c00000007), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x0000000c, 0x00000007); # ID
|
||||
write_le16(5740); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(305784, 192);
|
||||
|
||||
#
|
||||
# Firmware 68, type: SCODE FW HAS IF (0x60000000), IF = 5.90 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(5900); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(307512, 192);
|
||||
|
||||
#
|
||||
# Firmware 69, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.00 MHz id: PAL/DK PAL/I SECAM/K3 SECAM/L SECAM/Lc NICAM (0000000c04c000f0), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60008000); # Type
|
||||
write_le64(0x0000000c, 0x04c000f0); # ID
|
||||
write_le16(6000); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(305576, 192);
|
||||
|
||||
#
|
||||
# Firmware 70, type: SCODE FW DTV6 QAM ATSC LG60 F6MHZ HAS IF (0x68050060), IF = 6.20 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x68050060); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(6200); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(306552, 192);
|
||||
|
||||
#
|
||||
# Firmware 71, type: SCODE FW HAS IF (0x60000000), IF = 6.24 MHz id: PAL/I (0000000000000010), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00000010); # ID
|
||||
write_le16(6240); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(305400, 192);
|
||||
|
||||
#
|
||||
# Firmware 72, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.32 MHz id: SECAM/K1 (0000000000200000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60008000); # Type
|
||||
write_le64(0x00000000, 0x00200000); # ID
|
||||
write_le16(6320); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(308472, 192);
|
||||
|
||||
#
|
||||
# Firmware 73, type: SCODE FW HAS IF (0x60000000), IF = 6.34 MHz id: SECAM/K1 (0000000000200000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000000, 0x00200000); # ID
|
||||
write_le16(6340); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(306360, 192);
|
||||
|
||||
#
|
||||
# Firmware 74, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.50 MHz id: PAL/DK SECAM/K3 SECAM/L NICAM (0000000c044000e0), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60008000); # Type
|
||||
write_le64(0x0000000c, 0x044000e0); # ID
|
||||
write_le16(6500); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(308280, 192);
|
||||
|
||||
#
|
||||
# Firmware 75, type: SCODE FW DTV6 ATSC ATI638 HAS IF (0x60090020), IF = 6.58 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60090020); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(6580); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(304632, 192);
|
||||
|
||||
#
|
||||
# Firmware 76, type: SCODE FW HAS IF (0x60000000), IF = 6.60 MHz id: PAL/DK A2 (00000003000000e0), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60000000); # Type
|
||||
write_le64(0x00000003, 0x000000e0); # ID
|
||||
write_le16(6600); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(306168, 192);
|
||||
|
||||
#
|
||||
# Firmware 77, type: SCODE FW MONO HAS IF (0x60008000), IF = 6.68 MHz id: PAL/DK A2 (00000003000000e0), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60008000); # Type
|
||||
write_le64(0x00000003, 0x000000e0); # ID
|
||||
write_le16(6680); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(308088, 192);
|
||||
|
||||
#
|
||||
# Firmware 78, type: SCODE FW DTV6 ATSC TOYOTA794 HAS IF (0x60810020), IF = 8.14 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
write_le32(0x60810020); # Type
|
||||
write_le64(0x00000000, 0x00000000); # ID
|
||||
write_le16(8140); # IF
|
||||
write_le32(192); # Size
|
||||
write_hunk(307320, 192);
|
||||
|
||||
#
|
||||
# Firmware 79, type: SCODE FW HAS IF (0x60000000), IF = 8.20 MHz id: (0000000000000000), size: 192
|
||||
#
|
||||
|
||||
# write_le32(0x60000000); # Type
|
||||
# write_le64(0x00000000, 0x00000000); # ID
|
||||
# write_le16(8200); # IF
|
||||
# write_le32(192); # Size
|
||||
# write_hunk(308088, 192);
|
||||
}
|
||||
|
||||
sub main_firmware_27($$$$)
|
||||
{
|
||||
my $out;
|
||||
my $j=0;
|
||||
my $outfile = shift;
|
||||
my $name = shift;
|
||||
my $version = shift;
|
||||
my $nr_desc = shift;
|
||||
|
||||
for ($j = length($name); $j <32; $j++) {
|
||||
$name = $name.chr(0);
|
||||
}
|
||||
|
||||
open OUTFILE, ">$outfile";
|
||||
syswrite(OUTFILE, $name);
|
||||
write_le16($version);
|
||||
@ -906,20 +1678,39 @@ sub main_firmware($$$$)
|
||||
write_hunk(812856, 192);
|
||||
}
|
||||
|
||||
|
||||
sub extract_firmware {
|
||||
my $sourcefile = "hcw85bda.sys";
|
||||
my $hash = "0e44dbf63bb0169d57446aec21881ff2";
|
||||
my $outfile = "xc3028-v27.fw";
|
||||
my $name = "xc2028 firmware";
|
||||
my $version = 519;
|
||||
my $nr_desc = 80;
|
||||
my $sourcefile_24 = "UDXTTM6000.sys";
|
||||
my $hash_24 = "cb9deb5508a5e150af2880f5b0066d78";
|
||||
my $outfile_24 = "xc3028-v24.fw";
|
||||
my $name_24 = "xc2028 firmware";
|
||||
my $version_24 = 516;
|
||||
my $nr_desc_24 = 77;
|
||||
my $out;
|
||||
|
||||
verify($sourcefile, $hash);
|
||||
my $sourcefile_27 = "hcw85bda.sys";
|
||||
my $hash_27 = "0e44dbf63bb0169d57446aec21881ff2";
|
||||
my $outfile_27 = "xc3028-v27.fw";
|
||||
my $name_27 = "xc2028 firmware";
|
||||
my $version_27 = 519;
|
||||
my $nr_desc_27 = 80;
|
||||
my $out;
|
||||
|
||||
open INFILE, "<$sourcefile";
|
||||
main_firmware($outfile, $name, $version, $nr_desc);
|
||||
close INFILE;
|
||||
if (-e $sourcefile_24) {
|
||||
verify($sourcefile_24, $hash_24);
|
||||
|
||||
open INFILE, "<$sourcefile_24";
|
||||
main_firmware_24($outfile_24, $name_24, $version_24, $nr_desc_24);
|
||||
close INFILE;
|
||||
}
|
||||
|
||||
if (-e $sourcefile_27) {
|
||||
verify($sourcefile_27, $hash_27);
|
||||
|
||||
open INFILE, "<$sourcefile_27";
|
||||
main_firmware_27($outfile_27, $name_27, $version_27, $nr_desc_27);
|
||||
close INFILE;
|
||||
}
|
||||
}
|
||||
|
||||
extract_firmware;
|
||||
|
@ -50,6 +50,8 @@ zc3xx 0458:700f Genius VideoCam Web V2
|
||||
sonixj 0458:7025 Genius Eye 311Q
|
||||
sn9c20x 0458:7029 Genius Look 320s
|
||||
sonixj 0458:702e Genius Slim 310 NB
|
||||
sn9c20x 0458:704a Genius Slim 1320
|
||||
sn9c20x 0458:704c Genius i-Look 1321
|
||||
sn9c20x 045e:00f4 LifeCam VX-6000 (SN9C20x + OV9650)
|
||||
sonixj 045e:00f5 MicroSoft VX3000
|
||||
sonixj 045e:00f7 MicroSoft VX1000
|
||||
@ -305,12 +307,14 @@ sonixj 0c45:6138 Sn9c120 Mo4000
|
||||
sonixj 0c45:613a Microdia Sonix PC Camera
|
||||
sonixj 0c45:613b Surfer SN-206
|
||||
sonixj 0c45:613c Sonix Pccam168
|
||||
sonixj 0c45:6142 Hama PC-Webcam AC-150
|
||||
sonixj 0c45:6143 Sonix Pccam168
|
||||
sonixj 0c45:6148 Digitus DA-70811/ZSMC USB PC Camera ZS211/Microdia
|
||||
sonixj 0c45:614a Frontech E-Ccam (JIL-2225)
|
||||
sn9c20x 0c45:6240 PC Camera (SN9C201 + MT9M001)
|
||||
sn9c20x 0c45:6242 PC Camera (SN9C201 + MT9M111)
|
||||
sn9c20x 0c45:6248 PC Camera (SN9C201 + OV9655)
|
||||
sn9c20x 0c45:624c PC Camera (SN9C201 + MT9M112)
|
||||
sn9c20x 0c45:624e PC Camera (SN9C201 + SOI968)
|
||||
sn9c20x 0c45:624f PC Camera (SN9C201 + OV9650)
|
||||
sn9c20x 0c45:6251 PC Camera (SN9C201 + OV9650)
|
||||
@ -323,6 +327,7 @@ sn9c20x 0c45:627f PC Camera (SN9C201 + OV9650)
|
||||
sn9c20x 0c45:6280 PC Camera (SN9C202 + MT9M001)
|
||||
sn9c20x 0c45:6282 PC Camera (SN9C202 + MT9M111)
|
||||
sn9c20x 0c45:6288 PC Camera (SN9C202 + OV9655)
|
||||
sn9c20x 0c45:628c PC Camera (SN9C201 + MT9M112)
|
||||
sn9c20x 0c45:628e PC Camera (SN9C202 + SOI968)
|
||||
sn9c20x 0c45:628f PC Camera (SN9C202 + OV9650)
|
||||
sn9c20x 0c45:62a0 PC Camera (SN9C202 + OV7670)
|
||||
|
@ -17,18 +17,18 @@ Generic scaling / cropping scheme
|
||||
-2-- -\
|
||||
| --\
|
||||
| --\
|
||||
+-5-- -\ -- -3--
|
||||
| ---\
|
||||
| --- -4-- -\
|
||||
| -\
|
||||
| - -6--
|
||||
+-5-- . -- -3-- -\
|
||||
| `... -\
|
||||
| `... -4-- . - -7..
|
||||
| `.
|
||||
| `. .6--
|
||||
|
|
||||
| - -6'-
|
||||
| -/
|
||||
| --- -4'- -/
|
||||
| ---/
|
||||
+-5'- -/
|
||||
| -- -3'-
|
||||
| . .6'-
|
||||
| .´
|
||||
| ... -4'- .´
|
||||
| ...´ - -7'.
|
||||
+-5'- .´ -/
|
||||
| -- -3'- -/
|
||||
| --/
|
||||
| --/
|
||||
-2'- -/
|
||||
@ -36,7 +36,11 @@ Generic scaling / cropping scheme
|
||||
|
|
||||
-1'-
|
||||
|
||||
Produced by user requests:
|
||||
In the above chart minuses and slashes represent "real" data amounts, points and
|
||||
accents represent "useful" data, basically, CEU scaled amd cropped output,
|
||||
mapped back onto the client's source plane.
|
||||
|
||||
Such a configuration can be produced by user requests:
|
||||
|
||||
S_CROP(left / top = (5) - (1), width / height = (5') - (5))
|
||||
S_FMT(width / height = (6') - (6))
|
||||
@ -106,52 +110,30 @@ window:
|
||||
S_CROP
|
||||
------
|
||||
|
||||
If old scale applied to new crop is invalid produce nearest new scale possible
|
||||
The API at http://v4l2spec.bytesex.org/spec/x1904.htm says:
|
||||
|
||||
1. Calculate current combined scales.
|
||||
"...specification does not define an origin or units. However by convention
|
||||
drivers should horizontally count unscaled samples relative to 0H."
|
||||
|
||||
scale_comb = (((4') - (4)) / ((6') - (6))) * (((2') - (2)) / ((3') - (3)))
|
||||
We choose to follow the advise and interpret cropping units as client input
|
||||
pixels.
|
||||
|
||||
2. Apply iterative sensor S_CROP for new input window.
|
||||
Cropping is performed in the following 6 steps:
|
||||
|
||||
3. If old combined scales applied to new crop produce an impossible user window,
|
||||
adjust scales to produce nearest possible window.
|
||||
1. Request exactly user rectangle from the sensor.
|
||||
|
||||
width_u_out = ((5') - (5)) / scale_comb
|
||||
2. If smaller - iterate until a larger one is obtained. Result: sensor cropped
|
||||
to 2 : 2', target crop 5 : 5', current output format 6' - 6.
|
||||
|
||||
if (width_u_out > max)
|
||||
scale_comb = ((5') - (5)) / max;
|
||||
else if (width_u_out < min)
|
||||
scale_comb = ((5') - (5)) / min;
|
||||
3. In the previous step the sensor has tried to preserve its output frame as
|
||||
good as possible, but it could have changed. Retrieve it again.
|
||||
|
||||
4. Issue G_CROP to retrieve actual input window.
|
||||
4. Sensor scaled to 3 : 3'. Sensor's scale is (2' - 2) / (3' - 3). Calculate
|
||||
intermediate window: 4' - 4 = (5' - 5) * (3' - 3) / (2' - 2)
|
||||
|
||||
5. Using actual input window and calculated combined scales calculate sensor
|
||||
target output window.
|
||||
5. Calculate and apply host scale = (6' - 6) / (4' - 4)
|
||||
|
||||
width_s_out = ((3') - (3)) = ((2') - (2)) / scale_comb
|
||||
|
||||
6. Apply iterative S_FMT for new sensor target output window.
|
||||
|
||||
7. Issue G_FMT to retrieve the actual sensor output window.
|
||||
|
||||
8. Calculate sensor scales.
|
||||
|
||||
scale_s = ((3') - (3)) / ((2') - (2))
|
||||
|
||||
9. Calculate sensor output subwindow to be cropped on CEU by applying sensor
|
||||
scales to the requested window.
|
||||
|
||||
width_ceu = ((5') - (5)) / scale_s
|
||||
|
||||
10. Use CEU cropping for above calculated window.
|
||||
|
||||
11. Calculate CEU scales from sensor scales from results of (10) and user window
|
||||
from (3)
|
||||
|
||||
scale_ceu = calc_scale(((5') - (5)), &width_u_out)
|
||||
|
||||
12. Apply CEU scales.
|
||||
6. Calculate and apply host crop: 6 - 7 = (5 - 2) * (6' - 6) / (5' - 5)
|
||||
|
||||
--
|
||||
Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
||||
|
@ -545,12 +545,11 @@ unregister them:
|
||||
This will remove the device nodes from sysfs (causing udev to remove them
|
||||
from /dev).
|
||||
|
||||
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 device nodes open. You should block all new accesses to read,
|
||||
write, poll, etc. except possibly for certain ioctl operations like
|
||||
queueing buffers.
|
||||
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
|
||||
device nodes open. So after the unregister all file operations will return
|
||||
an error as well, except for the ioctl and unlocked_ioctl file operations:
|
||||
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()
|
||||
callback is called and you can do the final cleanup there.
|
||||
@ -609,3 +608,135 @@ scatter/gather method (videobuf-dma-sg), DMA with linear access
|
||||
|
||||
Please see Documentation/video4linux/videobuf for more information on how
|
||||
to use the videobuf layer.
|
||||
|
||||
struct v4l2_fh
|
||||
--------------
|
||||
|
||||
struct v4l2_fh provides a way to easily keep file handle specific data
|
||||
that is used by the V4L2 framework. Using v4l2_fh is optional for
|
||||
drivers.
|
||||
|
||||
The users of v4l2_fh (in the V4L2 framework, not the driver) know
|
||||
whether a driver uses v4l2_fh as its file->private_data pointer by
|
||||
testing the V4L2_FL_USES_V4L2_FH bit in video_device->flags.
|
||||
|
||||
Useful functions:
|
||||
|
||||
- v4l2_fh_init()
|
||||
|
||||
Initialise the file handle. This *MUST* be performed in the driver's
|
||||
v4l2_file_operations->open() handler.
|
||||
|
||||
- v4l2_fh_add()
|
||||
|
||||
Add a v4l2_fh to video_device file handle list. May be called after
|
||||
initialising the file handle.
|
||||
|
||||
- v4l2_fh_del()
|
||||
|
||||
Unassociate the file handle from video_device(). The file handle
|
||||
exit function may now be called.
|
||||
|
||||
- v4l2_fh_exit()
|
||||
|
||||
Uninitialise the file handle. After uninitialisation the v4l2_fh
|
||||
memory can be freed.
|
||||
|
||||
struct v4l2_fh is allocated as a part of the driver's own file handle
|
||||
structure and is set to file->private_data in the driver's open
|
||||
function by the driver. Drivers can extract their own file handle
|
||||
structure by using the container_of macro. Example:
|
||||
|
||||
struct my_fh {
|
||||
int blah;
|
||||
struct v4l2_fh fh;
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
int my_open(struct file *file)
|
||||
{
|
||||
struct my_fh *my_fh;
|
||||
struct video_device *vfd;
|
||||
int ret;
|
||||
|
||||
...
|
||||
|
||||
ret = v4l2_fh_init(&my_fh->fh, vfd);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
v4l2_fh_add(&my_fh->fh);
|
||||
|
||||
file->private_data = &my_fh->fh;
|
||||
|
||||
...
|
||||
}
|
||||
|
||||
int my_release(struct file *file)
|
||||
{
|
||||
struct v4l2_fh *fh = file->private_data;
|
||||
struct my_fh *my_fh = container_of(fh, struct my_fh, fh);
|
||||
|
||||
...
|
||||
}
|
||||
|
||||
V4L2 events
|
||||
-----------
|
||||
|
||||
The V4L2 events provide a generic way to pass events to user space.
|
||||
The driver must use v4l2_fh to be able to support V4L2 events.
|
||||
|
||||
Useful functions:
|
||||
|
||||
- v4l2_event_alloc()
|
||||
|
||||
To use events, the driver must allocate events for the file handle. By
|
||||
calling the function more than once, the driver may assure that at least n
|
||||
events in total have been allocated. The function may not be called in
|
||||
atomic context.
|
||||
|
||||
- v4l2_event_queue()
|
||||
|
||||
Queue events to video device. The driver's only responsibility is to fill
|
||||
in the type and the data fields. The other fields will be filled in by
|
||||
V4L2.
|
||||
|
||||
- v4l2_event_subscribe()
|
||||
|
||||
The video_device->ioctl_ops->vidioc_subscribe_event must check the driver
|
||||
is able to produce events with specified event id. Then it calls
|
||||
v4l2_event_subscribe() to subscribe the event.
|
||||
|
||||
- v4l2_event_unsubscribe()
|
||||
|
||||
vidioc_unsubscribe_event in struct v4l2_ioctl_ops. A driver may use
|
||||
v4l2_event_unsubscribe() directly unless it wants to be involved in
|
||||
unsubscription process.
|
||||
|
||||
The special type V4L2_EVENT_ALL may be used to unsubscribe all events. The
|
||||
drivers may want to handle this in a special way.
|
||||
|
||||
- v4l2_event_pending()
|
||||
|
||||
Returns the number of pending events. Useful when implementing poll.
|
||||
|
||||
Drivers do not initialise events directly. The events are initialised
|
||||
through v4l2_fh_init() if video_device->ioctl_ops->vidioc_subscribe_event is
|
||||
non-NULL. This *MUST* be performed in the driver's
|
||||
v4l2_file_operations->open() handler.
|
||||
|
||||
Events are delivered to user space through the poll system call. The driver
|
||||
can use v4l2_fh->events->wait wait_queue_head_t as the argument for
|
||||
poll_wait().
|
||||
|
||||
There are standard and private events. New standard events must use the
|
||||
smallest available event type. The drivers must allocate their events from
|
||||
their own class starting from class base. Class base is
|
||||
V4L2_EVENT_PRIVATE_START + n * 1000 where n is the lowest available number.
|
||||
The first event type in the class is reserved for future use, so the first
|
||||
available event type is 'class base + 1'.
|
||||
|
||||
An example on how the V4L2 events may be used can be found in the OMAP
|
||||
3 ISP driver available at <URL:http://gitorious.org/omap3camera> as of
|
||||
writing this.
|
||||
|
@ -5963,7 +5963,7 @@ M: Laurent Pinchart <laurent.pinchart@skynet.be>
|
||||
L: linux-uvc-devel@lists.berlios.de (subscribers-only)
|
||||
L: linux-media@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
|
||||
W: http://linux-uvc.berlios.de
|
||||
W: http://www.ideasonboard.org/uvc/
|
||||
S: Maintained
|
||||
F: drivers/media/video/uvc/
|
||||
|
||||
|
@ -7,3 +7,62 @@ config VIDEO_IR
|
||||
tristate
|
||||
depends on IR_CORE
|
||||
default IR_CORE
|
||||
|
||||
source "drivers/media/IR/keymaps/Kconfig"
|
||||
|
||||
config IR_NEC_DECODER
|
||||
tristate "Enable IR raw decoder for the NEC protocol"
|
||||
depends on IR_CORE
|
||||
default y
|
||||
|
||||
---help---
|
||||
Enable this option if you have IR with NEC protocol, and
|
||||
if the IR is decoded in software
|
||||
|
||||
config IR_RC5_DECODER
|
||||
tristate "Enable IR raw decoder for the RC-5 protocol"
|
||||
depends on IR_CORE
|
||||
default y
|
||||
|
||||
---help---
|
||||
Enable this option if you have IR with RC-5 protocol, and
|
||||
if the IR is decoded in software
|
||||
|
||||
config IR_RC6_DECODER
|
||||
tristate "Enable IR raw decoder for the RC6 protocol"
|
||||
depends on IR_CORE
|
||||
default y
|
||||
|
||||
---help---
|
||||
Enable this option if you have an infrared remote control which
|
||||
uses the RC6 protocol, and you need software decoding support.
|
||||
|
||||
config IR_JVC_DECODER
|
||||
tristate "Enable IR raw decoder for the JVC protocol"
|
||||
depends on IR_CORE
|
||||
default y
|
||||
|
||||
---help---
|
||||
Enable this option if you have an infrared remote control which
|
||||
uses the JVC protocol, and you need software decoding support.
|
||||
|
||||
config IR_SONY_DECODER
|
||||
tristate "Enable IR raw decoder for the Sony protocol"
|
||||
depends on IR_CORE
|
||||
default y
|
||||
|
||||
---help---
|
||||
Enable this option if you have an infrared remote control which
|
||||
uses the Sony protocol, and you need software decoding support.
|
||||
|
||||
config IR_IMON
|
||||
tristate "SoundGraph iMON Receiver and Display"
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
depends on IR_CORE
|
||||
select USB
|
||||
---help---
|
||||
Say Y here if you want to use a SoundGraph iMON (aka Antec Veris)
|
||||
IR Receiver and/or LCD/VFD/VGA display.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called imon.
|
||||
|
@ -1,5 +1,15 @@
|
||||
ir-common-objs := ir-functions.o ir-keymaps.o
|
||||
ir-core-objs := ir-keytable.o ir-sysfs.o
|
||||
ir-common-objs := ir-functions.o
|
||||
ir-core-objs := ir-keytable.o ir-sysfs.o ir-raw-event.o rc-map.o
|
||||
|
||||
obj-y += keymaps/
|
||||
|
||||
obj-$(CONFIG_IR_CORE) += ir-core.o
|
||||
obj-$(CONFIG_VIDEO_IR) += ir-common.o
|
||||
obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
|
||||
obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
|
||||
obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o
|
||||
obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o
|
||||
obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o
|
||||
|
||||
# stand-alone IR receivers/transmitters
|
||||
obj-$(CONFIG_IR_IMON) += imon.o
|
||||
|
2396
drivers/media/IR/imon.c
Normal file
2396
drivers/media/IR/imon.c
Normal file
File diff suppressed because it is too large
Load Diff
126
drivers/media/IR/ir-core-priv.h
Normal file
126
drivers/media/IR/ir-core-priv.h
Normal file
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Remote Controller core raw events header
|
||||
*
|
||||
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _IR_RAW_EVENT
|
||||
#define _IR_RAW_EVENT
|
||||
|
||||
#include <linux/slab.h>
|
||||
#include <media/ir-core.h>
|
||||
|
||||
struct ir_raw_handler {
|
||||
struct list_head list;
|
||||
|
||||
int (*decode)(struct input_dev *input_dev, struct ir_raw_event event);
|
||||
int (*raw_register)(struct input_dev *input_dev);
|
||||
int (*raw_unregister)(struct input_dev *input_dev);
|
||||
};
|
||||
|
||||
struct ir_raw_event_ctrl {
|
||||
struct work_struct rx_work; /* for the rx decoding workqueue */
|
||||
struct kfifo kfifo; /* fifo for the pulse/space durations */
|
||||
ktime_t last_event; /* when last event occurred */
|
||||
enum raw_event_type last_type; /* last event type */
|
||||
struct input_dev *input_dev; /* pointer to the parent input_dev */
|
||||
};
|
||||
|
||||
/* macros for IR decoders */
|
||||
static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin)
|
||||
{
|
||||
return d1 > (d2 - margin);
|
||||
}
|
||||
|
||||
static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin)
|
||||
{
|
||||
return ((d1 > (d2 - margin)) && (d1 < (d2 + margin)));
|
||||
}
|
||||
|
||||
static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y)
|
||||
{
|
||||
return x->pulse != y->pulse;
|
||||
}
|
||||
|
||||
static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration)
|
||||
{
|
||||
if (duration > ev->duration)
|
||||
ev->duration = 0;
|
||||
else
|
||||
ev->duration -= duration;
|
||||
}
|
||||
|
||||
#define TO_US(duration) (((duration) + 500) / 1000)
|
||||
#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
|
||||
* ir-core
|
||||
*/
|
||||
|
||||
int ir_register_class(struct input_dev *input_dev);
|
||||
void ir_unregister_class(struct input_dev *input_dev);
|
||||
|
||||
/*
|
||||
* Routines from ir-raw-event.c to be used internally and by decoders
|
||||
*/
|
||||
int ir_raw_event_register(struct input_dev *input_dev);
|
||||
void ir_raw_event_unregister(struct input_dev *input_dev);
|
||||
int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
|
||||
void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
|
||||
void ir_raw_init(void);
|
||||
|
||||
|
||||
/*
|
||||
* Decoder initialization code
|
||||
*
|
||||
* Those load logic are called during ir-core init, and automatically
|
||||
* loads the compiled decoders for their usage with IR raw events
|
||||
*/
|
||||
|
||||
/* from ir-nec-decoder.c */
|
||||
#ifdef CONFIG_IR_NEC_DECODER_MODULE
|
||||
#define load_nec_decode() request_module("ir-nec-decoder")
|
||||
#else
|
||||
#define load_nec_decode() 0
|
||||
#endif
|
||||
|
||||
/* from ir-rc5-decoder.c */
|
||||
#ifdef CONFIG_IR_RC5_DECODER_MODULE
|
||||
#define load_rc5_decode() request_module("ir-rc5-decoder")
|
||||
#else
|
||||
#define load_rc5_decode() 0
|
||||
#endif
|
||||
|
||||
/* from ir-rc6-decoder.c */
|
||||
#ifdef CONFIG_IR_RC6_DECODER_MODULE
|
||||
#define load_rc6_decode() request_module("ir-rc6-decoder")
|
||||
#else
|
||||
#define load_rc6_decode() 0
|
||||
#endif
|
||||
|
||||
/* from ir-jvc-decoder.c */
|
||||
#ifdef CONFIG_IR_JVC_DECODER_MODULE
|
||||
#define load_jvc_decode() request_module("ir-jvc-decoder")
|
||||
#else
|
||||
#define load_jvc_decode() 0
|
||||
#endif
|
||||
|
||||
/* from ir-sony-decoder.c */
|
||||
#ifdef CONFIG_IR_SONY_DECODER_MODULE
|
||||
#define load_sony_decode() request_module("ir-sony-decoder")
|
||||
#else
|
||||
#define load_sony_decode() 0
|
||||
#endif
|
||||
|
||||
#endif /* _IR_RAW_EVENT */
|
@ -24,6 +24,7 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <media/ir-common.h>
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
320
drivers/media/IR/ir-jvc-decoder.c
Normal file
320
drivers/media/IR/ir-jvc-decoder.c
Normal file
@ -0,0 +1,320 @@
|
||||
/* ir-jvc-decoder.c - handle JVC IR Pulse/Space protocol
|
||||
*
|
||||
* Copyright (C) 2010 by David Härdeman <david@hardeman.nu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/bitrev.h>
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
#define JVC_NBITS 16 /* dev(8) + func(8) */
|
||||
#define JVC_UNIT 525000 /* ns */
|
||||
#define JVC_HEADER_PULSE (16 * JVC_UNIT) /* lack of header -> repeat */
|
||||
#define JVC_HEADER_SPACE (8 * JVC_UNIT)
|
||||
#define JVC_BIT_PULSE (1 * JVC_UNIT)
|
||||
#define JVC_BIT_0_SPACE (1 * JVC_UNIT)
|
||||
#define JVC_BIT_1_SPACE (3 * JVC_UNIT)
|
||||
#define JVC_TRAILER_PULSE (1 * JVC_UNIT)
|
||||
#define JVC_TRAILER_SPACE (35 * JVC_UNIT)
|
||||
|
||||
/* Used to register jvc_decoder clients */
|
||||
static LIST_HEAD(decoder_list);
|
||||
DEFINE_SPINLOCK(decoder_lock);
|
||||
|
||||
enum jvc_state {
|
||||
STATE_INACTIVE,
|
||||
STATE_HEADER_SPACE,
|
||||
STATE_BIT_PULSE,
|
||||
STATE_BIT_SPACE,
|
||||
STATE_TRAILER_PULSE,
|
||||
STATE_TRAILER_SPACE,
|
||||
};
|
||||
|
||||
struct decoder_data {
|
||||
struct list_head list;
|
||||
struct ir_input_dev *ir_dev;
|
||||
int enabled:1;
|
||||
|
||||
/* State machine control */
|
||||
enum jvc_state state;
|
||||
u16 jvc_bits;
|
||||
u16 jvc_old_bits;
|
||||
unsigned count;
|
||||
bool first;
|
||||
bool toggle;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get_decoder_data() - gets decoder data
|
||||
* @input_dev: input device
|
||||
*
|
||||
* Returns the struct decoder_data that corresponds to a device
|
||||
*/
|
||||
static struct decoder_data *get_decoder_data(struct ir_input_dev *ir_dev)
|
||||
{
|
||||
struct decoder_data *data = NULL;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_for_each_entry(data, &decoder_list, list) {
|
||||
if (data->ir_dev == ir_dev)
|
||||
break;
|
||||
}
|
||||
spin_unlock(&decoder_lock);
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t store_enabled(struct device *d,
|
||||
struct device_attribute *mattr,
|
||||
const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
unsigned long value;
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (strict_strtoul(buf, 10, &value) || value > 1)
|
||||
return -EINVAL;
|
||||
|
||||
data->enabled = value;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
static ssize_t show_enabled(struct device *d,
|
||||
struct device_attribute *mattr, char *buf)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (data->enabled)
|
||||
return sprintf(buf, "1\n");
|
||||
else
|
||||
return sprintf(buf, "0\n");
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(enabled, S_IRUGO | S_IWUSR, show_enabled, store_enabled);
|
||||
|
||||
static struct attribute *decoder_attributes[] = {
|
||||
&dev_attr_enabled.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group decoder_attribute_group = {
|
||||
.name = "jvc_decoder",
|
||||
.attrs = decoder_attributes,
|
||||
};
|
||||
|
||||
/**
|
||||
* ir_jvc_decode() - Decode one JVC pulse or space
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
* @duration: the struct ir_raw_event descriptor of the pulse/space
|
||||
*
|
||||
* This function returns -EINVAL if the pulse violates the state machine
|
||||
*/
|
||||
static int ir_jvc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
|
||||
{
|
||||
struct decoder_data *data;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (!data->enabled)
|
||||
return 0;
|
||||
|
||||
if (IS_RESET(ev)) {
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!geq_margin(ev.duration, JVC_UNIT, JVC_UNIT / 2))
|
||||
goto out;
|
||||
|
||||
IR_dprintk(2, "JVC decode started at state %d (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
|
||||
switch (data->state) {
|
||||
|
||||
case STATE_INACTIVE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, JVC_HEADER_PULSE, JVC_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->count = 0;
|
||||
data->first = true;
|
||||
data->toggle = !data->toggle;
|
||||
data->state = STATE_HEADER_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_HEADER_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, JVC_HEADER_SPACE, JVC_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->state = STATE_BIT_PULSE;
|
||||
return 0;
|
||||
|
||||
case STATE_BIT_PULSE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, JVC_BIT_PULSE, JVC_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->state = STATE_BIT_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_BIT_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
data->jvc_bits <<= 1;
|
||||
if (eq_margin(ev.duration, JVC_BIT_1_SPACE, JVC_UNIT / 2)) {
|
||||
data->jvc_bits |= 1;
|
||||
decrease_duration(&ev, JVC_BIT_1_SPACE);
|
||||
} else if (eq_margin(ev.duration, JVC_BIT_0_SPACE, JVC_UNIT / 2))
|
||||
decrease_duration(&ev, JVC_BIT_0_SPACE);
|
||||
else
|
||||
break;
|
||||
data->count++;
|
||||
|
||||
if (data->count == JVC_NBITS)
|
||||
data->state = STATE_TRAILER_PULSE;
|
||||
else
|
||||
data->state = STATE_BIT_PULSE;
|
||||
return 0;
|
||||
|
||||
case STATE_TRAILER_PULSE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, JVC_TRAILER_PULSE, JVC_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->state = STATE_TRAILER_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_TRAILER_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (!geq_margin(ev.duration, JVC_TRAILER_SPACE, JVC_UNIT / 2))
|
||||
break;
|
||||
|
||||
if (data->first) {
|
||||
u32 scancode;
|
||||
scancode = (bitrev8((data->jvc_bits >> 8) & 0xff) << 8) |
|
||||
(bitrev8((data->jvc_bits >> 0) & 0xff) << 0);
|
||||
IR_dprintk(1, "JVC scancode 0x%04x\n", scancode);
|
||||
ir_keydown(input_dev, scancode, data->toggle);
|
||||
data->first = false;
|
||||
data->jvc_old_bits = data->jvc_bits;
|
||||
} else if (data->jvc_bits == data->jvc_old_bits) {
|
||||
IR_dprintk(1, "JVC repeat\n");
|
||||
ir_repeat(input_dev);
|
||||
} else {
|
||||
IR_dprintk(1, "JVC invalid repeat msg\n");
|
||||
break;
|
||||
}
|
||||
|
||||
data->count = 0;
|
||||
data->state = STATE_BIT_PULSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
out:
|
||||
IR_dprintk(1, "JVC decode failed at state %d (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
data->state = STATE_INACTIVE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ir_jvc_register(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
struct decoder_data *data;
|
||||
int rc;
|
||||
|
||||
rc = sysfs_create_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
if (!data) {
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data->ir_dev = ir_dev;
|
||||
data->enabled = 1;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_add_tail(&data->list, &decoder_list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ir_jvc_unregister(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
static struct decoder_data *data;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_del(&data->list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ir_raw_handler jvc_handler = {
|
||||
.decode = ir_jvc_decode,
|
||||
.raw_register = ir_jvc_register,
|
||||
.raw_unregister = ir_jvc_unregister,
|
||||
};
|
||||
|
||||
static int __init ir_jvc_decode_init(void)
|
||||
{
|
||||
ir_raw_handler_register(&jvc_handler);
|
||||
|
||||
printk(KERN_INFO "IR JVC protocol handler initialized\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ir_jvc_decode_exit(void)
|
||||
{
|
||||
ir_raw_handler_unregister(&jvc_handler);
|
||||
}
|
||||
|
||||
module_init(ir_jvc_decode_init);
|
||||
module_exit(ir_jvc_decode_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("David Härdeman <david@hardeman.nu>");
|
||||
MODULE_DESCRIPTION("JVC IR protocol decoder");
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
/* ir-register.c - handle IR scancode->keycode tables
|
||||
/* ir-keytable.c - handle IR scancode->keycode tables
|
||||
*
|
||||
* Copyright (C) 2009 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
@ -15,346 +15,244 @@
|
||||
|
||||
#include <linux/input.h>
|
||||
#include <linux/slab.h>
|
||||
#include <media/ir-common.h>
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
#define IR_TAB_MIN_SIZE 32
|
||||
#define IR_TAB_MAX_SIZE 1024
|
||||
/* Sizes are in bytes, 256 bytes allows for 32 entries on x64 */
|
||||
#define IR_TAB_MIN_SIZE 256
|
||||
#define IR_TAB_MAX_SIZE 8192
|
||||
|
||||
/* FIXME: IR_KEYPRESS_TIMEOUT should be protocol specific */
|
||||
#define IR_KEYPRESS_TIMEOUT 250
|
||||
|
||||
/**
|
||||
* ir_seek_table() - returns the element order on the table
|
||||
* @rc_tab: the ir_scancode_table with the keymap to be used
|
||||
* @scancode: the scancode that we're seeking
|
||||
* ir_resize_table() - resizes a scancode table if necessary
|
||||
* @rc_tab: the ir_scancode_table to resize
|
||||
* @return: zero on success or a negative error code
|
||||
*
|
||||
* This routine is used by the input routines when a key is pressed at the
|
||||
* IR. The scancode is received and needs to be converted into a keycode.
|
||||
* If the key is not found, it returns KEY_UNKNOWN. Otherwise, returns the
|
||||
* corresponding keycode from the table.
|
||||
* This routine will shrink the ir_scancode_table if it has lots of
|
||||
* unused entries and grow it if it is full.
|
||||
*/
|
||||
static int ir_seek_table(struct ir_scancode_table *rc_tab, u32 scancode)
|
||||
static int ir_resize_table(struct ir_scancode_table *rc_tab)
|
||||
{
|
||||
unsigned int oldalloc = rc_tab->alloc;
|
||||
unsigned int newalloc = oldalloc;
|
||||
struct ir_scancode *oldscan = rc_tab->scan;
|
||||
struct ir_scancode *newscan;
|
||||
|
||||
if (rc_tab->size == rc_tab->len) {
|
||||
/* All entries in use -> grow keytable */
|
||||
if (rc_tab->alloc >= IR_TAB_MAX_SIZE)
|
||||
return -ENOMEM;
|
||||
|
||||
newalloc *= 2;
|
||||
IR_dprintk(1, "Growing table to %u bytes\n", newalloc);
|
||||
}
|
||||
|
||||
if ((rc_tab->len * 3 < rc_tab->size) && (oldalloc > IR_TAB_MIN_SIZE)) {
|
||||
/* Less than 1/3 of entries in use -> shrink keytable */
|
||||
newalloc /= 2;
|
||||
IR_dprintk(1, "Shrinking table to %u bytes\n", newalloc);
|
||||
}
|
||||
|
||||
if (newalloc == oldalloc)
|
||||
return 0;
|
||||
|
||||
newscan = kmalloc(newalloc, GFP_ATOMIC);
|
||||
if (!newscan) {
|
||||
IR_dprintk(1, "Failed to kmalloc %u bytes\n", newalloc);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memcpy(newscan, rc_tab->scan, rc_tab->len * sizeof(struct ir_scancode));
|
||||
rc_tab->scan = newscan;
|
||||
rc_tab->alloc = newalloc;
|
||||
rc_tab->size = rc_tab->alloc / sizeof(struct ir_scancode);
|
||||
kfree(oldscan);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_do_setkeycode() - internal function to set a keycode in the
|
||||
* scancode->keycode table
|
||||
* @dev: the struct input_dev device descriptor
|
||||
* @rc_tab: the struct ir_scancode_table to set the keycode in
|
||||
* @scancode: the scancode for the ir command
|
||||
* @keycode: the keycode for the ir command
|
||||
* @resize: whether the keytable may be shrunk
|
||||
* @return: -EINVAL if the keycode could not be inserted, otherwise zero.
|
||||
*
|
||||
* This routine is used internally to manipulate the scancode->keycode table.
|
||||
* The caller has to hold @rc_tab->lock.
|
||||
*/
|
||||
static int ir_do_setkeycode(struct input_dev *dev,
|
||||
struct ir_scancode_table *rc_tab,
|
||||
unsigned scancode, unsigned keycode,
|
||||
bool resize)
|
||||
{
|
||||
unsigned int i;
|
||||
int old_keycode = KEY_RESERVED;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
|
||||
/*
|
||||
* Unfortunately, some hardware-based IR decoders don't provide
|
||||
* all bits for the complete IR code. In general, they provide only
|
||||
* the command part of the IR code. Yet, as it is possible to replace
|
||||
* the provided IR with another one, it is needed to allow loading
|
||||
* IR tables from other remotes. So,
|
||||
*/
|
||||
if (ir_dev->props && ir_dev->props->scanmask) {
|
||||
scancode &= ir_dev->props->scanmask;
|
||||
}
|
||||
|
||||
/* First check if we already have a mapping for this ir command */
|
||||
for (i = 0; i < rc_tab->len; i++) {
|
||||
/* Keytable is sorted from lowest to highest scancode */
|
||||
if (rc_tab->scan[i].scancode > scancode)
|
||||
break;
|
||||
else if (rc_tab->scan[i].scancode < scancode)
|
||||
continue;
|
||||
|
||||
old_keycode = rc_tab->scan[i].keycode;
|
||||
rc_tab->scan[i].keycode = keycode;
|
||||
|
||||
/* Did the user wish to remove the mapping? */
|
||||
if (keycode == KEY_RESERVED || keycode == KEY_UNKNOWN) {
|
||||
IR_dprintk(1, "#%d: Deleting scan 0x%04x\n",
|
||||
i, scancode);
|
||||
rc_tab->len--;
|
||||
memmove(&rc_tab->scan[i], &rc_tab->scan[i + 1],
|
||||
(rc_tab->len - i) * sizeof(struct ir_scancode));
|
||||
}
|
||||
|
||||
/* Possibly shrink the keytable, failure is not a problem */
|
||||
ir_resize_table(rc_tab);
|
||||
break;
|
||||
}
|
||||
|
||||
if (old_keycode == KEY_RESERVED && keycode != KEY_RESERVED) {
|
||||
/* No previous mapping found, we might need to grow the table */
|
||||
if (resize && ir_resize_table(rc_tab))
|
||||
return -ENOMEM;
|
||||
|
||||
IR_dprintk(1, "#%d: New scan 0x%04x with key 0x%04x\n",
|
||||
i, scancode, keycode);
|
||||
|
||||
/* i is the proper index to insert our new keycode */
|
||||
memmove(&rc_tab->scan[i + 1], &rc_tab->scan[i],
|
||||
(rc_tab->len - i) * sizeof(struct ir_scancode));
|
||||
rc_tab->scan[i].scancode = scancode;
|
||||
rc_tab->scan[i].keycode = keycode;
|
||||
rc_tab->len++;
|
||||
set_bit(keycode, dev->keybit);
|
||||
} else {
|
||||
IR_dprintk(1, "#%d: Replacing scan 0x%04x with key 0x%04x\n",
|
||||
i, scancode, keycode);
|
||||
/* A previous mapping was updated... */
|
||||
clear_bit(old_keycode, dev->keybit);
|
||||
/* ...but another scancode might use the same keycode */
|
||||
for (i = 0; i < rc_tab->len; i++) {
|
||||
if (rc_tab->scan[i].keycode == old_keycode) {
|
||||
set_bit(old_keycode, dev->keybit);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_setkeycode() - set a keycode in the scancode->keycode table
|
||||
* @dev: the struct input_dev device descriptor
|
||||
* @scancode: the desired scancode
|
||||
* @keycode: result
|
||||
* @return: -EINVAL if the keycode could not be inserted, otherwise zero.
|
||||
*
|
||||
* This routine is used to handle evdev EVIOCSKEY ioctl.
|
||||
*/
|
||||
static int ir_setkeycode(struct input_dev *dev,
|
||||
unsigned int scancode, unsigned int keycode)
|
||||
{
|
||||
int rc;
|
||||
unsigned long flags;
|
||||
struct ir_scancode *keymap = rc_tab->scan;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
|
||||
|
||||
spin_lock_irqsave(&rc_tab->lock, flags);
|
||||
|
||||
/* FIXME: replace it by a binary search */
|
||||
|
||||
for (rc = 0; rc < rc_tab->size; rc++)
|
||||
if (keymap[rc].scancode == scancode)
|
||||
goto exit;
|
||||
|
||||
/* Not found */
|
||||
rc = -EINVAL;
|
||||
|
||||
exit:
|
||||
rc = ir_do_setkeycode(dev, rc_tab, scancode, keycode, true);
|
||||
spin_unlock_irqrestore(&rc_tab->lock, flags);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_roundup_tablesize() - gets an optimum value for the table size
|
||||
* @n_elems: minimum number of entries to store keycodes
|
||||
* ir_setkeytable() - sets several entries in the scancode->keycode table
|
||||
* @dev: the struct input_dev device descriptor
|
||||
* @to: the struct ir_scancode_table to copy entries to
|
||||
* @from: the struct ir_scancode_table to copy entries from
|
||||
* @return: -EINVAL if all keycodes could not be inserted, otherwise zero.
|
||||
*
|
||||
* This routine is used to choose the keycode table size.
|
||||
*
|
||||
* In order to have some empty space for new keycodes,
|
||||
* and knowing in advance that kmalloc allocates only power of two
|
||||
* segments, it optimizes the allocated space to have some spare space
|
||||
* for those new keycodes by using the maximum number of entries that
|
||||
* will be effectively be allocated by kmalloc.
|
||||
* In order to reduce the quantity of table resizes, it has a minimum
|
||||
* table size of IR_TAB_MIN_SIZE.
|
||||
* This routine is used to handle table initialization.
|
||||
*/
|
||||
static int ir_roundup_tablesize(int n_elems)
|
||||
static int ir_setkeytable(struct input_dev *dev,
|
||||
struct ir_scancode_table *to,
|
||||
const struct ir_scancode_table *from)
|
||||
{
|
||||
size_t size;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
|
||||
unsigned long flags;
|
||||
unsigned int i;
|
||||
int rc = 0;
|
||||
|
||||
if (n_elems < IR_TAB_MIN_SIZE)
|
||||
n_elems = IR_TAB_MIN_SIZE;
|
||||
|
||||
/*
|
||||
* As kmalloc only allocates sizes of power of two, get as
|
||||
* much entries as possible for the allocated memory segment
|
||||
*/
|
||||
size = roundup_pow_of_two(n_elems * sizeof(struct ir_scancode));
|
||||
n_elems = size / sizeof(struct ir_scancode);
|
||||
|
||||
return n_elems;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_copy_table() - copies a keytable, discarding the unused entries
|
||||
* @destin: destin table
|
||||
* @origin: origin table
|
||||
*
|
||||
* Copies all entries where the keycode is not KEY_UNKNOWN/KEY_RESERVED
|
||||
* Also copies table size and table protocol.
|
||||
* NOTE: It shouldn't copy the lock field
|
||||
*/
|
||||
|
||||
static int ir_copy_table(struct ir_scancode_table *destin,
|
||||
const struct ir_scancode_table *origin)
|
||||
{
|
||||
int i, j = 0;
|
||||
|
||||
for (i = 0; i < origin->size; i++) {
|
||||
if (origin->scan[i].keycode == KEY_UNKNOWN ||
|
||||
origin->scan[i].keycode == KEY_RESERVED)
|
||||
continue;
|
||||
|
||||
memcpy(&destin->scan[j], &origin->scan[i], sizeof(struct ir_scancode));
|
||||
j++;
|
||||
spin_lock_irqsave(&rc_tab->lock, flags);
|
||||
for (i = 0; i < from->size; i++) {
|
||||
rc = ir_do_setkeycode(dev, to, from->scan[i].scancode,
|
||||
from->scan[i].keycode, false);
|
||||
if (rc)
|
||||
break;
|
||||
}
|
||||
destin->size = j;
|
||||
destin->ir_type = origin->ir_type;
|
||||
|
||||
IR_dprintk(1, "Copied %d scancodes to the new keycode table\n", destin->size);
|
||||
|
||||
return 0;
|
||||
spin_unlock_irqrestore(&rc_tab->lock, flags);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_getkeycode() - get a keycode at the evdev scancode ->keycode table
|
||||
* ir_getkeycode() - get a keycode from the scancode->keycode table
|
||||
* @dev: the struct input_dev device descriptor
|
||||
* @scancode: the desired scancode
|
||||
* @keycode: the keycode to be retorned.
|
||||
* @keycode: used to return the keycode, if found, or KEY_RESERVED
|
||||
* @return: always returns zero.
|
||||
*
|
||||
* This routine is used to handle evdev EVIOCGKEY ioctl.
|
||||
* If the key is not found, returns -EINVAL, otherwise, returns 0.
|
||||
*/
|
||||
static int ir_getkeycode(struct input_dev *dev,
|
||||
unsigned int scancode, unsigned int *keycode)
|
||||
{
|
||||
int elem;
|
||||
int start, end, mid;
|
||||
unsigned long flags;
|
||||
int key = KEY_RESERVED;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
|
||||
|
||||
elem = ir_seek_table(rc_tab, scancode);
|
||||
if (elem >= 0) {
|
||||
*keycode = rc_tab->scan[elem].keycode;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scancode not found and table can't be expanded
|
||||
*/
|
||||
if (elem < 0 && rc_tab->size == IR_TAB_MAX_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* If is there extra space, returns KEY_RESERVED,
|
||||
* otherwise, input core won't let ir_setkeycode to work
|
||||
*/
|
||||
*keycode = KEY_RESERVED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_is_resize_needed() - Check if the table needs rezise
|
||||
* @table: keycode table that may need to resize
|
||||
* @n_elems: minimum number of entries to store keycodes
|
||||
*
|
||||
* Considering that kmalloc uses power of two storage areas, this
|
||||
* routine detects if the real alloced size will change. If not, it
|
||||
* just returns without doing nothing. Otherwise, it will extend or
|
||||
* reduce the table size to meet the new needs.
|
||||
*
|
||||
* It returns 0 if no resize is needed, 1 otherwise.
|
||||
*/
|
||||
static int ir_is_resize_needed(struct ir_scancode_table *table, int n_elems)
|
||||
{
|
||||
int cur_size = ir_roundup_tablesize(table->size);
|
||||
int new_size = ir_roundup_tablesize(n_elems);
|
||||
|
||||
if (cur_size == new_size)
|
||||
return 0;
|
||||
|
||||
/* Resize is needed */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_delete_key() - remove a keycode from the table
|
||||
* @rc_tab: keycode table
|
||||
* @elem: element to be removed
|
||||
*
|
||||
*/
|
||||
static void ir_delete_key(struct ir_scancode_table *rc_tab, int elem)
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
int newsize = rc_tab->size - 1;
|
||||
int resize = ir_is_resize_needed(rc_tab, newsize);
|
||||
struct ir_scancode *oldkeymap = rc_tab->scan;
|
||||
struct ir_scancode *newkeymap = NULL;
|
||||
|
||||
if (resize)
|
||||
newkeymap = kzalloc(ir_roundup_tablesize(newsize) *
|
||||
sizeof(*newkeymap), GFP_ATOMIC);
|
||||
|
||||
/* There's no memory for resize. Keep the old table */
|
||||
if (!resize || !newkeymap) {
|
||||
newkeymap = oldkeymap;
|
||||
|
||||
/* We'll modify the live table. Lock it */
|
||||
spin_lock_irqsave(&rc_tab->lock, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy the elements before the one that will be deleted
|
||||
* if (!resize), both oldkeymap and newkeymap points
|
||||
* to the same place, so, there's no need to copy
|
||||
*/
|
||||
if (resize && elem > 0)
|
||||
memcpy(newkeymap, oldkeymap,
|
||||
elem * sizeof(*newkeymap));
|
||||
|
||||
/*
|
||||
* Copy the other elements overwriting the element to be removed
|
||||
* This operation applies to both resize and non-resize case
|
||||
*/
|
||||
if (elem < newsize)
|
||||
memcpy(&newkeymap[elem], &oldkeymap[elem + 1],
|
||||
(newsize - elem) * sizeof(*newkeymap));
|
||||
|
||||
if (resize) {
|
||||
/*
|
||||
* As the copy happened to a temporary table, only here
|
||||
* it needs to lock while replacing the table pointers
|
||||
* to use the new table
|
||||
*/
|
||||
spin_lock_irqsave(&rc_tab->lock, flags);
|
||||
rc_tab->size = newsize;
|
||||
rc_tab->scan = newkeymap;
|
||||
spin_unlock_irqrestore(&rc_tab->lock, flags);
|
||||
|
||||
/* Frees the old keytable */
|
||||
kfree(oldkeymap);
|
||||
} else {
|
||||
rc_tab->size = newsize;
|
||||
spin_unlock_irqrestore(&rc_tab->lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_insert_key() - insert a keycode at the table
|
||||
* @rc_tab: keycode table
|
||||
* @scancode: the desired scancode
|
||||
* @keycode: the keycode to be retorned.
|
||||
*
|
||||
*/
|
||||
static int ir_insert_key(struct ir_scancode_table *rc_tab,
|
||||
int scancode, int keycode)
|
||||
{
|
||||
unsigned long flags;
|
||||
int elem = rc_tab->size;
|
||||
int newsize = rc_tab->size + 1;
|
||||
int resize = ir_is_resize_needed(rc_tab, newsize);
|
||||
struct ir_scancode *oldkeymap = rc_tab->scan;
|
||||
struct ir_scancode *newkeymap;
|
||||
|
||||
if (resize) {
|
||||
newkeymap = kzalloc(ir_roundup_tablesize(newsize) *
|
||||
sizeof(*newkeymap), GFP_ATOMIC);
|
||||
if (!newkeymap)
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy(newkeymap, oldkeymap,
|
||||
rc_tab->size * sizeof(*newkeymap));
|
||||
} else
|
||||
newkeymap = oldkeymap;
|
||||
|
||||
/* Stores the new code at the table */
|
||||
IR_dprintk(1, "#%d: New scan 0x%04x with key 0x%04x\n",
|
||||
rc_tab->size, scancode, keycode);
|
||||
|
||||
spin_lock_irqsave(&rc_tab->lock, flags);
|
||||
rc_tab->size = newsize;
|
||||
if (resize) {
|
||||
rc_tab->scan = newkeymap;
|
||||
kfree(oldkeymap);
|
||||
start = 0;
|
||||
end = rc_tab->len - 1;
|
||||
while (start <= end) {
|
||||
mid = (start + end) / 2;
|
||||
if (rc_tab->scan[mid].scancode < scancode)
|
||||
start = mid + 1;
|
||||
else if (rc_tab->scan[mid].scancode > scancode)
|
||||
end = mid - 1;
|
||||
else {
|
||||
key = rc_tab->scan[mid].keycode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
newkeymap[elem].scancode = scancode;
|
||||
newkeymap[elem].keycode = keycode;
|
||||
spin_unlock_irqrestore(&rc_tab->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_setkeycode() - set a keycode at the evdev scancode ->keycode table
|
||||
* @dev: the struct input_dev device descriptor
|
||||
* @scancode: the desired scancode
|
||||
* @keycode: the keycode to be retorned.
|
||||
*
|
||||
* This routine is used to handle evdev EVIOCSKEY ioctl.
|
||||
* There's one caveat here: how can we increase the size of the table?
|
||||
* If the key is not found, returns -EINVAL, otherwise, returns 0.
|
||||
*/
|
||||
static int ir_setkeycode(struct input_dev *dev,
|
||||
unsigned int scancode, unsigned int keycode)
|
||||
{
|
||||
int rc = 0;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
|
||||
struct ir_scancode *keymap = rc_tab->scan;
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* Handle keycode table deletions
|
||||
*
|
||||
* If userspace is adding a KEY_UNKNOWN or KEY_RESERVED,
|
||||
* deal as a trial to remove an existing scancode attribution
|
||||
* if table become too big, reduce it to save space
|
||||
*/
|
||||
if (keycode == KEY_UNKNOWN || keycode == KEY_RESERVED) {
|
||||
rc = ir_seek_table(rc_tab, scancode);
|
||||
if (rc < 0)
|
||||
return 0;
|
||||
|
||||
IR_dprintk(1, "#%d: Deleting scan 0x%04x\n", rc, scancode);
|
||||
clear_bit(keymap[rc].keycode, dev->keybit);
|
||||
ir_delete_key(rc_tab, rc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle keycode replacements
|
||||
*
|
||||
* If the scancode exists, just replace by the new value
|
||||
*/
|
||||
rc = ir_seek_table(rc_tab, scancode);
|
||||
if (rc >= 0) {
|
||||
IR_dprintk(1, "#%d: Replacing scan 0x%04x with key 0x%04x\n",
|
||||
rc, scancode, keycode);
|
||||
|
||||
clear_bit(keymap[rc].keycode, dev->keybit);
|
||||
|
||||
spin_lock_irqsave(&rc_tab->lock, flags);
|
||||
keymap[rc].keycode = keycode;
|
||||
spin_unlock_irqrestore(&rc_tab->lock, flags);
|
||||
|
||||
set_bit(keycode, dev->keybit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle new scancode inserts
|
||||
*
|
||||
* reallocate table if needed and insert a new keycode
|
||||
*/
|
||||
|
||||
/* Avoid growing the table indefinitely */
|
||||
if (rc_tab->size + 1 > IR_TAB_MAX_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
rc = ir_insert_key(rc_tab, scancode, keycode);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
set_bit(keycode, dev->keybit);
|
||||
if (key == KEY_RESERVED)
|
||||
IR_dprintk(1, "unknown key for scancode 0x%04x\n",
|
||||
scancode);
|
||||
|
||||
*keycode = key;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -365,34 +263,160 @@ static int ir_setkeycode(struct input_dev *dev,
|
||||
*
|
||||
* This routine is used by the input routines when a key is pressed at the
|
||||
* IR. The scancode is received and needs to be converted into a keycode.
|
||||
* If the key is not found, it returns KEY_UNKNOWN. Otherwise, returns the
|
||||
* If the key is not found, it returns KEY_RESERVED. Otherwise, returns the
|
||||
* corresponding keycode from the table.
|
||||
*/
|
||||
u32 ir_g_keycode_from_table(struct input_dev *dev, u32 scancode)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
struct ir_scancode_table *rc_tab = &ir_dev->rc_tab;
|
||||
struct ir_scancode *keymap = rc_tab->scan;
|
||||
int elem;
|
||||
int keycode;
|
||||
|
||||
elem = ir_seek_table(rc_tab, scancode);
|
||||
if (elem >= 0) {
|
||||
ir_getkeycode(dev, scancode, &keycode);
|
||||
if (keycode != KEY_RESERVED)
|
||||
IR_dprintk(1, "%s: scancode 0x%04x keycode 0x%02x\n",
|
||||
dev->name, scancode, keymap[elem].keycode);
|
||||
|
||||
return rc_tab->scan[elem].keycode;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "%s: unknown key for scancode 0x%04x\n",
|
||||
dev->name, scancode);
|
||||
|
||||
/* Reports userspace that an unknown keycode were got */
|
||||
return KEY_RESERVED;
|
||||
dev->name, scancode, keycode);
|
||||
return keycode;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_g_keycode_from_table);
|
||||
|
||||
/**
|
||||
* ir_input_register() - sets the IR keycode table and add the handlers
|
||||
* ir_keyup() - generates input event to cleanup a key press
|
||||
* @ir: the struct ir_input_dev descriptor of the device
|
||||
*
|
||||
* 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().
|
||||
*/
|
||||
static void ir_keyup(struct ir_input_dev *ir)
|
||||
{
|
||||
if (!ir->keypressed)
|
||||
return;
|
||||
|
||||
IR_dprintk(1, "keyup key 0x%04x\n", ir->last_keycode);
|
||||
input_report_key(ir->input_dev, ir->last_keycode, 0);
|
||||
input_sync(ir->input_dev);
|
||||
ir->keypressed = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_timer_keyup() - generates a keyup event after a timeout
|
||||
* @cookie: a pointer to struct ir_input_dev passed to setup_timer()
|
||||
*
|
||||
* This routine will generate a keyup event some time after a keydown event
|
||||
* is generated when no further activity has been detected.
|
||||
*/
|
||||
static void ir_timer_keyup(unsigned long cookie)
|
||||
{
|
||||
struct ir_input_dev *ir = (struct ir_input_dev *)cookie;
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* ir->keyup_jiffies is used to prevent a race condition if a
|
||||
* hardware interrupt occurs at this point and the keyup timer
|
||||
* event is moved further into the future as a result.
|
||||
*
|
||||
* The timer will then be reactivated and this function called
|
||||
* again in the future. We need to exit gracefully in that case
|
||||
* to allow the input subsystem to do its auto-repeat magic or
|
||||
* a keyup event might follow immediately after the keydown.
|
||||
*/
|
||||
spin_lock_irqsave(&ir->keylock, flags);
|
||||
if (time_is_after_eq_jiffies(ir->keyup_jiffies))
|
||||
ir_keyup(ir);
|
||||
spin_unlock_irqrestore(&ir->keylock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_repeat() - notifies the IR core that a key is still pressed
|
||||
* @dev: the struct input_dev descriptor of the device
|
||||
*
|
||||
* This routine is used by IR decoders when a repeat message which does
|
||||
* not include the necessary bits to reproduce the scancode has been
|
||||
* received.
|
||||
*/
|
||||
void ir_repeat(struct input_dev *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct ir_input_dev *ir = input_get_drvdata(dev);
|
||||
|
||||
spin_lock_irqsave(&ir->keylock, flags);
|
||||
|
||||
if (!ir->keypressed)
|
||||
goto out;
|
||||
|
||||
ir->keyup_jiffies = jiffies + msecs_to_jiffies(IR_KEYPRESS_TIMEOUT);
|
||||
mod_timer(&ir->timer_keyup, ir->keyup_jiffies);
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&ir->keylock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_repeat);
|
||||
|
||||
/**
|
||||
* ir_keydown() - generates input event for a key press
|
||||
* @dev: the struct input_dev descriptor of the device
|
||||
* @scancode: the scancode that we're seeking
|
||||
* @toggle: the toggle value (protocol dependent, if the protocol doesn't
|
||||
* support toggle values, this should be set to zero)
|
||||
*
|
||||
* This routine is used by the input routines when a key is pressed at the
|
||||
* IR. It gets the keycode for a scancode and reports an input event via
|
||||
* input_report_key().
|
||||
*/
|
||||
void ir_keydown(struct input_dev *dev, int scancode, u8 toggle)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct ir_input_dev *ir = input_get_drvdata(dev);
|
||||
|
||||
u32 keycode = ir_g_keycode_from_table(dev, scancode);
|
||||
|
||||
spin_lock_irqsave(&ir->keylock, flags);
|
||||
|
||||
/* Repeat event? */
|
||||
if (ir->keypressed &&
|
||||
ir->last_scancode == scancode &&
|
||||
ir->last_toggle == toggle)
|
||||
goto set_timer;
|
||||
|
||||
/* Release old keypress */
|
||||
ir_keyup(ir);
|
||||
|
||||
ir->last_scancode = scancode;
|
||||
ir->last_toggle = toggle;
|
||||
ir->last_keycode = keycode;
|
||||
|
||||
if (keycode == KEY_RESERVED)
|
||||
goto out;
|
||||
|
||||
/* Register a keypress */
|
||||
ir->keypressed = true;
|
||||
IR_dprintk(1, "%s: key down event, key 0x%04x, scancode 0x%04x\n",
|
||||
dev->name, keycode, scancode);
|
||||
input_report_key(dev, ir->last_keycode, 1);
|
||||
input_sync(dev);
|
||||
|
||||
set_timer:
|
||||
ir->keyup_jiffies = jiffies + msecs_to_jiffies(IR_KEYPRESS_TIMEOUT);
|
||||
mod_timer(&ir->timer_keyup, ir->keyup_jiffies);
|
||||
out:
|
||||
spin_unlock_irqrestore(&ir->keylock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_keydown);
|
||||
|
||||
static int ir_open(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
|
||||
return ir_dev->props->open(ir_dev->props->priv);
|
||||
}
|
||||
|
||||
static void ir_close(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
|
||||
ir_dev->props->close(ir_dev->props->priv);
|
||||
}
|
||||
|
||||
/**
|
||||
* __ir_input_register() - sets the IR keycode table and add the handlers
|
||||
* for keymap table get/set
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
* @rc_tab: the struct ir_scancode_table table of scancode/keymap
|
||||
@ -402,13 +426,13 @@ EXPORT_SYMBOL_GPL(ir_g_keycode_from_table);
|
||||
* It will register the input/evdev interface for the device and
|
||||
* register the syfs code for IR class
|
||||
*/
|
||||
int ir_input_register(struct input_dev *input_dev,
|
||||
int __ir_input_register(struct input_dev *input_dev,
|
||||
const struct ir_scancode_table *rc_tab,
|
||||
const struct ir_dev_props *props)
|
||||
const struct ir_dev_props *props,
|
||||
const char *driver_name)
|
||||
{
|
||||
struct ir_input_dev *ir_dev;
|
||||
struct ir_scancode *keymap = rc_tab->scan;
|
||||
int i, rc;
|
||||
int rc;
|
||||
|
||||
if (rc_tab->scan == NULL || !rc_tab->size)
|
||||
return -EINVAL;
|
||||
@ -417,57 +441,77 @@ int ir_input_register(struct input_dev *input_dev,
|
||||
if (!ir_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&ir_dev->rc_tab.lock);
|
||||
|
||||
ir_dev->rc_tab.size = ir_roundup_tablesize(rc_tab->size);
|
||||
ir_dev->rc_tab.scan = kzalloc(ir_dev->rc_tab.size *
|
||||
sizeof(struct ir_scancode), GFP_KERNEL);
|
||||
if (!ir_dev->rc_tab.scan) {
|
||||
kfree(ir_dev);
|
||||
return -ENOMEM;
|
||||
ir_dev->driver_name = kasprintf(GFP_KERNEL, "%s", driver_name);
|
||||
if (!ir_dev->driver_name) {
|
||||
rc = -ENOMEM;
|
||||
goto out_dev;
|
||||
}
|
||||
|
||||
IR_dprintk(1, "Allocated space for %d keycode entries (%zd bytes)\n",
|
||||
ir_dev->rc_tab.size,
|
||||
ir_dev->rc_tab.size * sizeof(ir_dev->rc_tab.scan));
|
||||
|
||||
ir_copy_table(&ir_dev->rc_tab, rc_tab);
|
||||
ir_dev->props = props;
|
||||
|
||||
/* set the bits for the keys */
|
||||
IR_dprintk(1, "key map size: %d\n", rc_tab->size);
|
||||
for (i = 0; i < rc_tab->size; i++) {
|
||||
IR_dprintk(1, "#%d: setting bit for keycode 0x%04x\n",
|
||||
i, keymap[i].keycode);
|
||||
set_bit(keymap[i].keycode, input_dev->keybit);
|
||||
}
|
||||
clear_bit(0, input_dev->keybit);
|
||||
|
||||
set_bit(EV_KEY, input_dev->evbit);
|
||||
|
||||
input_dev->getkeycode = ir_getkeycode;
|
||||
input_dev->setkeycode = ir_setkeycode;
|
||||
input_set_drvdata(input_dev, ir_dev);
|
||||
ir_dev->input_dev = input_dev;
|
||||
|
||||
rc = input_register_device(input_dev);
|
||||
if (rc < 0)
|
||||
goto err;
|
||||
spin_lock_init(&ir_dev->rc_tab.lock);
|
||||
spin_lock_init(&ir_dev->keylock);
|
||||
setup_timer(&ir_dev->timer_keyup, ir_timer_keyup, (unsigned long)ir_dev);
|
||||
|
||||
ir_dev->rc_tab.name = rc_tab->name;
|
||||
ir_dev->rc_tab.ir_type = rc_tab->ir_type;
|
||||
ir_dev->rc_tab.alloc = roundup_pow_of_two(rc_tab->size *
|
||||
sizeof(struct ir_scancode));
|
||||
ir_dev->rc_tab.scan = kmalloc(ir_dev->rc_tab.alloc, GFP_KERNEL);
|
||||
ir_dev->rc_tab.size = ir_dev->rc_tab.alloc / sizeof(struct ir_scancode);
|
||||
if (props) {
|
||||
ir_dev->props = props;
|
||||
if (props->open)
|
||||
input_dev->open = ir_open;
|
||||
if (props->close)
|
||||
input_dev->close = ir_close;
|
||||
}
|
||||
|
||||
if (!ir_dev->rc_tab.scan) {
|
||||
rc = -ENOMEM;
|
||||
goto out_name;
|
||||
}
|
||||
|
||||
IR_dprintk(1, "Allocated space for %u keycode entries (%u bytes)\n",
|
||||
ir_dev->rc_tab.size, ir_dev->rc_tab.alloc);
|
||||
|
||||
set_bit(EV_KEY, input_dev->evbit);
|
||||
set_bit(EV_REP, input_dev->evbit);
|
||||
|
||||
if (ir_setkeytable(input_dev, &ir_dev->rc_tab, rc_tab)) {
|
||||
rc = -ENOMEM;
|
||||
goto out_table;
|
||||
}
|
||||
|
||||
rc = ir_register_class(input_dev);
|
||||
if (rc < 0) {
|
||||
input_unregister_device(input_dev);
|
||||
goto err;
|
||||
if (rc < 0)
|
||||
goto out_table;
|
||||
|
||||
if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) {
|
||||
rc = ir_raw_event_register(input_dev);
|
||||
if (rc < 0)
|
||||
goto out_event;
|
||||
}
|
||||
|
||||
IR_dprintk(1, "Registered input device on %s for %s remote.\n",
|
||||
driver_name, rc_tab->name);
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
kfree(rc_tab->scan);
|
||||
out_event:
|
||||
ir_unregister_class(input_dev);
|
||||
out_table:
|
||||
kfree(ir_dev->rc_tab.scan);
|
||||
out_name:
|
||||
kfree(ir_dev->driver_name);
|
||||
out_dev:
|
||||
kfree(ir_dev);
|
||||
input_set_drvdata(input_dev, NULL);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_input_register);
|
||||
EXPORT_SYMBOL_GPL(__ir_input_register);
|
||||
|
||||
/**
|
||||
* ir_input_unregister() - unregisters IR and frees resources
|
||||
@ -475,9 +519,9 @@ EXPORT_SYMBOL_GPL(ir_input_register);
|
||||
|
||||
* This routine is used to free memory and de-register interfaces.
|
||||
*/
|
||||
void ir_input_unregister(struct input_dev *dev)
|
||||
void ir_input_unregister(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
struct ir_scancode_table *rc_tab;
|
||||
|
||||
if (!ir_dev)
|
||||
@ -485,15 +529,18 @@ void ir_input_unregister(struct input_dev *dev)
|
||||
|
||||
IR_dprintk(1, "Freed keycode table\n");
|
||||
|
||||
del_timer_sync(&ir_dev->timer_keyup);
|
||||
if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW)
|
||||
ir_raw_event_unregister(input_dev);
|
||||
rc_tab = &ir_dev->rc_tab;
|
||||
rc_tab->size = 0;
|
||||
kfree(rc_tab->scan);
|
||||
rc_tab->scan = NULL;
|
||||
|
||||
ir_unregister_class(dev);
|
||||
ir_unregister_class(input_dev);
|
||||
|
||||
kfree(ir_dev->driver_name);
|
||||
kfree(ir_dev);
|
||||
input_unregister_device(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_input_unregister);
|
||||
|
||||
|
328
drivers/media/IR/ir-nec-decoder.c
Normal file
328
drivers/media/IR/ir-nec-decoder.c
Normal file
@ -0,0 +1,328 @@
|
||||
/* ir-nec-decoder.c - handle NEC IR Pulse/Space protocol
|
||||
*
|
||||
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/bitrev.h>
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
#define NEC_NBITS 32
|
||||
#define NEC_UNIT 562500 /* ns */
|
||||
#define NEC_HEADER_PULSE (16 * NEC_UNIT)
|
||||
#define NECX_HEADER_PULSE (8 * NEC_UNIT) /* Less common NEC variant */
|
||||
#define NEC_HEADER_SPACE (8 * NEC_UNIT)
|
||||
#define NEC_REPEAT_SPACE (8 * NEC_UNIT)
|
||||
#define NEC_BIT_PULSE (1 * NEC_UNIT)
|
||||
#define NEC_BIT_0_SPACE (1 * NEC_UNIT)
|
||||
#define NEC_BIT_1_SPACE (3 * NEC_UNIT)
|
||||
#define NEC_TRAILER_PULSE (1 * NEC_UNIT)
|
||||
#define NEC_TRAILER_SPACE (10 * NEC_UNIT) /* even longer in reality */
|
||||
|
||||
/* Used to register nec_decoder clients */
|
||||
static LIST_HEAD(decoder_list);
|
||||
static DEFINE_SPINLOCK(decoder_lock);
|
||||
|
||||
enum nec_state {
|
||||
STATE_INACTIVE,
|
||||
STATE_HEADER_SPACE,
|
||||
STATE_BIT_PULSE,
|
||||
STATE_BIT_SPACE,
|
||||
STATE_TRAILER_PULSE,
|
||||
STATE_TRAILER_SPACE,
|
||||
};
|
||||
|
||||
struct decoder_data {
|
||||
struct list_head list;
|
||||
struct ir_input_dev *ir_dev;
|
||||
int enabled:1;
|
||||
|
||||
/* State machine control */
|
||||
enum nec_state state;
|
||||
u32 nec_bits;
|
||||
unsigned count;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get_decoder_data() - gets decoder data
|
||||
* @input_dev: input device
|
||||
*
|
||||
* Returns the struct decoder_data that corresponds to a device
|
||||
*/
|
||||
static struct decoder_data *get_decoder_data(struct ir_input_dev *ir_dev)
|
||||
{
|
||||
struct decoder_data *data = NULL;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_for_each_entry(data, &decoder_list, list) {
|
||||
if (data->ir_dev == ir_dev)
|
||||
break;
|
||||
}
|
||||
spin_unlock(&decoder_lock);
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t store_enabled(struct device *d,
|
||||
struct device_attribute *mattr,
|
||||
const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
unsigned long value;
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (strict_strtoul(buf, 10, &value) || value > 1)
|
||||
return -EINVAL;
|
||||
|
||||
data->enabled = value;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
static ssize_t show_enabled(struct device *d,
|
||||
struct device_attribute *mattr, char *buf)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (data->enabled)
|
||||
return sprintf(buf, "1\n");
|
||||
else
|
||||
return sprintf(buf, "0\n");
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(enabled, S_IRUGO | S_IWUSR, show_enabled, store_enabled);
|
||||
|
||||
static struct attribute *decoder_attributes[] = {
|
||||
&dev_attr_enabled.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group decoder_attribute_group = {
|
||||
.name = "nec_decoder",
|
||||
.attrs = decoder_attributes,
|
||||
};
|
||||
|
||||
/**
|
||||
* ir_nec_decode() - Decode one NEC pulse or space
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
* @duration: the struct ir_raw_event descriptor of the pulse/space
|
||||
*
|
||||
* This function returns -EINVAL if the pulse violates the state machine
|
||||
*/
|
||||
static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev)
|
||||
{
|
||||
struct decoder_data *data;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
u32 scancode;
|
||||
u8 address, not_address, command, not_command;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (!data->enabled)
|
||||
return 0;
|
||||
|
||||
if (IS_RESET(ev)) {
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
IR_dprintk(2, "NEC decode started at state %d (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
|
||||
switch (data->state) {
|
||||
|
||||
case STATE_INACTIVE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT / 2) &&
|
||||
!eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->count = 0;
|
||||
data->state = STATE_HEADER_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_HEADER_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (eq_margin(ev.duration, NEC_HEADER_SPACE, NEC_UNIT / 2)) {
|
||||
data->state = STATE_BIT_PULSE;
|
||||
return 0;
|
||||
} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
|
||||
ir_repeat(input_dev);
|
||||
IR_dprintk(1, "Repeat last key\n");
|
||||
data->state = STATE_TRAILER_PULSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case STATE_BIT_PULSE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, NEC_BIT_PULSE, NEC_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->state = STATE_BIT_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_BIT_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
data->nec_bits <<= 1;
|
||||
if (eq_margin(ev.duration, NEC_BIT_1_SPACE, NEC_UNIT / 2))
|
||||
data->nec_bits |= 1;
|
||||
else if (!eq_margin(ev.duration, NEC_BIT_0_SPACE, NEC_UNIT / 2))
|
||||
break;
|
||||
data->count++;
|
||||
|
||||
if (data->count == NEC_NBITS)
|
||||
data->state = STATE_TRAILER_PULSE;
|
||||
else
|
||||
data->state = STATE_BIT_PULSE;
|
||||
|
||||
return 0;
|
||||
|
||||
case STATE_TRAILER_PULSE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, NEC_TRAILER_PULSE, NEC_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->state = STATE_TRAILER_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_TRAILER_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (!geq_margin(ev.duration, NEC_TRAILER_SPACE, NEC_UNIT / 2))
|
||||
break;
|
||||
|
||||
address = bitrev8((data->nec_bits >> 24) & 0xff);
|
||||
not_address = bitrev8((data->nec_bits >> 16) & 0xff);
|
||||
command = bitrev8((data->nec_bits >> 8) & 0xff);
|
||||
not_command = bitrev8((data->nec_bits >> 0) & 0xff);
|
||||
|
||||
if ((command ^ not_command) != 0xff) {
|
||||
IR_dprintk(1, "NEC checksum error: received 0x%08x\n",
|
||||
data->nec_bits);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((address ^ not_address) != 0xff) {
|
||||
/* Extended NEC */
|
||||
scancode = address << 16 |
|
||||
not_address << 8 |
|
||||
command;
|
||||
IR_dprintk(1, "NEC (Ext) scancode 0x%06x\n", scancode);
|
||||
} else {
|
||||
/* Normal NEC */
|
||||
scancode = address << 8 | command;
|
||||
IR_dprintk(1, "NEC scancode 0x%04x\n", scancode);
|
||||
}
|
||||
|
||||
ir_keydown(input_dev, scancode, 0);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
IR_dprintk(1, "NEC decode failed at state %d (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
data->state = STATE_INACTIVE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ir_nec_register(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
struct decoder_data *data;
|
||||
int rc;
|
||||
|
||||
rc = sysfs_create_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
if (!data) {
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data->ir_dev = ir_dev;
|
||||
data->enabled = 1;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_add_tail(&data->list, &decoder_list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ir_nec_unregister(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
static struct decoder_data *data;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_del(&data->list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ir_raw_handler nec_handler = {
|
||||
.decode = ir_nec_decode,
|
||||
.raw_register = ir_nec_register,
|
||||
.raw_unregister = ir_nec_unregister,
|
||||
};
|
||||
|
||||
static int __init ir_nec_decode_init(void)
|
||||
{
|
||||
ir_raw_handler_register(&nec_handler);
|
||||
|
||||
printk(KERN_INFO "IR NEC protocol handler initialized\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ir_nec_decode_exit(void)
|
||||
{
|
||||
ir_raw_handler_unregister(&nec_handler);
|
||||
}
|
||||
|
||||
module_init(ir_nec_decode_init);
|
||||
module_exit(ir_nec_decode_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
||||
MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com)");
|
||||
MODULE_DESCRIPTION("NEC IR protocol decoder");
|
251
drivers/media/IR/ir-raw-event.c
Normal file
251
drivers/media/IR/ir-raw-event.c
Normal file
@ -0,0 +1,251 @@
|
||||
/* ir-raw-event.c - handle IR Pulse/Space event
|
||||
*
|
||||
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/sched.h>
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
/* Define the max number of pulse/space transitions to buffer */
|
||||
#define MAX_IR_EVENT_SIZE 512
|
||||
|
||||
/* Used to handle IR raw handler extensions */
|
||||
static LIST_HEAD(ir_raw_handler_list);
|
||||
static DEFINE_SPINLOCK(ir_raw_handler_lock);
|
||||
|
||||
/**
|
||||
* RUN_DECODER() - runs an operation on all IR decoders
|
||||
* @ops: IR raw handler operation to be called
|
||||
* @arg: arguments to be passed to the callback
|
||||
*
|
||||
* Calls ir_raw_handler::ops for all registered IR handlers. It prevents
|
||||
* new decode addition/removal while running, by locking ir_raw_handler_lock
|
||||
* mutex. If an error occurs, it stops the ops. Otherwise, it returns a sum
|
||||
* of the return codes.
|
||||
*/
|
||||
#define RUN_DECODER(ops, ...) ({ \
|
||||
struct ir_raw_handler *_ir_raw_handler; \
|
||||
int _sumrc = 0, _rc; \
|
||||
spin_lock(&ir_raw_handler_lock); \
|
||||
list_for_each_entry(_ir_raw_handler, &ir_raw_handler_list, list) { \
|
||||
if (_ir_raw_handler->ops) { \
|
||||
_rc = _ir_raw_handler->ops(__VA_ARGS__); \
|
||||
if (_rc < 0) \
|
||||
break; \
|
||||
_sumrc += _rc; \
|
||||
} \
|
||||
} \
|
||||
spin_unlock(&ir_raw_handler_lock); \
|
||||
_sumrc; \
|
||||
})
|
||||
|
||||
#ifdef MODULE
|
||||
/* Used to load the decoders */
|
||||
static struct work_struct wq_load;
|
||||
#endif
|
||||
|
||||
static void ir_raw_event_work(struct work_struct *work)
|
||||
{
|
||||
struct ir_raw_event ev;
|
||||
struct ir_raw_event_ctrl *raw =
|
||||
container_of(work, struct ir_raw_event_ctrl, rx_work);
|
||||
|
||||
while (kfifo_out(&raw->kfifo, &ev, sizeof(ev)) == sizeof(ev))
|
||||
RUN_DECODER(decode, raw->input_dev, ev);
|
||||
}
|
||||
|
||||
int ir_raw_event_register(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir = input_get_drvdata(input_dev);
|
||||
int rc;
|
||||
|
||||
ir->raw = kzalloc(sizeof(*ir->raw), GFP_KERNEL);
|
||||
if (!ir->raw)
|
||||
return -ENOMEM;
|
||||
|
||||
ir->raw->input_dev = input_dev;
|
||||
INIT_WORK(&ir->raw->rx_work, ir_raw_event_work);
|
||||
|
||||
rc = kfifo_alloc(&ir->raw->kfifo, sizeof(s64) * MAX_IR_EVENT_SIZE,
|
||||
GFP_KERNEL);
|
||||
if (rc < 0) {
|
||||
kfree(ir->raw);
|
||||
ir->raw = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = RUN_DECODER(raw_register, input_dev);
|
||||
if (rc < 0) {
|
||||
kfifo_free(&ir->raw->kfifo);
|
||||
kfree(ir->raw);
|
||||
ir->raw = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
void ir_raw_event_unregister(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir = input_get_drvdata(input_dev);
|
||||
|
||||
if (!ir->raw)
|
||||
return;
|
||||
|
||||
cancel_work_sync(&ir->raw->rx_work);
|
||||
RUN_DECODER(raw_unregister, input_dev);
|
||||
|
||||
kfifo_free(&ir->raw->kfifo);
|
||||
kfree(ir->raw);
|
||||
ir->raw = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_raw_event_store() - pass a pulse/space duration to the raw ir decoders
|
||||
* @input_dev: the struct input_dev device descriptor
|
||||
* @ev: the struct ir_raw_event descriptor of the pulse/space
|
||||
*
|
||||
* This routine (which may be called from an interrupt context) stores a
|
||||
* pulse/space duration for the raw ir decoding state machines. Pulses are
|
||||
* signalled as positive values and spaces as negative values. A zero value
|
||||
* will reset the decoding state machines.
|
||||
*/
|
||||
int ir_raw_event_store(struct input_dev *input_dev, struct ir_raw_event *ev)
|
||||
{
|
||||
struct ir_input_dev *ir = input_get_drvdata(input_dev);
|
||||
|
||||
if (!ir->raw)
|
||||
return -EINVAL;
|
||||
|
||||
if (kfifo_in(&ir->raw->kfifo, ev, sizeof(*ev)) != sizeof(*ev))
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_raw_event_store);
|
||||
|
||||
/**
|
||||
* ir_raw_event_store_edge() - notify raw ir decoders of the start of a pulse/space
|
||||
* @input_dev: the struct input_dev device descriptor
|
||||
* @type: the type of the event that has occurred
|
||||
*
|
||||
* This routine (which may be called from an interrupt context) is used to
|
||||
* store the beginning of an ir pulse or space (or the start/end of ir
|
||||
* reception) for the raw ir decoding state machines. This is used by
|
||||
* hardware which does not provide durations directly but only interrupts
|
||||
* (or similar events) on state change.
|
||||
*/
|
||||
int ir_raw_event_store_edge(struct input_dev *input_dev, enum raw_event_type type)
|
||||
{
|
||||
struct ir_input_dev *ir = input_get_drvdata(input_dev);
|
||||
ktime_t now;
|
||||
s64 delta; /* ns */
|
||||
struct ir_raw_event ev;
|
||||
int rc = 0;
|
||||
|
||||
if (!ir->raw)
|
||||
return -EINVAL;
|
||||
|
||||
now = ktime_get();
|
||||
delta = ktime_to_ns(ktime_sub(now, ir->raw->last_event));
|
||||
|
||||
/* Check for a long duration since last event or if we're
|
||||
* being called for the first time, note that delta can't
|
||||
* possibly be negative.
|
||||
*/
|
||||
ev.duration = 0;
|
||||
if (delta > IR_MAX_DURATION || !ir->raw->last_type)
|
||||
type |= IR_START_EVENT;
|
||||
else
|
||||
ev.duration = delta;
|
||||
|
||||
if (type & IR_START_EVENT)
|
||||
ir_raw_event_reset(input_dev);
|
||||
else if (ir->raw->last_type & IR_SPACE) {
|
||||
ev.pulse = false;
|
||||
rc = ir_raw_event_store(input_dev, &ev);
|
||||
} else if (ir->raw->last_type & IR_PULSE) {
|
||||
ev.pulse = true;
|
||||
rc = ir_raw_event_store(input_dev, &ev);
|
||||
} else
|
||||
return 0;
|
||||
|
||||
ir->raw->last_event = now;
|
||||
ir->raw->last_type = type;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_raw_event_store_edge);
|
||||
|
||||
/**
|
||||
* ir_raw_event_handle() - schedules the decoding of stored ir data
|
||||
* @input_dev: the struct input_dev device descriptor
|
||||
*
|
||||
* This routine will signal the workqueue to start decoding stored ir data.
|
||||
*/
|
||||
void ir_raw_event_handle(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir = input_get_drvdata(input_dev);
|
||||
|
||||
if (!ir->raw)
|
||||
return;
|
||||
|
||||
schedule_work(&ir->raw->rx_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ir_raw_event_handle);
|
||||
|
||||
/*
|
||||
* Extension interface - used to register the IR decoders
|
||||
*/
|
||||
|
||||
int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler)
|
||||
{
|
||||
spin_lock(&ir_raw_handler_lock);
|
||||
list_add_tail(&ir_raw_handler->list, &ir_raw_handler_list);
|
||||
spin_unlock(&ir_raw_handler_lock);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ir_raw_handler_register);
|
||||
|
||||
void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler)
|
||||
{
|
||||
spin_lock(&ir_raw_handler_lock);
|
||||
list_del(&ir_raw_handler->list);
|
||||
spin_unlock(&ir_raw_handler_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(ir_raw_handler_unregister);
|
||||
|
||||
#ifdef MODULE
|
||||
static void init_decoders(struct work_struct *work)
|
||||
{
|
||||
/* Load the decoder modules */
|
||||
|
||||
load_nec_decode();
|
||||
load_rc5_decode();
|
||||
load_rc6_decode();
|
||||
load_jvc_decode();
|
||||
load_sony_decode();
|
||||
|
||||
/* If needed, we may later add some init code. In this case,
|
||||
it is needed to change the CONFIG_MODULE test at ir-core.h
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
||||
void ir_raw_init(void)
|
||||
{
|
||||
#ifdef MODULE
|
||||
INIT_WORK(&wq_load, init_decoders);
|
||||
schedule_work(&wq_load);
|
||||
#endif
|
||||
}
|
324
drivers/media/IR/ir-rc5-decoder.c
Normal file
324
drivers/media/IR/ir-rc5-decoder.c
Normal file
@ -0,0 +1,324 @@
|
||||
/* ir-rc5-decoder.c - handle RC5(x) IR Pulse/Space protocol
|
||||
*
|
||||
* Copyright (C) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code handles 14 bits RC5 protocols and 20 bits RC5x protocols.
|
||||
* There are other variants that use a different number of bits.
|
||||
* This is currently unsupported.
|
||||
* It considers a carrier of 36 kHz, with a total of 14/20 bits, where
|
||||
* the first two bits are start bits, and a third one is a filing bit
|
||||
*/
|
||||
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
#define RC5_NBITS 14
|
||||
#define RC5X_NBITS 20
|
||||
#define CHECK_RC5X_NBITS 8
|
||||
#define RC5_UNIT 888888 /* ns */
|
||||
#define RC5_BIT_START (1 * RC5_UNIT)
|
||||
#define RC5_BIT_END (1 * RC5_UNIT)
|
||||
#define RC5X_SPACE (4 * RC5_UNIT)
|
||||
|
||||
/* Used to register rc5_decoder clients */
|
||||
static LIST_HEAD(decoder_list);
|
||||
static DEFINE_SPINLOCK(decoder_lock);
|
||||
|
||||
enum rc5_state {
|
||||
STATE_INACTIVE,
|
||||
STATE_BIT_START,
|
||||
STATE_BIT_END,
|
||||
STATE_CHECK_RC5X,
|
||||
STATE_FINISHED,
|
||||
};
|
||||
|
||||
struct decoder_data {
|
||||
struct list_head list;
|
||||
struct ir_input_dev *ir_dev;
|
||||
int enabled:1;
|
||||
|
||||
/* State machine control */
|
||||
enum rc5_state state;
|
||||
u32 rc5_bits;
|
||||
struct ir_raw_event prev_ev;
|
||||
unsigned count;
|
||||
unsigned wanted_bits;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get_decoder_data() - gets decoder data
|
||||
* @input_dev: input device
|
||||
*
|
||||
* Returns the struct decoder_data that corresponds to a device
|
||||
*/
|
||||
|
||||
static struct decoder_data *get_decoder_data(struct ir_input_dev *ir_dev)
|
||||
{
|
||||
struct decoder_data *data = NULL;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_for_each_entry(data, &decoder_list, list) {
|
||||
if (data->ir_dev == ir_dev)
|
||||
break;
|
||||
}
|
||||
spin_unlock(&decoder_lock);
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t store_enabled(struct device *d,
|
||||
struct device_attribute *mattr,
|
||||
const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
unsigned long value;
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (strict_strtoul(buf, 10, &value) || value > 1)
|
||||
return -EINVAL;
|
||||
|
||||
data->enabled = value;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
static ssize_t show_enabled(struct device *d,
|
||||
struct device_attribute *mattr, char *buf)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (data->enabled)
|
||||
return sprintf(buf, "1\n");
|
||||
else
|
||||
return sprintf(buf, "0\n");
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(enabled, S_IRUGO | S_IWUSR, show_enabled, store_enabled);
|
||||
|
||||
static struct attribute *decoder_attributes[] = {
|
||||
&dev_attr_enabled.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group decoder_attribute_group = {
|
||||
.name = "rc5_decoder",
|
||||
.attrs = decoder_attributes,
|
||||
};
|
||||
|
||||
/**
|
||||
* ir_rc5_decode() - Decode one RC-5 pulse or space
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
* @ev: the struct ir_raw_event descriptor of the pulse/space
|
||||
*
|
||||
* This function returns -EINVAL if the pulse violates the state machine
|
||||
*/
|
||||
static int ir_rc5_decode(struct input_dev *input_dev, struct ir_raw_event ev)
|
||||
{
|
||||
struct decoder_data *data;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
u8 toggle;
|
||||
u32 scancode;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (!data->enabled)
|
||||
return 0;
|
||||
|
||||
if (IS_RESET(ev)) {
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!geq_margin(ev.duration, RC5_UNIT, RC5_UNIT / 2))
|
||||
goto out;
|
||||
|
||||
again:
|
||||
IR_dprintk(2, "RC5(x) decode started at state %i (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
|
||||
if (!geq_margin(ev.duration, RC5_UNIT, RC5_UNIT / 2))
|
||||
return 0;
|
||||
|
||||
switch (data->state) {
|
||||
|
||||
case STATE_INACTIVE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
data->state = STATE_BIT_START;
|
||||
data->count = 1;
|
||||
/* We just need enough bits to get to STATE_CHECK_RC5X */
|
||||
data->wanted_bits = RC5X_NBITS;
|
||||
decrease_duration(&ev, RC5_BIT_START);
|
||||
goto again;
|
||||
|
||||
case STATE_BIT_START:
|
||||
if (!eq_margin(ev.duration, RC5_BIT_START, RC5_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->rc5_bits <<= 1;
|
||||
if (!ev.pulse)
|
||||
data->rc5_bits |= 1;
|
||||
data->count++;
|
||||
data->prev_ev = ev;
|
||||
data->state = STATE_BIT_END;
|
||||
return 0;
|
||||
|
||||
case STATE_BIT_END:
|
||||
if (!is_transition(&ev, &data->prev_ev))
|
||||
break;
|
||||
|
||||
if (data->count == data->wanted_bits)
|
||||
data->state = STATE_FINISHED;
|
||||
else if (data->count == CHECK_RC5X_NBITS)
|
||||
data->state = STATE_CHECK_RC5X;
|
||||
else
|
||||
data->state = STATE_BIT_START;
|
||||
|
||||
decrease_duration(&ev, RC5_BIT_END);
|
||||
goto again;
|
||||
|
||||
case STATE_CHECK_RC5X:
|
||||
if (!ev.pulse && geq_margin(ev.duration, RC5X_SPACE, RC5_UNIT / 2)) {
|
||||
/* RC5X */
|
||||
data->wanted_bits = RC5X_NBITS;
|
||||
decrease_duration(&ev, RC5X_SPACE);
|
||||
} else {
|
||||
/* RC5 */
|
||||
data->wanted_bits = RC5_NBITS;
|
||||
}
|
||||
data->state = STATE_BIT_START;
|
||||
goto again;
|
||||
|
||||
case STATE_FINISHED:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (data->wanted_bits == RC5X_NBITS) {
|
||||
/* RC5X */
|
||||
u8 xdata, command, system;
|
||||
xdata = (data->rc5_bits & 0x0003F) >> 0;
|
||||
command = (data->rc5_bits & 0x00FC0) >> 6;
|
||||
system = (data->rc5_bits & 0x1F000) >> 12;
|
||||
toggle = (data->rc5_bits & 0x20000) ? 1 : 0;
|
||||
command += (data->rc5_bits & 0x01000) ? 0 : 0x40;
|
||||
scancode = system << 16 | command << 8 | xdata;
|
||||
|
||||
IR_dprintk(1, "RC5X scancode 0x%06x (toggle: %u)\n",
|
||||
scancode, toggle);
|
||||
|
||||
} else {
|
||||
/* RC5 */
|
||||
u8 command, system;
|
||||
command = (data->rc5_bits & 0x0003F) >> 0;
|
||||
system = (data->rc5_bits & 0x007C0) >> 6;
|
||||
toggle = (data->rc5_bits & 0x00800) ? 1 : 0;
|
||||
command += (data->rc5_bits & 0x01000) ? 0 : 0x40;
|
||||
scancode = system << 8 | command;
|
||||
|
||||
IR_dprintk(1, "RC5 scancode 0x%04x (toggle: %u)\n",
|
||||
scancode, toggle);
|
||||
}
|
||||
|
||||
ir_keydown(input_dev, scancode, toggle);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
out:
|
||||
IR_dprintk(1, "RC5(x) decode failed at state %i (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
data->state = STATE_INACTIVE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ir_rc5_register(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
struct decoder_data *data;
|
||||
int rc;
|
||||
|
||||
rc = sysfs_create_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
if (!data) {
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data->ir_dev = ir_dev;
|
||||
data->enabled = 1;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_add_tail(&data->list, &decoder_list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ir_rc5_unregister(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
static struct decoder_data *data;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_del(&data->list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ir_raw_handler rc5_handler = {
|
||||
.decode = ir_rc5_decode,
|
||||
.raw_register = ir_rc5_register,
|
||||
.raw_unregister = ir_rc5_unregister,
|
||||
};
|
||||
|
||||
static int __init ir_rc5_decode_init(void)
|
||||
{
|
||||
ir_raw_handler_register(&rc5_handler);
|
||||
|
||||
printk(KERN_INFO "IR RC5(x) protocol handler initialized\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ir_rc5_decode_exit(void)
|
||||
{
|
||||
ir_raw_handler_unregister(&rc5_handler);
|
||||
}
|
||||
|
||||
module_init(ir_rc5_decode_init);
|
||||
module_exit(ir_rc5_decode_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
||||
MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com)");
|
||||
MODULE_DESCRIPTION("RC5(x) IR protocol decoder");
|
419
drivers/media/IR/ir-rc6-decoder.c
Normal file
419
drivers/media/IR/ir-rc6-decoder.c
Normal file
@ -0,0 +1,419 @@
|
||||
/* ir-rc6-decoder.c - A decoder for the RC6 IR protocol
|
||||
*
|
||||
* Copyright (C) 2010 by David Härdeman <david@hardeman.nu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
/*
|
||||
* This decoder currently supports:
|
||||
* RC6-0-16 (standard toggle bit in header)
|
||||
* RC6-6A-24 (no toggle bit)
|
||||
* RC6-6A-32 (MCE version with toggle bit in body)
|
||||
*/
|
||||
|
||||
#define RC6_UNIT 444444 /* us */
|
||||
#define RC6_HEADER_NBITS 4 /* not including toggle bit */
|
||||
#define RC6_0_NBITS 16
|
||||
#define RC6_6A_SMALL_NBITS 24
|
||||
#define RC6_6A_LARGE_NBITS 32
|
||||
#define RC6_PREFIX_PULSE (6 * RC6_UNIT)
|
||||
#define RC6_PREFIX_SPACE (2 * RC6_UNIT)
|
||||
#define RC6_BIT_START (1 * RC6_UNIT)
|
||||
#define RC6_BIT_END (1 * RC6_UNIT)
|
||||
#define RC6_TOGGLE_START (2 * RC6_UNIT)
|
||||
#define RC6_TOGGLE_END (2 * RC6_UNIT)
|
||||
#define RC6_MODE_MASK 0x07 /* for the header bits */
|
||||
#define RC6_STARTBIT_MASK 0x08 /* for the header bits */
|
||||
#define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */
|
||||
|
||||
/* Used to register rc6_decoder clients */
|
||||
static LIST_HEAD(decoder_list);
|
||||
static DEFINE_SPINLOCK(decoder_lock);
|
||||
|
||||
enum rc6_mode {
|
||||
RC6_MODE_0,
|
||||
RC6_MODE_6A,
|
||||
RC6_MODE_UNKNOWN,
|
||||
};
|
||||
|
||||
enum rc6_state {
|
||||
STATE_INACTIVE,
|
||||
STATE_PREFIX_SPACE,
|
||||
STATE_HEADER_BIT_START,
|
||||
STATE_HEADER_BIT_END,
|
||||
STATE_TOGGLE_START,
|
||||
STATE_TOGGLE_END,
|
||||
STATE_BODY_BIT_START,
|
||||
STATE_BODY_BIT_END,
|
||||
STATE_FINISHED,
|
||||
};
|
||||
|
||||
struct decoder_data {
|
||||
struct list_head list;
|
||||
struct ir_input_dev *ir_dev;
|
||||
int enabled:1;
|
||||
|
||||
/* State machine control */
|
||||
enum rc6_state state;
|
||||
u8 header;
|
||||
u32 body;
|
||||
struct ir_raw_event prev_ev;
|
||||
bool toggle;
|
||||
unsigned count;
|
||||
unsigned wanted_bits;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get_decoder_data() - gets decoder data
|
||||
* @input_dev: input device
|
||||
*
|
||||
* Returns the struct decoder_data that corresponds to a device
|
||||
*/
|
||||
static struct decoder_data *get_decoder_data(struct ir_input_dev *ir_dev)
|
||||
{
|
||||
struct decoder_data *data = NULL;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_for_each_entry(data, &decoder_list, list) {
|
||||
if (data->ir_dev == ir_dev)
|
||||
break;
|
||||
}
|
||||
spin_unlock(&decoder_lock);
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t store_enabled(struct device *d,
|
||||
struct device_attribute *mattr,
|
||||
const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
unsigned long value;
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (strict_strtoul(buf, 10, &value) || value > 1)
|
||||
return -EINVAL;
|
||||
|
||||
data->enabled = value;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
static ssize_t show_enabled(struct device *d,
|
||||
struct device_attribute *mattr, char *buf)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (data->enabled)
|
||||
return sprintf(buf, "1\n");
|
||||
else
|
||||
return sprintf(buf, "0\n");
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(enabled, S_IRUGO | S_IWUSR, show_enabled, store_enabled);
|
||||
|
||||
static struct attribute *decoder_attributes[] = {
|
||||
&dev_attr_enabled.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group decoder_attribute_group = {
|
||||
.name = "rc6_decoder",
|
||||
.attrs = decoder_attributes,
|
||||
};
|
||||
|
||||
static enum rc6_mode rc6_mode(struct decoder_data *data) {
|
||||
switch (data->header & RC6_MODE_MASK) {
|
||||
case 0:
|
||||
return RC6_MODE_0;
|
||||
case 6:
|
||||
if (!data->toggle)
|
||||
return RC6_MODE_6A;
|
||||
/* fall through */
|
||||
default:
|
||||
return RC6_MODE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ir_rc6_decode() - Decode one RC6 pulse or space
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
* @ev: the struct ir_raw_event descriptor of the pulse/space
|
||||
*
|
||||
* This function returns -EINVAL if the pulse violates the state machine
|
||||
*/
|
||||
static int ir_rc6_decode(struct input_dev *input_dev, struct ir_raw_event ev)
|
||||
{
|
||||
struct decoder_data *data;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
u32 scancode;
|
||||
u8 toggle;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (!data->enabled)
|
||||
return 0;
|
||||
|
||||
if (IS_RESET(ev)) {
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2))
|
||||
goto out;
|
||||
|
||||
again:
|
||||
IR_dprintk(2, "RC6 decode started at state %i (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
|
||||
if (!geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2))
|
||||
return 0;
|
||||
|
||||
switch (data->state) {
|
||||
|
||||
case STATE_INACTIVE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
/* Note: larger margin on first pulse since each RC6_UNIT
|
||||
is quite short and some hardware takes some time to
|
||||
adjust to the signal */
|
||||
if (!eq_margin(ev.duration, RC6_PREFIX_PULSE, RC6_UNIT))
|
||||
break;
|
||||
|
||||
data->state = STATE_PREFIX_SPACE;
|
||||
data->count = 0;
|
||||
return 0;
|
||||
|
||||
case STATE_PREFIX_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, RC6_PREFIX_SPACE, RC6_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->state = STATE_HEADER_BIT_START;
|
||||
return 0;
|
||||
|
||||
case STATE_HEADER_BIT_START:
|
||||
if (!eq_margin(ev.duration, RC6_BIT_START, RC6_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->header <<= 1;
|
||||
if (ev.pulse)
|
||||
data->header |= 1;
|
||||
data->count++;
|
||||
data->prev_ev = ev;
|
||||
data->state = STATE_HEADER_BIT_END;
|
||||
return 0;
|
||||
|
||||
case STATE_HEADER_BIT_END:
|
||||
if (!is_transition(&ev, &data->prev_ev))
|
||||
break;
|
||||
|
||||
if (data->count == RC6_HEADER_NBITS)
|
||||
data->state = STATE_TOGGLE_START;
|
||||
else
|
||||
data->state = STATE_HEADER_BIT_START;
|
||||
|
||||
decrease_duration(&ev, RC6_BIT_END);
|
||||
goto again;
|
||||
|
||||
case STATE_TOGGLE_START:
|
||||
if (!eq_margin(ev.duration, RC6_TOGGLE_START, RC6_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->toggle = ev.pulse;
|
||||
data->prev_ev = ev;
|
||||
data->state = STATE_TOGGLE_END;
|
||||
return 0;
|
||||
|
||||
case STATE_TOGGLE_END:
|
||||
if (!is_transition(&ev, &data->prev_ev) ||
|
||||
!geq_margin(ev.duration, RC6_TOGGLE_END, RC6_UNIT / 2))
|
||||
break;
|
||||
|
||||
if (!(data->header & RC6_STARTBIT_MASK)) {
|
||||
IR_dprintk(1, "RC6 invalid start bit\n");
|
||||
break;
|
||||
}
|
||||
|
||||
data->state = STATE_BODY_BIT_START;
|
||||
data->prev_ev = ev;
|
||||
decrease_duration(&ev, RC6_TOGGLE_END);
|
||||
data->count = 0;
|
||||
|
||||
switch (rc6_mode(data)) {
|
||||
case RC6_MODE_0:
|
||||
data->wanted_bits = RC6_0_NBITS;
|
||||
break;
|
||||
case RC6_MODE_6A:
|
||||
/* This might look weird, but we basically
|
||||
check the value of the first body bit to
|
||||
determine the number of bits in mode 6A */
|
||||
if ((!ev.pulse && !geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2)) ||
|
||||
geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2))
|
||||
data->wanted_bits = RC6_6A_LARGE_NBITS;
|
||||
else
|
||||
data->wanted_bits = RC6_6A_SMALL_NBITS;
|
||||
break;
|
||||
default:
|
||||
IR_dprintk(1, "RC6 unknown mode\n");
|
||||
goto out;
|
||||
}
|
||||
goto again;
|
||||
|
||||
case STATE_BODY_BIT_START:
|
||||
if (!eq_margin(ev.duration, RC6_BIT_START, RC6_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->body <<= 1;
|
||||
if (ev.pulse)
|
||||
data->body |= 1;
|
||||
data->count++;
|
||||
data->prev_ev = ev;
|
||||
|
||||
data->state = STATE_BODY_BIT_END;
|
||||
return 0;
|
||||
|
||||
case STATE_BODY_BIT_END:
|
||||
if (!is_transition(&ev, &data->prev_ev))
|
||||
break;
|
||||
|
||||
if (data->count == data->wanted_bits)
|
||||
data->state = STATE_FINISHED;
|
||||
else
|
||||
data->state = STATE_BODY_BIT_START;
|
||||
|
||||
decrease_duration(&ev, RC6_BIT_END);
|
||||
goto again;
|
||||
|
||||
case STATE_FINISHED:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
switch (rc6_mode(data)) {
|
||||
case RC6_MODE_0:
|
||||
scancode = data->body & 0xffff;
|
||||
toggle = data->toggle;
|
||||
IR_dprintk(1, "RC6(0) scancode 0x%04x (toggle: %u)\n",
|
||||
scancode, toggle);
|
||||
break;
|
||||
case RC6_MODE_6A:
|
||||
if (data->wanted_bits == RC6_6A_LARGE_NBITS) {
|
||||
toggle = data->body & RC6_6A_MCE_TOGGLE_MASK ? 1 : 0;
|
||||
scancode = data->body & ~RC6_6A_MCE_TOGGLE_MASK;
|
||||
} else {
|
||||
toggle = 0;
|
||||
scancode = data->body & 0xffffff;
|
||||
}
|
||||
|
||||
IR_dprintk(1, "RC6(6A) scancode 0x%08x (toggle: %u)\n",
|
||||
scancode, toggle);
|
||||
break;
|
||||
default:
|
||||
IR_dprintk(1, "RC6 unknown mode\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ir_keydown(input_dev, scancode, toggle);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
out:
|
||||
IR_dprintk(1, "RC6 decode failed at state %i (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
data->state = STATE_INACTIVE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ir_rc6_register(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
struct decoder_data *data;
|
||||
int rc;
|
||||
|
||||
rc = sysfs_create_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
if (!data) {
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data->ir_dev = ir_dev;
|
||||
data->enabled = 1;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_add_tail(&data->list, &decoder_list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ir_rc6_unregister(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
static struct decoder_data *data;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_del(&data->list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ir_raw_handler rc6_handler = {
|
||||
.decode = ir_rc6_decode,
|
||||
.raw_register = ir_rc6_register,
|
||||
.raw_unregister = ir_rc6_unregister,
|
||||
};
|
||||
|
||||
static int __init ir_rc6_decode_init(void)
|
||||
{
|
||||
ir_raw_handler_register(&rc6_handler);
|
||||
|
||||
printk(KERN_INFO "IR RC6 protocol handler initialized\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ir_rc6_decode_exit(void)
|
||||
{
|
||||
ir_raw_handler_unregister(&rc6_handler);
|
||||
}
|
||||
|
||||
module_init(ir_rc6_decode_init);
|
||||
module_exit(ir_rc6_decode_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("David Härdeman <david@hardeman.nu>");
|
||||
MODULE_DESCRIPTION("RC6 IR protocol decoder");
|
312
drivers/media/IR/ir-sony-decoder.c
Normal file
312
drivers/media/IR/ir-sony-decoder.c
Normal file
@ -0,0 +1,312 @@
|
||||
/* ir-sony-decoder.c - handle Sony IR Pulse/Space protocol
|
||||
*
|
||||
* Copyright (C) 2010 by David Härdeman <david@hardeman.nu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/bitrev.h>
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
#define SONY_UNIT 600000 /* ns */
|
||||
#define SONY_HEADER_PULSE (4 * SONY_UNIT)
|
||||
#define SONY_HEADER_SPACE (1 * SONY_UNIT)
|
||||
#define SONY_BIT_0_PULSE (1 * SONY_UNIT)
|
||||
#define SONY_BIT_1_PULSE (2 * SONY_UNIT)
|
||||
#define SONY_BIT_SPACE (1 * SONY_UNIT)
|
||||
#define SONY_TRAILER_SPACE (10 * SONY_UNIT) /* minimum */
|
||||
|
||||
/* Used to register sony_decoder clients */
|
||||
static LIST_HEAD(decoder_list);
|
||||
static DEFINE_SPINLOCK(decoder_lock);
|
||||
|
||||
enum sony_state {
|
||||
STATE_INACTIVE,
|
||||
STATE_HEADER_SPACE,
|
||||
STATE_BIT_PULSE,
|
||||
STATE_BIT_SPACE,
|
||||
STATE_FINISHED,
|
||||
};
|
||||
|
||||
struct decoder_data {
|
||||
struct list_head list;
|
||||
struct ir_input_dev *ir_dev;
|
||||
int enabled:1;
|
||||
|
||||
/* State machine control */
|
||||
enum sony_state state;
|
||||
u32 sony_bits;
|
||||
unsigned count;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* get_decoder_data() - gets decoder data
|
||||
* @input_dev: input device
|
||||
*
|
||||
* Returns the struct decoder_data that corresponds to a device
|
||||
*/
|
||||
static struct decoder_data *get_decoder_data(struct ir_input_dev *ir_dev)
|
||||
{
|
||||
struct decoder_data *data = NULL;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_for_each_entry(data, &decoder_list, list) {
|
||||
if (data->ir_dev == ir_dev)
|
||||
break;
|
||||
}
|
||||
spin_unlock(&decoder_lock);
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t store_enabled(struct device *d,
|
||||
struct device_attribute *mattr,
|
||||
const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
unsigned long value;
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (strict_strtoul(buf, 10, &value) || value > 1)
|
||||
return -EINVAL;
|
||||
|
||||
data->enabled = value;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
static ssize_t show_enabled(struct device *d,
|
||||
struct device_attribute *mattr, char *buf)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
struct decoder_data *data = get_decoder_data(ir_dev);
|
||||
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (data->enabled)
|
||||
return sprintf(buf, "1\n");
|
||||
else
|
||||
return sprintf(buf, "0\n");
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(enabled, S_IRUGO | S_IWUSR, show_enabled, store_enabled);
|
||||
|
||||
static struct attribute *decoder_attributes[] = {
|
||||
&dev_attr_enabled.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group decoder_attribute_group = {
|
||||
.name = "sony_decoder",
|
||||
.attrs = decoder_attributes,
|
||||
};
|
||||
|
||||
/**
|
||||
* ir_sony_decode() - Decode one Sony pulse or space
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
* @ev: the struct ir_raw_event descriptor of the pulse/space
|
||||
*
|
||||
* This function returns -EINVAL if the pulse violates the state machine
|
||||
*/
|
||||
static int ir_sony_decode(struct input_dev *input_dev, struct ir_raw_event ev)
|
||||
{
|
||||
struct decoder_data *data;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
u32 scancode;
|
||||
u8 device, subdevice, function;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
if (!data->enabled)
|
||||
return 0;
|
||||
|
||||
if (IS_RESET(ev)) {
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!geq_margin(ev.duration, SONY_UNIT, SONY_UNIT / 2))
|
||||
goto out;
|
||||
|
||||
IR_dprintk(2, "Sony decode started at state %d (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
|
||||
switch (data->state) {
|
||||
|
||||
case STATE_INACTIVE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, SONY_HEADER_PULSE, SONY_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->count = 0;
|
||||
data->state = STATE_HEADER_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_HEADER_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (!eq_margin(ev.duration, SONY_HEADER_SPACE, SONY_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->state = STATE_BIT_PULSE;
|
||||
return 0;
|
||||
|
||||
case STATE_BIT_PULSE:
|
||||
if (!ev.pulse)
|
||||
break;
|
||||
|
||||
data->sony_bits <<= 1;
|
||||
if (eq_margin(ev.duration, SONY_BIT_1_PULSE, SONY_UNIT / 2))
|
||||
data->sony_bits |= 1;
|
||||
else if (!eq_margin(ev.duration, SONY_BIT_0_PULSE, SONY_UNIT / 2))
|
||||
break;
|
||||
|
||||
data->count++;
|
||||
data->state = STATE_BIT_SPACE;
|
||||
return 0;
|
||||
|
||||
case STATE_BIT_SPACE:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (!geq_margin(ev.duration, SONY_BIT_SPACE, SONY_UNIT / 2))
|
||||
break;
|
||||
|
||||
decrease_duration(&ev, SONY_BIT_SPACE);
|
||||
|
||||
if (!geq_margin(ev.duration, SONY_UNIT, SONY_UNIT / 2)) {
|
||||
data->state = STATE_BIT_PULSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
data->state = STATE_FINISHED;
|
||||
/* Fall through */
|
||||
|
||||
case STATE_FINISHED:
|
||||
if (ev.pulse)
|
||||
break;
|
||||
|
||||
if (!geq_margin(ev.duration, SONY_TRAILER_SPACE, SONY_UNIT / 2))
|
||||
break;
|
||||
|
||||
switch (data->count) {
|
||||
case 12:
|
||||
device = bitrev8((data->sony_bits << 3) & 0xF8);
|
||||
subdevice = 0;
|
||||
function = bitrev8((data->sony_bits >> 4) & 0xFE);
|
||||
break;
|
||||
case 15:
|
||||
device = bitrev8((data->sony_bits >> 0) & 0xFF);
|
||||
subdevice = 0;
|
||||
function = bitrev8((data->sony_bits >> 7) & 0xFD);
|
||||
break;
|
||||
case 20:
|
||||
device = bitrev8((data->sony_bits >> 5) & 0xF8);
|
||||
subdevice = bitrev8((data->sony_bits >> 0) & 0xFF);
|
||||
function = bitrev8((data->sony_bits >> 12) & 0xFE);
|
||||
break;
|
||||
default:
|
||||
IR_dprintk(1, "Sony invalid bitcount %u\n", data->count);
|
||||
goto out;
|
||||
}
|
||||
|
||||
scancode = device << 16 | subdevice << 8 | function;
|
||||
IR_dprintk(1, "Sony(%u) scancode 0x%05x\n", data->count, scancode);
|
||||
ir_keydown(input_dev, scancode, 0);
|
||||
data->state = STATE_INACTIVE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
out:
|
||||
IR_dprintk(1, "Sony decode failed at state %d (%uus %s)\n",
|
||||
data->state, TO_US(ev.duration), TO_STR(ev.pulse));
|
||||
data->state = STATE_INACTIVE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ir_sony_register(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
struct decoder_data *data;
|
||||
int rc;
|
||||
|
||||
rc = sysfs_create_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
data = kzalloc(sizeof(*data), GFP_KERNEL);
|
||||
if (!data) {
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data->ir_dev = ir_dev;
|
||||
data->enabled = 1;
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_add_tail(&data->list, &decoder_list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ir_sony_unregister(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
static struct decoder_data *data;
|
||||
|
||||
data = get_decoder_data(ir_dev);
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
sysfs_remove_group(&ir_dev->dev.kobj, &decoder_attribute_group);
|
||||
|
||||
spin_lock(&decoder_lock);
|
||||
list_del(&data->list);
|
||||
spin_unlock(&decoder_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ir_raw_handler sony_handler = {
|
||||
.decode = ir_sony_decode,
|
||||
.raw_register = ir_sony_register,
|
||||
.raw_unregister = ir_sony_unregister,
|
||||
};
|
||||
|
||||
static int __init ir_sony_decode_init(void)
|
||||
{
|
||||
ir_raw_handler_register(&sony_handler);
|
||||
|
||||
printk(KERN_INFO "IR Sony protocol handler initialized\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ir_sony_decode_exit(void)
|
||||
{
|
||||
ir_raw_handler_unregister(&sony_handler);
|
||||
}
|
||||
|
||||
module_init(ir_sony_decode_init);
|
||||
module_exit(ir_sony_decode_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("David Härdeman <david@hardeman.nu>");
|
||||
MODULE_DESCRIPTION("Sony IR protocol decoder");
|
@ -1,6 +1,6 @@
|
||||
/* ir-register.c - handle IR scancode->keycode tables
|
||||
/* ir-sysfs.c - sysfs interface for RC devices (/sys/class/rc)
|
||||
*
|
||||
* Copyright (C) 2009 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
* Copyright (C) 2009-2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -15,15 +15,23 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/device.h>
|
||||
#include <media/ir-core.h>
|
||||
#include "ir-core-priv.h"
|
||||
|
||||
#define IRRCV_NUM_DEVICES 256
|
||||
|
||||
/* bit array to represent IR sysfs device number */
|
||||
static unsigned long ir_core_dev_number;
|
||||
|
||||
/* class for /sys/class/irrcv */
|
||||
static struct class *ir_input_class;
|
||||
/* class for /sys/class/rc */
|
||||
static char *ir_devnode(struct device *dev, mode_t *mode)
|
||||
{
|
||||
return kasprintf(GFP_KERNEL, "rc/%s", dev_name(dev));
|
||||
}
|
||||
|
||||
static struct class ir_input_class = {
|
||||
.name = "rc",
|
||||
.devnode = ir_devnode,
|
||||
};
|
||||
|
||||
/**
|
||||
* show_protocol() - shows the current IR protocol
|
||||
@ -32,7 +40,7 @@ static struct class *ir_input_class;
|
||||
* @buf: a pointer to the output buffer
|
||||
*
|
||||
* This routine is a callback routine for input read the IR protocol type.
|
||||
* it is trigged by reading /sys/class/irrcv/irrcv?/current_protocol.
|
||||
* it is trigged by reading /sys/class/rc/rc?/current_protocol.
|
||||
* It returns the protocol name, as understood by the driver.
|
||||
*/
|
||||
static ssize_t show_protocol(struct device *d,
|
||||
@ -48,13 +56,17 @@ static ssize_t show_protocol(struct device *d,
|
||||
if (ir_type == IR_TYPE_UNKNOWN)
|
||||
s = "Unknown";
|
||||
else if (ir_type == IR_TYPE_RC5)
|
||||
s = "RC-5";
|
||||
else if (ir_type == IR_TYPE_PD)
|
||||
s = "Pulse/distance";
|
||||
s = "rc-5";
|
||||
else if (ir_type == IR_TYPE_NEC)
|
||||
s = "NEC";
|
||||
s = "nec";
|
||||
else if (ir_type == IR_TYPE_RC6)
|
||||
s = "rc6";
|
||||
else if (ir_type == IR_TYPE_JVC)
|
||||
s = "jvc";
|
||||
else if (ir_type == IR_TYPE_SONY)
|
||||
s = "sony";
|
||||
else
|
||||
s = "Other";
|
||||
s = "other";
|
||||
|
||||
return sprintf(buf, "%s\n", s);
|
||||
}
|
||||
@ -67,7 +79,7 @@ static ssize_t show_protocol(struct device *d,
|
||||
* @len: length of the input buffer
|
||||
*
|
||||
* This routine is a callback routine for changing the IR protocol type.
|
||||
* it is trigged by reading /sys/class/irrcv/irrcv?/current_protocol.
|
||||
* it is trigged by reading /sys/class/rc/rc?/current_protocol.
|
||||
* It changes the IR the protocol name, if the IR type is recognized
|
||||
* by the driver.
|
||||
* If an unknown protocol name is used, returns -EINVAL.
|
||||
@ -78,23 +90,24 @@ static ssize_t store_protocol(struct device *d,
|
||||
size_t len)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
u64 ir_type = IR_TYPE_UNKNOWN;
|
||||
u64 ir_type = 0;
|
||||
int rc = -EINVAL;
|
||||
unsigned long flags;
|
||||
char *buf;
|
||||
|
||||
buf = strsep((char **) &data, "\n");
|
||||
while ((buf = strsep((char **) &data, " \n")) != NULL) {
|
||||
if (!strcasecmp(buf, "rc-5") || !strcasecmp(buf, "rc5"))
|
||||
ir_type |= IR_TYPE_RC5;
|
||||
if (!strcasecmp(buf, "nec"))
|
||||
ir_type |= IR_TYPE_NEC;
|
||||
if (!strcasecmp(buf, "jvc"))
|
||||
ir_type |= IR_TYPE_JVC;
|
||||
if (!strcasecmp(buf, "sony"))
|
||||
ir_type |= IR_TYPE_SONY;
|
||||
}
|
||||
|
||||
if (!strcasecmp(buf, "rc-5"))
|
||||
ir_type = IR_TYPE_RC5;
|
||||
else if (!strcasecmp(buf, "pd"))
|
||||
ir_type = IR_TYPE_PD;
|
||||
else if (!strcasecmp(buf, "nec"))
|
||||
ir_type = IR_TYPE_NEC;
|
||||
|
||||
if (ir_type == IR_TYPE_UNKNOWN) {
|
||||
IR_dprintk(1, "Error setting protocol to %lld\n",
|
||||
(long long)ir_type);
|
||||
if (!ir_type) {
|
||||
IR_dprintk(1, "Unknown protocol\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -112,25 +125,87 @@ static ssize_t store_protocol(struct device *d,
|
||||
ir_dev->rc_tab.ir_type = ir_type;
|
||||
spin_unlock_irqrestore(&ir_dev->rc_tab.lock, flags);
|
||||
|
||||
IR_dprintk(1, "Current protocol is %lld\n",
|
||||
IR_dprintk(1, "Current protocol(s) is(are) %lld\n",
|
||||
(long long)ir_type);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
static ssize_t show_supported_protocols(struct device *d,
|
||||
struct device_attribute *mattr, char *buf)
|
||||
{
|
||||
char *orgbuf = buf;
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(d);
|
||||
|
||||
/* FIXME: doesn't support multiple protocols at the same time */
|
||||
if (ir_dev->props->allowed_protos == IR_TYPE_UNKNOWN)
|
||||
buf += sprintf(buf, "unknown ");
|
||||
if (ir_dev->props->allowed_protos & IR_TYPE_RC5)
|
||||
buf += sprintf(buf, "rc-5 ");
|
||||
if (ir_dev->props->allowed_protos & IR_TYPE_NEC)
|
||||
buf += sprintf(buf, "nec ");
|
||||
if (buf == orgbuf)
|
||||
buf += sprintf(buf, "other ");
|
||||
|
||||
buf += sprintf(buf - 1, "\n");
|
||||
|
||||
return buf - orgbuf;
|
||||
}
|
||||
|
||||
#define ADD_HOTPLUG_VAR(fmt, val...) \
|
||||
do { \
|
||||
int err = add_uevent_var(env, fmt, val); \
|
||||
if (err) \
|
||||
return err; \
|
||||
} while (0)
|
||||
|
||||
static int ir_dev_uevent(struct device *device, struct kobj_uevent_env *env)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = dev_get_drvdata(device);
|
||||
|
||||
if (ir_dev->rc_tab.name)
|
||||
ADD_HOTPLUG_VAR("NAME=%s", ir_dev->rc_tab.name);
|
||||
if (ir_dev->driver_name)
|
||||
ADD_HOTPLUG_VAR("DRV_NAME=%s", ir_dev->driver_name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Static device attribute struct with the sysfs attributes for IR's
|
||||
*/
|
||||
static DEVICE_ATTR(current_protocol, S_IRUGO | S_IWUSR,
|
||||
static DEVICE_ATTR(protocol, S_IRUGO | S_IWUSR,
|
||||
show_protocol, store_protocol);
|
||||
|
||||
static struct attribute *ir_dev_attrs[] = {
|
||||
&dev_attr_current_protocol.attr,
|
||||
static DEVICE_ATTR(supported_protocols, S_IRUGO | S_IWUSR,
|
||||
show_supported_protocols, NULL);
|
||||
|
||||
static struct attribute *ir_hw_dev_attrs[] = {
|
||||
&dev_attr_protocol.attr,
|
||||
&dev_attr_supported_protocols.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group ir_hw_dev_attr_grp = {
|
||||
.attrs = ir_hw_dev_attrs,
|
||||
};
|
||||
|
||||
static const struct attribute_group *ir_hw_dev_attr_groups[] = {
|
||||
&ir_hw_dev_attr_grp,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct device_type rc_dev_type = {
|
||||
.groups = ir_hw_dev_attr_groups,
|
||||
.uevent = ir_dev_uevent,
|
||||
};
|
||||
|
||||
static struct device_type ir_raw_dev_type = {
|
||||
.uevent = ir_dev_uevent,
|
||||
};
|
||||
|
||||
/**
|
||||
* ir_register_class() - creates the sysfs for /sys/class/irrcv/irrcv?
|
||||
* ir_register_class() - creates the sysfs for /sys/class/rc/rc?
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
*
|
||||
* This routine is used to register the syfs code for IR class
|
||||
@ -138,8 +213,7 @@ static struct attribute *ir_dev_attrs[] = {
|
||||
int ir_register_class(struct input_dev *input_dev)
|
||||
{
|
||||
int rc;
|
||||
struct kobject *kobj;
|
||||
|
||||
const char *path;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
int devno = find_first_zero_bit(&ir_core_dev_number,
|
||||
IRRCV_NUM_DEVICES);
|
||||
@ -147,19 +221,36 @@ int ir_register_class(struct input_dev *input_dev)
|
||||
if (unlikely(devno < 0))
|
||||
return devno;
|
||||
|
||||
ir_dev->attr.attrs = ir_dev_attrs;
|
||||
ir_dev->class_dev = device_create(ir_input_class, NULL,
|
||||
input_dev->dev.devt, ir_dev,
|
||||
"irrcv%d", devno);
|
||||
kobj = &ir_dev->class_dev->kobj;
|
||||
if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE)
|
||||
ir_dev->dev.type = &rc_dev_type;
|
||||
else
|
||||
ir_dev->dev.type = &ir_raw_dev_type;
|
||||
|
||||
printk(KERN_WARNING "Creating IR device %s\n", kobject_name(kobj));
|
||||
rc = sysfs_create_group(kobj, &ir_dev->attr);
|
||||
if (unlikely(rc < 0)) {
|
||||
device_destroy(ir_input_class, input_dev->dev.devt);
|
||||
return -ENOMEM;
|
||||
ir_dev->dev.class = &ir_input_class;
|
||||
ir_dev->dev.parent = input_dev->dev.parent;
|
||||
dev_set_name(&ir_dev->dev, "rc%d", devno);
|
||||
dev_set_drvdata(&ir_dev->dev, ir_dev);
|
||||
rc = device_register(&ir_dev->dev);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
||||
input_dev->dev.parent = &ir_dev->dev;
|
||||
rc = input_register_device(input_dev);
|
||||
if (rc < 0) {
|
||||
device_del(&ir_dev->dev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
__module_get(THIS_MODULE);
|
||||
|
||||
path = kobject_get_path(&ir_dev->dev.kobj, GFP_KERNEL);
|
||||
printk(KERN_INFO "%s: %s as %s\n",
|
||||
dev_name(&ir_dev->dev),
|
||||
input_dev->name ? input_dev->name : "Unspecified device",
|
||||
path ? path : "N/A");
|
||||
kfree(path);
|
||||
|
||||
ir_dev->devno = devno;
|
||||
set_bit(devno, &ir_core_dev_number);
|
||||
|
||||
@ -168,7 +259,7 @@ int ir_register_class(struct input_dev *input_dev)
|
||||
|
||||
/**
|
||||
* ir_unregister_class() - removes the sysfs for sysfs for
|
||||
* /sys/class/irrcv/irrcv?
|
||||
* /sys/class/rc/rc?
|
||||
* @input_dev: the struct input_dev descriptor of the device
|
||||
*
|
||||
* This routine is used to unregister the syfs code for IR class
|
||||
@ -176,36 +267,35 @@ int ir_register_class(struct input_dev *input_dev)
|
||||
void ir_unregister_class(struct input_dev *input_dev)
|
||||
{
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(input_dev);
|
||||
struct kobject *kobj;
|
||||
|
||||
clear_bit(ir_dev->devno, &ir_core_dev_number);
|
||||
input_unregister_device(input_dev);
|
||||
device_del(&ir_dev->dev);
|
||||
|
||||
kobj = &ir_dev->class_dev->kobj;
|
||||
|
||||
sysfs_remove_group(kobj, &ir_dev->attr);
|
||||
device_destroy(ir_input_class, input_dev->dev.devt);
|
||||
|
||||
kfree(ir_dev->attr.name);
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Init/exit code for the module. Basically, creates/removes /sys/class/irrcv
|
||||
* Init/exit code for the module. Basically, creates/removes /sys/class/rc
|
||||
*/
|
||||
|
||||
static int __init ir_core_init(void)
|
||||
{
|
||||
ir_input_class = class_create(THIS_MODULE, "irrcv");
|
||||
if (IS_ERR(ir_input_class)) {
|
||||
printk(KERN_ERR "ir_core: unable to register irrcv class\n");
|
||||
return PTR_ERR(ir_input_class);
|
||||
int rc = class_register(&ir_input_class);
|
||||
if (rc) {
|
||||
printk(KERN_ERR "ir_core: unable to register rc class\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Initialize/load the decoders/keymap code that will be used */
|
||||
ir_raw_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ir_core_exit(void)
|
||||
{
|
||||
class_destroy(ir_input_class);
|
||||
class_unregister(&ir_input_class);
|
||||
}
|
||||
|
||||
module_init(ir_core_init);
|
||||
|
15
drivers/media/IR/keymaps/Kconfig
Normal file
15
drivers/media/IR/keymaps/Kconfig
Normal file
@ -0,0 +1,15 @@
|
||||
config RC_MAP
|
||||
tristate "Compile Remote Controller keymap modules"
|
||||
depends on IR_CORE
|
||||
default y
|
||||
|
||||
---help---
|
||||
This option enables the compilation of lots of Remote
|
||||
Controller tables. They are short tables, but if you
|
||||
don't use a remote controller, or prefer to load the
|
||||
tables on userspace, you should disable it.
|
||||
|
||||
The ir-keytable program, available at v4l-utils package
|
||||
provide the tool and the same RC maps for load from
|
||||
userspace. Its available at
|
||||
http://git.linuxtv.org/v4l-utils
|
67
drivers/media/IR/keymaps/Makefile
Normal file
67
drivers/media/IR/keymaps/Makefile
Normal file
@ -0,0 +1,67 @@
|
||||
obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
|
||||
rc-apac-viewcomp.o \
|
||||
rc-asus-pc39.o \
|
||||
rc-ati-tv-wonder-hd-600.o \
|
||||
rc-avermedia-a16d.o \
|
||||
rc-avermedia.o \
|
||||
rc-avermedia-cardbus.o \
|
||||
rc-avermedia-dvbt.o \
|
||||
rc-avermedia-m135a-rm-jx.o \
|
||||
rc-avertv-303.o \
|
||||
rc-behold.o \
|
||||
rc-behold-columbus.o \
|
||||
rc-budget-ci-old.o \
|
||||
rc-cinergy-1400.o \
|
||||
rc-cinergy.o \
|
||||
rc-dm1105-nec.o \
|
||||
rc-dntv-live-dvb-t.o \
|
||||
rc-dntv-live-dvbt-pro.o \
|
||||
rc-empty.o \
|
||||
rc-em-terratec.o \
|
||||
rc-encore-enltv2.o \
|
||||
rc-encore-enltv.o \
|
||||
rc-encore-enltv-fm53.o \
|
||||
rc-evga-indtube.o \
|
||||
rc-eztv.o \
|
||||
rc-flydvb.o \
|
||||
rc-flyvideo.o \
|
||||
rc-fusionhdtv-mce.o \
|
||||
rc-gadmei-rm008z.o \
|
||||
rc-genius-tvgo-a11mce.o \
|
||||
rc-gotview7135.o \
|
||||
rc-hauppauge-new.o \
|
||||
rc-imon-mce.o \
|
||||
rc-imon-pad.o \
|
||||
rc-iodata-bctv7e.o \
|
||||
rc-kaiomy.o \
|
||||
rc-kworld-315u.o \
|
||||
rc-kworld-plus-tv-analog.o \
|
||||
rc-manli.o \
|
||||
rc-msi-tvanywhere.o \
|
||||
rc-msi-tvanywhere-plus.o \
|
||||
rc-nebula.o \
|
||||
rc-nec-terratec-cinergy-xs.o \
|
||||
rc-norwood.o \
|
||||
rc-npgtech.o \
|
||||
rc-pctv-sedna.o \
|
||||
rc-pinnacle-color.o \
|
||||
rc-pinnacle-grey.o \
|
||||
rc-pinnacle-pctv-hd.o \
|
||||
rc-pixelview.o \
|
||||
rc-pixelview-mk12.o \
|
||||
rc-pixelview-new.o \
|
||||
rc-powercolor-real-angel.o \
|
||||
rc-proteus-2309.o \
|
||||
rc-purpletv.o \
|
||||
rc-pv951.o \
|
||||
rc-rc5-hauppauge-new.o \
|
||||
rc-rc5-tv.o \
|
||||
rc-real-audio-220-32-keys.o \
|
||||
rc-tbs-nec.o \
|
||||
rc-terratec-cinergy-xs.o \
|
||||
rc-tevii-nec.o \
|
||||
rc-tt-1500.o \
|
||||
rc-videomate-s350.o \
|
||||
rc-videomate-tv-pvr.o \
|
||||
rc-winfast.o \
|
||||
rc-winfast-usbii-deluxe.o
|
89
drivers/media/IR/keymaps/rc-adstech-dvb-t-pci.c
Normal file
89
drivers/media/IR/keymaps/rc-adstech-dvb-t-pci.c
Normal file
@ -0,0 +1,89 @@
|
||||
/* adstech-dvb-t-pci.h - Keytable for adstech_dvb_t_pci Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* ADS Tech Instant TV DVB-T PCI Remote */
|
||||
|
||||
static struct ir_scancode adstech_dvb_t_pci[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x4d, KEY_0 },
|
||||
{ 0x57, KEY_1 },
|
||||
{ 0x4f, KEY_2 },
|
||||
{ 0x53, KEY_3 },
|
||||
{ 0x56, KEY_4 },
|
||||
{ 0x4e, KEY_5 },
|
||||
{ 0x5e, KEY_6 },
|
||||
{ 0x54, KEY_7 },
|
||||
{ 0x4c, KEY_8 },
|
||||
{ 0x5c, KEY_9 },
|
||||
|
||||
{ 0x5b, KEY_POWER },
|
||||
{ 0x5f, KEY_MUTE },
|
||||
{ 0x55, KEY_GOTO },
|
||||
{ 0x5d, KEY_SEARCH },
|
||||
{ 0x17, KEY_EPG }, /* Guide */
|
||||
{ 0x1f, KEY_MENU },
|
||||
{ 0x0f, KEY_UP },
|
||||
{ 0x46, KEY_DOWN },
|
||||
{ 0x16, KEY_LEFT },
|
||||
{ 0x1e, KEY_RIGHT },
|
||||
{ 0x0e, KEY_SELECT }, /* Enter */
|
||||
{ 0x5a, KEY_INFO },
|
||||
{ 0x52, KEY_EXIT },
|
||||
{ 0x59, KEY_PREVIOUS },
|
||||
{ 0x51, KEY_NEXT },
|
||||
{ 0x58, KEY_REWIND },
|
||||
{ 0x50, KEY_FORWARD },
|
||||
{ 0x44, KEY_PLAYPAUSE },
|
||||
{ 0x07, KEY_STOP },
|
||||
{ 0x1b, KEY_RECORD },
|
||||
{ 0x13, KEY_TUNER }, /* Live */
|
||||
{ 0x0a, KEY_A },
|
||||
{ 0x12, KEY_B },
|
||||
{ 0x03, KEY_PROG1 }, /* 1 */
|
||||
{ 0x01, KEY_PROG2 }, /* 2 */
|
||||
{ 0x00, KEY_PROG3 }, /* 3 */
|
||||
{ 0x06, KEY_DVD },
|
||||
{ 0x48, KEY_AUX }, /* Photo */
|
||||
{ 0x40, KEY_VIDEO },
|
||||
{ 0x19, KEY_AUDIO }, /* Music */
|
||||
{ 0x0b, KEY_CHANNELUP },
|
||||
{ 0x08, KEY_CHANNELDOWN },
|
||||
{ 0x15, KEY_VOLUMEUP },
|
||||
{ 0x1c, KEY_VOLUMEDOWN },
|
||||
};
|
||||
|
||||
static struct rc_keymap adstech_dvb_t_pci_map = {
|
||||
.map = {
|
||||
.scan = adstech_dvb_t_pci,
|
||||
.size = ARRAY_SIZE(adstech_dvb_t_pci),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_ADSTECH_DVB_T_PCI,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_adstech_dvb_t_pci(void)
|
||||
{
|
||||
return ir_register_map(&adstech_dvb_t_pci_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_adstech_dvb_t_pci(void)
|
||||
{
|
||||
ir_unregister_map(&adstech_dvb_t_pci_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_adstech_dvb_t_pci)
|
||||
module_exit(exit_rc_map_adstech_dvb_t_pci)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
80
drivers/media/IR/keymaps/rc-apac-viewcomp.c
Normal file
80
drivers/media/IR/keymaps/rc-apac-viewcomp.c
Normal file
@ -0,0 +1,80 @@
|
||||
/* apac-viewcomp.h - Keytable for apac_viewcomp Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Attila Kondoros <attila.kondoros@chello.hu> */
|
||||
|
||||
static struct ir_scancode apac_viewcomp[] = {
|
||||
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x17, KEY_LAST }, /* +100 */
|
||||
{ 0x0a, KEY_LIST }, /* recall */
|
||||
|
||||
|
||||
{ 0x1c, KEY_TUNER }, /* TV/FM */
|
||||
{ 0x15, KEY_SEARCH }, /* scan */
|
||||
{ 0x12, KEY_POWER }, /* power */
|
||||
{ 0x1f, KEY_VOLUMEDOWN }, /* vol up */
|
||||
{ 0x1b, KEY_VOLUMEUP }, /* vol down */
|
||||
{ 0x1e, KEY_CHANNELDOWN }, /* chn up */
|
||||
{ 0x1a, KEY_CHANNELUP }, /* chn down */
|
||||
|
||||
{ 0x11, KEY_VIDEO }, /* video */
|
||||
{ 0x0f, KEY_ZOOM }, /* full screen */
|
||||
{ 0x13, KEY_MUTE }, /* mute/unmute */
|
||||
{ 0x10, KEY_TEXT }, /* min */
|
||||
|
||||
{ 0x0d, KEY_STOP }, /* freeze */
|
||||
{ 0x0e, KEY_RECORD }, /* record */
|
||||
{ 0x1d, KEY_PLAYPAUSE }, /* stop */
|
||||
{ 0x19, KEY_PLAY }, /* play */
|
||||
|
||||
{ 0x16, KEY_GOTO }, /* osd */
|
||||
{ 0x14, KEY_REFRESH }, /* default */
|
||||
{ 0x0c, KEY_KPPLUS }, /* fine tune >>>> */
|
||||
{ 0x18, KEY_KPMINUS }, /* fine tune <<<< */
|
||||
};
|
||||
|
||||
static struct rc_keymap apac_viewcomp_map = {
|
||||
.map = {
|
||||
.scan = apac_viewcomp,
|
||||
.size = ARRAY_SIZE(apac_viewcomp),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_APAC_VIEWCOMP,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_apac_viewcomp(void)
|
||||
{
|
||||
return ir_register_map(&apac_viewcomp_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_apac_viewcomp(void)
|
||||
{
|
||||
ir_unregister_map(&apac_viewcomp_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_apac_viewcomp)
|
||||
module_exit(exit_rc_map_apac_viewcomp)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
91
drivers/media/IR/keymaps/rc-asus-pc39.c
Normal file
91
drivers/media/IR/keymaps/rc-asus-pc39.c
Normal file
@ -0,0 +1,91 @@
|
||||
/* asus-pc39.h - Keytable for asus_pc39 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* Marc Fargas <telenieko@telenieko.com>
|
||||
* this is the remote control that comes with the asus p7131
|
||||
* which has a label saying is "Model PC-39"
|
||||
*/
|
||||
|
||||
static struct ir_scancode asus_pc39[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x15, KEY_0 },
|
||||
{ 0x29, KEY_1 },
|
||||
{ 0x2d, KEY_2 },
|
||||
{ 0x2b, KEY_3 },
|
||||
{ 0x09, KEY_4 },
|
||||
{ 0x0d, KEY_5 },
|
||||
{ 0x0b, KEY_6 },
|
||||
{ 0x31, KEY_7 },
|
||||
{ 0x35, KEY_8 },
|
||||
{ 0x33, KEY_9 },
|
||||
|
||||
{ 0x3e, KEY_RADIO }, /* radio */
|
||||
{ 0x03, KEY_MENU }, /* dvd/menu */
|
||||
{ 0x2a, KEY_VOLUMEUP },
|
||||
{ 0x19, KEY_VOLUMEDOWN },
|
||||
{ 0x37, KEY_UP },
|
||||
{ 0x3b, KEY_DOWN },
|
||||
{ 0x27, KEY_LEFT },
|
||||
{ 0x2f, KEY_RIGHT },
|
||||
{ 0x25, KEY_VIDEO }, /* video */
|
||||
{ 0x39, KEY_AUDIO }, /* music */
|
||||
|
||||
{ 0x21, KEY_TV }, /* tv */
|
||||
{ 0x1d, KEY_EXIT }, /* back */
|
||||
{ 0x0a, KEY_CHANNELUP }, /* channel / program + */
|
||||
{ 0x1b, KEY_CHANNELDOWN }, /* channel / program - */
|
||||
{ 0x1a, KEY_ENTER }, /* enter */
|
||||
|
||||
{ 0x06, KEY_PAUSE }, /* play/pause */
|
||||
{ 0x1e, KEY_PREVIOUS }, /* rew */
|
||||
{ 0x26, KEY_NEXT }, /* forward */
|
||||
{ 0x0e, KEY_REWIND }, /* backward << */
|
||||
{ 0x3a, KEY_FASTFORWARD }, /* forward >> */
|
||||
{ 0x36, KEY_STOP },
|
||||
{ 0x2e, KEY_RECORD }, /* recording */
|
||||
{ 0x16, KEY_POWER }, /* the button that reads "close" */
|
||||
|
||||
{ 0x11, KEY_ZOOM }, /* full screen */
|
||||
{ 0x13, KEY_MACRO }, /* recall */
|
||||
{ 0x23, KEY_HOME }, /* home */
|
||||
{ 0x05, KEY_PVR }, /* picture */
|
||||
{ 0x3d, KEY_MUTE }, /* mute */
|
||||
{ 0x01, KEY_DVD }, /* dvd */
|
||||
};
|
||||
|
||||
static struct rc_keymap asus_pc39_map = {
|
||||
.map = {
|
||||
.scan = asus_pc39,
|
||||
.size = ARRAY_SIZE(asus_pc39),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_ASUS_PC39,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_asus_pc39(void)
|
||||
{
|
||||
return ir_register_map(&asus_pc39_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_asus_pc39(void)
|
||||
{
|
||||
ir_unregister_map(&asus_pc39_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_asus_pc39)
|
||||
module_exit(exit_rc_map_asus_pc39)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
69
drivers/media/IR/keymaps/rc-ati-tv-wonder-hd-600.c
Normal file
69
drivers/media/IR/keymaps/rc-ati-tv-wonder-hd-600.c
Normal file
@ -0,0 +1,69 @@
|
||||
/* ati-tv-wonder-hd-600.h - Keytable for ati_tv_wonder_hd_600 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* ATI TV Wonder HD 600 USB
|
||||
Devin Heitmueller <devin.heitmueller@gmail.com>
|
||||
*/
|
||||
|
||||
static struct ir_scancode ati_tv_wonder_hd_600[] = {
|
||||
{ 0x00, KEY_RECORD}, /* Row 1 */
|
||||
{ 0x01, KEY_PLAYPAUSE},
|
||||
{ 0x02, KEY_STOP},
|
||||
{ 0x03, KEY_POWER},
|
||||
{ 0x04, KEY_PREVIOUS}, /* Row 2 */
|
||||
{ 0x05, KEY_REWIND},
|
||||
{ 0x06, KEY_FORWARD},
|
||||
{ 0x07, KEY_NEXT},
|
||||
{ 0x08, KEY_EPG}, /* Row 3 */
|
||||
{ 0x09, KEY_HOME},
|
||||
{ 0x0a, KEY_MENU},
|
||||
{ 0x0b, KEY_CHANNELUP},
|
||||
{ 0x0c, KEY_BACK}, /* Row 4 */
|
||||
{ 0x0d, KEY_UP},
|
||||
{ 0x0e, KEY_INFO},
|
||||
{ 0x0f, KEY_CHANNELDOWN},
|
||||
{ 0x10, KEY_LEFT}, /* Row 5 */
|
||||
{ 0x11, KEY_SELECT},
|
||||
{ 0x12, KEY_RIGHT},
|
||||
{ 0x13, KEY_VOLUMEUP},
|
||||
{ 0x14, KEY_LAST}, /* Row 6 */
|
||||
{ 0x15, KEY_DOWN},
|
||||
{ 0x16, KEY_MUTE},
|
||||
{ 0x17, KEY_VOLUMEDOWN},
|
||||
};
|
||||
|
||||
static struct rc_keymap ati_tv_wonder_hd_600_map = {
|
||||
.map = {
|
||||
.scan = ati_tv_wonder_hd_600,
|
||||
.size = ARRAY_SIZE(ati_tv_wonder_hd_600),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_ATI_TV_WONDER_HD_600,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_ati_tv_wonder_hd_600(void)
|
||||
{
|
||||
return ir_register_map(&ati_tv_wonder_hd_600_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_ati_tv_wonder_hd_600(void)
|
||||
{
|
||||
ir_unregister_map(&ati_tv_wonder_hd_600_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_ati_tv_wonder_hd_600)
|
||||
module_exit(exit_rc_map_ati_tv_wonder_hd_600)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
75
drivers/media/IR/keymaps/rc-avermedia-a16d.c
Normal file
75
drivers/media/IR/keymaps/rc-avermedia-a16d.c
Normal file
@ -0,0 +1,75 @@
|
||||
/* avermedia-a16d.h - Keytable for avermedia_a16d Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode avermedia_a16d[] = {
|
||||
{ 0x20, KEY_LIST},
|
||||
{ 0x00, KEY_POWER},
|
||||
{ 0x28, KEY_1},
|
||||
{ 0x18, KEY_2},
|
||||
{ 0x38, KEY_3},
|
||||
{ 0x24, KEY_4},
|
||||
{ 0x14, KEY_5},
|
||||
{ 0x34, KEY_6},
|
||||
{ 0x2c, KEY_7},
|
||||
{ 0x1c, KEY_8},
|
||||
{ 0x3c, KEY_9},
|
||||
{ 0x12, KEY_SUBTITLE},
|
||||
{ 0x22, KEY_0},
|
||||
{ 0x32, KEY_REWIND},
|
||||
{ 0x3a, KEY_SHUFFLE},
|
||||
{ 0x02, KEY_PRINT},
|
||||
{ 0x11, KEY_CHANNELDOWN},
|
||||
{ 0x31, KEY_CHANNELUP},
|
||||
{ 0x0c, KEY_ZOOM},
|
||||
{ 0x1e, KEY_VOLUMEDOWN},
|
||||
{ 0x3e, KEY_VOLUMEUP},
|
||||
{ 0x0a, KEY_MUTE},
|
||||
{ 0x04, KEY_AUDIO},
|
||||
{ 0x26, KEY_RECORD},
|
||||
{ 0x06, KEY_PLAY},
|
||||
{ 0x36, KEY_STOP},
|
||||
{ 0x16, KEY_PAUSE},
|
||||
{ 0x2e, KEY_REWIND},
|
||||
{ 0x0e, KEY_FASTFORWARD},
|
||||
{ 0x30, KEY_TEXT},
|
||||
{ 0x21, KEY_GREEN},
|
||||
{ 0x01, KEY_BLUE},
|
||||
{ 0x08, KEY_EPG},
|
||||
{ 0x2a, KEY_MENU},
|
||||
};
|
||||
|
||||
static struct rc_keymap avermedia_a16d_map = {
|
||||
.map = {
|
||||
.scan = avermedia_a16d,
|
||||
.size = ARRAY_SIZE(avermedia_a16d),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_AVERMEDIA_A16D,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_avermedia_a16d(void)
|
||||
{
|
||||
return ir_register_map(&avermedia_a16d_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_avermedia_a16d(void)
|
||||
{
|
||||
ir_unregister_map(&avermedia_a16d_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_avermedia_a16d)
|
||||
module_exit(exit_rc_map_avermedia_a16d)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
97
drivers/media/IR/keymaps/rc-avermedia-cardbus.c
Normal file
97
drivers/media/IR/keymaps/rc-avermedia-cardbus.c
Normal file
@ -0,0 +1,97 @@
|
||||
/* avermedia-cardbus.h - Keytable for avermedia_cardbus Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Oldrich Jedlicka <oldium.pro@seznam.cz> */
|
||||
|
||||
static struct ir_scancode avermedia_cardbus[] = {
|
||||
{ 0x00, KEY_POWER },
|
||||
{ 0x01, KEY_TUNER }, /* TV/FM */
|
||||
{ 0x03, KEY_TEXT }, /* Teletext */
|
||||
{ 0x04, KEY_EPG },
|
||||
{ 0x05, KEY_1 },
|
||||
{ 0x06, KEY_2 },
|
||||
{ 0x07, KEY_3 },
|
||||
{ 0x08, KEY_AUDIO },
|
||||
{ 0x09, KEY_4 },
|
||||
{ 0x0a, KEY_5 },
|
||||
{ 0x0b, KEY_6 },
|
||||
{ 0x0c, KEY_ZOOM }, /* Full screen */
|
||||
{ 0x0d, KEY_7 },
|
||||
{ 0x0e, KEY_8 },
|
||||
{ 0x0f, KEY_9 },
|
||||
{ 0x10, KEY_PAGEUP }, /* 16-CH PREV */
|
||||
{ 0x11, KEY_0 },
|
||||
{ 0x12, KEY_INFO },
|
||||
{ 0x13, KEY_AGAIN }, /* CH RTN - channel return */
|
||||
{ 0x14, KEY_MUTE },
|
||||
{ 0x15, KEY_EDIT }, /* Autoscan */
|
||||
{ 0x17, KEY_SAVE }, /* Screenshot */
|
||||
{ 0x18, KEY_PLAYPAUSE },
|
||||
{ 0x19, KEY_RECORD },
|
||||
{ 0x1a, KEY_PLAY },
|
||||
{ 0x1b, KEY_STOP },
|
||||
{ 0x1c, KEY_FASTFORWARD },
|
||||
{ 0x1d, KEY_REWIND },
|
||||
{ 0x1e, KEY_VOLUMEDOWN },
|
||||
{ 0x1f, KEY_VOLUMEUP },
|
||||
{ 0x22, KEY_SLEEP }, /* Sleep */
|
||||
{ 0x23, KEY_ZOOM }, /* Aspect */
|
||||
{ 0x26, KEY_SCREEN }, /* Pos */
|
||||
{ 0x27, KEY_ANGLE }, /* Size */
|
||||
{ 0x28, KEY_SELECT }, /* Select */
|
||||
{ 0x29, KEY_BLUE }, /* Blue/Picture */
|
||||
{ 0x2a, KEY_BACKSPACE }, /* Back */
|
||||
{ 0x2b, KEY_MEDIA }, /* PIP (Picture-in-picture) */
|
||||
{ 0x2c, KEY_DOWN },
|
||||
{ 0x2e, KEY_DOT },
|
||||
{ 0x2f, KEY_TV }, /* Live TV */
|
||||
{ 0x32, KEY_LEFT },
|
||||
{ 0x33, KEY_CLEAR }, /* Clear */
|
||||
{ 0x35, KEY_RED }, /* Red/TV */
|
||||
{ 0x36, KEY_UP },
|
||||
{ 0x37, KEY_HOME }, /* Home */
|
||||
{ 0x39, KEY_GREEN }, /* Green/Video */
|
||||
{ 0x3d, KEY_YELLOW }, /* Yellow/Music */
|
||||
{ 0x3e, KEY_OK }, /* Ok */
|
||||
{ 0x3f, KEY_RIGHT },
|
||||
{ 0x40, KEY_NEXT }, /* Next */
|
||||
{ 0x41, KEY_PREVIOUS }, /* Previous */
|
||||
{ 0x42, KEY_CHANNELDOWN }, /* Channel down */
|
||||
{ 0x43, KEY_CHANNELUP }, /* Channel up */
|
||||
};
|
||||
|
||||
static struct rc_keymap avermedia_cardbus_map = {
|
||||
.map = {
|
||||
.scan = avermedia_cardbus,
|
||||
.size = ARRAY_SIZE(avermedia_cardbus),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_AVERMEDIA_CARDBUS,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_avermedia_cardbus(void)
|
||||
{
|
||||
return ir_register_map(&avermedia_cardbus_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_avermedia_cardbus(void)
|
||||
{
|
||||
ir_unregister_map(&avermedia_cardbus_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_avermedia_cardbus)
|
||||
module_exit(exit_rc_map_avermedia_cardbus)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
78
drivers/media/IR/keymaps/rc-avermedia-dvbt.c
Normal file
78
drivers/media/IR/keymaps/rc-avermedia-dvbt.c
Normal file
@ -0,0 +1,78 @@
|
||||
/* avermedia-dvbt.h - Keytable for avermedia_dvbt Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Matt Jesson <dvb@jesson.eclipse.co.uk */
|
||||
|
||||
static struct ir_scancode avermedia_dvbt[] = {
|
||||
{ 0x28, KEY_0 }, /* '0' / 'enter' */
|
||||
{ 0x22, KEY_1 }, /* '1' */
|
||||
{ 0x12, KEY_2 }, /* '2' / 'up arrow' */
|
||||
{ 0x32, KEY_3 }, /* '3' */
|
||||
{ 0x24, KEY_4 }, /* '4' / 'left arrow' */
|
||||
{ 0x14, KEY_5 }, /* '5' */
|
||||
{ 0x34, KEY_6 }, /* '6' / 'right arrow' */
|
||||
{ 0x26, KEY_7 }, /* '7' */
|
||||
{ 0x16, KEY_8 }, /* '8' / 'down arrow' */
|
||||
{ 0x36, KEY_9 }, /* '9' */
|
||||
|
||||
{ 0x20, KEY_LIST }, /* 'source' */
|
||||
{ 0x10, KEY_TEXT }, /* 'teletext' */
|
||||
{ 0x00, KEY_POWER }, /* 'power' */
|
||||
{ 0x04, KEY_AUDIO }, /* 'audio' */
|
||||
{ 0x06, KEY_ZOOM }, /* 'full screen' */
|
||||
{ 0x18, KEY_VIDEO }, /* 'display' */
|
||||
{ 0x38, KEY_SEARCH }, /* 'loop' */
|
||||
{ 0x08, KEY_INFO }, /* 'preview' */
|
||||
{ 0x2a, KEY_REWIND }, /* 'backward <<' */
|
||||
{ 0x1a, KEY_FASTFORWARD }, /* 'forward >>' */
|
||||
{ 0x3a, KEY_RECORD }, /* 'capture' */
|
||||
{ 0x0a, KEY_MUTE }, /* 'mute' */
|
||||
{ 0x2c, KEY_RECORD }, /* 'record' */
|
||||
{ 0x1c, KEY_PAUSE }, /* 'pause' */
|
||||
{ 0x3c, KEY_STOP }, /* 'stop' */
|
||||
{ 0x0c, KEY_PLAY }, /* 'play' */
|
||||
{ 0x2e, KEY_RED }, /* 'red' */
|
||||
{ 0x01, KEY_BLUE }, /* 'blue' / 'cancel' */
|
||||
{ 0x0e, KEY_YELLOW }, /* 'yellow' / 'ok' */
|
||||
{ 0x21, KEY_GREEN }, /* 'green' */
|
||||
{ 0x11, KEY_CHANNELDOWN }, /* 'channel -' */
|
||||
{ 0x31, KEY_CHANNELUP }, /* 'channel +' */
|
||||
{ 0x1e, KEY_VOLUMEDOWN }, /* 'volume -' */
|
||||
{ 0x3e, KEY_VOLUMEUP }, /* 'volume +' */
|
||||
};
|
||||
|
||||
static struct rc_keymap avermedia_dvbt_map = {
|
||||
.map = {
|
||||
.scan = avermedia_dvbt,
|
||||
.size = ARRAY_SIZE(avermedia_dvbt),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_AVERMEDIA_DVBT,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_avermedia_dvbt(void)
|
||||
{
|
||||
return ir_register_map(&avermedia_dvbt_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_avermedia_dvbt(void)
|
||||
{
|
||||
ir_unregister_map(&avermedia_dvbt_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_avermedia_dvbt)
|
||||
module_exit(exit_rc_map_avermedia_dvbt)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
90
drivers/media/IR/keymaps/rc-avermedia-m135a-rm-jx.c
Normal file
90
drivers/media/IR/keymaps/rc-avermedia-m135a-rm-jx.c
Normal file
@ -0,0 +1,90 @@
|
||||
/* avermedia-m135a-rm-jx.h - Keytable for avermedia_m135a_rm_jx Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* Avermedia M135A with IR model RM-JX
|
||||
* The same codes exist on both Positivo (BR) and original IR
|
||||
* Mauro Carvalho Chehab <mchehab@infradead.org>
|
||||
*/
|
||||
|
||||
static struct ir_scancode avermedia_m135a_rm_jx[] = {
|
||||
{ 0x0200, KEY_POWER2 },
|
||||
{ 0x022e, KEY_DOT }, /* '.' */
|
||||
{ 0x0201, KEY_MODE }, /* TV/FM or SOURCE */
|
||||
|
||||
{ 0x0205, KEY_1 },
|
||||
{ 0x0206, KEY_2 },
|
||||
{ 0x0207, KEY_3 },
|
||||
{ 0x0209, KEY_4 },
|
||||
{ 0x020a, KEY_5 },
|
||||
{ 0x020b, KEY_6 },
|
||||
{ 0x020d, KEY_7 },
|
||||
{ 0x020e, KEY_8 },
|
||||
{ 0x020f, KEY_9 },
|
||||
{ 0x0211, KEY_0 },
|
||||
|
||||
{ 0x0213, KEY_RIGHT }, /* -> or L */
|
||||
{ 0x0212, KEY_LEFT }, /* <- or R */
|
||||
|
||||
{ 0x0217, KEY_SLEEP }, /* Capturar Imagem or Snapshot */
|
||||
{ 0x0210, KEY_SHUFFLE }, /* Amostra or 16 chan prev */
|
||||
|
||||
{ 0x0303, KEY_CHANNELUP },
|
||||
{ 0x0302, KEY_CHANNELDOWN },
|
||||
{ 0x021f, KEY_VOLUMEUP },
|
||||
{ 0x021e, KEY_VOLUMEDOWN },
|
||||
{ 0x020c, KEY_ENTER }, /* Full Screen */
|
||||
|
||||
{ 0x0214, KEY_MUTE },
|
||||
{ 0x0208, KEY_AUDIO },
|
||||
|
||||
{ 0x0203, KEY_TEXT }, /* Teletext */
|
||||
{ 0x0204, KEY_EPG },
|
||||
{ 0x022b, KEY_TV2 }, /* TV2 or PIP */
|
||||
|
||||
{ 0x021d, KEY_RED },
|
||||
{ 0x021c, KEY_YELLOW },
|
||||
{ 0x0301, KEY_GREEN },
|
||||
{ 0x0300, KEY_BLUE },
|
||||
|
||||
{ 0x021a, KEY_PLAYPAUSE },
|
||||
{ 0x0219, KEY_RECORD },
|
||||
{ 0x0218, KEY_PLAY },
|
||||
{ 0x021b, KEY_STOP },
|
||||
};
|
||||
|
||||
static struct rc_keymap avermedia_m135a_rm_jx_map = {
|
||||
.map = {
|
||||
.scan = avermedia_m135a_rm_jx,
|
||||
.size = ARRAY_SIZE(avermedia_m135a_rm_jx),
|
||||
.ir_type = IR_TYPE_NEC,
|
||||
.name = RC_MAP_AVERMEDIA_M135A_RM_JX,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_avermedia_m135a_rm_jx(void)
|
||||
{
|
||||
return ir_register_map(&avermedia_m135a_rm_jx_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_avermedia_m135a_rm_jx(void)
|
||||
{
|
||||
ir_unregister_map(&avermedia_m135a_rm_jx_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_avermedia_m135a_rm_jx)
|
||||
module_exit(exit_rc_map_avermedia_m135a_rm_jx)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
86
drivers/media/IR/keymaps/rc-avermedia.c
Normal file
86
drivers/media/IR/keymaps/rc-avermedia.c
Normal file
@ -0,0 +1,86 @@
|
||||
/* avermedia.h - Keytable for avermedia Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Alex Hermann <gaaf@gmx.net> */
|
||||
|
||||
static struct ir_scancode avermedia[] = {
|
||||
{ 0x28, KEY_1 },
|
||||
{ 0x18, KEY_2 },
|
||||
{ 0x38, KEY_3 },
|
||||
{ 0x24, KEY_4 },
|
||||
{ 0x14, KEY_5 },
|
||||
{ 0x34, KEY_6 },
|
||||
{ 0x2c, KEY_7 },
|
||||
{ 0x1c, KEY_8 },
|
||||
{ 0x3c, KEY_9 },
|
||||
{ 0x22, KEY_0 },
|
||||
|
||||
{ 0x20, KEY_TV }, /* TV/FM */
|
||||
{ 0x10, KEY_CD }, /* CD */
|
||||
{ 0x30, KEY_TEXT }, /* TELETEXT */
|
||||
{ 0x00, KEY_POWER }, /* POWER */
|
||||
|
||||
{ 0x08, KEY_VIDEO }, /* VIDEO */
|
||||
{ 0x04, KEY_AUDIO }, /* AUDIO */
|
||||
{ 0x0c, KEY_ZOOM }, /* FULL SCREEN */
|
||||
|
||||
{ 0x12, KEY_SUBTITLE }, /* DISPLAY */
|
||||
{ 0x32, KEY_REWIND }, /* LOOP */
|
||||
{ 0x02, KEY_PRINT }, /* PREVIEW */
|
||||
|
||||
{ 0x2a, KEY_SEARCH }, /* AUTOSCAN */
|
||||
{ 0x1a, KEY_SLEEP }, /* FREEZE */
|
||||
{ 0x3a, KEY_CAMERA }, /* SNAPSHOT */
|
||||
{ 0x0a, KEY_MUTE }, /* MUTE */
|
||||
|
||||
{ 0x26, KEY_RECORD }, /* RECORD */
|
||||
{ 0x16, KEY_PAUSE }, /* PAUSE */
|
||||
{ 0x36, KEY_STOP }, /* STOP */
|
||||
{ 0x06, KEY_PLAY }, /* PLAY */
|
||||
|
||||
{ 0x2e, KEY_RED }, /* RED */
|
||||
{ 0x21, KEY_GREEN }, /* GREEN */
|
||||
{ 0x0e, KEY_YELLOW }, /* YELLOW */
|
||||
{ 0x01, KEY_BLUE }, /* BLUE */
|
||||
|
||||
{ 0x1e, KEY_VOLUMEDOWN }, /* VOLUME- */
|
||||
{ 0x3e, KEY_VOLUMEUP }, /* VOLUME+ */
|
||||
{ 0x11, KEY_CHANNELDOWN }, /* CHANNEL/PAGE- */
|
||||
{ 0x31, KEY_CHANNELUP } /* CHANNEL/PAGE+ */
|
||||
};
|
||||
|
||||
static struct rc_keymap avermedia_map = {
|
||||
.map = {
|
||||
.scan = avermedia,
|
||||
.size = ARRAY_SIZE(avermedia),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_AVERMEDIA,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_avermedia(void)
|
||||
{
|
||||
return ir_register_map(&avermedia_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_avermedia(void)
|
||||
{
|
||||
ir_unregister_map(&avermedia_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_avermedia)
|
||||
module_exit(exit_rc_map_avermedia)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
85
drivers/media/IR/keymaps/rc-avertv-303.c
Normal file
85
drivers/media/IR/keymaps/rc-avertv-303.c
Normal file
@ -0,0 +1,85 @@
|
||||
/* avertv-303.h - Keytable for avertv_303 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* AVERTV STUDIO 303 Remote */
|
||||
|
||||
static struct ir_scancode avertv_303[] = {
|
||||
{ 0x2a, KEY_1 },
|
||||
{ 0x32, KEY_2 },
|
||||
{ 0x3a, KEY_3 },
|
||||
{ 0x4a, KEY_4 },
|
||||
{ 0x52, KEY_5 },
|
||||
{ 0x5a, KEY_6 },
|
||||
{ 0x6a, KEY_7 },
|
||||
{ 0x72, KEY_8 },
|
||||
{ 0x7a, KEY_9 },
|
||||
{ 0x0e, KEY_0 },
|
||||
|
||||
{ 0x02, KEY_POWER },
|
||||
{ 0x22, KEY_VIDEO },
|
||||
{ 0x42, KEY_AUDIO },
|
||||
{ 0x62, KEY_ZOOM },
|
||||
{ 0x0a, KEY_TV },
|
||||
{ 0x12, KEY_CD },
|
||||
{ 0x1a, KEY_TEXT },
|
||||
|
||||
{ 0x16, KEY_SUBTITLE },
|
||||
{ 0x1e, KEY_REWIND },
|
||||
{ 0x06, KEY_PRINT },
|
||||
|
||||
{ 0x2e, KEY_SEARCH },
|
||||
{ 0x36, KEY_SLEEP },
|
||||
{ 0x3e, KEY_SHUFFLE },
|
||||
{ 0x26, KEY_MUTE },
|
||||
|
||||
{ 0x4e, KEY_RECORD },
|
||||
{ 0x56, KEY_PAUSE },
|
||||
{ 0x5e, KEY_STOP },
|
||||
{ 0x46, KEY_PLAY },
|
||||
|
||||
{ 0x6e, KEY_RED },
|
||||
{ 0x0b, KEY_GREEN },
|
||||
{ 0x66, KEY_YELLOW },
|
||||
{ 0x03, KEY_BLUE },
|
||||
|
||||
{ 0x76, KEY_LEFT },
|
||||
{ 0x7e, KEY_RIGHT },
|
||||
{ 0x13, KEY_DOWN },
|
||||
{ 0x1b, KEY_UP },
|
||||
};
|
||||
|
||||
static struct rc_keymap avertv_303_map = {
|
||||
.map = {
|
||||
.scan = avertv_303,
|
||||
.size = ARRAY_SIZE(avertv_303),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_AVERTV_303,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_avertv_303(void)
|
||||
{
|
||||
return ir_register_map(&avertv_303_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_avertv_303(void)
|
||||
{
|
||||
ir_unregister_map(&avertv_303_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_avertv_303)
|
||||
module_exit(exit_rc_map_avertv_303)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
108
drivers/media/IR/keymaps/rc-behold-columbus.c
Normal file
108
drivers/media/IR/keymaps/rc-behold-columbus.c
Normal file
@ -0,0 +1,108 @@
|
||||
/* behold-columbus.h - Keytable for behold_columbus Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Beholder Intl. Ltd. 2008
|
||||
* Dmitry Belimov d.belimov@google.com
|
||||
* Keytable is used by BeholdTV Columbus
|
||||
* The "ascii-art picture" below (in comments, first row
|
||||
* is the keycode in hex, and subsequent row(s) shows
|
||||
* the button labels (several variants when appropriate)
|
||||
* helps to descide which keycodes to assign to the buttons.
|
||||
*/
|
||||
|
||||
static struct ir_scancode behold_columbus[] = {
|
||||
|
||||
/* 0x13 0x11 0x1C 0x12 *
|
||||
* Mute Source TV/FM Power *
|
||||
* */
|
||||
|
||||
{ 0x13, KEY_MUTE },
|
||||
{ 0x11, KEY_PROPS },
|
||||
{ 0x1C, KEY_TUNER }, /* KEY_TV/KEY_RADIO */
|
||||
{ 0x12, KEY_POWER },
|
||||
|
||||
/* 0x01 0x02 0x03 0x0D *
|
||||
* 1 2 3 Stereo *
|
||||
* *
|
||||
* 0x04 0x05 0x06 0x19 *
|
||||
* 4 5 6 Snapshot *
|
||||
* *
|
||||
* 0x07 0x08 0x09 0x10 *
|
||||
* 7 8 9 Zoom *
|
||||
* */
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x0D, KEY_SETUP }, /* Setup key */
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x19, KEY_CAMERA }, /* Snapshot key */
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
{ 0x10, KEY_ZOOM },
|
||||
|
||||
/* 0x0A 0x00 0x0B 0x0C *
|
||||
* RECALL 0 ChannelUp VolumeUp *
|
||||
* */
|
||||
{ 0x0A, KEY_AGAIN },
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x0B, KEY_CHANNELUP },
|
||||
{ 0x0C, KEY_VOLUMEUP },
|
||||
|
||||
/* 0x1B 0x1D 0x15 0x18 *
|
||||
* Timeshift Record ChannelDown VolumeDown *
|
||||
* */
|
||||
|
||||
{ 0x1B, KEY_TIME },
|
||||
{ 0x1D, KEY_RECORD },
|
||||
{ 0x15, KEY_CHANNELDOWN },
|
||||
{ 0x18, KEY_VOLUMEDOWN },
|
||||
|
||||
/* 0x0E 0x1E 0x0F 0x1A *
|
||||
* Stop Pause Previouse Next *
|
||||
* */
|
||||
|
||||
{ 0x0E, KEY_STOP },
|
||||
{ 0x1E, KEY_PAUSE },
|
||||
{ 0x0F, KEY_PREVIOUS },
|
||||
{ 0x1A, KEY_NEXT },
|
||||
|
||||
};
|
||||
|
||||
static struct rc_keymap behold_columbus_map = {
|
||||
.map = {
|
||||
.scan = behold_columbus,
|
||||
.size = ARRAY_SIZE(behold_columbus),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_BEHOLD_COLUMBUS,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_behold_columbus(void)
|
||||
{
|
||||
return ir_register_map(&behold_columbus_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_behold_columbus(void)
|
||||
{
|
||||
ir_unregister_map(&behold_columbus_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_behold_columbus)
|
||||
module_exit(exit_rc_map_behold_columbus)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
141
drivers/media/IR/keymaps/rc-behold.c
Normal file
141
drivers/media/IR/keymaps/rc-behold.c
Normal file
@ -0,0 +1,141 @@
|
||||
/* behold.h - Keytable for behold Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* Igor Kuznetsov <igk72@ya.ru>
|
||||
* Andrey J. Melnikov <temnota@kmv.ru>
|
||||
*
|
||||
* Keytable is used by BeholdTV 60x series, M6 series at
|
||||
* least, and probably other cards too.
|
||||
* The "ascii-art picture" below (in comments, first row
|
||||
* is the keycode in hex, and subsequent row(s) shows
|
||||
* the button labels (several variants when appropriate)
|
||||
* helps to descide which keycodes to assign to the buttons.
|
||||
*/
|
||||
|
||||
static struct ir_scancode behold[] = {
|
||||
|
||||
/* 0x1c 0x12 *
|
||||
* TV/FM POWER *
|
||||
* */
|
||||
{ 0x1c, KEY_TUNER }, /* XXX KEY_TV / KEY_RADIO */
|
||||
{ 0x12, KEY_POWER },
|
||||
|
||||
/* 0x01 0x02 0x03 *
|
||||
* 1 2 3 *
|
||||
* *
|
||||
* 0x04 0x05 0x06 *
|
||||
* 4 5 6 *
|
||||
* *
|
||||
* 0x07 0x08 0x09 *
|
||||
* 7 8 9 *
|
||||
* */
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
/* 0x0a 0x00 0x17 *
|
||||
* RECALL 0 MODE *
|
||||
* */
|
||||
{ 0x0a, KEY_AGAIN },
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x17, KEY_MODE },
|
||||
|
||||
/* 0x14 0x10 *
|
||||
* ASPECT FULLSCREEN *
|
||||
* */
|
||||
{ 0x14, KEY_SCREEN },
|
||||
{ 0x10, KEY_ZOOM },
|
||||
|
||||
/* 0x0b *
|
||||
* Up *
|
||||
* *
|
||||
* 0x18 0x16 0x0c *
|
||||
* Left Ok Right *
|
||||
* *
|
||||
* 0x015 *
|
||||
* Down *
|
||||
* */
|
||||
{ 0x0b, KEY_CHANNELUP },
|
||||
{ 0x18, KEY_VOLUMEDOWN },
|
||||
{ 0x16, KEY_OK }, /* XXX KEY_ENTER */
|
||||
{ 0x0c, KEY_VOLUMEUP },
|
||||
{ 0x15, KEY_CHANNELDOWN },
|
||||
|
||||
/* 0x11 0x0d *
|
||||
* MUTE INFO *
|
||||
* */
|
||||
{ 0x11, KEY_MUTE },
|
||||
{ 0x0d, KEY_INFO },
|
||||
|
||||
/* 0x0f 0x1b 0x1a *
|
||||
* RECORD PLAY/PAUSE STOP *
|
||||
* *
|
||||
* 0x0e 0x1f 0x1e *
|
||||
*TELETEXT AUDIO SOURCE *
|
||||
* RED YELLOW *
|
||||
* */
|
||||
{ 0x0f, KEY_RECORD },
|
||||
{ 0x1b, KEY_PLAYPAUSE },
|
||||
{ 0x1a, KEY_STOP },
|
||||
{ 0x0e, KEY_TEXT },
|
||||
{ 0x1f, KEY_RED }, /*XXX KEY_AUDIO */
|
||||
{ 0x1e, KEY_YELLOW }, /*XXX KEY_SOURCE */
|
||||
|
||||
/* 0x1d 0x13 0x19 *
|
||||
* SLEEP PREVIEW DVB *
|
||||
* GREEN BLUE *
|
||||
* */
|
||||
{ 0x1d, KEY_SLEEP },
|
||||
{ 0x13, KEY_GREEN },
|
||||
{ 0x19, KEY_BLUE }, /* XXX KEY_SAT */
|
||||
|
||||
/* 0x58 0x5c *
|
||||
* FREEZE SNAPSHOT *
|
||||
* */
|
||||
{ 0x58, KEY_SLOW },
|
||||
{ 0x5c, KEY_CAMERA },
|
||||
|
||||
};
|
||||
|
||||
static struct rc_keymap behold_map = {
|
||||
.map = {
|
||||
.scan = behold,
|
||||
.size = ARRAY_SIZE(behold),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_BEHOLD,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_behold(void)
|
||||
{
|
||||
return ir_register_map(&behold_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_behold(void)
|
||||
{
|
||||
ir_unregister_map(&behold_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_behold)
|
||||
module_exit(exit_rc_map_behold)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
92
drivers/media/IR/keymaps/rc-budget-ci-old.c
Normal file
92
drivers/media/IR/keymaps/rc-budget-ci-old.c
Normal file
@ -0,0 +1,92 @@
|
||||
/* budget-ci-old.h - Keytable for budget_ci_old Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* From reading the following remotes:
|
||||
* Zenith Universal 7 / TV Mode 807 / VCR Mode 837
|
||||
* Hauppauge (from NOVA-CI-s box product)
|
||||
* This is a "middle of the road" approach, differences are noted
|
||||
*/
|
||||
|
||||
static struct ir_scancode budget_ci_old[] = {
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
{ 0x0a, KEY_ENTER },
|
||||
{ 0x0b, KEY_RED },
|
||||
{ 0x0c, KEY_POWER }, /* RADIO on Hauppauge */
|
||||
{ 0x0d, KEY_MUTE },
|
||||
{ 0x0f, KEY_A }, /* TV on Hauppauge */
|
||||
{ 0x10, KEY_VOLUMEUP },
|
||||
{ 0x11, KEY_VOLUMEDOWN },
|
||||
{ 0x14, KEY_B },
|
||||
{ 0x1c, KEY_UP },
|
||||
{ 0x1d, KEY_DOWN },
|
||||
{ 0x1e, KEY_OPTION }, /* RESERVED on Hauppauge */
|
||||
{ 0x1f, KEY_BREAK },
|
||||
{ 0x20, KEY_CHANNELUP },
|
||||
{ 0x21, KEY_CHANNELDOWN },
|
||||
{ 0x22, KEY_PREVIOUS }, /* Prev Ch on Zenith, SOURCE on Hauppauge */
|
||||
{ 0x24, KEY_RESTART },
|
||||
{ 0x25, KEY_OK },
|
||||
{ 0x26, KEY_CYCLEWINDOWS }, /* MINIMIZE on Hauppauge */
|
||||
{ 0x28, KEY_ENTER }, /* VCR mode on Zenith */
|
||||
{ 0x29, KEY_PAUSE },
|
||||
{ 0x2b, KEY_RIGHT },
|
||||
{ 0x2c, KEY_LEFT },
|
||||
{ 0x2e, KEY_MENU }, /* FULL SCREEN on Hauppauge */
|
||||
{ 0x30, KEY_SLOW },
|
||||
{ 0x31, KEY_PREVIOUS }, /* VCR mode on Zenith */
|
||||
{ 0x32, KEY_REWIND },
|
||||
{ 0x34, KEY_FASTFORWARD },
|
||||
{ 0x35, KEY_PLAY },
|
||||
{ 0x36, KEY_STOP },
|
||||
{ 0x37, KEY_RECORD },
|
||||
{ 0x38, KEY_TUNER }, /* TV/VCR on Zenith */
|
||||
{ 0x3a, KEY_C },
|
||||
{ 0x3c, KEY_EXIT },
|
||||
{ 0x3d, KEY_POWER2 },
|
||||
{ 0x3e, KEY_TUNER },
|
||||
};
|
||||
|
||||
static struct rc_keymap budget_ci_old_map = {
|
||||
.map = {
|
||||
.scan = budget_ci_old,
|
||||
.size = ARRAY_SIZE(budget_ci_old),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_BUDGET_CI_OLD,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_budget_ci_old(void)
|
||||
{
|
||||
return ir_register_map(&budget_ci_old_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_budget_ci_old(void)
|
||||
{
|
||||
ir_unregister_map(&budget_ci_old_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_budget_ci_old)
|
||||
module_exit(exit_rc_map_budget_ci_old)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
84
drivers/media/IR/keymaps/rc-cinergy-1400.c
Normal file
84
drivers/media/IR/keymaps/rc-cinergy-1400.c
Normal file
@ -0,0 +1,84 @@
|
||||
/* cinergy-1400.h - Keytable for cinergy_1400 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Cinergy 1400 DVB-T */
|
||||
|
||||
static struct ir_scancode cinergy_1400[] = {
|
||||
{ 0x01, KEY_POWER },
|
||||
{ 0x02, KEY_1 },
|
||||
{ 0x03, KEY_2 },
|
||||
{ 0x04, KEY_3 },
|
||||
{ 0x05, KEY_4 },
|
||||
{ 0x06, KEY_5 },
|
||||
{ 0x07, KEY_6 },
|
||||
{ 0x08, KEY_7 },
|
||||
{ 0x09, KEY_8 },
|
||||
{ 0x0a, KEY_9 },
|
||||
{ 0x0c, KEY_0 },
|
||||
|
||||
{ 0x0b, KEY_VIDEO },
|
||||
{ 0x0d, KEY_REFRESH },
|
||||
{ 0x0e, KEY_SELECT },
|
||||
{ 0x0f, KEY_EPG },
|
||||
{ 0x10, KEY_UP },
|
||||
{ 0x11, KEY_LEFT },
|
||||
{ 0x12, KEY_OK },
|
||||
{ 0x13, KEY_RIGHT },
|
||||
{ 0x14, KEY_DOWN },
|
||||
{ 0x15, KEY_TEXT },
|
||||
{ 0x16, KEY_INFO },
|
||||
|
||||
{ 0x17, KEY_RED },
|
||||
{ 0x18, KEY_GREEN },
|
||||
{ 0x19, KEY_YELLOW },
|
||||
{ 0x1a, KEY_BLUE },
|
||||
|
||||
{ 0x1b, KEY_CHANNELUP },
|
||||
{ 0x1c, KEY_VOLUMEUP },
|
||||
{ 0x1d, KEY_MUTE },
|
||||
{ 0x1e, KEY_VOLUMEDOWN },
|
||||
{ 0x1f, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x40, KEY_PAUSE },
|
||||
{ 0x4c, KEY_PLAY },
|
||||
{ 0x58, KEY_RECORD },
|
||||
{ 0x54, KEY_PREVIOUS },
|
||||
{ 0x48, KEY_STOP },
|
||||
{ 0x5c, KEY_NEXT },
|
||||
};
|
||||
|
||||
static struct rc_keymap cinergy_1400_map = {
|
||||
.map = {
|
||||
.scan = cinergy_1400,
|
||||
.size = ARRAY_SIZE(cinergy_1400),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_CINERGY_1400,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_cinergy_1400(void)
|
||||
{
|
||||
return ir_register_map(&cinergy_1400_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_cinergy_1400(void)
|
||||
{
|
||||
ir_unregister_map(&cinergy_1400_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_cinergy_1400)
|
||||
module_exit(exit_rc_map_cinergy_1400)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
78
drivers/media/IR/keymaps/rc-cinergy.c
Normal file
78
drivers/media/IR/keymaps/rc-cinergy.c
Normal file
@ -0,0 +1,78 @@
|
||||
/* cinergy.h - Keytable for cinergy Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode cinergy[] = {
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x0a, KEY_POWER },
|
||||
{ 0x0b, KEY_PROG1 }, /* app */
|
||||
{ 0x0c, KEY_ZOOM }, /* zoom/fullscreen */
|
||||
{ 0x0d, KEY_CHANNELUP }, /* channel */
|
||||
{ 0x0e, KEY_CHANNELDOWN }, /* channel- */
|
||||
{ 0x0f, KEY_VOLUMEUP },
|
||||
{ 0x10, KEY_VOLUMEDOWN },
|
||||
{ 0x11, KEY_TUNER }, /* AV */
|
||||
{ 0x12, KEY_NUMLOCK }, /* -/-- */
|
||||
{ 0x13, KEY_AUDIO }, /* audio */
|
||||
{ 0x14, KEY_MUTE },
|
||||
{ 0x15, KEY_UP },
|
||||
{ 0x16, KEY_DOWN },
|
||||
{ 0x17, KEY_LEFT },
|
||||
{ 0x18, KEY_RIGHT },
|
||||
{ 0x19, BTN_LEFT, },
|
||||
{ 0x1a, BTN_RIGHT, },
|
||||
{ 0x1b, KEY_WWW }, /* text */
|
||||
{ 0x1c, KEY_REWIND },
|
||||
{ 0x1d, KEY_FORWARD },
|
||||
{ 0x1e, KEY_RECORD },
|
||||
{ 0x1f, KEY_PLAY },
|
||||
{ 0x20, KEY_PREVIOUSSONG },
|
||||
{ 0x21, KEY_NEXTSONG },
|
||||
{ 0x22, KEY_PAUSE },
|
||||
{ 0x23, KEY_STOP },
|
||||
};
|
||||
|
||||
static struct rc_keymap cinergy_map = {
|
||||
.map = {
|
||||
.scan = cinergy,
|
||||
.size = ARRAY_SIZE(cinergy),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_CINERGY,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_cinergy(void)
|
||||
{
|
||||
return ir_register_map(&cinergy_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_cinergy(void)
|
||||
{
|
||||
ir_unregister_map(&cinergy_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_cinergy)
|
||||
module_exit(exit_rc_map_cinergy)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
76
drivers/media/IR/keymaps/rc-dm1105-nec.c
Normal file
76
drivers/media/IR/keymaps/rc-dm1105-nec.c
Normal file
@ -0,0 +1,76 @@
|
||||
/* dm1105-nec.h - Keytable for dm1105_nec Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* DVBWorld remotes
|
||||
Igor M. Liplianin <liplianin@me.by>
|
||||
*/
|
||||
|
||||
static struct ir_scancode dm1105_nec[] = {
|
||||
{ 0x0a, KEY_POWER2}, /* power */
|
||||
{ 0x0c, KEY_MUTE}, /* mute */
|
||||
{ 0x11, KEY_1},
|
||||
{ 0x12, KEY_2},
|
||||
{ 0x13, KEY_3},
|
||||
{ 0x14, KEY_4},
|
||||
{ 0x15, KEY_5},
|
||||
{ 0x16, KEY_6},
|
||||
{ 0x17, KEY_7},
|
||||
{ 0x18, KEY_8},
|
||||
{ 0x19, KEY_9},
|
||||
{ 0x10, KEY_0},
|
||||
{ 0x1c, KEY_CHANNELUP}, /* ch+ */
|
||||
{ 0x0f, KEY_CHANNELDOWN}, /* ch- */
|
||||
{ 0x1a, KEY_VOLUMEUP}, /* vol+ */
|
||||
{ 0x0e, KEY_VOLUMEDOWN}, /* vol- */
|
||||
{ 0x04, KEY_RECORD}, /* rec */
|
||||
{ 0x09, KEY_CHANNEL}, /* fav */
|
||||
{ 0x08, KEY_BACKSPACE}, /* rewind */
|
||||
{ 0x07, KEY_FASTFORWARD}, /* fast */
|
||||
{ 0x0b, KEY_PAUSE}, /* pause */
|
||||
{ 0x02, KEY_ESC}, /* cancel */
|
||||
{ 0x03, KEY_TAB}, /* tab */
|
||||
{ 0x00, KEY_UP}, /* up */
|
||||
{ 0x1f, KEY_ENTER}, /* ok */
|
||||
{ 0x01, KEY_DOWN}, /* down */
|
||||
{ 0x05, KEY_RECORD}, /* cap */
|
||||
{ 0x06, KEY_STOP}, /* stop */
|
||||
{ 0x40, KEY_ZOOM}, /* full */
|
||||
{ 0x1e, KEY_TV}, /* tvmode */
|
||||
{ 0x1b, KEY_B}, /* recall */
|
||||
};
|
||||
|
||||
static struct rc_keymap dm1105_nec_map = {
|
||||
.map = {
|
||||
.scan = dm1105_nec,
|
||||
.size = ARRAY_SIZE(dm1105_nec),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_DM1105_NEC,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_dm1105_nec(void)
|
||||
{
|
||||
return ir_register_map(&dm1105_nec_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_dm1105_nec(void)
|
||||
{
|
||||
ir_unregister_map(&dm1105_nec_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_dm1105_nec)
|
||||
module_exit(exit_rc_map_dm1105_nec)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
78
drivers/media/IR/keymaps/rc-dntv-live-dvb-t.c
Normal file
78
drivers/media/IR/keymaps/rc-dntv-live-dvb-t.c
Normal file
@ -0,0 +1,78 @@
|
||||
/* dntv-live-dvb-t.h - Keytable for dntv_live_dvb_t Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* DigitalNow DNTV Live DVB-T Remote */
|
||||
|
||||
static struct ir_scancode dntv_live_dvb_t[] = {
|
||||
{ 0x00, KEY_ESC }, /* 'go up a level?' */
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x0a, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x0b, KEY_TUNER }, /* tv/fm */
|
||||
{ 0x0c, KEY_SEARCH }, /* scan */
|
||||
{ 0x0d, KEY_STOP },
|
||||
{ 0x0e, KEY_PAUSE },
|
||||
{ 0x0f, KEY_LIST }, /* source */
|
||||
|
||||
{ 0x10, KEY_MUTE },
|
||||
{ 0x11, KEY_REWIND }, /* backward << */
|
||||
{ 0x12, KEY_POWER },
|
||||
{ 0x13, KEY_CAMERA }, /* snap */
|
||||
{ 0x14, KEY_AUDIO }, /* stereo */
|
||||
{ 0x15, KEY_CLEAR }, /* reset */
|
||||
{ 0x16, KEY_PLAY },
|
||||
{ 0x17, KEY_ENTER },
|
||||
{ 0x18, KEY_ZOOM }, /* full screen */
|
||||
{ 0x19, KEY_FASTFORWARD }, /* forward >> */
|
||||
{ 0x1a, KEY_CHANNELUP },
|
||||
{ 0x1b, KEY_VOLUMEUP },
|
||||
{ 0x1c, KEY_INFO }, /* preview */
|
||||
{ 0x1d, KEY_RECORD }, /* record */
|
||||
{ 0x1e, KEY_CHANNELDOWN },
|
||||
{ 0x1f, KEY_VOLUMEDOWN },
|
||||
};
|
||||
|
||||
static struct rc_keymap dntv_live_dvb_t_map = {
|
||||
.map = {
|
||||
.scan = dntv_live_dvb_t,
|
||||
.size = ARRAY_SIZE(dntv_live_dvb_t),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_DNTV_LIVE_DVB_T,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_dntv_live_dvb_t(void)
|
||||
{
|
||||
return ir_register_map(&dntv_live_dvb_t_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_dntv_live_dvb_t(void)
|
||||
{
|
||||
ir_unregister_map(&dntv_live_dvb_t_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_dntv_live_dvb_t)
|
||||
module_exit(exit_rc_map_dntv_live_dvb_t)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
97
drivers/media/IR/keymaps/rc-dntv-live-dvbt-pro.c
Normal file
97
drivers/media/IR/keymaps/rc-dntv-live-dvbt-pro.c
Normal file
@ -0,0 +1,97 @@
|
||||
/* dntv-live-dvbt-pro.h - Keytable for dntv_live_dvbt_pro Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* DigitalNow DNTV Live! DVB-T Pro Remote */
|
||||
|
||||
static struct ir_scancode dntv_live_dvbt_pro[] = {
|
||||
{ 0x16, KEY_POWER },
|
||||
{ 0x5b, KEY_HOME },
|
||||
|
||||
{ 0x55, KEY_TV }, /* live tv */
|
||||
{ 0x58, KEY_TUNER }, /* digital Radio */
|
||||
{ 0x5a, KEY_RADIO }, /* FM radio */
|
||||
{ 0x59, KEY_DVD }, /* dvd menu */
|
||||
{ 0x03, KEY_1 },
|
||||
{ 0x01, KEY_2 },
|
||||
{ 0x06, KEY_3 },
|
||||
{ 0x09, KEY_4 },
|
||||
{ 0x1d, KEY_5 },
|
||||
{ 0x1f, KEY_6 },
|
||||
{ 0x0d, KEY_7 },
|
||||
{ 0x19, KEY_8 },
|
||||
{ 0x1b, KEY_9 },
|
||||
{ 0x0c, KEY_CANCEL },
|
||||
{ 0x15, KEY_0 },
|
||||
{ 0x4a, KEY_CLEAR },
|
||||
{ 0x13, KEY_BACK },
|
||||
{ 0x00, KEY_TAB },
|
||||
{ 0x4b, KEY_UP },
|
||||
{ 0x4e, KEY_LEFT },
|
||||
{ 0x4f, KEY_OK },
|
||||
{ 0x52, KEY_RIGHT },
|
||||
{ 0x51, KEY_DOWN },
|
||||
{ 0x1e, KEY_VOLUMEUP },
|
||||
{ 0x0a, KEY_VOLUMEDOWN },
|
||||
{ 0x02, KEY_CHANNELDOWN },
|
||||
{ 0x05, KEY_CHANNELUP },
|
||||
{ 0x11, KEY_RECORD },
|
||||
{ 0x14, KEY_PLAY },
|
||||
{ 0x4c, KEY_PAUSE },
|
||||
{ 0x1a, KEY_STOP },
|
||||
{ 0x40, KEY_REWIND },
|
||||
{ 0x12, KEY_FASTFORWARD },
|
||||
{ 0x41, KEY_PREVIOUSSONG }, /* replay |< */
|
||||
{ 0x42, KEY_NEXTSONG }, /* skip >| */
|
||||
{ 0x54, KEY_CAMERA }, /* capture */
|
||||
{ 0x50, KEY_LANGUAGE }, /* sap */
|
||||
{ 0x47, KEY_TV2 }, /* pip */
|
||||
{ 0x4d, KEY_SCREEN },
|
||||
{ 0x43, KEY_SUBTITLE },
|
||||
{ 0x10, KEY_MUTE },
|
||||
{ 0x49, KEY_AUDIO }, /* l/r */
|
||||
{ 0x07, KEY_SLEEP },
|
||||
{ 0x08, KEY_VIDEO }, /* a/v */
|
||||
{ 0x0e, KEY_PREVIOUS }, /* recall */
|
||||
{ 0x45, KEY_ZOOM }, /* zoom + */
|
||||
{ 0x46, KEY_ANGLE }, /* zoom - */
|
||||
{ 0x56, KEY_RED },
|
||||
{ 0x57, KEY_GREEN },
|
||||
{ 0x5c, KEY_YELLOW },
|
||||
{ 0x5d, KEY_BLUE },
|
||||
};
|
||||
|
||||
static struct rc_keymap dntv_live_dvbt_pro_map = {
|
||||
.map = {
|
||||
.scan = dntv_live_dvbt_pro,
|
||||
.size = ARRAY_SIZE(dntv_live_dvbt_pro),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_DNTV_LIVE_DVBT_PRO,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_dntv_live_dvbt_pro(void)
|
||||
{
|
||||
return ir_register_map(&dntv_live_dvbt_pro_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_dntv_live_dvbt_pro(void)
|
||||
{
|
||||
ir_unregister_map(&dntv_live_dvbt_pro_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_dntv_live_dvbt_pro)
|
||||
module_exit(exit_rc_map_dntv_live_dvbt_pro)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
69
drivers/media/IR/keymaps/rc-em-terratec.c
Normal file
69
drivers/media/IR/keymaps/rc-em-terratec.c
Normal file
@ -0,0 +1,69 @@
|
||||
/* em-terratec.h - Keytable for em_terratec Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode em_terratec[] = {
|
||||
{ 0x01, KEY_CHANNEL },
|
||||
{ 0x02, KEY_SELECT },
|
||||
{ 0x03, KEY_MUTE },
|
||||
{ 0x04, KEY_POWER },
|
||||
{ 0x05, KEY_1 },
|
||||
{ 0x06, KEY_2 },
|
||||
{ 0x07, KEY_3 },
|
||||
{ 0x08, KEY_CHANNELUP },
|
||||
{ 0x09, KEY_4 },
|
||||
{ 0x0a, KEY_5 },
|
||||
{ 0x0b, KEY_6 },
|
||||
{ 0x0c, KEY_CHANNELDOWN },
|
||||
{ 0x0d, KEY_7 },
|
||||
{ 0x0e, KEY_8 },
|
||||
{ 0x0f, KEY_9 },
|
||||
{ 0x10, KEY_VOLUMEUP },
|
||||
{ 0x11, KEY_0 },
|
||||
{ 0x12, KEY_MENU },
|
||||
{ 0x13, KEY_PRINT },
|
||||
{ 0x14, KEY_VOLUMEDOWN },
|
||||
{ 0x16, KEY_PAUSE },
|
||||
{ 0x18, KEY_RECORD },
|
||||
{ 0x19, KEY_REWIND },
|
||||
{ 0x1a, KEY_PLAY },
|
||||
{ 0x1b, KEY_FORWARD },
|
||||
{ 0x1c, KEY_BACKSPACE },
|
||||
{ 0x1e, KEY_STOP },
|
||||
{ 0x40, KEY_ZOOM },
|
||||
};
|
||||
|
||||
static struct rc_keymap em_terratec_map = {
|
||||
.map = {
|
||||
.scan = em_terratec,
|
||||
.size = ARRAY_SIZE(em_terratec),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_EM_TERRATEC,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_em_terratec(void)
|
||||
{
|
||||
return ir_register_map(&em_terratec_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_em_terratec(void)
|
||||
{
|
||||
ir_unregister_map(&em_terratec_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_em_terratec)
|
||||
module_exit(exit_rc_map_em_terratec)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
44
drivers/media/IR/keymaps/rc-empty.c
Normal file
44
drivers/media/IR/keymaps/rc-empty.c
Normal file
@ -0,0 +1,44 @@
|
||||
/* empty.h - Keytable for empty Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* empty keytable, can be used as placeholder for not-yet created keytables */
|
||||
|
||||
static struct ir_scancode empty[] = {
|
||||
{ 0x2a, KEY_COFFEE },
|
||||
};
|
||||
|
||||
static struct rc_keymap empty_map = {
|
||||
.map = {
|
||||
.scan = empty,
|
||||
.size = ARRAY_SIZE(empty),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_EMPTY,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_empty(void)
|
||||
{
|
||||
return ir_register_map(&empty_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_empty(void)
|
||||
{
|
||||
ir_unregister_map(&empty_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_empty)
|
||||
module_exit(exit_rc_map_empty)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
81
drivers/media/IR/keymaps/rc-encore-enltv-fm53.c
Normal file
81
drivers/media/IR/keymaps/rc-encore-enltv-fm53.c
Normal file
@ -0,0 +1,81 @@
|
||||
/* encore-enltv-fm53.h - Keytable for encore_enltv_fm53 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Encore ENLTV-FM v5.3
|
||||
Mauro Carvalho Chehab <mchehab@infradead.org>
|
||||
*/
|
||||
|
||||
static struct ir_scancode encore_enltv_fm53[] = {
|
||||
{ 0x10, KEY_POWER2},
|
||||
{ 0x06, KEY_MUTE},
|
||||
|
||||
{ 0x09, KEY_1},
|
||||
{ 0x1d, KEY_2},
|
||||
{ 0x1f, KEY_3},
|
||||
{ 0x19, KEY_4},
|
||||
{ 0x1b, KEY_5},
|
||||
{ 0x11, KEY_6},
|
||||
{ 0x17, KEY_7},
|
||||
{ 0x12, KEY_8},
|
||||
{ 0x16, KEY_9},
|
||||
{ 0x48, KEY_0},
|
||||
|
||||
{ 0x04, KEY_LIST}, /* -/-- */
|
||||
{ 0x40, KEY_LAST}, /* recall */
|
||||
|
||||
{ 0x02, KEY_MODE}, /* TV/AV */
|
||||
{ 0x05, KEY_CAMERA}, /* SNAPSHOT */
|
||||
|
||||
{ 0x4c, KEY_CHANNELUP}, /* UP */
|
||||
{ 0x00, KEY_CHANNELDOWN}, /* DOWN */
|
||||
{ 0x0d, KEY_VOLUMEUP}, /* RIGHT */
|
||||
{ 0x15, KEY_VOLUMEDOWN}, /* LEFT */
|
||||
{ 0x49, KEY_ENTER}, /* OK */
|
||||
|
||||
{ 0x54, KEY_RECORD},
|
||||
{ 0x4d, KEY_PLAY}, /* pause */
|
||||
|
||||
{ 0x1e, KEY_MENU}, /* video setting */
|
||||
{ 0x0e, KEY_RIGHT}, /* <- */
|
||||
{ 0x1a, KEY_LEFT}, /* -> */
|
||||
|
||||
{ 0x0a, KEY_CLEAR}, /* video default */
|
||||
{ 0x0c, KEY_ZOOM}, /* hide pannel */
|
||||
{ 0x47, KEY_SLEEP}, /* shutdown */
|
||||
};
|
||||
|
||||
static struct rc_keymap encore_enltv_fm53_map = {
|
||||
.map = {
|
||||
.scan = encore_enltv_fm53,
|
||||
.size = ARRAY_SIZE(encore_enltv_fm53),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_ENCORE_ENLTV_FM53,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_encore_enltv_fm53(void)
|
||||
{
|
||||
return ir_register_map(&encore_enltv_fm53_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_encore_enltv_fm53(void)
|
||||
{
|
||||
ir_unregister_map(&encore_enltv_fm53_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_encore_enltv_fm53)
|
||||
module_exit(exit_rc_map_encore_enltv_fm53)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
112
drivers/media/IR/keymaps/rc-encore-enltv.c
Normal file
112
drivers/media/IR/keymaps/rc-encore-enltv.c
Normal file
@ -0,0 +1,112 @@
|
||||
/* encore-enltv.h - Keytable for encore_enltv Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Encore ENLTV-FM - black plastic, white front cover with white glowing buttons
|
||||
Juan Pablo Sormani <sorman@gmail.com> */
|
||||
|
||||
static struct ir_scancode encore_enltv[] = {
|
||||
|
||||
/* Power button does nothing, neither in Windows app,
|
||||
although it sends data (used for BIOS wakeup?) */
|
||||
{ 0x0d, KEY_MUTE },
|
||||
|
||||
{ 0x1e, KEY_TV },
|
||||
{ 0x00, KEY_VIDEO },
|
||||
{ 0x01, KEY_AUDIO }, /* music */
|
||||
{ 0x02, KEY_MHP }, /* picture */
|
||||
|
||||
{ 0x1f, KEY_1 },
|
||||
{ 0x03, KEY_2 },
|
||||
{ 0x04, KEY_3 },
|
||||
{ 0x05, KEY_4 },
|
||||
{ 0x1c, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x1d, KEY_9 },
|
||||
{ 0x0a, KEY_0 },
|
||||
|
||||
{ 0x09, KEY_LIST }, /* -/-- */
|
||||
{ 0x0b, KEY_LAST }, /* recall */
|
||||
|
||||
{ 0x14, KEY_HOME }, /* win start menu */
|
||||
{ 0x15, KEY_EXIT }, /* exit */
|
||||
{ 0x16, KEY_CHANNELUP }, /* UP */
|
||||
{ 0x12, KEY_CHANNELDOWN }, /* DOWN */
|
||||
{ 0x0c, KEY_VOLUMEUP }, /* RIGHT */
|
||||
{ 0x17, KEY_VOLUMEDOWN }, /* LEFT */
|
||||
|
||||
{ 0x18, KEY_ENTER }, /* OK */
|
||||
|
||||
{ 0x0e, KEY_ESC },
|
||||
{ 0x13, KEY_CYCLEWINDOWS }, /* desktop */
|
||||
{ 0x11, KEY_TAB },
|
||||
{ 0x19, KEY_SWITCHVIDEOMODE }, /* switch */
|
||||
|
||||
{ 0x1a, KEY_MENU },
|
||||
{ 0x1b, KEY_ZOOM }, /* fullscreen */
|
||||
{ 0x44, KEY_TIME }, /* time shift */
|
||||
{ 0x40, KEY_MODE }, /* source */
|
||||
|
||||
{ 0x5a, KEY_RECORD },
|
||||
{ 0x42, KEY_PLAY }, /* play/pause */
|
||||
{ 0x45, KEY_STOP },
|
||||
{ 0x43, KEY_CAMERA }, /* camera icon */
|
||||
|
||||
{ 0x48, KEY_REWIND },
|
||||
{ 0x4a, KEY_FASTFORWARD },
|
||||
{ 0x49, KEY_PREVIOUS },
|
||||
{ 0x4b, KEY_NEXT },
|
||||
|
||||
{ 0x4c, KEY_FAVORITES }, /* tv wall */
|
||||
{ 0x4d, KEY_SOUND }, /* DVD sound */
|
||||
{ 0x4e, KEY_LANGUAGE }, /* DVD lang */
|
||||
{ 0x4f, KEY_TEXT }, /* DVD text */
|
||||
|
||||
{ 0x50, KEY_SLEEP }, /* shutdown */
|
||||
{ 0x51, KEY_MODE }, /* stereo > main */
|
||||
{ 0x52, KEY_SELECT }, /* stereo > sap */
|
||||
{ 0x53, KEY_PROG1 }, /* teletext */
|
||||
|
||||
|
||||
{ 0x59, KEY_RED }, /* AP1 */
|
||||
{ 0x41, KEY_GREEN }, /* AP2 */
|
||||
{ 0x47, KEY_YELLOW }, /* AP3 */
|
||||
{ 0x57, KEY_BLUE }, /* AP4 */
|
||||
};
|
||||
|
||||
static struct rc_keymap encore_enltv_map = {
|
||||
.map = {
|
||||
.scan = encore_enltv,
|
||||
.size = ARRAY_SIZE(encore_enltv),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_ENCORE_ENLTV,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_encore_enltv(void)
|
||||
{
|
||||
return ir_register_map(&encore_enltv_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_encore_enltv(void)
|
||||
{
|
||||
ir_unregister_map(&encore_enltv_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_encore_enltv)
|
||||
module_exit(exit_rc_map_encore_enltv)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
90
drivers/media/IR/keymaps/rc-encore-enltv2.c
Normal file
90
drivers/media/IR/keymaps/rc-encore-enltv2.c
Normal file
@ -0,0 +1,90 @@
|
||||
/* encore-enltv2.h - Keytable for encore_enltv2 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Encore ENLTV2-FM - silver plastic - "Wand Media" written at the botton
|
||||
Mauro Carvalho Chehab <mchehab@infradead.org> */
|
||||
|
||||
static struct ir_scancode encore_enltv2[] = {
|
||||
{ 0x4c, KEY_POWER2 },
|
||||
{ 0x4a, KEY_TUNER },
|
||||
{ 0x40, KEY_1 },
|
||||
{ 0x60, KEY_2 },
|
||||
{ 0x50, KEY_3 },
|
||||
{ 0x70, KEY_4 },
|
||||
{ 0x48, KEY_5 },
|
||||
{ 0x68, KEY_6 },
|
||||
{ 0x58, KEY_7 },
|
||||
{ 0x78, KEY_8 },
|
||||
{ 0x44, KEY_9 },
|
||||
{ 0x54, KEY_0 },
|
||||
|
||||
{ 0x64, KEY_LAST }, /* +100 */
|
||||
{ 0x4e, KEY_AGAIN }, /* Recall */
|
||||
|
||||
{ 0x6c, KEY_SWITCHVIDEOMODE }, /* Video Source */
|
||||
{ 0x5e, KEY_MENU },
|
||||
{ 0x56, KEY_SCREEN },
|
||||
{ 0x7a, KEY_SETUP },
|
||||
|
||||
{ 0x46, KEY_MUTE },
|
||||
{ 0x5c, KEY_MODE }, /* Stereo */
|
||||
{ 0x74, KEY_INFO },
|
||||
{ 0x7c, KEY_CLEAR },
|
||||
|
||||
{ 0x55, KEY_UP },
|
||||
{ 0x49, KEY_DOWN },
|
||||
{ 0x7e, KEY_LEFT },
|
||||
{ 0x59, KEY_RIGHT },
|
||||
{ 0x6a, KEY_ENTER },
|
||||
|
||||
{ 0x42, KEY_VOLUMEUP },
|
||||
{ 0x62, KEY_VOLUMEDOWN },
|
||||
{ 0x52, KEY_CHANNELUP },
|
||||
{ 0x72, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x41, KEY_RECORD },
|
||||
{ 0x51, KEY_CAMERA }, /* Snapshot */
|
||||
{ 0x75, KEY_TIME }, /* Timeshift */
|
||||
{ 0x71, KEY_TV2 }, /* PIP */
|
||||
|
||||
{ 0x45, KEY_REWIND },
|
||||
{ 0x6f, KEY_PAUSE },
|
||||
{ 0x7d, KEY_FORWARD },
|
||||
{ 0x79, KEY_STOP },
|
||||
};
|
||||
|
||||
static struct rc_keymap encore_enltv2_map = {
|
||||
.map = {
|
||||
.scan = encore_enltv2,
|
||||
.size = ARRAY_SIZE(encore_enltv2),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_ENCORE_ENLTV2,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_encore_enltv2(void)
|
||||
{
|
||||
return ir_register_map(&encore_enltv2_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_encore_enltv2(void)
|
||||
{
|
||||
ir_unregister_map(&encore_enltv2_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_encore_enltv2)
|
||||
module_exit(exit_rc_map_encore_enltv2)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
61
drivers/media/IR/keymaps/rc-evga-indtube.c
Normal file
61
drivers/media/IR/keymaps/rc-evga-indtube.c
Normal file
@ -0,0 +1,61 @@
|
||||
/* evga-indtube.h - Keytable for evga_indtube Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* EVGA inDtube
|
||||
Devin Heitmueller <devin.heitmueller@gmail.com>
|
||||
*/
|
||||
|
||||
static struct ir_scancode evga_indtube[] = {
|
||||
{ 0x12, KEY_POWER},
|
||||
{ 0x02, KEY_MODE}, /* TV */
|
||||
{ 0x14, KEY_MUTE},
|
||||
{ 0x1a, KEY_CHANNELUP},
|
||||
{ 0x16, KEY_TV2}, /* PIP */
|
||||
{ 0x1d, KEY_VOLUMEUP},
|
||||
{ 0x05, KEY_CHANNELDOWN},
|
||||
{ 0x0f, KEY_PLAYPAUSE},
|
||||
{ 0x19, KEY_VOLUMEDOWN},
|
||||
{ 0x1c, KEY_REWIND},
|
||||
{ 0x0d, KEY_RECORD},
|
||||
{ 0x18, KEY_FORWARD},
|
||||
{ 0x1e, KEY_PREVIOUS},
|
||||
{ 0x1b, KEY_STOP},
|
||||
{ 0x1f, KEY_NEXT},
|
||||
{ 0x13, KEY_CAMERA},
|
||||
};
|
||||
|
||||
static struct rc_keymap evga_indtube_map = {
|
||||
.map = {
|
||||
.scan = evga_indtube,
|
||||
.size = ARRAY_SIZE(evga_indtube),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_EVGA_INDTUBE,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_evga_indtube(void)
|
||||
{
|
||||
return ir_register_map(&evga_indtube_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_evga_indtube(void)
|
||||
{
|
||||
ir_unregister_map(&evga_indtube_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_evga_indtube)
|
||||
module_exit(exit_rc_map_evga_indtube)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
96
drivers/media/IR/keymaps/rc-eztv.c
Normal file
96
drivers/media/IR/keymaps/rc-eztv.c
Normal file
@ -0,0 +1,96 @@
|
||||
/* eztv.h - Keytable for eztv Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Alfons Geser <a.geser@cox.net>
|
||||
* updates from Job D. R. Borges <jobdrb@ig.com.br> */
|
||||
|
||||
static struct ir_scancode eztv[] = {
|
||||
{ 0x12, KEY_POWER },
|
||||
{ 0x01, KEY_TV }, /* DVR */
|
||||
{ 0x15, KEY_DVD }, /* DVD */
|
||||
{ 0x17, KEY_AUDIO }, /* music */
|
||||
/* DVR mode / DVD mode / music mode */
|
||||
|
||||
{ 0x1b, KEY_MUTE }, /* mute */
|
||||
{ 0x02, KEY_LANGUAGE }, /* MTS/SAP / audio / autoseek */
|
||||
{ 0x1e, KEY_SUBTITLE }, /* closed captioning / subtitle / seek */
|
||||
{ 0x16, KEY_ZOOM }, /* full screen */
|
||||
{ 0x1c, KEY_VIDEO }, /* video source / eject / delall */
|
||||
{ 0x1d, KEY_RESTART }, /* playback / angle / del */
|
||||
{ 0x2f, KEY_SEARCH }, /* scan / menu / playlist */
|
||||
{ 0x30, KEY_CHANNEL }, /* CH surfing / bookmark / memo */
|
||||
|
||||
{ 0x31, KEY_HELP }, /* help */
|
||||
{ 0x32, KEY_MODE }, /* num/memo */
|
||||
{ 0x33, KEY_ESC }, /* cancel */
|
||||
|
||||
{ 0x0c, KEY_UP }, /* up */
|
||||
{ 0x10, KEY_DOWN }, /* down */
|
||||
{ 0x08, KEY_LEFT }, /* left */
|
||||
{ 0x04, KEY_RIGHT }, /* right */
|
||||
{ 0x03, KEY_SELECT }, /* select */
|
||||
|
||||
{ 0x1f, KEY_REWIND }, /* rewind */
|
||||
{ 0x20, KEY_PLAYPAUSE },/* play/pause */
|
||||
{ 0x29, KEY_FORWARD }, /* forward */
|
||||
{ 0x14, KEY_AGAIN }, /* repeat */
|
||||
{ 0x2b, KEY_RECORD }, /* recording */
|
||||
{ 0x2c, KEY_STOP }, /* stop */
|
||||
{ 0x2d, KEY_PLAY }, /* play */
|
||||
{ 0x2e, KEY_CAMERA }, /* snapshot / shuffle */
|
||||
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x05, KEY_1 },
|
||||
{ 0x06, KEY_2 },
|
||||
{ 0x07, KEY_3 },
|
||||
{ 0x09, KEY_4 },
|
||||
{ 0x0a, KEY_5 },
|
||||
{ 0x0b, KEY_6 },
|
||||
{ 0x0d, KEY_7 },
|
||||
{ 0x0e, KEY_8 },
|
||||
{ 0x0f, KEY_9 },
|
||||
|
||||
{ 0x2a, KEY_VOLUMEUP },
|
||||
{ 0x11, KEY_VOLUMEDOWN },
|
||||
{ 0x18, KEY_CHANNELUP },/* CH.tracking up */
|
||||
{ 0x19, KEY_CHANNELDOWN },/* CH.tracking down */
|
||||
|
||||
{ 0x13, KEY_ENTER }, /* enter */
|
||||
{ 0x21, KEY_DOT }, /* . (decimal dot) */
|
||||
};
|
||||
|
||||
static struct rc_keymap eztv_map = {
|
||||
.map = {
|
||||
.scan = eztv,
|
||||
.size = ARRAY_SIZE(eztv),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_EZTV,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_eztv(void)
|
||||
{
|
||||
return ir_register_map(&eztv_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_eztv(void)
|
||||
{
|
||||
ir_unregister_map(&eztv_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_eztv)
|
||||
module_exit(exit_rc_map_eztv)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
77
drivers/media/IR/keymaps/rc-flydvb.c
Normal file
77
drivers/media/IR/keymaps/rc-flydvb.c
Normal file
@ -0,0 +1,77 @@
|
||||
/* flydvb.h - Keytable for flydvb Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode flydvb[] = {
|
||||
{ 0x01, KEY_ZOOM }, /* Full Screen */
|
||||
{ 0x00, KEY_POWER }, /* Power */
|
||||
|
||||
{ 0x03, KEY_1 },
|
||||
{ 0x04, KEY_2 },
|
||||
{ 0x05, KEY_3 },
|
||||
{ 0x07, KEY_4 },
|
||||
{ 0x08, KEY_5 },
|
||||
{ 0x09, KEY_6 },
|
||||
{ 0x0b, KEY_7 },
|
||||
{ 0x0c, KEY_8 },
|
||||
{ 0x0d, KEY_9 },
|
||||
{ 0x06, KEY_AGAIN }, /* Recall */
|
||||
{ 0x0f, KEY_0 },
|
||||
{ 0x10, KEY_MUTE }, /* Mute */
|
||||
{ 0x02, KEY_RADIO }, /* TV/Radio */
|
||||
{ 0x1b, KEY_LANGUAGE }, /* SAP (Second Audio Program) */
|
||||
|
||||
{ 0x14, KEY_VOLUMEUP }, /* VOL+ */
|
||||
{ 0x17, KEY_VOLUMEDOWN }, /* VOL- */
|
||||
{ 0x12, KEY_CHANNELUP }, /* CH+ */
|
||||
{ 0x13, KEY_CHANNELDOWN }, /* CH- */
|
||||
{ 0x1d, KEY_ENTER }, /* Enter */
|
||||
|
||||
{ 0x1a, KEY_MODE }, /* PIP */
|
||||
{ 0x18, KEY_TUNER }, /* Source */
|
||||
|
||||
{ 0x1e, KEY_RECORD }, /* Record/Pause */
|
||||
{ 0x15, KEY_ANGLE }, /* Swap (no label on key) */
|
||||
{ 0x1c, KEY_PAUSE }, /* Timeshift/Pause */
|
||||
{ 0x19, KEY_BACK }, /* Rewind << */
|
||||
{ 0x0a, KEY_PLAYPAUSE }, /* Play/Pause */
|
||||
{ 0x1f, KEY_FORWARD }, /* Forward >> */
|
||||
{ 0x16, KEY_PREVIOUS }, /* Back |<< */
|
||||
{ 0x11, KEY_STOP }, /* Stop */
|
||||
{ 0x0e, KEY_NEXT }, /* End >>| */
|
||||
};
|
||||
|
||||
static struct rc_keymap flydvb_map = {
|
||||
.map = {
|
||||
.scan = flydvb,
|
||||
.size = ARRAY_SIZE(flydvb),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_FLYDVB,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_flydvb(void)
|
||||
{
|
||||
return ir_register_map(&flydvb_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_flydvb(void)
|
||||
{
|
||||
ir_unregister_map(&flydvb_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_flydvb)
|
||||
module_exit(exit_rc_map_flydvb)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
70
drivers/media/IR/keymaps/rc-flyvideo.c
Normal file
70
drivers/media/IR/keymaps/rc-flyvideo.c
Normal file
@ -0,0 +1,70 @@
|
||||
/* flyvideo.h - Keytable for flyvideo Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode flyvideo[] = {
|
||||
{ 0x0f, KEY_0 },
|
||||
{ 0x03, KEY_1 },
|
||||
{ 0x04, KEY_2 },
|
||||
{ 0x05, KEY_3 },
|
||||
{ 0x07, KEY_4 },
|
||||
{ 0x08, KEY_5 },
|
||||
{ 0x09, KEY_6 },
|
||||
{ 0x0b, KEY_7 },
|
||||
{ 0x0c, KEY_8 },
|
||||
{ 0x0d, KEY_9 },
|
||||
|
||||
{ 0x0e, KEY_MODE }, /* Air/Cable */
|
||||
{ 0x11, KEY_VIDEO }, /* Video */
|
||||
{ 0x15, KEY_AUDIO }, /* Audio */
|
||||
{ 0x00, KEY_POWER }, /* Power */
|
||||
{ 0x18, KEY_TUNER }, /* AV Source */
|
||||
{ 0x02, KEY_ZOOM }, /* Fullscreen */
|
||||
{ 0x1a, KEY_LANGUAGE }, /* Stereo */
|
||||
{ 0x1b, KEY_MUTE }, /* Mute */
|
||||
{ 0x14, KEY_VOLUMEUP }, /* Volume + */
|
||||
{ 0x17, KEY_VOLUMEDOWN },/* Volume - */
|
||||
{ 0x12, KEY_CHANNELUP },/* Channel + */
|
||||
{ 0x13, KEY_CHANNELDOWN },/* Channel - */
|
||||
{ 0x06, KEY_AGAIN }, /* Recall */
|
||||
{ 0x10, KEY_ENTER }, /* Enter */
|
||||
|
||||
{ 0x19, KEY_BACK }, /* Rewind ( <<< ) */
|
||||
{ 0x1f, KEY_FORWARD }, /* Forward ( >>> ) */
|
||||
{ 0x0a, KEY_ANGLE }, /* no label, may be used as the PAUSE button */
|
||||
};
|
||||
|
||||
static struct rc_keymap flyvideo_map = {
|
||||
.map = {
|
||||
.scan = flyvideo,
|
||||
.size = ARRAY_SIZE(flyvideo),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_FLYVIDEO,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_flyvideo(void)
|
||||
{
|
||||
return ir_register_map(&flyvideo_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_flyvideo(void)
|
||||
{
|
||||
ir_unregister_map(&flyvideo_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_flyvideo)
|
||||
module_exit(exit_rc_map_flyvideo)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
98
drivers/media/IR/keymaps/rc-fusionhdtv-mce.c
Normal file
98
drivers/media/IR/keymaps/rc-fusionhdtv-mce.c
Normal file
@ -0,0 +1,98 @@
|
||||
/* fusionhdtv-mce.h - Keytable for fusionhdtv_mce Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* DViCO FUSION HDTV MCE remote */
|
||||
|
||||
static struct ir_scancode fusionhdtv_mce[] = {
|
||||
|
||||
{ 0x0b, KEY_1 },
|
||||
{ 0x17, KEY_2 },
|
||||
{ 0x1b, KEY_3 },
|
||||
{ 0x07, KEY_4 },
|
||||
{ 0x50, KEY_5 },
|
||||
{ 0x54, KEY_6 },
|
||||
{ 0x48, KEY_7 },
|
||||
{ 0x4c, KEY_8 },
|
||||
{ 0x58, KEY_9 },
|
||||
{ 0x03, KEY_0 },
|
||||
|
||||
{ 0x5e, KEY_OK },
|
||||
{ 0x51, KEY_UP },
|
||||
{ 0x53, KEY_DOWN },
|
||||
{ 0x5b, KEY_LEFT },
|
||||
{ 0x5f, KEY_RIGHT },
|
||||
|
||||
{ 0x02, KEY_TV }, /* Labeled DTV on remote */
|
||||
{ 0x0e, KEY_MP3 },
|
||||
{ 0x1a, KEY_DVD },
|
||||
{ 0x1e, KEY_FAVORITES }, /* Labeled CPF on remote */
|
||||
{ 0x16, KEY_SETUP },
|
||||
{ 0x46, KEY_POWER2 }, /* TV On/Off button on remote */
|
||||
{ 0x0a, KEY_EPG }, /* Labeled Guide on remote */
|
||||
|
||||
{ 0x49, KEY_BACK },
|
||||
{ 0x59, KEY_INFO }, /* Labeled MORE on remote */
|
||||
{ 0x4d, KEY_MENU }, /* Labeled DVDMENU on remote */
|
||||
{ 0x55, KEY_CYCLEWINDOWS }, /* Labeled ALT-TAB on remote */
|
||||
|
||||
{ 0x0f, KEY_PREVIOUSSONG }, /* Labeled |<< REPLAY on remote */
|
||||
{ 0x12, KEY_NEXTSONG }, /* Labeled >>| SKIP on remote */
|
||||
{ 0x42, KEY_ENTER }, /* Labeled START with a green
|
||||
MS windows logo on remote */
|
||||
|
||||
{ 0x15, KEY_VOLUMEUP },
|
||||
{ 0x05, KEY_VOLUMEDOWN },
|
||||
{ 0x11, KEY_CHANNELUP },
|
||||
{ 0x09, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x52, KEY_CAMERA },
|
||||
{ 0x5a, KEY_TUNER },
|
||||
{ 0x19, KEY_OPEN },
|
||||
|
||||
{ 0x13, KEY_MODE }, /* 4:3 16:9 select */
|
||||
{ 0x1f, KEY_ZOOM },
|
||||
|
||||
{ 0x43, KEY_REWIND },
|
||||
{ 0x47, KEY_PLAYPAUSE },
|
||||
{ 0x4f, KEY_FASTFORWARD },
|
||||
{ 0x57, KEY_MUTE },
|
||||
{ 0x0d, KEY_STOP },
|
||||
{ 0x01, KEY_RECORD },
|
||||
{ 0x4e, KEY_POWER },
|
||||
};
|
||||
|
||||
static struct rc_keymap fusionhdtv_mce_map = {
|
||||
.map = {
|
||||
.scan = fusionhdtv_mce,
|
||||
.size = ARRAY_SIZE(fusionhdtv_mce),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_FUSIONHDTV_MCE,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_fusionhdtv_mce(void)
|
||||
{
|
||||
return ir_register_map(&fusionhdtv_mce_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_fusionhdtv_mce(void)
|
||||
{
|
||||
ir_unregister_map(&fusionhdtv_mce_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_fusionhdtv_mce)
|
||||
module_exit(exit_rc_map_fusionhdtv_mce)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
81
drivers/media/IR/keymaps/rc-gadmei-rm008z.c
Normal file
81
drivers/media/IR/keymaps/rc-gadmei-rm008z.c
Normal file
@ -0,0 +1,81 @@
|
||||
/* gadmei-rm008z.h - Keytable for gadmei_rm008z Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* GADMEI UTV330+ RM008Z remote
|
||||
Shine Liu <shinel@foxmail.com>
|
||||
*/
|
||||
|
||||
static struct ir_scancode gadmei_rm008z[] = {
|
||||
{ 0x14, KEY_POWER2}, /* POWER OFF */
|
||||
{ 0x0c, KEY_MUTE}, /* MUTE */
|
||||
|
||||
{ 0x18, KEY_TV}, /* TV */
|
||||
{ 0x0e, KEY_VIDEO}, /* AV */
|
||||
{ 0x0b, KEY_AUDIO}, /* SV */
|
||||
{ 0x0f, KEY_RADIO}, /* FM */
|
||||
|
||||
{ 0x00, KEY_1},
|
||||
{ 0x01, KEY_2},
|
||||
{ 0x02, KEY_3},
|
||||
{ 0x03, KEY_4},
|
||||
{ 0x04, KEY_5},
|
||||
{ 0x05, KEY_6},
|
||||
{ 0x06, KEY_7},
|
||||
{ 0x07, KEY_8},
|
||||
{ 0x08, KEY_9},
|
||||
{ 0x09, KEY_0},
|
||||
{ 0x0a, KEY_INFO}, /* OSD */
|
||||
{ 0x1c, KEY_BACKSPACE}, /* LAST */
|
||||
|
||||
{ 0x0d, KEY_PLAY}, /* PLAY */
|
||||
{ 0x1e, KEY_CAMERA}, /* SNAPSHOT */
|
||||
{ 0x1a, KEY_RECORD}, /* RECORD */
|
||||
{ 0x17, KEY_STOP}, /* STOP */
|
||||
|
||||
{ 0x1f, KEY_UP}, /* UP */
|
||||
{ 0x44, KEY_DOWN}, /* DOWN */
|
||||
{ 0x46, KEY_TAB}, /* BACK */
|
||||
{ 0x4a, KEY_ZOOM}, /* FULLSECREEN */
|
||||
|
||||
{ 0x10, KEY_VOLUMEUP}, /* VOLUMEUP */
|
||||
{ 0x11, KEY_VOLUMEDOWN}, /* VOLUMEDOWN */
|
||||
{ 0x12, KEY_CHANNELUP}, /* CHANNELUP */
|
||||
{ 0x13, KEY_CHANNELDOWN}, /* CHANNELDOWN */
|
||||
{ 0x15, KEY_ENTER}, /* OK */
|
||||
};
|
||||
|
||||
static struct rc_keymap gadmei_rm008z_map = {
|
||||
.map = {
|
||||
.scan = gadmei_rm008z,
|
||||
.size = ARRAY_SIZE(gadmei_rm008z),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_GADMEI_RM008Z,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_gadmei_rm008z(void)
|
||||
{
|
||||
return ir_register_map(&gadmei_rm008z_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_gadmei_rm008z(void)
|
||||
{
|
||||
ir_unregister_map(&gadmei_rm008z_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_gadmei_rm008z)
|
||||
module_exit(exit_rc_map_gadmei_rm008z)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
84
drivers/media/IR/keymaps/rc-genius-tvgo-a11mce.c
Normal file
84
drivers/media/IR/keymaps/rc-genius-tvgo-a11mce.c
Normal file
@ -0,0 +1,84 @@
|
||||
/* genius-tvgo-a11mce.h - Keytable for genius_tvgo_a11mce Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* Remote control for the Genius TVGO A11MCE
|
||||
* Adrian Pardini <pardo.bsso@gmail.com>
|
||||
*/
|
||||
|
||||
static struct ir_scancode genius_tvgo_a11mce[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x48, KEY_0 },
|
||||
{ 0x09, KEY_1 },
|
||||
{ 0x1d, KEY_2 },
|
||||
{ 0x1f, KEY_3 },
|
||||
{ 0x19, KEY_4 },
|
||||
{ 0x1b, KEY_5 },
|
||||
{ 0x11, KEY_6 },
|
||||
{ 0x17, KEY_7 },
|
||||
{ 0x12, KEY_8 },
|
||||
{ 0x16, KEY_9 },
|
||||
|
||||
{ 0x54, KEY_RECORD }, /* recording */
|
||||
{ 0x06, KEY_MUTE }, /* mute */
|
||||
{ 0x10, KEY_POWER },
|
||||
{ 0x40, KEY_LAST }, /* recall */
|
||||
{ 0x4c, KEY_CHANNELUP }, /* channel / program + */
|
||||
{ 0x00, KEY_CHANNELDOWN }, /* channel / program - */
|
||||
{ 0x0d, KEY_VOLUMEUP },
|
||||
{ 0x15, KEY_VOLUMEDOWN },
|
||||
{ 0x4d, KEY_OK }, /* also labeled as Pause */
|
||||
{ 0x1c, KEY_ZOOM }, /* full screen and Stop*/
|
||||
{ 0x02, KEY_MODE }, /* AV Source or Rewind*/
|
||||
{ 0x04, KEY_LIST }, /* -/-- */
|
||||
/* small arrows above numbers */
|
||||
{ 0x1a, KEY_NEXT }, /* also Fast Forward */
|
||||
{ 0x0e, KEY_PREVIOUS }, /* also Rewind */
|
||||
/* these are in a rather non standard layout and have
|
||||
an alternate name written */
|
||||
{ 0x1e, KEY_UP }, /* Video Setting */
|
||||
{ 0x0a, KEY_DOWN }, /* Video Default */
|
||||
{ 0x05, KEY_CAMERA }, /* Snapshot */
|
||||
{ 0x0c, KEY_RIGHT }, /* Hide Panel */
|
||||
/* Four buttons without label */
|
||||
{ 0x49, KEY_RED },
|
||||
{ 0x0b, KEY_GREEN },
|
||||
{ 0x13, KEY_YELLOW },
|
||||
{ 0x50, KEY_BLUE },
|
||||
};
|
||||
|
||||
static struct rc_keymap genius_tvgo_a11mce_map = {
|
||||
.map = {
|
||||
.scan = genius_tvgo_a11mce,
|
||||
.size = ARRAY_SIZE(genius_tvgo_a11mce),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_GENIUS_TVGO_A11MCE,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_genius_tvgo_a11mce(void)
|
||||
{
|
||||
return ir_register_map(&genius_tvgo_a11mce_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_genius_tvgo_a11mce(void)
|
||||
{
|
||||
ir_unregister_map(&genius_tvgo_a11mce_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_genius_tvgo_a11mce)
|
||||
module_exit(exit_rc_map_genius_tvgo_a11mce)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
79
drivers/media/IR/keymaps/rc-gotview7135.c
Normal file
79
drivers/media/IR/keymaps/rc-gotview7135.c
Normal file
@ -0,0 +1,79 @@
|
||||
/* gotview7135.h - Keytable for gotview7135 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Mike Baikov <mike@baikov.com> */
|
||||
|
||||
static struct ir_scancode gotview7135[] = {
|
||||
|
||||
{ 0x11, KEY_POWER },
|
||||
{ 0x35, KEY_TV },
|
||||
{ 0x1b, KEY_0 },
|
||||
{ 0x29, KEY_1 },
|
||||
{ 0x19, KEY_2 },
|
||||
{ 0x39, KEY_3 },
|
||||
{ 0x1f, KEY_4 },
|
||||
{ 0x2c, KEY_5 },
|
||||
{ 0x21, KEY_6 },
|
||||
{ 0x24, KEY_7 },
|
||||
{ 0x18, KEY_8 },
|
||||
{ 0x2b, KEY_9 },
|
||||
{ 0x3b, KEY_AGAIN }, /* LOOP */
|
||||
{ 0x06, KEY_AUDIO },
|
||||
{ 0x31, KEY_PRINT }, /* PREVIEW */
|
||||
{ 0x3e, KEY_VIDEO },
|
||||
{ 0x10, KEY_CHANNELUP },
|
||||
{ 0x20, KEY_CHANNELDOWN },
|
||||
{ 0x0c, KEY_VOLUMEDOWN },
|
||||
{ 0x28, KEY_VOLUMEUP },
|
||||
{ 0x08, KEY_MUTE },
|
||||
{ 0x26, KEY_SEARCH }, /* SCAN */
|
||||
{ 0x3f, KEY_CAMERA }, /* SNAPSHOT */
|
||||
{ 0x12, KEY_RECORD },
|
||||
{ 0x32, KEY_STOP },
|
||||
{ 0x3c, KEY_PLAY },
|
||||
{ 0x1d, KEY_REWIND },
|
||||
{ 0x2d, KEY_PAUSE },
|
||||
{ 0x0d, KEY_FORWARD },
|
||||
{ 0x05, KEY_ZOOM }, /*FULL*/
|
||||
|
||||
{ 0x2a, KEY_F21 }, /* LIVE TIMESHIFT */
|
||||
{ 0x0e, KEY_F22 }, /* MIN TIMESHIFT */
|
||||
{ 0x1e, KEY_TIME }, /* TIMESHIFT */
|
||||
{ 0x38, KEY_F24 }, /* NORMAL TIMESHIFT */
|
||||
};
|
||||
|
||||
static struct rc_keymap gotview7135_map = {
|
||||
.map = {
|
||||
.scan = gotview7135,
|
||||
.size = ARRAY_SIZE(gotview7135),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_GOTVIEW7135,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_gotview7135(void)
|
||||
{
|
||||
return ir_register_map(&gotview7135_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_gotview7135(void)
|
||||
{
|
||||
ir_unregister_map(&gotview7135_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_gotview7135)
|
||||
module_exit(exit_rc_map_gotview7135)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
100
drivers/media/IR/keymaps/rc-hauppauge-new.c
Normal file
100
drivers/media/IR/keymaps/rc-hauppauge-new.c
Normal file
@ -0,0 +1,100 @@
|
||||
/* hauppauge-new.h - Keytable for hauppauge_new Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Hauppauge: the newer, gray remotes (seems there are multiple
|
||||
* slightly different versions), shipped with cx88+ivtv cards.
|
||||
* almost rc5 coding, but some non-standard keys */
|
||||
|
||||
static struct ir_scancode hauppauge_new[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x0a, KEY_TEXT }, /* keypad asterisk as well */
|
||||
{ 0x0b, KEY_RED }, /* red button */
|
||||
{ 0x0c, KEY_RADIO },
|
||||
{ 0x0d, KEY_MENU },
|
||||
{ 0x0e, KEY_SUBTITLE }, /* also the # key */
|
||||
{ 0x0f, KEY_MUTE },
|
||||
{ 0x10, KEY_VOLUMEUP },
|
||||
{ 0x11, KEY_VOLUMEDOWN },
|
||||
{ 0x12, KEY_PREVIOUS }, /* previous channel */
|
||||
{ 0x14, KEY_UP },
|
||||
{ 0x15, KEY_DOWN },
|
||||
{ 0x16, KEY_LEFT },
|
||||
{ 0x17, KEY_RIGHT },
|
||||
{ 0x18, KEY_VIDEO }, /* Videos */
|
||||
{ 0x19, KEY_AUDIO }, /* Music */
|
||||
/* 0x1a: Pictures - presume this means
|
||||
"Multimedia Home Platform" -
|
||||
no "PICTURES" key in input.h
|
||||
*/
|
||||
{ 0x1a, KEY_MHP },
|
||||
|
||||
{ 0x1b, KEY_EPG }, /* Guide */
|
||||
{ 0x1c, KEY_TV },
|
||||
{ 0x1e, KEY_NEXTSONG }, /* skip >| */
|
||||
{ 0x1f, KEY_EXIT }, /* back/exit */
|
||||
{ 0x20, KEY_CHANNELUP }, /* channel / program + */
|
||||
{ 0x21, KEY_CHANNELDOWN }, /* channel / program - */
|
||||
{ 0x22, KEY_CHANNEL }, /* source (old black remote) */
|
||||
{ 0x24, KEY_PREVIOUSSONG }, /* replay |< */
|
||||
{ 0x25, KEY_ENTER }, /* OK */
|
||||
{ 0x26, KEY_SLEEP }, /* minimize (old black remote) */
|
||||
{ 0x29, KEY_BLUE }, /* blue key */
|
||||
{ 0x2e, KEY_GREEN }, /* green button */
|
||||
{ 0x30, KEY_PAUSE }, /* pause */
|
||||
{ 0x32, KEY_REWIND }, /* backward << */
|
||||
{ 0x34, KEY_FASTFORWARD }, /* forward >> */
|
||||
{ 0x35, KEY_PLAY },
|
||||
{ 0x36, KEY_STOP },
|
||||
{ 0x37, KEY_RECORD }, /* recording */
|
||||
{ 0x38, KEY_YELLOW }, /* yellow key */
|
||||
{ 0x3b, KEY_SELECT }, /* top right button */
|
||||
{ 0x3c, KEY_ZOOM }, /* full */
|
||||
{ 0x3d, KEY_POWER }, /* system power (green button) */
|
||||
};
|
||||
|
||||
static struct rc_keymap hauppauge_new_map = {
|
||||
.map = {
|
||||
.scan = hauppauge_new,
|
||||
.size = ARRAY_SIZE(hauppauge_new),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_HAUPPAUGE_NEW,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_hauppauge_new(void)
|
||||
{
|
||||
return ir_register_map(&hauppauge_new_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_hauppauge_new(void)
|
||||
{
|
||||
ir_unregister_map(&hauppauge_new_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_hauppauge_new)
|
||||
module_exit(exit_rc_map_hauppauge_new)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
142
drivers/media/IR/keymaps/rc-imon-mce.c
Normal file
142
drivers/media/IR/keymaps/rc-imon-mce.c
Normal file
@ -0,0 +1,142 @@
|
||||
/* rc5-imon-mce.c - Keytable for Windows Media Center RC-6 remotes for use
|
||||
* with the SoundGraph iMON/Antec Veris hardware IR decoder
|
||||
*
|
||||
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* mce-mode imon mce remote key table */
|
||||
static struct ir_scancode imon_mce[] = {
|
||||
/* keys sorted mostly by frequency of use to optimize lookups */
|
||||
{ 0x800ff415, KEY_REWIND },
|
||||
{ 0x800ff414, KEY_FASTFORWARD },
|
||||
{ 0x800ff41b, KEY_PREVIOUS },
|
||||
{ 0x800ff41a, KEY_NEXT },
|
||||
|
||||
{ 0x800ff416, KEY_PLAY },
|
||||
{ 0x800ff418, KEY_PAUSE },
|
||||
{ 0x800ff419, KEY_STOP },
|
||||
{ 0x800ff417, KEY_RECORD },
|
||||
|
||||
{ 0x02000052, KEY_UP },
|
||||
{ 0x02000051, KEY_DOWN },
|
||||
{ 0x02000050, KEY_LEFT },
|
||||
{ 0x0200004f, KEY_RIGHT },
|
||||
|
||||
{ 0x800ff41e, KEY_UP },
|
||||
{ 0x800ff41f, KEY_DOWN },
|
||||
{ 0x800ff420, KEY_LEFT },
|
||||
{ 0x800ff421, KEY_RIGHT },
|
||||
|
||||
/* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */
|
||||
{ 0x800ff40b, KEY_ENTER },
|
||||
{ 0x02000028, KEY_ENTER },
|
||||
/* the OK and Enter buttons decode to the same value on some remotes
|
||||
{ 0x02000028, KEY_OK }, */
|
||||
{ 0x800ff422, KEY_OK },
|
||||
{ 0x0200002a, KEY_EXIT },
|
||||
{ 0x800ff423, KEY_EXIT },
|
||||
{ 0x02000029, KEY_DELETE },
|
||||
/* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */
|
||||
{ 0x800ff40a, KEY_DELETE },
|
||||
|
||||
{ 0x800ff40e, KEY_MUTE },
|
||||
{ 0x800ff410, KEY_VOLUMEUP },
|
||||
{ 0x800ff411, KEY_VOLUMEDOWN },
|
||||
{ 0x800ff412, KEY_CHANNELUP },
|
||||
{ 0x800ff413, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x0200001e, KEY_NUMERIC_1 },
|
||||
{ 0x0200001f, KEY_NUMERIC_2 },
|
||||
{ 0x02000020, KEY_NUMERIC_3 },
|
||||
{ 0x02000021, KEY_NUMERIC_4 },
|
||||
{ 0x02000022, KEY_NUMERIC_5 },
|
||||
{ 0x02000023, KEY_NUMERIC_6 },
|
||||
{ 0x02000024, KEY_NUMERIC_7 },
|
||||
{ 0x02000025, KEY_NUMERIC_8 },
|
||||
{ 0x02000026, KEY_NUMERIC_9 },
|
||||
{ 0x02000027, KEY_NUMERIC_0 },
|
||||
|
||||
{ 0x800ff401, KEY_NUMERIC_1 },
|
||||
{ 0x800ff402, KEY_NUMERIC_2 },
|
||||
{ 0x800ff403, KEY_NUMERIC_3 },
|
||||
{ 0x800ff404, KEY_NUMERIC_4 },
|
||||
{ 0x800ff405, KEY_NUMERIC_5 },
|
||||
{ 0x800ff406, KEY_NUMERIC_6 },
|
||||
{ 0x800ff407, KEY_NUMERIC_7 },
|
||||
{ 0x800ff408, KEY_NUMERIC_8 },
|
||||
{ 0x800ff409, KEY_NUMERIC_9 },
|
||||
{ 0x800ff400, KEY_NUMERIC_0 },
|
||||
|
||||
{ 0x02200025, KEY_NUMERIC_STAR },
|
||||
{ 0x02200020, KEY_NUMERIC_POUND },
|
||||
/* 0x800ff41d also KEY_BLUE on some receivers */
|
||||
{ 0x800ff41d, KEY_NUMERIC_STAR },
|
||||
/* 0x800ff41c also KEY_PREVIOUS on some receivers */
|
||||
{ 0x800ff41c, KEY_NUMERIC_POUND },
|
||||
|
||||
{ 0x800ff446, KEY_TV },
|
||||
{ 0x800ff447, KEY_AUDIO }, /* My Music */
|
||||
{ 0x800ff448, KEY_PVR }, /* RecordedTV */
|
||||
{ 0x800ff449, KEY_CAMERA },
|
||||
{ 0x800ff44a, KEY_VIDEO },
|
||||
/* 0x800ff424 also KEY_MENU on some receivers */
|
||||
{ 0x800ff424, KEY_DVD },
|
||||
/* 0x800ff425 also KEY_GREEN on some receivers */
|
||||
{ 0x800ff425, KEY_TUNER }, /* LiveTV */
|
||||
{ 0x800ff450, KEY_RADIO },
|
||||
|
||||
{ 0x800ff44c, KEY_LANGUAGE },
|
||||
{ 0x800ff427, KEY_ZOOM }, /* Aspect */
|
||||
|
||||
{ 0x800ff45b, KEY_RED },
|
||||
{ 0x800ff45c, KEY_GREEN },
|
||||
{ 0x800ff45d, KEY_YELLOW },
|
||||
{ 0x800ff45e, KEY_BLUE },
|
||||
|
||||
{ 0x800ff466, KEY_RED },
|
||||
/* { 0x800ff425, KEY_GREEN }, */
|
||||
{ 0x800ff468, KEY_YELLOW },
|
||||
/* { 0x800ff41d, KEY_BLUE }, */
|
||||
|
||||
{ 0x800ff40f, KEY_INFO },
|
||||
{ 0x800ff426, KEY_EPG }, /* Guide */
|
||||
{ 0x800ff45a, KEY_SUBTITLE }, /* Caption/Teletext */
|
||||
{ 0x800ff44d, KEY_TITLE },
|
||||
|
||||
{ 0x800ff40c, KEY_POWER },
|
||||
{ 0x800ff40d, KEY_PROG1 }, /* Windows MCE button */
|
||||
|
||||
};
|
||||
|
||||
static struct rc_keymap imon_mce_map = {
|
||||
.map = {
|
||||
.scan = imon_mce,
|
||||
.size = ARRAY_SIZE(imon_mce),
|
||||
/* its RC6, but w/a hardware decoder */
|
||||
.ir_type = IR_TYPE_RC6,
|
||||
.name = RC_MAP_IMON_MCE,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_imon_mce(void)
|
||||
{
|
||||
return ir_register_map(&imon_mce_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_imon_mce(void)
|
||||
{
|
||||
ir_unregister_map(&imon_mce_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_imon_mce)
|
||||
module_exit(exit_rc_map_imon_mce)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
|
156
drivers/media/IR/keymaps/rc-imon-pad.c
Normal file
156
drivers/media/IR/keymaps/rc-imon-pad.c
Normal file
@ -0,0 +1,156 @@
|
||||
/* rc5-imon-pad.c - Keytable for SoundGraph iMON PAD and Antec Veris
|
||||
* RM-200 Remote Control
|
||||
*
|
||||
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* standard imon remote key table, which isn't really entirely
|
||||
* "standard", as different receivers decode the same key on the
|
||||
* same remote to different hex codes, and the silkscreened names
|
||||
* vary a bit between the SoundGraph and Antec remotes... ugh.
|
||||
*/
|
||||
static struct ir_scancode imon_pad[] = {
|
||||
/* keys sorted mostly by frequency of use to optimize lookups */
|
||||
{ 0x2a8195b7, KEY_REWIND },
|
||||
{ 0x298315b7, KEY_REWIND },
|
||||
{ 0x2b8115b7, KEY_FASTFORWARD },
|
||||
{ 0x2b8315b7, KEY_FASTFORWARD },
|
||||
{ 0x2b9115b7, KEY_PREVIOUS },
|
||||
{ 0x298195b7, KEY_NEXT },
|
||||
|
||||
{ 0x2a8115b7, KEY_PLAY },
|
||||
{ 0x2a8315b7, KEY_PLAY },
|
||||
{ 0x2a9115b7, KEY_PAUSE },
|
||||
{ 0x2b9715b7, KEY_STOP },
|
||||
{ 0x298115b7, KEY_RECORD },
|
||||
|
||||
{ 0x01008000, KEY_UP },
|
||||
{ 0x01007f00, KEY_DOWN },
|
||||
{ 0x01000080, KEY_LEFT },
|
||||
{ 0x0100007f, KEY_RIGHT },
|
||||
|
||||
{ 0x2aa515b7, KEY_UP },
|
||||
{ 0x289515b7, KEY_DOWN },
|
||||
{ 0x29a515b7, KEY_LEFT },
|
||||
{ 0x2ba515b7, KEY_RIGHT },
|
||||
|
||||
{ 0x0200002c, KEY_SPACE }, /* Select/Space */
|
||||
{ 0x2a9315b7, KEY_SPACE }, /* Select/Space */
|
||||
{ 0x02000028, KEY_ENTER },
|
||||
{ 0x28a195b7, KEY_ENTER },
|
||||
{ 0x288195b7, KEY_EXIT },
|
||||
{ 0x02000029, KEY_ESC },
|
||||
{ 0x2bb715b7, KEY_ESC },
|
||||
{ 0x0200002a, KEY_BACKSPACE },
|
||||
{ 0x28a115b7, KEY_BACKSPACE },
|
||||
|
||||
{ 0x2b9595b7, KEY_MUTE },
|
||||
{ 0x28a395b7, KEY_VOLUMEUP },
|
||||
{ 0x28a595b7, KEY_VOLUMEDOWN },
|
||||
{ 0x289395b7, KEY_CHANNELUP },
|
||||
{ 0x288795b7, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x0200001e, KEY_NUMERIC_1 },
|
||||
{ 0x0200001f, KEY_NUMERIC_2 },
|
||||
{ 0x02000020, KEY_NUMERIC_3 },
|
||||
{ 0x02000021, KEY_NUMERIC_4 },
|
||||
{ 0x02000022, KEY_NUMERIC_5 },
|
||||
{ 0x02000023, KEY_NUMERIC_6 },
|
||||
{ 0x02000024, KEY_NUMERIC_7 },
|
||||
{ 0x02000025, KEY_NUMERIC_8 },
|
||||
{ 0x02000026, KEY_NUMERIC_9 },
|
||||
{ 0x02000027, KEY_NUMERIC_0 },
|
||||
|
||||
{ 0x28b595b7, KEY_NUMERIC_1 },
|
||||
{ 0x2bb195b7, KEY_NUMERIC_2 },
|
||||
{ 0x28b195b7, KEY_NUMERIC_3 },
|
||||
{ 0x2a8595b7, KEY_NUMERIC_4 },
|
||||
{ 0x299595b7, KEY_NUMERIC_5 },
|
||||
{ 0x2aa595b7, KEY_NUMERIC_6 },
|
||||
{ 0x2b9395b7, KEY_NUMERIC_7 },
|
||||
{ 0x2a8515b7, KEY_NUMERIC_8 },
|
||||
{ 0x2aa115b7, KEY_NUMERIC_9 },
|
||||
{ 0x2ba595b7, KEY_NUMERIC_0 },
|
||||
|
||||
{ 0x02200025, KEY_NUMERIC_STAR },
|
||||
{ 0x28b515b7, KEY_NUMERIC_STAR },
|
||||
{ 0x02200020, KEY_NUMERIC_POUND },
|
||||
{ 0x29a115b7, KEY_NUMERIC_POUND },
|
||||
|
||||
{ 0x2b8515b7, KEY_VIDEO },
|
||||
{ 0x299195b7, KEY_AUDIO },
|
||||
{ 0x2ba115b7, KEY_CAMERA },
|
||||
{ 0x28a515b7, KEY_TV },
|
||||
{ 0x29a395b7, KEY_DVD },
|
||||
{ 0x29a295b7, KEY_DVD },
|
||||
|
||||
/* the Menu key between DVD and Subtitle on the RM-200... */
|
||||
{ 0x2ba385b7, KEY_MENU },
|
||||
{ 0x2ba395b7, KEY_MENU },
|
||||
|
||||
{ 0x288515b7, KEY_BOOKMARKS },
|
||||
{ 0x2ab715b7, KEY_MEDIA }, /* Thumbnail */
|
||||
{ 0x298595b7, KEY_SUBTITLE },
|
||||
{ 0x2b8595b7, KEY_LANGUAGE },
|
||||
|
||||
{ 0x29a595b7, KEY_ZOOM },
|
||||
{ 0x2aa395b7, KEY_SCREEN }, /* FullScreen */
|
||||
|
||||
{ 0x299115b7, KEY_KEYBOARD },
|
||||
{ 0x299135b7, KEY_KEYBOARD },
|
||||
|
||||
{ 0x01010000, BTN_LEFT },
|
||||
{ 0x01020000, BTN_RIGHT },
|
||||
{ 0x01010080, BTN_LEFT },
|
||||
{ 0x01020080, BTN_RIGHT },
|
||||
{ 0x688301b7, BTN_LEFT },
|
||||
{ 0x688481b7, BTN_RIGHT },
|
||||
|
||||
{ 0x2a9395b7, KEY_CYCLEWINDOWS }, /* TaskSwitcher */
|
||||
{ 0x2b8395b7, KEY_TIME }, /* Timer */
|
||||
|
||||
{ 0x289115b7, KEY_POWER },
|
||||
{ 0x29b195b7, KEY_EJECTCD }, /* the one next to play */
|
||||
{ 0x299395b7, KEY_EJECTCLOSECD }, /* eject (by TaskSw) */
|
||||
|
||||
{ 0x02800000, KEY_CONTEXT_MENU }, /* Left Menu */
|
||||
{ 0x2b8195b7, KEY_CONTEXT_MENU }, /* Left Menu*/
|
||||
{ 0x02000065, KEY_COMPOSE }, /* RightMenu */
|
||||
{ 0x28b715b7, KEY_COMPOSE }, /* RightMenu */
|
||||
{ 0x2ab195b7, KEY_PROG1 }, /* Go or MultiMon */
|
||||
{ 0x29b715b7, KEY_DASHBOARD }, /* AppLauncher */
|
||||
};
|
||||
|
||||
static struct rc_keymap imon_pad_map = {
|
||||
.map = {
|
||||
.scan = imon_pad,
|
||||
.size = ARRAY_SIZE(imon_pad),
|
||||
/* actual protocol details unknown, hardware decoder */
|
||||
.ir_type = IR_TYPE_OTHER,
|
||||
.name = RC_MAP_IMON_PAD,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_imon_pad(void)
|
||||
{
|
||||
return ir_register_map(&imon_pad_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_imon_pad(void)
|
||||
{
|
||||
ir_unregister_map(&imon_pad_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_imon_pad)
|
||||
module_exit(exit_rc_map_imon_pad)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
|
88
drivers/media/IR/keymaps/rc-iodata-bctv7e.c
Normal file
88
drivers/media/IR/keymaps/rc-iodata-bctv7e.c
Normal file
@ -0,0 +1,88 @@
|
||||
/* iodata-bctv7e.h - Keytable for iodata_bctv7e Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* IO-DATA BCTV7E Remote */
|
||||
|
||||
static struct ir_scancode iodata_bctv7e[] = {
|
||||
{ 0x40, KEY_TV },
|
||||
{ 0x20, KEY_RADIO }, /* FM */
|
||||
{ 0x60, KEY_EPG },
|
||||
{ 0x00, KEY_POWER },
|
||||
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x44, KEY_0 }, /* 10 */
|
||||
{ 0x50, KEY_1 },
|
||||
{ 0x30, KEY_2 },
|
||||
{ 0x70, KEY_3 },
|
||||
{ 0x48, KEY_4 },
|
||||
{ 0x28, KEY_5 },
|
||||
{ 0x68, KEY_6 },
|
||||
{ 0x58, KEY_7 },
|
||||
{ 0x38, KEY_8 },
|
||||
{ 0x78, KEY_9 },
|
||||
|
||||
{ 0x10, KEY_L }, /* Live */
|
||||
{ 0x08, KEY_TIME }, /* Time Shift */
|
||||
|
||||
{ 0x18, KEY_PLAYPAUSE }, /* Play */
|
||||
|
||||
{ 0x24, KEY_ENTER }, /* 11 */
|
||||
{ 0x64, KEY_ESC }, /* 12 */
|
||||
{ 0x04, KEY_M }, /* Multi */
|
||||
|
||||
{ 0x54, KEY_VIDEO },
|
||||
{ 0x34, KEY_CHANNELUP },
|
||||
{ 0x74, KEY_VOLUMEUP },
|
||||
{ 0x14, KEY_MUTE },
|
||||
|
||||
{ 0x4c, KEY_VCR }, /* SVIDEO */
|
||||
{ 0x2c, KEY_CHANNELDOWN },
|
||||
{ 0x6c, KEY_VOLUMEDOWN },
|
||||
{ 0x0c, KEY_ZOOM },
|
||||
|
||||
{ 0x5c, KEY_PAUSE },
|
||||
{ 0x3c, KEY_RED }, /* || (red) */
|
||||
{ 0x7c, KEY_RECORD }, /* recording */
|
||||
{ 0x1c, KEY_STOP },
|
||||
|
||||
{ 0x41, KEY_REWIND }, /* backward << */
|
||||
{ 0x21, KEY_PLAY },
|
||||
{ 0x61, KEY_FASTFORWARD }, /* forward >> */
|
||||
{ 0x01, KEY_NEXT }, /* skip >| */
|
||||
};
|
||||
|
||||
static struct rc_keymap iodata_bctv7e_map = {
|
||||
.map = {
|
||||
.scan = iodata_bctv7e,
|
||||
.size = ARRAY_SIZE(iodata_bctv7e),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_IODATA_BCTV7E,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_iodata_bctv7e(void)
|
||||
{
|
||||
return ir_register_map(&iodata_bctv7e_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_iodata_bctv7e(void)
|
||||
{
|
||||
ir_unregister_map(&iodata_bctv7e_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_iodata_bctv7e)
|
||||
module_exit(exit_rc_map_iodata_bctv7e)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
87
drivers/media/IR/keymaps/rc-kaiomy.c
Normal file
87
drivers/media/IR/keymaps/rc-kaiomy.c
Normal file
@ -0,0 +1,87 @@
|
||||
/* kaiomy.h - Keytable for kaiomy Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Kaiomy TVnPC U2
|
||||
Mauro Carvalho Chehab <mchehab@infradead.org>
|
||||
*/
|
||||
|
||||
static struct ir_scancode kaiomy[] = {
|
||||
{ 0x43, KEY_POWER2},
|
||||
{ 0x01, KEY_LIST},
|
||||
{ 0x0b, KEY_ZOOM},
|
||||
{ 0x03, KEY_POWER},
|
||||
|
||||
{ 0x04, KEY_1},
|
||||
{ 0x08, KEY_2},
|
||||
{ 0x02, KEY_3},
|
||||
|
||||
{ 0x0f, KEY_4},
|
||||
{ 0x05, KEY_5},
|
||||
{ 0x06, KEY_6},
|
||||
|
||||
{ 0x0c, KEY_7},
|
||||
{ 0x0d, KEY_8},
|
||||
{ 0x0a, KEY_9},
|
||||
|
||||
{ 0x11, KEY_0},
|
||||
|
||||
{ 0x09, KEY_CHANNELUP},
|
||||
{ 0x07, KEY_CHANNELDOWN},
|
||||
|
||||
{ 0x0e, KEY_VOLUMEUP},
|
||||
{ 0x13, KEY_VOLUMEDOWN},
|
||||
|
||||
{ 0x10, KEY_HOME},
|
||||
{ 0x12, KEY_ENTER},
|
||||
|
||||
{ 0x14, KEY_RECORD},
|
||||
{ 0x15, KEY_STOP},
|
||||
{ 0x16, KEY_PLAY},
|
||||
{ 0x17, KEY_MUTE},
|
||||
|
||||
{ 0x18, KEY_UP},
|
||||
{ 0x19, KEY_DOWN},
|
||||
{ 0x1a, KEY_LEFT},
|
||||
{ 0x1b, KEY_RIGHT},
|
||||
|
||||
{ 0x1c, KEY_RED},
|
||||
{ 0x1d, KEY_GREEN},
|
||||
{ 0x1e, KEY_YELLOW},
|
||||
{ 0x1f, KEY_BLUE},
|
||||
};
|
||||
|
||||
static struct rc_keymap kaiomy_map = {
|
||||
.map = {
|
||||
.scan = kaiomy,
|
||||
.size = ARRAY_SIZE(kaiomy),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_KAIOMY,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_kaiomy(void)
|
||||
{
|
||||
return ir_register_map(&kaiomy_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_kaiomy(void)
|
||||
{
|
||||
ir_unregister_map(&kaiomy_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_kaiomy)
|
||||
module_exit(exit_rc_map_kaiomy)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
83
drivers/media/IR/keymaps/rc-kworld-315u.c
Normal file
83
drivers/media/IR/keymaps/rc-kworld-315u.c
Normal file
@ -0,0 +1,83 @@
|
||||
/* kworld-315u.h - Keytable for kworld_315u Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Kworld 315U
|
||||
*/
|
||||
|
||||
static struct ir_scancode kworld_315u[] = {
|
||||
{ 0x6143, KEY_POWER },
|
||||
{ 0x6101, KEY_TUNER }, /* source */
|
||||
{ 0x610b, KEY_ZOOM },
|
||||
{ 0x6103, KEY_POWER2 }, /* shutdown */
|
||||
|
||||
{ 0x6104, KEY_1 },
|
||||
{ 0x6108, KEY_2 },
|
||||
{ 0x6102, KEY_3 },
|
||||
{ 0x6109, KEY_CHANNELUP },
|
||||
|
||||
{ 0x610f, KEY_4 },
|
||||
{ 0x6105, KEY_5 },
|
||||
{ 0x6106, KEY_6 },
|
||||
{ 0x6107, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x610c, KEY_7 },
|
||||
{ 0x610d, KEY_8 },
|
||||
{ 0x610a, KEY_9 },
|
||||
{ 0x610e, KEY_VOLUMEUP },
|
||||
|
||||
{ 0x6110, KEY_LAST },
|
||||
{ 0x6111, KEY_0 },
|
||||
{ 0x6112, KEY_ENTER },
|
||||
{ 0x6113, KEY_VOLUMEDOWN },
|
||||
|
||||
{ 0x6114, KEY_RECORD },
|
||||
{ 0x6115, KEY_STOP },
|
||||
{ 0x6116, KEY_PLAY },
|
||||
{ 0x6117, KEY_MUTE },
|
||||
|
||||
{ 0x6118, KEY_UP },
|
||||
{ 0x6119, KEY_DOWN },
|
||||
{ 0x611a, KEY_LEFT },
|
||||
{ 0x611b, KEY_RIGHT },
|
||||
|
||||
{ 0x611c, KEY_RED },
|
||||
{ 0x611d, KEY_GREEN },
|
||||
{ 0x611e, KEY_YELLOW },
|
||||
{ 0x611f, KEY_BLUE },
|
||||
};
|
||||
|
||||
static struct rc_keymap kworld_315u_map = {
|
||||
.map = {
|
||||
.scan = kworld_315u,
|
||||
.size = ARRAY_SIZE(kworld_315u),
|
||||
.ir_type = IR_TYPE_NEC,
|
||||
.name = RC_MAP_KWORLD_315U,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_kworld_315u(void)
|
||||
{
|
||||
return ir_register_map(&kworld_315u_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_kworld_315u(void)
|
||||
{
|
||||
ir_unregister_map(&kworld_315u_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_kworld_315u)
|
||||
module_exit(exit_rc_map_kworld_315u)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
99
drivers/media/IR/keymaps/rc-kworld-plus-tv-analog.c
Normal file
99
drivers/media/IR/keymaps/rc-kworld-plus-tv-analog.c
Normal file
@ -0,0 +1,99 @@
|
||||
/* kworld-plus-tv-analog.h - Keytable for kworld_plus_tv_analog Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Kworld Plus TV Analog Lite PCI IR
|
||||
Mauro Carvalho Chehab <mchehab@infradead.org>
|
||||
*/
|
||||
|
||||
static struct ir_scancode kworld_plus_tv_analog[] = {
|
||||
{ 0x0c, KEY_PROG1 }, /* Kworld key */
|
||||
{ 0x16, KEY_CLOSECD }, /* -> ) */
|
||||
{ 0x1d, KEY_POWER2 },
|
||||
|
||||
{ 0x00, KEY_1 },
|
||||
{ 0x01, KEY_2 },
|
||||
{ 0x02, KEY_3 }, /* Two keys have the same code: 3 and left */
|
||||
{ 0x03, KEY_4 }, /* Two keys have the same code: 3 and right */
|
||||
{ 0x04, KEY_5 },
|
||||
{ 0x05, KEY_6 },
|
||||
{ 0x06, KEY_7 },
|
||||
{ 0x07, KEY_8 },
|
||||
{ 0x08, KEY_9 },
|
||||
{ 0x0a, KEY_0 },
|
||||
|
||||
{ 0x09, KEY_AGAIN },
|
||||
{ 0x14, KEY_MUTE },
|
||||
|
||||
{ 0x20, KEY_UP },
|
||||
{ 0x21, KEY_DOWN },
|
||||
{ 0x0b, KEY_ENTER },
|
||||
|
||||
{ 0x10, KEY_CHANNELUP },
|
||||
{ 0x11, KEY_CHANNELDOWN },
|
||||
|
||||
/* Couldn't map key left/key right since those
|
||||
conflict with '3' and '4' scancodes
|
||||
I dunno what the original driver does
|
||||
*/
|
||||
|
||||
{ 0x13, KEY_VOLUMEUP },
|
||||
{ 0x12, KEY_VOLUMEDOWN },
|
||||
|
||||
/* The lower part of the IR
|
||||
There are several duplicated keycodes there.
|
||||
Most of them conflict with digits.
|
||||
Add mappings just to the unused scancodes.
|
||||
Somehow, the original driver has a way to know,
|
||||
but this doesn't seem to be on some GPIO.
|
||||
Also, it is not related to the time between keyup
|
||||
and keydown.
|
||||
*/
|
||||
{ 0x19, KEY_TIME}, /* Timeshift */
|
||||
{ 0x1a, KEY_STOP},
|
||||
{ 0x1b, KEY_RECORD},
|
||||
|
||||
{ 0x22, KEY_TEXT},
|
||||
|
||||
{ 0x15, KEY_AUDIO}, /* ((*)) */
|
||||
{ 0x0f, KEY_ZOOM},
|
||||
{ 0x1c, KEY_CAMERA}, /* snapshot */
|
||||
|
||||
{ 0x18, KEY_RED}, /* B */
|
||||
{ 0x23, KEY_GREEN}, /* C */
|
||||
};
|
||||
|
||||
static struct rc_keymap kworld_plus_tv_analog_map = {
|
||||
.map = {
|
||||
.scan = kworld_plus_tv_analog,
|
||||
.size = ARRAY_SIZE(kworld_plus_tv_analog),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_KWORLD_PLUS_TV_ANALOG,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_kworld_plus_tv_analog(void)
|
||||
{
|
||||
return ir_register_map(&kworld_plus_tv_analog_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_kworld_plus_tv_analog(void)
|
||||
{
|
||||
ir_unregister_map(&kworld_plus_tv_analog_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_kworld_plus_tv_analog)
|
||||
module_exit(exit_rc_map_kworld_plus_tv_analog)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
135
drivers/media/IR/keymaps/rc-manli.c
Normal file
135
drivers/media/IR/keymaps/rc-manli.c
Normal file
@ -0,0 +1,135 @@
|
||||
/* manli.h - Keytable for manli Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Michael Tokarev <mjt@tls.msk.ru>
|
||||
http://www.corpit.ru/mjt/beholdTV/remote_control.jpg
|
||||
keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
|
||||
least, and probably other cards too.
|
||||
The "ascii-art picture" below (in comments, first row
|
||||
is the keycode in hex, and subsequent row(s) shows
|
||||
the button labels (several variants when appropriate)
|
||||
helps to descide which keycodes to assign to the buttons.
|
||||
*/
|
||||
|
||||
static struct ir_scancode manli[] = {
|
||||
|
||||
/* 0x1c 0x12 *
|
||||
* FUNCTION POWER *
|
||||
* FM (|) *
|
||||
* */
|
||||
{ 0x1c, KEY_RADIO }, /*XXX*/
|
||||
{ 0x12, KEY_POWER },
|
||||
|
||||
/* 0x01 0x02 0x03 *
|
||||
* 1 2 3 *
|
||||
* *
|
||||
* 0x04 0x05 0x06 *
|
||||
* 4 5 6 *
|
||||
* *
|
||||
* 0x07 0x08 0x09 *
|
||||
* 7 8 9 *
|
||||
* */
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
/* 0x0a 0x00 0x17 *
|
||||
* RECALL 0 +100 *
|
||||
* PLUS *
|
||||
* */
|
||||
{ 0x0a, KEY_AGAIN }, /*XXX KEY_REWIND? */
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x17, KEY_DIGITS }, /*XXX*/
|
||||
|
||||
/* 0x14 0x10 *
|
||||
* MENU INFO *
|
||||
* OSD */
|
||||
{ 0x14, KEY_MENU },
|
||||
{ 0x10, KEY_INFO },
|
||||
|
||||
/* 0x0b *
|
||||
* Up *
|
||||
* *
|
||||
* 0x18 0x16 0x0c *
|
||||
* Left Ok Right *
|
||||
* *
|
||||
* 0x015 *
|
||||
* Down *
|
||||
* */
|
||||
{ 0x0b, KEY_UP },
|
||||
{ 0x18, KEY_LEFT },
|
||||
{ 0x16, KEY_OK }, /*XXX KEY_SELECT? KEY_ENTER? */
|
||||
{ 0x0c, KEY_RIGHT },
|
||||
{ 0x15, KEY_DOWN },
|
||||
|
||||
/* 0x11 0x0d *
|
||||
* TV/AV MODE *
|
||||
* SOURCE STEREO *
|
||||
* */
|
||||
{ 0x11, KEY_TV }, /*XXX*/
|
||||
{ 0x0d, KEY_MODE }, /*XXX there's no KEY_STEREO */
|
||||
|
||||
/* 0x0f 0x1b 0x1a *
|
||||
* AUDIO Vol+ Chan+ *
|
||||
* TIMESHIFT??? *
|
||||
* *
|
||||
* 0x0e 0x1f 0x1e *
|
||||
* SLEEP Vol- Chan- *
|
||||
* */
|
||||
{ 0x0f, KEY_AUDIO },
|
||||
{ 0x1b, KEY_VOLUMEUP },
|
||||
{ 0x1a, KEY_CHANNELUP },
|
||||
{ 0x0e, KEY_TIME },
|
||||
{ 0x1f, KEY_VOLUMEDOWN },
|
||||
{ 0x1e, KEY_CHANNELDOWN },
|
||||
|
||||
/* 0x13 0x19 *
|
||||
* MUTE SNAPSHOT*
|
||||
* */
|
||||
{ 0x13, KEY_MUTE },
|
||||
{ 0x19, KEY_CAMERA },
|
||||
|
||||
/* 0x1d unused ? */
|
||||
};
|
||||
|
||||
static struct rc_keymap manli_map = {
|
||||
.map = {
|
||||
.scan = manli,
|
||||
.size = ARRAY_SIZE(manli),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_MANLI,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_manli(void)
|
||||
{
|
||||
return ir_register_map(&manli_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_manli(void)
|
||||
{
|
||||
ir_unregister_map(&manli_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_manli)
|
||||
module_exit(exit_rc_map_manli)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
123
drivers/media/IR/keymaps/rc-msi-tvanywhere-plus.c
Normal file
123
drivers/media/IR/keymaps/rc-msi-tvanywhere-plus.c
Normal file
@ -0,0 +1,123 @@
|
||||
/* msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
|
||||
is marked "KS003". The controller is I2C at address 0x30, but does not seem
|
||||
to respond to probes until a read is performed from a valid device.
|
||||
I don't know why...
|
||||
|
||||
Note: This remote may be of similar or identical design to the
|
||||
Pixelview remote (?). The raw codes and duplicate button codes
|
||||
appear to be the same.
|
||||
|
||||
Henry Wong <henry@stuffedcow.net>
|
||||
Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com>
|
||||
*/
|
||||
|
||||
static struct ir_scancode msi_tvanywhere_plus[] = {
|
||||
|
||||
/* ---- Remote Button Layout ----
|
||||
|
||||
POWER SOURCE SCAN MUTE
|
||||
TV/FM 1 2 3
|
||||
|> 4 5 6
|
||||
<| 7 8 9
|
||||
^^UP 0 + RECALL
|
||||
vvDN RECORD STOP PLAY
|
||||
|
||||
MINIMIZE ZOOM
|
||||
|
||||
CH+
|
||||
VOL- VOL+
|
||||
CH-
|
||||
|
||||
SNAPSHOT MTS
|
||||
|
||||
<< FUNC >> RESET
|
||||
*/
|
||||
|
||||
{ 0x01, KEY_1 }, /* 1 */
|
||||
{ 0x0b, KEY_2 }, /* 2 */
|
||||
{ 0x1b, KEY_3 }, /* 3 */
|
||||
{ 0x05, KEY_4 }, /* 4 */
|
||||
{ 0x09, KEY_5 }, /* 5 */
|
||||
{ 0x15, KEY_6 }, /* 6 */
|
||||
{ 0x06, KEY_7 }, /* 7 */
|
||||
{ 0x0a, KEY_8 }, /* 8 */
|
||||
{ 0x12, KEY_9 }, /* 9 */
|
||||
{ 0x02, KEY_0 }, /* 0 */
|
||||
{ 0x10, KEY_KPPLUS }, /* + */
|
||||
{ 0x13, KEY_AGAIN }, /* Recall */
|
||||
|
||||
{ 0x1e, KEY_POWER }, /* Power */
|
||||
{ 0x07, KEY_TUNER }, /* Source */
|
||||
{ 0x1c, KEY_SEARCH }, /* Scan */
|
||||
{ 0x18, KEY_MUTE }, /* Mute */
|
||||
|
||||
{ 0x03, KEY_RADIO }, /* TV/FM */
|
||||
/* The next four keys are duplicates that appear to send the
|
||||
same IR code as Ch+, Ch-, >>, and << . The raw code assigned
|
||||
to them is the actual code + 0x20 - they will never be
|
||||
detected as such unless some way is discovered to distinguish
|
||||
these buttons from those that have the same code. */
|
||||
{ 0x3f, KEY_RIGHT }, /* |> and Ch+ */
|
||||
{ 0x37, KEY_LEFT }, /* <| and Ch- */
|
||||
{ 0x2c, KEY_UP }, /* ^^Up and >> */
|
||||
{ 0x24, KEY_DOWN }, /* vvDn and << */
|
||||
|
||||
{ 0x00, KEY_RECORD }, /* Record */
|
||||
{ 0x08, KEY_STOP }, /* Stop */
|
||||
{ 0x11, KEY_PLAY }, /* Play */
|
||||
|
||||
{ 0x0f, KEY_CLOSE }, /* Minimize */
|
||||
{ 0x19, KEY_ZOOM }, /* Zoom */
|
||||
{ 0x1a, KEY_CAMERA }, /* Snapshot */
|
||||
{ 0x0d, KEY_LANGUAGE }, /* MTS */
|
||||
|
||||
{ 0x14, KEY_VOLUMEDOWN }, /* Vol- */
|
||||
{ 0x16, KEY_VOLUMEUP }, /* Vol+ */
|
||||
{ 0x17, KEY_CHANNELDOWN }, /* Ch- */
|
||||
{ 0x1f, KEY_CHANNELUP }, /* Ch+ */
|
||||
|
||||
{ 0x04, KEY_REWIND }, /* << */
|
||||
{ 0x0e, KEY_MENU }, /* Function */
|
||||
{ 0x0c, KEY_FASTFORWARD }, /* >> */
|
||||
{ 0x1d, KEY_RESTART }, /* Reset */
|
||||
};
|
||||
|
||||
static struct rc_keymap msi_tvanywhere_plus_map = {
|
||||
.map = {
|
||||
.scan = msi_tvanywhere_plus,
|
||||
.size = ARRAY_SIZE(msi_tvanywhere_plus),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_MSI_TVANYWHERE_PLUS,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_msi_tvanywhere_plus(void)
|
||||
{
|
||||
return ir_register_map(&msi_tvanywhere_plus_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_msi_tvanywhere_plus(void)
|
||||
{
|
||||
ir_unregister_map(&msi_tvanywhere_plus_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_msi_tvanywhere_plus)
|
||||
module_exit(exit_rc_map_msi_tvanywhere_plus)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
69
drivers/media/IR/keymaps/rc-msi-tvanywhere.c
Normal file
69
drivers/media/IR/keymaps/rc-msi-tvanywhere.c
Normal file
@ -0,0 +1,69 @@
|
||||
/* msi-tvanywhere.h - Keytable for msi_tvanywhere Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* MSI TV@nywhere MASTER remote */
|
||||
|
||||
static struct ir_scancode msi_tvanywhere[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x0c, KEY_MUTE },
|
||||
{ 0x0f, KEY_SCREEN }, /* Full Screen */
|
||||
{ 0x10, KEY_FN }, /* Funtion */
|
||||
{ 0x11, KEY_TIME }, /* Time shift */
|
||||
{ 0x12, KEY_POWER },
|
||||
{ 0x13, KEY_MEDIA }, /* MTS */
|
||||
{ 0x14, KEY_SLOW },
|
||||
{ 0x16, KEY_REWIND }, /* backward << */
|
||||
{ 0x17, KEY_ENTER }, /* Return */
|
||||
{ 0x18, KEY_FASTFORWARD }, /* forward >> */
|
||||
{ 0x1a, KEY_CHANNELUP },
|
||||
{ 0x1b, KEY_VOLUMEUP },
|
||||
{ 0x1e, KEY_CHANNELDOWN },
|
||||
{ 0x1f, KEY_VOLUMEDOWN },
|
||||
};
|
||||
|
||||
static struct rc_keymap msi_tvanywhere_map = {
|
||||
.map = {
|
||||
.scan = msi_tvanywhere,
|
||||
.size = ARRAY_SIZE(msi_tvanywhere),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_MSI_TVANYWHERE,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_msi_tvanywhere(void)
|
||||
{
|
||||
return ir_register_map(&msi_tvanywhere_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_msi_tvanywhere(void)
|
||||
{
|
||||
ir_unregister_map(&msi_tvanywhere_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_msi_tvanywhere)
|
||||
module_exit(exit_rc_map_msi_tvanywhere)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
96
drivers/media/IR/keymaps/rc-nebula.c
Normal file
96
drivers/media/IR/keymaps/rc-nebula.c
Normal file
@ -0,0 +1,96 @@
|
||||
/* nebula.h - Keytable for nebula Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode nebula[] = {
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
{ 0x0a, KEY_TV },
|
||||
{ 0x0b, KEY_AUX },
|
||||
{ 0x0c, KEY_DVD },
|
||||
{ 0x0d, KEY_POWER },
|
||||
{ 0x0e, KEY_MHP }, /* labelled 'Picture' */
|
||||
{ 0x0f, KEY_AUDIO },
|
||||
{ 0x10, KEY_INFO },
|
||||
{ 0x11, KEY_F13 }, /* 16:9 */
|
||||
{ 0x12, KEY_F14 }, /* 14:9 */
|
||||
{ 0x13, KEY_EPG },
|
||||
{ 0x14, KEY_EXIT },
|
||||
{ 0x15, KEY_MENU },
|
||||
{ 0x16, KEY_UP },
|
||||
{ 0x17, KEY_DOWN },
|
||||
{ 0x18, KEY_LEFT },
|
||||
{ 0x19, KEY_RIGHT },
|
||||
{ 0x1a, KEY_ENTER },
|
||||
{ 0x1b, KEY_CHANNELUP },
|
||||
{ 0x1c, KEY_CHANNELDOWN },
|
||||
{ 0x1d, KEY_VOLUMEUP },
|
||||
{ 0x1e, KEY_VOLUMEDOWN },
|
||||
{ 0x1f, KEY_RED },
|
||||
{ 0x20, KEY_GREEN },
|
||||
{ 0x21, KEY_YELLOW },
|
||||
{ 0x22, KEY_BLUE },
|
||||
{ 0x23, KEY_SUBTITLE },
|
||||
{ 0x24, KEY_F15 }, /* AD */
|
||||
{ 0x25, KEY_TEXT },
|
||||
{ 0x26, KEY_MUTE },
|
||||
{ 0x27, KEY_REWIND },
|
||||
{ 0x28, KEY_STOP },
|
||||
{ 0x29, KEY_PLAY },
|
||||
{ 0x2a, KEY_FASTFORWARD },
|
||||
{ 0x2b, KEY_F16 }, /* chapter */
|
||||
{ 0x2c, KEY_PAUSE },
|
||||
{ 0x2d, KEY_PLAY },
|
||||
{ 0x2e, KEY_RECORD },
|
||||
{ 0x2f, KEY_F17 }, /* picture in picture */
|
||||
{ 0x30, KEY_KPPLUS }, /* zoom in */
|
||||
{ 0x31, KEY_KPMINUS }, /* zoom out */
|
||||
{ 0x32, KEY_F18 }, /* capture */
|
||||
{ 0x33, KEY_F19 }, /* web */
|
||||
{ 0x34, KEY_EMAIL },
|
||||
{ 0x35, KEY_PHONE },
|
||||
{ 0x36, KEY_PC },
|
||||
};
|
||||
|
||||
static struct rc_keymap nebula_map = {
|
||||
.map = {
|
||||
.scan = nebula,
|
||||
.size = ARRAY_SIZE(nebula),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_NEBULA,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_nebula(void)
|
||||
{
|
||||
return ir_register_map(&nebula_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_nebula(void)
|
||||
{
|
||||
ir_unregister_map(&nebula_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_nebula)
|
||||
module_exit(exit_rc_map_nebula)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
105
drivers/media/IR/keymaps/rc-nec-terratec-cinergy-xs.c
Normal file
105
drivers/media/IR/keymaps/rc-nec-terratec-cinergy-xs.c
Normal file
@ -0,0 +1,105 @@
|
||||
/* nec-terratec-cinergy-xs.h - Keytable for nec_terratec_cinergy_xs Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Terratec Cinergy Hybrid T USB XS FM
|
||||
Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*/
|
||||
|
||||
static struct ir_scancode nec_terratec_cinergy_xs[] = {
|
||||
{ 0x1441, KEY_HOME},
|
||||
{ 0x1401, KEY_POWER2},
|
||||
|
||||
{ 0x1442, KEY_MENU}, /* DVD menu */
|
||||
{ 0x1443, KEY_SUBTITLE},
|
||||
{ 0x1444, KEY_TEXT}, /* Teletext */
|
||||
{ 0x1445, KEY_DELETE},
|
||||
|
||||
{ 0x1402, KEY_1},
|
||||
{ 0x1403, KEY_2},
|
||||
{ 0x1404, KEY_3},
|
||||
{ 0x1405, KEY_4},
|
||||
{ 0x1406, KEY_5},
|
||||
{ 0x1407, KEY_6},
|
||||
{ 0x1408, KEY_7},
|
||||
{ 0x1409, KEY_8},
|
||||
{ 0x140a, KEY_9},
|
||||
{ 0x140c, KEY_0},
|
||||
|
||||
{ 0x140b, KEY_TUNER}, /* AV */
|
||||
{ 0x140d, KEY_MODE}, /* A.B */
|
||||
|
||||
{ 0x1446, KEY_TV},
|
||||
{ 0x1447, KEY_DVD},
|
||||
{ 0x1449, KEY_VIDEO},
|
||||
{ 0x144a, KEY_RADIO}, /* Music */
|
||||
{ 0x144b, KEY_CAMERA}, /* PIC */
|
||||
|
||||
{ 0x1410, KEY_UP},
|
||||
{ 0x1411, KEY_LEFT},
|
||||
{ 0x1412, KEY_OK},
|
||||
{ 0x1413, KEY_RIGHT},
|
||||
{ 0x1414, KEY_DOWN},
|
||||
|
||||
{ 0x140f, KEY_EPG},
|
||||
{ 0x1416, KEY_INFO},
|
||||
{ 0x144d, KEY_BACKSPACE},
|
||||
|
||||
{ 0x141c, KEY_VOLUMEUP},
|
||||
{ 0x141e, KEY_VOLUMEDOWN},
|
||||
|
||||
{ 0x144c, KEY_PLAY},
|
||||
{ 0x141d, KEY_MUTE},
|
||||
|
||||
{ 0x141b, KEY_CHANNELUP},
|
||||
{ 0x141f, KEY_CHANNELDOWN},
|
||||
|
||||
{ 0x1417, KEY_RED},
|
||||
{ 0x1418, KEY_GREEN},
|
||||
{ 0x1419, KEY_YELLOW},
|
||||
{ 0x141a, KEY_BLUE},
|
||||
|
||||
{ 0x1458, KEY_RECORD},
|
||||
{ 0x1448, KEY_STOP},
|
||||
{ 0x1440, KEY_PAUSE},
|
||||
|
||||
{ 0x1454, KEY_LAST},
|
||||
{ 0x144e, KEY_REWIND},
|
||||
{ 0x144f, KEY_FASTFORWARD},
|
||||
{ 0x145c, KEY_NEXT},
|
||||
};
|
||||
|
||||
static struct rc_keymap nec_terratec_cinergy_xs_map = {
|
||||
.map = {
|
||||
.scan = nec_terratec_cinergy_xs,
|
||||
.size = ARRAY_SIZE(nec_terratec_cinergy_xs),
|
||||
.ir_type = IR_TYPE_NEC,
|
||||
.name = RC_MAP_NEC_TERRATEC_CINERGY_XS,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_nec_terratec_cinergy_xs(void)
|
||||
{
|
||||
return ir_register_map(&nec_terratec_cinergy_xs_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_nec_terratec_cinergy_xs(void)
|
||||
{
|
||||
ir_unregister_map(&nec_terratec_cinergy_xs_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_nec_terratec_cinergy_xs)
|
||||
module_exit(exit_rc_map_nec_terratec_cinergy_xs)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
85
drivers/media/IR/keymaps/rc-norwood.c
Normal file
85
drivers/media/IR/keymaps/rc-norwood.c
Normal file
@ -0,0 +1,85 @@
|
||||
/* norwood.h - Keytable for norwood Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Norwood Micro (non-Pro) TV Tuner
|
||||
By Peter Naulls <peter@chocky.org>
|
||||
Key comments are the functions given in the manual */
|
||||
|
||||
static struct ir_scancode norwood[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x20, KEY_0 },
|
||||
{ 0x21, KEY_1 },
|
||||
{ 0x22, KEY_2 },
|
||||
{ 0x23, KEY_3 },
|
||||
{ 0x24, KEY_4 },
|
||||
{ 0x25, KEY_5 },
|
||||
{ 0x26, KEY_6 },
|
||||
{ 0x27, KEY_7 },
|
||||
{ 0x28, KEY_8 },
|
||||
{ 0x29, KEY_9 },
|
||||
|
||||
{ 0x78, KEY_TUNER }, /* Video Source */
|
||||
{ 0x2c, KEY_EXIT }, /* Open/Close software */
|
||||
{ 0x2a, KEY_SELECT }, /* 2 Digit Select */
|
||||
{ 0x69, KEY_AGAIN }, /* Recall */
|
||||
|
||||
{ 0x32, KEY_BRIGHTNESSUP }, /* Brightness increase */
|
||||
{ 0x33, KEY_BRIGHTNESSDOWN }, /* Brightness decrease */
|
||||
{ 0x6b, KEY_KPPLUS }, /* (not named >>>>>) */
|
||||
{ 0x6c, KEY_KPMINUS }, /* (not named <<<<<) */
|
||||
|
||||
{ 0x2d, KEY_MUTE }, /* Mute */
|
||||
{ 0x30, KEY_VOLUMEUP }, /* Volume up */
|
||||
{ 0x31, KEY_VOLUMEDOWN }, /* Volume down */
|
||||
{ 0x60, KEY_CHANNELUP }, /* Channel up */
|
||||
{ 0x61, KEY_CHANNELDOWN }, /* Channel down */
|
||||
|
||||
{ 0x3f, KEY_RECORD }, /* Record */
|
||||
{ 0x37, KEY_PLAY }, /* Play */
|
||||
{ 0x36, KEY_PAUSE }, /* Pause */
|
||||
{ 0x2b, KEY_STOP }, /* Stop */
|
||||
{ 0x67, KEY_FASTFORWARD }, /* Foward */
|
||||
{ 0x66, KEY_REWIND }, /* Rewind */
|
||||
{ 0x3e, KEY_SEARCH }, /* Auto Scan */
|
||||
{ 0x2e, KEY_CAMERA }, /* Capture Video */
|
||||
{ 0x6d, KEY_MENU }, /* Show/Hide Control */
|
||||
{ 0x2f, KEY_ZOOM }, /* Full Screen */
|
||||
{ 0x34, KEY_RADIO }, /* FM */
|
||||
{ 0x65, KEY_POWER }, /* Computer power */
|
||||
};
|
||||
|
||||
static struct rc_keymap norwood_map = {
|
||||
.map = {
|
||||
.scan = norwood,
|
||||
.size = ARRAY_SIZE(norwood),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_NORWOOD,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_norwood(void)
|
||||
{
|
||||
return ir_register_map(&norwood_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_norwood(void)
|
||||
{
|
||||
ir_unregister_map(&norwood_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_norwood)
|
||||
module_exit(exit_rc_map_norwood)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
80
drivers/media/IR/keymaps/rc-npgtech.c
Normal file
80
drivers/media/IR/keymaps/rc-npgtech.c
Normal file
@ -0,0 +1,80 @@
|
||||
/* npgtech.h - Keytable for npgtech Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode npgtech[] = {
|
||||
{ 0x1d, KEY_SWITCHVIDEOMODE }, /* switch inputs */
|
||||
{ 0x2a, KEY_FRONT },
|
||||
|
||||
{ 0x3e, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x06, KEY_3 },
|
||||
{ 0x0a, KEY_4 },
|
||||
{ 0x0e, KEY_5 },
|
||||
{ 0x12, KEY_6 },
|
||||
{ 0x16, KEY_7 },
|
||||
{ 0x1a, KEY_8 },
|
||||
{ 0x1e, KEY_9 },
|
||||
{ 0x3a, KEY_0 },
|
||||
{ 0x22, KEY_NUMLOCK }, /* -/-- */
|
||||
{ 0x20, KEY_REFRESH },
|
||||
|
||||
{ 0x03, KEY_BRIGHTNESSDOWN },
|
||||
{ 0x28, KEY_AUDIO },
|
||||
{ 0x3c, KEY_CHANNELUP },
|
||||
{ 0x3f, KEY_VOLUMEDOWN },
|
||||
{ 0x2e, KEY_MUTE },
|
||||
{ 0x3b, KEY_VOLUMEUP },
|
||||
{ 0x00, KEY_CHANNELDOWN },
|
||||
{ 0x07, KEY_BRIGHTNESSUP },
|
||||
{ 0x2c, KEY_TEXT },
|
||||
|
||||
{ 0x37, KEY_RECORD },
|
||||
{ 0x17, KEY_PLAY },
|
||||
{ 0x13, KEY_PAUSE },
|
||||
{ 0x26, KEY_STOP },
|
||||
{ 0x18, KEY_FASTFORWARD },
|
||||
{ 0x14, KEY_REWIND },
|
||||
{ 0x33, KEY_ZOOM },
|
||||
{ 0x32, KEY_KEYBOARD },
|
||||
{ 0x30, KEY_GOTO }, /* Pointing arrow */
|
||||
{ 0x36, KEY_MACRO }, /* Maximize/Minimize (yellow) */
|
||||
{ 0x0b, KEY_RADIO },
|
||||
{ 0x10, KEY_POWER },
|
||||
|
||||
};
|
||||
|
||||
static struct rc_keymap npgtech_map = {
|
||||
.map = {
|
||||
.scan = npgtech,
|
||||
.size = ARRAY_SIZE(npgtech),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_NPGTECH,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_npgtech(void)
|
||||
{
|
||||
return ir_register_map(&npgtech_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_npgtech(void)
|
||||
{
|
||||
ir_unregister_map(&npgtech_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_npgtech)
|
||||
module_exit(exit_rc_map_npgtech)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
80
drivers/media/IR/keymaps/rc-pctv-sedna.c
Normal file
80
drivers/media/IR/keymaps/rc-pctv-sedna.c
Normal file
@ -0,0 +1,80 @@
|
||||
/* pctv-sedna.h - Keytable for pctv_sedna Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Mapping for the 28 key remote control as seen at
|
||||
http://www.sednacomputer.com/photo/cardbus-tv.jpg
|
||||
Pavel Mihaylov <bin@bash.info>
|
||||
Also for the remote bundled with Kozumi KTV-01C card */
|
||||
|
||||
static struct ir_scancode pctv_sedna[] = {
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x0a, KEY_AGAIN }, /* Recall */
|
||||
{ 0x0b, KEY_CHANNELUP },
|
||||
{ 0x0c, KEY_VOLUMEUP },
|
||||
{ 0x0d, KEY_MODE }, /* Stereo */
|
||||
{ 0x0e, KEY_STOP },
|
||||
{ 0x0f, KEY_PREVIOUSSONG },
|
||||
{ 0x10, KEY_ZOOM },
|
||||
{ 0x11, KEY_TUNER }, /* Source */
|
||||
{ 0x12, KEY_POWER },
|
||||
{ 0x13, KEY_MUTE },
|
||||
{ 0x15, KEY_CHANNELDOWN },
|
||||
{ 0x18, KEY_VOLUMEDOWN },
|
||||
{ 0x19, KEY_CAMERA }, /* Snapshot */
|
||||
{ 0x1a, KEY_NEXTSONG },
|
||||
{ 0x1b, KEY_TIME }, /* Time Shift */
|
||||
{ 0x1c, KEY_RADIO }, /* FM Radio */
|
||||
{ 0x1d, KEY_RECORD },
|
||||
{ 0x1e, KEY_PAUSE },
|
||||
/* additional codes for Kozumi's remote */
|
||||
{ 0x14, KEY_INFO }, /* OSD */
|
||||
{ 0x16, KEY_OK }, /* OK */
|
||||
{ 0x17, KEY_DIGITS }, /* Plus */
|
||||
{ 0x1f, KEY_PLAY }, /* Play */
|
||||
};
|
||||
|
||||
static struct rc_keymap pctv_sedna_map = {
|
||||
.map = {
|
||||
.scan = pctv_sedna,
|
||||
.size = ARRAY_SIZE(pctv_sedna),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PCTV_SEDNA,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pctv_sedna(void)
|
||||
{
|
||||
return ir_register_map(&pctv_sedna_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pctv_sedna(void)
|
||||
{
|
||||
ir_unregister_map(&pctv_sedna_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pctv_sedna)
|
||||
module_exit(exit_rc_map_pctv_sedna)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
94
drivers/media/IR/keymaps/rc-pinnacle-color.c
Normal file
94
drivers/media/IR/keymaps/rc-pinnacle-color.c
Normal file
@ -0,0 +1,94 @@
|
||||
/* pinnacle-color.h - Keytable for pinnacle_color Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode pinnacle_color[] = {
|
||||
{ 0x59, KEY_MUTE },
|
||||
{ 0x4a, KEY_POWER },
|
||||
|
||||
{ 0x18, KEY_TEXT },
|
||||
{ 0x26, KEY_TV },
|
||||
{ 0x3d, KEY_PRINT },
|
||||
|
||||
{ 0x48, KEY_RED },
|
||||
{ 0x04, KEY_GREEN },
|
||||
{ 0x11, KEY_YELLOW },
|
||||
{ 0x00, KEY_BLUE },
|
||||
|
||||
{ 0x2d, KEY_VOLUMEUP },
|
||||
{ 0x1e, KEY_VOLUMEDOWN },
|
||||
|
||||
{ 0x49, KEY_MENU },
|
||||
|
||||
{ 0x16, KEY_CHANNELUP },
|
||||
{ 0x17, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x20, KEY_UP },
|
||||
{ 0x21, KEY_DOWN },
|
||||
{ 0x22, KEY_LEFT },
|
||||
{ 0x23, KEY_RIGHT },
|
||||
{ 0x0d, KEY_SELECT },
|
||||
|
||||
{ 0x08, KEY_BACK },
|
||||
{ 0x07, KEY_REFRESH },
|
||||
|
||||
{ 0x2f, KEY_ZOOM },
|
||||
{ 0x29, KEY_RECORD },
|
||||
|
||||
{ 0x4b, KEY_PAUSE },
|
||||
{ 0x4d, KEY_REWIND },
|
||||
{ 0x2e, KEY_PLAY },
|
||||
{ 0x4e, KEY_FORWARD },
|
||||
{ 0x53, KEY_PREVIOUS },
|
||||
{ 0x4c, KEY_STOP },
|
||||
{ 0x54, KEY_NEXT },
|
||||
|
||||
{ 0x69, KEY_0 },
|
||||
{ 0x6a, KEY_1 },
|
||||
{ 0x6b, KEY_2 },
|
||||
{ 0x6c, KEY_3 },
|
||||
{ 0x6d, KEY_4 },
|
||||
{ 0x6e, KEY_5 },
|
||||
{ 0x6f, KEY_6 },
|
||||
{ 0x70, KEY_7 },
|
||||
{ 0x71, KEY_8 },
|
||||
{ 0x72, KEY_9 },
|
||||
|
||||
{ 0x74, KEY_CHANNEL },
|
||||
{ 0x0a, KEY_BACKSPACE },
|
||||
};
|
||||
|
||||
static struct rc_keymap pinnacle_color_map = {
|
||||
.map = {
|
||||
.scan = pinnacle_color,
|
||||
.size = ARRAY_SIZE(pinnacle_color),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PINNACLE_COLOR,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pinnacle_color(void)
|
||||
{
|
||||
return ir_register_map(&pinnacle_color_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pinnacle_color(void)
|
||||
{
|
||||
ir_unregister_map(&pinnacle_color_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pinnacle_color)
|
||||
module_exit(exit_rc_map_pinnacle_color)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
89
drivers/media/IR/keymaps/rc-pinnacle-grey.c
Normal file
89
drivers/media/IR/keymaps/rc-pinnacle-grey.c
Normal file
@ -0,0 +1,89 @@
|
||||
/* pinnacle-grey.h - Keytable for pinnacle_grey Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode pinnacle_grey[] = {
|
||||
{ 0x3a, KEY_0 },
|
||||
{ 0x31, KEY_1 },
|
||||
{ 0x32, KEY_2 },
|
||||
{ 0x33, KEY_3 },
|
||||
{ 0x34, KEY_4 },
|
||||
{ 0x35, KEY_5 },
|
||||
{ 0x36, KEY_6 },
|
||||
{ 0x37, KEY_7 },
|
||||
{ 0x38, KEY_8 },
|
||||
{ 0x39, KEY_9 },
|
||||
|
||||
{ 0x2f, KEY_POWER },
|
||||
|
||||
{ 0x2e, KEY_P },
|
||||
{ 0x1f, KEY_L },
|
||||
{ 0x2b, KEY_I },
|
||||
|
||||
{ 0x2d, KEY_SCREEN },
|
||||
{ 0x1e, KEY_ZOOM },
|
||||
{ 0x1b, KEY_VOLUMEUP },
|
||||
{ 0x0f, KEY_VOLUMEDOWN },
|
||||
{ 0x17, KEY_CHANNELUP },
|
||||
{ 0x1c, KEY_CHANNELDOWN },
|
||||
{ 0x25, KEY_INFO },
|
||||
|
||||
{ 0x3c, KEY_MUTE },
|
||||
|
||||
{ 0x3d, KEY_LEFT },
|
||||
{ 0x3b, KEY_RIGHT },
|
||||
|
||||
{ 0x3f, KEY_UP },
|
||||
{ 0x3e, KEY_DOWN },
|
||||
{ 0x1a, KEY_ENTER },
|
||||
|
||||
{ 0x1d, KEY_MENU },
|
||||
{ 0x19, KEY_AGAIN },
|
||||
{ 0x16, KEY_PREVIOUSSONG },
|
||||
{ 0x13, KEY_NEXTSONG },
|
||||
{ 0x15, KEY_PAUSE },
|
||||
{ 0x0e, KEY_REWIND },
|
||||
{ 0x0d, KEY_PLAY },
|
||||
{ 0x0b, KEY_STOP },
|
||||
{ 0x07, KEY_FORWARD },
|
||||
{ 0x27, KEY_RECORD },
|
||||
{ 0x26, KEY_TUNER },
|
||||
{ 0x29, KEY_TEXT },
|
||||
{ 0x2a, KEY_MEDIA },
|
||||
{ 0x18, KEY_EPG },
|
||||
};
|
||||
|
||||
static struct rc_keymap pinnacle_grey_map = {
|
||||
.map = {
|
||||
.scan = pinnacle_grey,
|
||||
.size = ARRAY_SIZE(pinnacle_grey),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PINNACLE_GREY,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pinnacle_grey(void)
|
||||
{
|
||||
return ir_register_map(&pinnacle_grey_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pinnacle_grey(void)
|
||||
{
|
||||
ir_unregister_map(&pinnacle_grey_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pinnacle_grey)
|
||||
module_exit(exit_rc_map_pinnacle_grey)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
73
drivers/media/IR/keymaps/rc-pinnacle-pctv-hd.c
Normal file
73
drivers/media/IR/keymaps/rc-pinnacle-pctv-hd.c
Normal file
@ -0,0 +1,73 @@
|
||||
/* pinnacle-pctv-hd.h - Keytable for pinnacle_pctv_hd Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Pinnacle PCTV HD 800i mini remote */
|
||||
|
||||
static struct ir_scancode pinnacle_pctv_hd[] = {
|
||||
|
||||
{ 0x0f, KEY_1 },
|
||||
{ 0x15, KEY_2 },
|
||||
{ 0x10, KEY_3 },
|
||||
{ 0x18, KEY_4 },
|
||||
{ 0x1b, KEY_5 },
|
||||
{ 0x1e, KEY_6 },
|
||||
{ 0x11, KEY_7 },
|
||||
{ 0x21, KEY_8 },
|
||||
{ 0x12, KEY_9 },
|
||||
{ 0x27, KEY_0 },
|
||||
|
||||
{ 0x24, KEY_ZOOM },
|
||||
{ 0x2a, KEY_SUBTITLE },
|
||||
|
||||
{ 0x00, KEY_MUTE },
|
||||
{ 0x01, KEY_ENTER }, /* Pinnacle Logo */
|
||||
{ 0x39, KEY_POWER },
|
||||
|
||||
{ 0x03, KEY_VOLUMEUP },
|
||||
{ 0x09, KEY_VOLUMEDOWN },
|
||||
{ 0x06, KEY_CHANNELUP },
|
||||
{ 0x0c, KEY_CHANNELDOWN },
|
||||
|
||||
{ 0x2d, KEY_REWIND },
|
||||
{ 0x30, KEY_PLAYPAUSE },
|
||||
{ 0x33, KEY_FASTFORWARD },
|
||||
{ 0x3c, KEY_STOP },
|
||||
{ 0x36, KEY_RECORD },
|
||||
{ 0x3f, KEY_EPG }, /* Labeled "?" */
|
||||
};
|
||||
|
||||
static struct rc_keymap pinnacle_pctv_hd_map = {
|
||||
.map = {
|
||||
.scan = pinnacle_pctv_hd,
|
||||
.size = ARRAY_SIZE(pinnacle_pctv_hd),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PINNACLE_PCTV_HD,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pinnacle_pctv_hd(void)
|
||||
{
|
||||
return ir_register_map(&pinnacle_pctv_hd_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pinnacle_pctv_hd(void)
|
||||
{
|
||||
ir_unregister_map(&pinnacle_pctv_hd_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pinnacle_pctv_hd)
|
||||
module_exit(exit_rc_map_pinnacle_pctv_hd)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
83
drivers/media/IR/keymaps/rc-pixelview-mk12.c
Normal file
83
drivers/media/IR/keymaps/rc-pixelview-mk12.c
Normal file
@ -0,0 +1,83 @@
|
||||
/* rc-pixelview-mk12.h - Keytable for pixelview Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* Keytable for MK-F12 IR remote provided together with Pixelview
|
||||
* Ultra Pro Remote Controller. Uses NEC extended format.
|
||||
*/
|
||||
static struct ir_scancode pixelview_mk12[] = {
|
||||
{ 0x866b03, KEY_TUNER }, /* Timeshift */
|
||||
{ 0x866b1e, KEY_POWER2 }, /* power */
|
||||
|
||||
{ 0x866b01, KEY_1 },
|
||||
{ 0x866b0b, KEY_2 },
|
||||
{ 0x866b1b, KEY_3 },
|
||||
{ 0x866b05, KEY_4 },
|
||||
{ 0x866b09, KEY_5 },
|
||||
{ 0x866b15, KEY_6 },
|
||||
{ 0x866b06, KEY_7 },
|
||||
{ 0x866b0a, KEY_8 },
|
||||
{ 0x866b12, KEY_9 },
|
||||
{ 0x866b02, KEY_0 },
|
||||
|
||||
{ 0x866b13, KEY_AGAIN }, /* loop */
|
||||
{ 0x866b10, KEY_DIGITS }, /* +100 */
|
||||
|
||||
{ 0x866b00, KEY_MEDIA }, /* source */
|
||||
{ 0x866b18, KEY_MUTE }, /* mute */
|
||||
{ 0x866b19, KEY_CAMERA }, /* snapshot */
|
||||
{ 0x866b1a, KEY_SEARCH }, /* scan */
|
||||
|
||||
{ 0x866b16, KEY_CHANNELUP }, /* chn + */
|
||||
{ 0x866b14, KEY_CHANNELDOWN }, /* chn - */
|
||||
{ 0x866b1f, KEY_VOLUMEUP }, /* vol + */
|
||||
{ 0x866b17, KEY_VOLUMEDOWN }, /* vol - */
|
||||
{ 0x866b1c, KEY_ZOOM }, /* zoom */
|
||||
|
||||
{ 0x866b04, KEY_REWIND },
|
||||
{ 0x866b0e, KEY_RECORD },
|
||||
{ 0x866b0c, KEY_FORWARD },
|
||||
|
||||
{ 0x866b1d, KEY_STOP },
|
||||
{ 0x866b08, KEY_PLAY },
|
||||
{ 0x866b0f, KEY_PAUSE },
|
||||
|
||||
{ 0x866b0d, KEY_TV },
|
||||
{ 0x866b07, KEY_RADIO }, /* FM */
|
||||
};
|
||||
|
||||
static struct rc_keymap pixelview_map = {
|
||||
.map = {
|
||||
.scan = pixelview_mk12,
|
||||
.size = ARRAY_SIZE(pixelview_mk12),
|
||||
.ir_type = IR_TYPE_NEC,
|
||||
.name = RC_MAP_PIXELVIEW_MK12,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pixelview(void)
|
||||
{
|
||||
return ir_register_map(&pixelview_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pixelview(void)
|
||||
{
|
||||
ir_unregister_map(&pixelview_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pixelview)
|
||||
module_exit(exit_rc_map_pixelview)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
83
drivers/media/IR/keymaps/rc-pixelview-new.c
Normal file
83
drivers/media/IR/keymaps/rc-pixelview-new.c
Normal file
@ -0,0 +1,83 @@
|
||||
/* pixelview-new.h - Keytable for pixelview_new Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
Mauro Carvalho Chehab <mchehab@infradead.org>
|
||||
present on PV MPEG 8000GT
|
||||
*/
|
||||
|
||||
static struct ir_scancode pixelview_new[] = {
|
||||
{ 0x3c, KEY_TIME }, /* Timeshift */
|
||||
{ 0x12, KEY_POWER },
|
||||
|
||||
{ 0x3d, KEY_1 },
|
||||
{ 0x38, KEY_2 },
|
||||
{ 0x18, KEY_3 },
|
||||
{ 0x35, KEY_4 },
|
||||
{ 0x39, KEY_5 },
|
||||
{ 0x15, KEY_6 },
|
||||
{ 0x36, KEY_7 },
|
||||
{ 0x3a, KEY_8 },
|
||||
{ 0x1e, KEY_9 },
|
||||
{ 0x3e, KEY_0 },
|
||||
|
||||
{ 0x1c, KEY_AGAIN }, /* LOOP */
|
||||
{ 0x3f, KEY_MEDIA }, /* Source */
|
||||
{ 0x1f, KEY_LAST }, /* +100 */
|
||||
{ 0x1b, KEY_MUTE },
|
||||
|
||||
{ 0x17, KEY_CHANNELDOWN },
|
||||
{ 0x16, KEY_CHANNELUP },
|
||||
{ 0x10, KEY_VOLUMEUP },
|
||||
{ 0x14, KEY_VOLUMEDOWN },
|
||||
{ 0x13, KEY_ZOOM },
|
||||
|
||||
{ 0x19, KEY_CAMERA }, /* SNAPSHOT */
|
||||
{ 0x1a, KEY_SEARCH }, /* scan */
|
||||
|
||||
{ 0x37, KEY_REWIND }, /* << */
|
||||
{ 0x32, KEY_RECORD }, /* o (red) */
|
||||
{ 0x33, KEY_FORWARD }, /* >> */
|
||||
{ 0x11, KEY_STOP }, /* square */
|
||||
{ 0x3b, KEY_PLAY }, /* > */
|
||||
{ 0x30, KEY_PLAYPAUSE }, /* || */
|
||||
|
||||
{ 0x31, KEY_TV },
|
||||
{ 0x34, KEY_RADIO },
|
||||
};
|
||||
|
||||
static struct rc_keymap pixelview_new_map = {
|
||||
.map = {
|
||||
.scan = pixelview_new,
|
||||
.size = ARRAY_SIZE(pixelview_new),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PIXELVIEW_NEW,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pixelview_new(void)
|
||||
{
|
||||
return ir_register_map(&pixelview_new_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pixelview_new(void)
|
||||
{
|
||||
ir_unregister_map(&pixelview_new_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pixelview_new)
|
||||
module_exit(exit_rc_map_pixelview_new)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
82
drivers/media/IR/keymaps/rc-pixelview.c
Normal file
82
drivers/media/IR/keymaps/rc-pixelview.c
Normal file
@ -0,0 +1,82 @@
|
||||
/* pixelview.h - Keytable for pixelview Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode pixelview[] = {
|
||||
|
||||
{ 0x1e, KEY_POWER }, /* power */
|
||||
{ 0x07, KEY_MEDIA }, /* source */
|
||||
{ 0x1c, KEY_SEARCH }, /* scan */
|
||||
|
||||
|
||||
{ 0x03, KEY_TUNER }, /* TV/FM */
|
||||
|
||||
{ 0x00, KEY_RECORD },
|
||||
{ 0x08, KEY_STOP },
|
||||
{ 0x11, KEY_PLAY },
|
||||
|
||||
{ 0x1a, KEY_PLAYPAUSE }, /* freeze */
|
||||
{ 0x19, KEY_ZOOM }, /* zoom */
|
||||
{ 0x0f, KEY_TEXT }, /* min */
|
||||
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x0b, KEY_2 },
|
||||
{ 0x1b, KEY_3 },
|
||||
{ 0x05, KEY_4 },
|
||||
{ 0x09, KEY_5 },
|
||||
{ 0x15, KEY_6 },
|
||||
{ 0x06, KEY_7 },
|
||||
{ 0x0a, KEY_8 },
|
||||
{ 0x12, KEY_9 },
|
||||
{ 0x02, KEY_0 },
|
||||
{ 0x10, KEY_LAST }, /* +100 */
|
||||
{ 0x13, KEY_LIST }, /* recall */
|
||||
|
||||
{ 0x1f, KEY_CHANNELUP }, /* chn down */
|
||||
{ 0x17, KEY_CHANNELDOWN }, /* chn up */
|
||||
{ 0x16, KEY_VOLUMEUP }, /* vol down */
|
||||
{ 0x14, KEY_VOLUMEDOWN }, /* vol up */
|
||||
|
||||
{ 0x04, KEY_KPMINUS }, /* <<< */
|
||||
{ 0x0e, KEY_SETUP }, /* function */
|
||||
{ 0x0c, KEY_KPPLUS }, /* >>> */
|
||||
|
||||
{ 0x0d, KEY_GOTO }, /* mts */
|
||||
{ 0x1d, KEY_REFRESH }, /* reset */
|
||||
{ 0x18, KEY_MUTE }, /* mute/unmute */
|
||||
};
|
||||
|
||||
static struct rc_keymap pixelview_map = {
|
||||
.map = {
|
||||
.scan = pixelview,
|
||||
.size = ARRAY_SIZE(pixelview),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PIXELVIEW,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pixelview(void)
|
||||
{
|
||||
return ir_register_map(&pixelview_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pixelview(void)
|
||||
{
|
||||
ir_unregister_map(&pixelview_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pixelview)
|
||||
module_exit(exit_rc_map_pixelview)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
81
drivers/media/IR/keymaps/rc-powercolor-real-angel.c
Normal file
81
drivers/media/IR/keymaps/rc-powercolor-real-angel.c
Normal file
@ -0,0 +1,81 @@
|
||||
/* powercolor-real-angel.h - Keytable for powercolor_real_angel Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* Remote control for Powercolor Real Angel 330
|
||||
* Daniel Fraga <fragabr@gmail.com>
|
||||
*/
|
||||
|
||||
static struct ir_scancode powercolor_real_angel[] = {
|
||||
{ 0x38, KEY_SWITCHVIDEOMODE }, /* switch inputs */
|
||||
{ 0x0c, KEY_MEDIA }, /* Turn ON/OFF App */
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
{ 0x0a, KEY_DIGITS }, /* single, double, tripple digit */
|
||||
{ 0x29, KEY_PREVIOUS }, /* previous channel */
|
||||
{ 0x12, KEY_BRIGHTNESSUP },
|
||||
{ 0x13, KEY_BRIGHTNESSDOWN },
|
||||
{ 0x2b, KEY_MODE }, /* stereo/mono */
|
||||
{ 0x2c, KEY_TEXT }, /* teletext */
|
||||
{ 0x20, KEY_CHANNELUP }, /* channel up */
|
||||
{ 0x21, KEY_CHANNELDOWN }, /* channel down */
|
||||
{ 0x10, KEY_VOLUMEUP }, /* volume up */
|
||||
{ 0x11, KEY_VOLUMEDOWN }, /* volume down */
|
||||
{ 0x0d, KEY_MUTE },
|
||||
{ 0x1f, KEY_RECORD },
|
||||
{ 0x17, KEY_PLAY },
|
||||
{ 0x16, KEY_PAUSE },
|
||||
{ 0x0b, KEY_STOP },
|
||||
{ 0x27, KEY_FASTFORWARD },
|
||||
{ 0x26, KEY_REWIND },
|
||||
{ 0x1e, KEY_SEARCH }, /* autoscan */
|
||||
{ 0x0e, KEY_CAMERA }, /* snapshot */
|
||||
{ 0x2d, KEY_SETUP },
|
||||
{ 0x0f, KEY_SCREEN }, /* full screen */
|
||||
{ 0x14, KEY_RADIO }, /* FM radio */
|
||||
{ 0x25, KEY_POWER }, /* power */
|
||||
};
|
||||
|
||||
static struct rc_keymap powercolor_real_angel_map = {
|
||||
.map = {
|
||||
.scan = powercolor_real_angel,
|
||||
.size = ARRAY_SIZE(powercolor_real_angel),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_POWERCOLOR_REAL_ANGEL,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_powercolor_real_angel(void)
|
||||
{
|
||||
return ir_register_map(&powercolor_real_angel_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_powercolor_real_angel(void)
|
||||
{
|
||||
ir_unregister_map(&powercolor_real_angel_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_powercolor_real_angel)
|
||||
module_exit(exit_rc_map_powercolor_real_angel)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
69
drivers/media/IR/keymaps/rc-proteus-2309.c
Normal file
69
drivers/media/IR/keymaps/rc-proteus-2309.c
Normal file
@ -0,0 +1,69 @@
|
||||
/* proteus-2309.h - Keytable for proteus_2309 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Michal Majchrowicz <mmajchrowicz@gmail.com> */
|
||||
|
||||
static struct ir_scancode proteus_2309[] = {
|
||||
/* numeric */
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x5c, KEY_POWER }, /* power */
|
||||
{ 0x20, KEY_ZOOM }, /* full screen */
|
||||
{ 0x0f, KEY_BACKSPACE }, /* recall */
|
||||
{ 0x1b, KEY_ENTER }, /* mute */
|
||||
{ 0x41, KEY_RECORD }, /* record */
|
||||
{ 0x43, KEY_STOP }, /* stop */
|
||||
{ 0x16, KEY_S },
|
||||
{ 0x1a, KEY_POWER2 }, /* off */
|
||||
{ 0x2e, KEY_RED },
|
||||
{ 0x1f, KEY_CHANNELDOWN }, /* channel - */
|
||||
{ 0x1c, KEY_CHANNELUP }, /* channel + */
|
||||
{ 0x10, KEY_VOLUMEDOWN }, /* volume - */
|
||||
{ 0x1e, KEY_VOLUMEUP }, /* volume + */
|
||||
{ 0x14, KEY_F1 },
|
||||
};
|
||||
|
||||
static struct rc_keymap proteus_2309_map = {
|
||||
.map = {
|
||||
.scan = proteus_2309,
|
||||
.size = ARRAY_SIZE(proteus_2309),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PROTEUS_2309,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_proteus_2309(void)
|
||||
{
|
||||
return ir_register_map(&proteus_2309_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_proteus_2309(void)
|
||||
{
|
||||
ir_unregister_map(&proteus_2309_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_proteus_2309)
|
||||
module_exit(exit_rc_map_proteus_2309)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
81
drivers/media/IR/keymaps/rc-purpletv.c
Normal file
81
drivers/media/IR/keymaps/rc-purpletv.c
Normal file
@ -0,0 +1,81 @@
|
||||
/* purpletv.h - Keytable for purpletv Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode purpletv[] = {
|
||||
{ 0x03, KEY_POWER },
|
||||
{ 0x6f, KEY_MUTE },
|
||||
{ 0x10, KEY_BACKSPACE }, /* Recall */
|
||||
|
||||
{ 0x11, KEY_0 },
|
||||
{ 0x04, KEY_1 },
|
||||
{ 0x05, KEY_2 },
|
||||
{ 0x06, KEY_3 },
|
||||
{ 0x08, KEY_4 },
|
||||
{ 0x09, KEY_5 },
|
||||
{ 0x0a, KEY_6 },
|
||||
{ 0x0c, KEY_7 },
|
||||
{ 0x0d, KEY_8 },
|
||||
{ 0x0e, KEY_9 },
|
||||
{ 0x12, KEY_DOT }, /* 100+ */
|
||||
|
||||
{ 0x07, KEY_VOLUMEUP },
|
||||
{ 0x0b, KEY_VOLUMEDOWN },
|
||||
{ 0x1a, KEY_KPPLUS },
|
||||
{ 0x18, KEY_KPMINUS },
|
||||
{ 0x15, KEY_UP },
|
||||
{ 0x1d, KEY_DOWN },
|
||||
{ 0x0f, KEY_CHANNELUP },
|
||||
{ 0x13, KEY_CHANNELDOWN },
|
||||
{ 0x48, KEY_ZOOM },
|
||||
|
||||
{ 0x1b, KEY_VIDEO }, /* Video source */
|
||||
{ 0x1f, KEY_CAMERA }, /* Snapshot */
|
||||
{ 0x49, KEY_LANGUAGE }, /* MTS Select */
|
||||
{ 0x19, KEY_SEARCH }, /* Auto Scan */
|
||||
|
||||
{ 0x4b, KEY_RECORD },
|
||||
{ 0x46, KEY_PLAY },
|
||||
{ 0x45, KEY_PAUSE }, /* Pause */
|
||||
{ 0x44, KEY_STOP },
|
||||
{ 0x43, KEY_TIME }, /* Time Shift */
|
||||
{ 0x17, KEY_CHANNEL }, /* SURF CH */
|
||||
{ 0x40, KEY_FORWARD }, /* Forward ? */
|
||||
{ 0x42, KEY_REWIND }, /* Backward ? */
|
||||
|
||||
};
|
||||
|
||||
static struct rc_keymap purpletv_map = {
|
||||
.map = {
|
||||
.scan = purpletv,
|
||||
.size = ARRAY_SIZE(purpletv),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PURPLETV,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_purpletv(void)
|
||||
{
|
||||
return ir_register_map(&purpletv_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_purpletv(void)
|
||||
{
|
||||
ir_unregister_map(&purpletv_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_purpletv)
|
||||
module_exit(exit_rc_map_purpletv)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
78
drivers/media/IR/keymaps/rc-pv951.c
Normal file
78
drivers/media/IR/keymaps/rc-pv951.c
Normal file
@ -0,0 +1,78 @@
|
||||
/* pv951.h - Keytable for pv951 Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Mark Phalan <phalanm@o2.ie> */
|
||||
|
||||
static struct ir_scancode pv951[] = {
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x12, KEY_POWER },
|
||||
{ 0x10, KEY_MUTE },
|
||||
{ 0x1f, KEY_VOLUMEDOWN },
|
||||
{ 0x1b, KEY_VOLUMEUP },
|
||||
{ 0x1a, KEY_CHANNELUP },
|
||||
{ 0x1e, KEY_CHANNELDOWN },
|
||||
{ 0x0e, KEY_PAGEUP },
|
||||
{ 0x1d, KEY_PAGEDOWN },
|
||||
{ 0x13, KEY_SOUND },
|
||||
|
||||
{ 0x18, KEY_KPPLUSMINUS }, /* CH +/- */
|
||||
{ 0x16, KEY_SUBTITLE }, /* CC */
|
||||
{ 0x0d, KEY_TEXT }, /* TTX */
|
||||
{ 0x0b, KEY_TV }, /* AIR/CBL */
|
||||
{ 0x11, KEY_PC }, /* PC/TV */
|
||||
{ 0x17, KEY_OK }, /* CH RTN */
|
||||
{ 0x19, KEY_MODE }, /* FUNC */
|
||||
{ 0x0c, KEY_SEARCH }, /* AUTOSCAN */
|
||||
|
||||
/* Not sure what to do with these ones! */
|
||||
{ 0x0f, KEY_SELECT }, /* SOURCE */
|
||||
{ 0x0a, KEY_KPPLUS }, /* +100 */
|
||||
{ 0x14, KEY_EQUAL }, /* SYNC */
|
||||
{ 0x1c, KEY_MEDIA }, /* PC/TV */
|
||||
};
|
||||
|
||||
static struct rc_keymap pv951_map = {
|
||||
.map = {
|
||||
.scan = pv951,
|
||||
.size = ARRAY_SIZE(pv951),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_PV951,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_pv951(void)
|
||||
{
|
||||
return ir_register_map(&pv951_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_pv951(void)
|
||||
{
|
||||
ir_unregister_map(&pv951_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_pv951)
|
||||
module_exit(exit_rc_map_pv951)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
103
drivers/media/IR/keymaps/rc-rc5-hauppauge-new.c
Normal file
103
drivers/media/IR/keymaps/rc-rc5-hauppauge-new.c
Normal file
@ -0,0 +1,103 @@
|
||||
/* rc5-hauppauge-new.h - Keytable for rc5_hauppauge_new Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/*
|
||||
* Hauppauge:the newer, gray remotes (seems there are multiple
|
||||
* slightly different versions), shipped with cx88+ivtv cards.
|
||||
*
|
||||
* This table contains the complete RC5 code, instead of just the data part
|
||||
*/
|
||||
|
||||
static struct ir_scancode rc5_hauppauge_new[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x1e00, KEY_0 },
|
||||
{ 0x1e01, KEY_1 },
|
||||
{ 0x1e02, KEY_2 },
|
||||
{ 0x1e03, KEY_3 },
|
||||
{ 0x1e04, KEY_4 },
|
||||
{ 0x1e05, KEY_5 },
|
||||
{ 0x1e06, KEY_6 },
|
||||
{ 0x1e07, KEY_7 },
|
||||
{ 0x1e08, KEY_8 },
|
||||
{ 0x1e09, KEY_9 },
|
||||
|
||||
{ 0x1e0a, KEY_TEXT }, /* keypad asterisk as well */
|
||||
{ 0x1e0b, KEY_RED }, /* red button */
|
||||
{ 0x1e0c, KEY_RADIO },
|
||||
{ 0x1e0d, KEY_MENU },
|
||||
{ 0x1e0e, KEY_SUBTITLE }, /* also the # key */
|
||||
{ 0x1e0f, KEY_MUTE },
|
||||
{ 0x1e10, KEY_VOLUMEUP },
|
||||
{ 0x1e11, KEY_VOLUMEDOWN },
|
||||
{ 0x1e12, KEY_PREVIOUS }, /* previous channel */
|
||||
{ 0x1e14, KEY_UP },
|
||||
{ 0x1e15, KEY_DOWN },
|
||||
{ 0x1e16, KEY_LEFT },
|
||||
{ 0x1e17, KEY_RIGHT },
|
||||
{ 0x1e18, KEY_VIDEO }, /* Videos */
|
||||
{ 0x1e19, KEY_AUDIO }, /* Music */
|
||||
/* 0x1e1a: Pictures - presume this means
|
||||
"Multimedia Home Platform" -
|
||||
no "PICTURES" key in input.h
|
||||
*/
|
||||
{ 0x1e1a, KEY_MHP },
|
||||
|
||||
{ 0x1e1b, KEY_EPG }, /* Guide */
|
||||
{ 0x1e1c, KEY_TV },
|
||||
{ 0x1e1e, KEY_NEXTSONG }, /* skip >| */
|
||||
{ 0x1e1f, KEY_EXIT }, /* back/exit */
|
||||
{ 0x1e20, KEY_CHANNELUP }, /* channel / program + */
|
||||
{ 0x1e21, KEY_CHANNELDOWN }, /* channel / program - */
|
||||
{ 0x1e22, KEY_CHANNEL }, /* source (old black remote) */
|
||||
{ 0x1e24, KEY_PREVIOUSSONG }, /* replay |< */
|
||||
{ 0x1e25, KEY_ENTER }, /* OK */
|
||||
{ 0x1e26, KEY_SLEEP }, /* minimize (old black remote) */
|
||||
{ 0x1e29, KEY_BLUE }, /* blue key */
|
||||
{ 0x1e2e, KEY_GREEN }, /* green button */
|
||||
{ 0x1e30, KEY_PAUSE }, /* pause */
|
||||
{ 0x1e32, KEY_REWIND }, /* backward << */
|
||||
{ 0x1e34, KEY_FASTFORWARD }, /* forward >> */
|
||||
{ 0x1e35, KEY_PLAY },
|
||||
{ 0x1e36, KEY_STOP },
|
||||
{ 0x1e37, KEY_RECORD }, /* recording */
|
||||
{ 0x1e38, KEY_YELLOW }, /* yellow key */
|
||||
{ 0x1e3b, KEY_SELECT }, /* top right button */
|
||||
{ 0x1e3c, KEY_ZOOM }, /* full */
|
||||
{ 0x1e3d, KEY_POWER }, /* system power (green button) */
|
||||
};
|
||||
|
||||
static struct rc_keymap rc5_hauppauge_new_map = {
|
||||
.map = {
|
||||
.scan = rc5_hauppauge_new,
|
||||
.size = ARRAY_SIZE(rc5_hauppauge_new),
|
||||
.ir_type = IR_TYPE_RC5,
|
||||
.name = RC_MAP_RC5_HAUPPAUGE_NEW,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_rc5_hauppauge_new(void)
|
||||
{
|
||||
return ir_register_map(&rc5_hauppauge_new_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_rc5_hauppauge_new(void)
|
||||
{
|
||||
ir_unregister_map(&rc5_hauppauge_new_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_rc5_hauppauge_new)
|
||||
module_exit(exit_rc_map_rc5_hauppauge_new)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
81
drivers/media/IR/keymaps/rc-rc5-tv.c
Normal file
81
drivers/media/IR/keymaps/rc-rc5-tv.c
Normal file
@ -0,0 +1,81 @@
|
||||
/* rc5-tv.h - Keytable for rc5_tv Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* generic RC5 keytable */
|
||||
/* see http://users.pandora.be/nenya/electronics/rc5/codes00.htm */
|
||||
/* used by old (black) Hauppauge remotes */
|
||||
|
||||
static struct ir_scancode rc5_tv[] = {
|
||||
/* Keys 0 to 9 */
|
||||
{ 0x00, KEY_0 },
|
||||
{ 0x01, KEY_1 },
|
||||
{ 0x02, KEY_2 },
|
||||
{ 0x03, KEY_3 },
|
||||
{ 0x04, KEY_4 },
|
||||
{ 0x05, KEY_5 },
|
||||
{ 0x06, KEY_6 },
|
||||
{ 0x07, KEY_7 },
|
||||
{ 0x08, KEY_8 },
|
||||
{ 0x09, KEY_9 },
|
||||
|
||||
{ 0x0b, KEY_CHANNEL }, /* channel / program (japan: 11) */
|
||||
{ 0x0c, KEY_POWER }, /* standby */
|
||||
{ 0x0d, KEY_MUTE }, /* mute / demute */
|
||||
{ 0x0f, KEY_TV }, /* display */
|
||||
{ 0x10, KEY_VOLUMEUP },
|
||||
{ 0x11, KEY_VOLUMEDOWN },
|
||||
{ 0x12, KEY_BRIGHTNESSUP },
|
||||
{ 0x13, KEY_BRIGHTNESSDOWN },
|
||||
{ 0x1e, KEY_SEARCH }, /* search + */
|
||||
{ 0x20, KEY_CHANNELUP }, /* channel / program + */
|
||||
{ 0x21, KEY_CHANNELDOWN }, /* channel / program - */
|
||||
{ 0x22, KEY_CHANNEL }, /* alt / channel */
|
||||
{ 0x23, KEY_LANGUAGE }, /* 1st / 2nd language */
|
||||
{ 0x26, KEY_SLEEP }, /* sleeptimer */
|
||||
{ 0x2e, KEY_MENU }, /* 2nd controls (USA: menu) */
|
||||
{ 0x30, KEY_PAUSE },
|
||||
{ 0x32, KEY_REWIND },
|
||||
{ 0x33, KEY_GOTO },
|
||||
{ 0x35, KEY_PLAY },
|
||||
{ 0x36, KEY_STOP },
|
||||
{ 0x37, KEY_RECORD }, /* recording */
|
||||
{ 0x3c, KEY_TEXT }, /* teletext submode (Japan: 12) */
|
||||
{ 0x3d, KEY_SUSPEND }, /* system standby */
|
||||
|
||||
};
|
||||
|
||||
static struct rc_keymap rc5_tv_map = {
|
||||
.map = {
|
||||
.scan = rc5_tv,
|
||||
.size = ARRAY_SIZE(rc5_tv),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_RC5_TV,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_rc5_tv(void)
|
||||
{
|
||||
return ir_register_map(&rc5_tv_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_rc5_tv(void)
|
||||
{
|
||||
ir_unregister_map(&rc5_tv_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_rc5_tv)
|
||||
module_exit(exit_rc_map_rc5_tv)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
78
drivers/media/IR/keymaps/rc-real-audio-220-32-keys.c
Normal file
78
drivers/media/IR/keymaps/rc-real-audio-220-32-keys.c
Normal file
@ -0,0 +1,78 @@
|
||||
/* real-audio-220-32-keys.h - Keytable for real_audio_220_32_keys Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Zogis Real Audio 220 - 32 keys IR */
|
||||
|
||||
static struct ir_scancode real_audio_220_32_keys[] = {
|
||||
{ 0x1c, KEY_RADIO},
|
||||
{ 0x12, KEY_POWER2},
|
||||
|
||||
{ 0x01, KEY_1},
|
||||
{ 0x02, KEY_2},
|
||||
{ 0x03, KEY_3},
|
||||
{ 0x04, KEY_4},
|
||||
{ 0x05, KEY_5},
|
||||
{ 0x06, KEY_6},
|
||||
{ 0x07, KEY_7},
|
||||
{ 0x08, KEY_8},
|
||||
{ 0x09, KEY_9},
|
||||
{ 0x00, KEY_0},
|
||||
|
||||
{ 0x0c, KEY_VOLUMEUP},
|
||||
{ 0x18, KEY_VOLUMEDOWN},
|
||||
{ 0x0b, KEY_CHANNELUP},
|
||||
{ 0x15, KEY_CHANNELDOWN},
|
||||
{ 0x16, KEY_ENTER},
|
||||
|
||||
{ 0x11, KEY_LIST}, /* Source */
|
||||
{ 0x0d, KEY_AUDIO}, /* stereo */
|
||||
|
||||
{ 0x0f, KEY_PREVIOUS}, /* Prev */
|
||||
{ 0x1b, KEY_TIME}, /* Timeshift */
|
||||
{ 0x1a, KEY_NEXT}, /* Next */
|
||||
|
||||
{ 0x0e, KEY_STOP},
|
||||
{ 0x1f, KEY_PLAY},
|
||||
{ 0x1e, KEY_PLAYPAUSE}, /* Pause */
|
||||
|
||||
{ 0x1d, KEY_RECORD},
|
||||
{ 0x13, KEY_MUTE},
|
||||
{ 0x19, KEY_CAMERA}, /* Snapshot */
|
||||
|
||||
};
|
||||
|
||||
static struct rc_keymap real_audio_220_32_keys_map = {
|
||||
.map = {
|
||||
.scan = real_audio_220_32_keys,
|
||||
.size = ARRAY_SIZE(real_audio_220_32_keys),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_REAL_AUDIO_220_32_KEYS,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_real_audio_220_32_keys(void)
|
||||
{
|
||||
return ir_register_map(&real_audio_220_32_keys_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_real_audio_220_32_keys(void)
|
||||
{
|
||||
ir_unregister_map(&real_audio_220_32_keys_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_real_audio_220_32_keys)
|
||||
module_exit(exit_rc_map_real_audio_220_32_keys)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
73
drivers/media/IR/keymaps/rc-tbs-nec.c
Normal file
73
drivers/media/IR/keymaps/rc-tbs-nec.c
Normal file
@ -0,0 +1,73 @@
|
||||
/* tbs-nec.h - Keytable for tbs_nec Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
static struct ir_scancode tbs_nec[] = {
|
||||
{ 0x04, KEY_POWER2}, /*power*/
|
||||
{ 0x14, KEY_MUTE}, /*mute*/
|
||||
{ 0x07, KEY_1},
|
||||
{ 0x06, KEY_2},
|
||||
{ 0x05, KEY_3},
|
||||
{ 0x0b, KEY_4},
|
||||
{ 0x0a, KEY_5},
|
||||
{ 0x09, KEY_6},
|
||||
{ 0x0f, KEY_7},
|
||||
{ 0x0e, KEY_8},
|
||||
{ 0x0d, KEY_9},
|
||||
{ 0x12, KEY_0},
|
||||
{ 0x16, KEY_CHANNELUP}, /*ch+*/
|
||||
{ 0x11, KEY_CHANNELDOWN},/*ch-*/
|
||||
{ 0x13, KEY_VOLUMEUP}, /*vol+*/
|
||||
{ 0x0c, KEY_VOLUMEDOWN},/*vol-*/
|
||||
{ 0x03, KEY_RECORD}, /*rec*/
|
||||
{ 0x18, KEY_PAUSE}, /*pause*/
|
||||
{ 0x19, KEY_OK}, /*ok*/
|
||||
{ 0x1a, KEY_CAMERA}, /* snapshot */
|
||||
{ 0x01, KEY_UP},
|
||||
{ 0x10, KEY_LEFT},
|
||||
{ 0x02, KEY_RIGHT},
|
||||
{ 0x08, KEY_DOWN},
|
||||
{ 0x15, KEY_FAVORITES},
|
||||
{ 0x17, KEY_SUBTITLE},
|
||||
{ 0x1d, KEY_ZOOM},
|
||||
{ 0x1f, KEY_EXIT},
|
||||
{ 0x1e, KEY_MENU},
|
||||
{ 0x1c, KEY_EPG},
|
||||
{ 0x00, KEY_PREVIOUS},
|
||||
{ 0x1b, KEY_MODE},
|
||||
};
|
||||
|
||||
static struct rc_keymap tbs_nec_map = {
|
||||
.map = {
|
||||
.scan = tbs_nec,
|
||||
.size = ARRAY_SIZE(tbs_nec),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_TBS_NEC,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_tbs_nec(void)
|
||||
{
|
||||
return ir_register_map(&tbs_nec_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_tbs_nec(void)
|
||||
{
|
||||
ir_unregister_map(&tbs_nec_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_tbs_nec)
|
||||
module_exit(exit_rc_map_tbs_nec)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
92
drivers/media/IR/keymaps/rc-terratec-cinergy-xs.c
Normal file
92
drivers/media/IR/keymaps/rc-terratec-cinergy-xs.c
Normal file
@ -0,0 +1,92 @@
|
||||
/* terratec-cinergy-xs.h - Keytable for terratec_cinergy_xs Remote Controller
|
||||
*
|
||||
* keymap imported from ir-keymaps.c
|
||||
*
|
||||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <media/rc-map.h>
|
||||
|
||||
/* Terratec Cinergy Hybrid T USB XS
|
||||
Devin Heitmueller <dheitmueller@linuxtv.org>
|
||||
*/
|
||||
|
||||
static struct ir_scancode terratec_cinergy_xs[] = {
|
||||
{ 0x41, KEY_HOME},
|
||||
{ 0x01, KEY_POWER},
|
||||
{ 0x42, KEY_MENU},
|
||||
{ 0x02, KEY_1},
|
||||
{ 0x03, KEY_2},
|
||||
{ 0x04, KEY_3},
|
||||
{ 0x43, KEY_SUBTITLE},
|
||||
{ 0x05, KEY_4},
|
||||
{ 0x06, KEY_5},
|
||||
{ 0x07, KEY_6},
|
||||
{ 0x44, KEY_TEXT},
|
||||
{ 0x08, KEY_7},
|
||||
{ 0x09, KEY_8},
|
||||
{ 0x0a, KEY_9},
|
||||
{ 0x45, KEY_DELETE},
|
||||
{ 0x0b, KEY_TUNER},
|
||||
{ 0x0c, KEY_0},
|
||||
{ 0x0d, KEY_MODE},
|
||||
{ 0x46, KEY_TV},
|
||||
{ 0x47, KEY_DVD},
|
||||
{ 0x49, KEY_VIDEO},
|
||||
{ 0x4b, KEY_AUX},
|
||||
{ 0x10, KEY_UP},
|
||||
{ 0x11, KEY_LEFT},
|
||||
{ 0x12, KEY_OK},
|
||||
{ 0x13, KEY_RIGHT},
|
||||
{ 0x14, KEY_DOWN},
|
||||
{ 0x0f, KEY_EPG},
|
||||
{ 0x16, KEY_INFO},
|
||||
{ 0x4d, KEY_BACKSPACE},
|
||||
{ 0x1c, KEY_VOLUMEUP},
|
||||
{ 0x4c, KEY_PLAY},
|
||||
{ 0x1b, KEY_CHANNELUP},
|
||||
{ 0x1e, KEY_VOLUMEDOWN},
|
||||
{ 0x1d, KEY_MUTE},
|
||||
{ 0x1f, KEY_CHANNELDOWN},
|
||||
{ 0x17, KEY_RED},
|
||||
{ 0x18, KEY_GREEN},
|
||||
{ 0x19, KEY_YELLOW},
|
||||
{ 0x1a, KEY_BLUE},
|
||||
{ 0x58, KEY_RECORD},
|
||||
{ 0x48, KEY_STOP},
|
||||
{ 0x40, KEY_PAUSE},
|
||||
{ 0x54, KEY_LAST},
|
||||
{ 0x4e, KEY_REWIND},
|
||||
{ 0x4f, KEY_FASTFORWARD},
|
||||
{ 0x5c, KEY_NEXT},
|
||||
};
|
||||
|
||||
static struct rc_keymap terratec_cinergy_xs_map = {
|
||||
.map = {
|
||||
.scan = terratec_cinergy_xs,
|
||||
.size = ARRAY_SIZE(terratec_cinergy_xs),
|
||||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
|
||||
.name = RC_MAP_TERRATEC_CINERGY_XS,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init init_rc_map_terratec_cinergy_xs(void)
|
||||
{
|
||||
return ir_register_map(&terratec_cinergy_xs_map);
|
||||
}
|
||||
|
||||
static void __exit exit_rc_map_terratec_cinergy_xs(void)
|
||||
{
|
||||
ir_unregister_map(&terratec_cinergy_xs_map);
|
||||
}
|
||||
|
||||
module_init(init_rc_map_terratec_cinergy_xs)
|
||||
module_exit(exit_rc_map_terratec_cinergy_xs)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user