aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-06 07:08:57 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-06 09:25:57 -0500
commit4195086571d49e6ad63087621d397c4a9eddd152 (patch)
tree7697d73d8ef2cb03172bec07b3bceb3f30ad83fe /Documentation/DocBook
parent90f745cea2190d42d2ee10eab6cddad526d6e521 (diff)
[media] DocBook: Add a description for the Remote Controller interface
Adds a missing section to describe the remote controller interface. The DocBook is just addin the same documentation as written at Documentation/ABI/testing/sysfs-class-rc, using the DocBook's way, and dropping timestamps/contact info. While that means that we'll have the same info on two parts, there are parts of the remote controller interface that doesn't belong at Documentation/ABI/, and it makes sense to have everything on the same place. This also means that we'll need to manually track to be sure that both places will be synchronized, but, as it is not expected much changes on it, this sync can be done manually. It also adds an introduction that states that the IR is a normal evdev/input interface, plus the sysfs class nodes. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/media/v4l/remote_controllers.xml98
1 files changed, 97 insertions, 1 deletions
diff --git a/Documentation/DocBook/media/v4l/remote_controllers.xml b/Documentation/DocBook/media/v4l/remote_controllers.xml
index 18288a3c595b..c440a81f14c0 100644
--- a/Documentation/DocBook/media/v4l/remote_controllers.xml
+++ b/Documentation/DocBook/media/v4l/remote_controllers.xml
@@ -16,7 +16,13 @@
16<revhistory> 16<revhistory>
17<!-- Put document revisions here, newest first. --> 17<!-- Put document revisions here, newest first. -->
18<revision> 18<revision>
19<revnumber>1.0.0</revnumber> 19<revnumber>3.15</revnumber>
20<date>2014-02-06</date>
21<authorinitials>mcc</authorinitials>
22<revremark>Added the interface description and the RC sysfs class description.</revremark>
23</revision>
24<revision>
25<revnumber>1.0</revnumber>
20<date>2009-09-06</date> 26<date>2009-09-06</date>
21<authorinitials>mcc</authorinitials> 27<authorinitials>mcc</authorinitials>
22<revremark>Initial revision</revremark> 28<revremark>Initial revision</revremark>
@@ -35,6 +41,96 @@
35<para>Currently, most analog and digital devices have a Infrared input for remote controllers. Each 41<para>Currently, most analog and digital devices have a Infrared input for remote controllers. Each
36manufacturer has their own type of control. It is not rare for the same manufacturer to ship different 42manufacturer has their own type of control. It is not rare for the same manufacturer to ship different
37types of controls, depending on the device.</para> 43types of controls, depending on the device.</para>
44<para>A Remote Controller interface is mapped as a normal evdev/input interface, just like a keyboard or a mouse.
45So, it uses all ioctls already defined for any other input devices.</para>
46<para>However, remove controllers are more flexible than a normal input device, as the IR
47receiver (and/or transmitter) can be used in conjunction with a wide variety of different IR remotes.</para>
48<para>In order to allow flexibility, the Remote Controller subsystem allows controlling the
49RC-specific attributes via <link linkend="remote_controllers_sysfs_nodes">the sysfs class nodes</link>.</para>
50</section>
51
52<section id="remote_controllers_sysfs_nodes">
53<title>Remote Controller's sysfs nodes</title>
54<para>As defined at <constant>Documentation/ABI/testing/sysfs-class-rc</constant>, those are the sysfs nodes that control the Remote Controllers:</para>
55
56<section id="sys_class_rc">
57<title>/sys/class/rc/</title>
58<para>The <constant>/sys/class/rc/</constant> class sub-directory belongs to the Remote Controller
59core and provides a sysfs interface for configuring infrared remote controller receivers.
60</para>
61
62</section>
63<section id="sys_class_rc_rcN">
64<title>/sys/class/rc/rcN/</title>
65<para>A <constant>/sys/class/rc/rcN</constant> directory is created for each remote
66 control receiver device where N is the number of the receiver.</para>
67
68</section>
69<section id="sys_class_rc_rcN_protocols">
70<title>/sys/class/rc/rcN/protocols</title>
71<para>Reading this file returns a list of available protocols, something like:</para>
72<para><constant>rc5 [rc6] nec jvc [sony]</constant></para>
73<para>Enabled protocols are shown in [] brackets.</para>
74<para>Writing "+proto" will add a protocol to the list of enabled protocols.</para>
75<para>Writing "-proto" will remove a protocol from the list of enabled protocols.</para>
76<para>Writing "proto" will enable only "proto".</para>
77<para>Writing "none" will disable all protocols.</para>
78<para>Write fails with EINVAL if an invalid protocol combination or unknown protocol name is used.</para>
79
80</section>
81<section id="sys_class_rc_rcN_filter">
82<title>/sys/class/rc/rcN/filter</title>
83<para>Sets the scancode filter expected value.</para>
84<para>Use in combination with <constant>/sys/class/rc/rcN/filter_mask</constant> to set the
85expected value of the bits set in the filter mask.
86If the hardware supports it then scancodes which do not match
87the filter will be ignored. Otherwise the write will fail with
88an error.</para>
89<para>This value may be reset to 0 if the current protocol is altered.</para>
90
91</section>
92<section id="sys_class_rc_rcN_filter_mask">
93<title>/sys/class/rc/rcN/filter_mask</title>
94<para>Sets the scancode filter mask of bits to compare.
95Use in combination with <constant>/sys/class/rc/rcN/filter</constant> to set the bits
96of the scancode which should be compared against the expected
97value. A value of 0 disables the filter to allow all valid
98scancodes to be processed.</para>
99<para>If the hardware supports it then scancodes which do not match
100the filter will be ignored. Otherwise the write will fail with
101an error.</para>
102<para>This value may be reset to 0 if the current protocol is altered.</para>
103
104</section>
105<section id="sys_class_rc_rcN_wakeup_filter">
106<title>/sys/class/rc/rcN/wakeup_filter</title>
107<para>Sets the scancode wakeup filter expected value.
108Use in combination with <constant>/sys/class/rc/rcN/wakeup_filter_mask</constant> to
109set the expected value of the bits set in the wakeup filter mask
110to trigger a system wake event.</para>
111<para>If the hardware supports it and wakeup_filter_mask is not 0 then
112scancodes which match the filter will wake the system from e.g.
113suspend to RAM or power off.
114Otherwise the write will fail with an error.</para>
115<para>This value may be reset to 0 if the current protocol is altered.</para>
116
117</section>
118<section id="sys_class_rc_rcN_wakeup_filter_mask">
119<title>/sys/class/rc/rcN/wakeup_filter_mask</title>
120<para>Sets the scancode wakeup filter mask of bits to compare.
121Use in combination with <constant>/sys/class/rc/rcN/wakeup_filter</constant> to set
122the bits of the scancode which should be compared against the
123expected value to trigger a system wake event.</para>
124<para>If the hardware supports it and wakeup_filter_mask is not 0 then
125scancodes which match the filter will wake the system from e.g.
126suspend to RAM or power off.
127Otherwise the write will fail with an error.</para>
128<para>This value may be reset to 0 if the current protocol is altered.</para>
129</section>
130</section>
131
132<section id="Remote_controllers_tables">
133<title>Remote controller tables</title>
38<para>Unfortunately, for several years, there was no effort to create uniform IR keycodes for 134<para>Unfortunately, for several years, there was no effort to create uniform IR keycodes for
39different devices. This caused the same IR keyname to be mapped completely differently on 135different devices. This caused the same IR keyname to be mapped completely differently on
40different IR devices. This resulted that the same IR keyname to be mapped completely different on 136different IR devices. This resulted that the same IR keyname to be mapped completely different on