aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-17 21:34:51 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-17 21:51:28 -0400
commit2e97d6d3013fa0d44c322b6181ea4b8f8a519094 (patch)
tree5fd8ace37edea78f086b142409d504edd3b76482
parent31cae7ca8d39af189486458ad8a3c239e2cb2cd2 (diff)
[media] v4l-with-ir.rst: update it to reflect the current status
This document were really old. Update it to reflect the current status of the IR drivers for TV. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--Documentation/media/v4l-drivers/v4l-with-ir.rst80
1 files changed, 39 insertions, 41 deletions
diff --git a/Documentation/media/v4l-drivers/v4l-with-ir.rst b/Documentation/media/v4l-drivers/v4l-with-ir.rst
index 334174a52bda..613e1e79fc96 100644
--- a/Documentation/media/v4l-drivers/v4l-with-ir.rst
+++ b/Documentation/media/v4l-drivers/v4l-with-ir.rst
@@ -1,31 +1,34 @@
1infrared remote control support in video4linux drivers 1Infrared remote control support in video4linux drivers
2====================================================== 2======================================================
3 3
4Author: Gerd Hoffmann 4Authors: Gerd Hoffmann, Mauro Carvalho Chehab
5
6.. note::
7
8 This section is outdated.
9 5
10Basics 6Basics
11------ 7------
12 8
13Current versions use the linux input layer to support infrared 9Most analog and digital TV boards support remote controllers. Several of
14remote controls. I suggest to download my input layer tools 10them have a microprocessor that receives the IR carriers, convert into
15from http://bytesex.org/snapshot/input-<date>.tar.gz 11pulse/space sequences and then to scan codes, returning such codes to
12userspace ("scancode mode"). Other boards return just the pulse/space
13sequences ("raw mode").
16 14
17Modules you have to load: 15The support for remote controller in scancode mode is provided by the
16standard Linux input layer. The support for raw mode is provided via LIRC.
18 17
19 saa7134 statically built in, i.e. just the driver :) 18In order to check the support and test it, it is suggested to download
20 bttv ir-kbd-gpio or ir-kbd-i2c depending on your 19the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_. It provides
21 card. 20two tools to handle remote controllers:
22 21
23ir-kbd-gpio and ir-kbd-i2c don't support all cards lirc supports 22- ir-keytable: provides a way to query the remote controller, list the
24(yet), mainly for the reason that the code of lirc_i2c and lirc_gpio 23 protocols it supports, enable in-kernel support for IR decoder or
25was very confusing and I decided to basically start over from scratch. 24 switch the protocol and to test the reception of scan codes;
26Feel free to contact me in case of trouble. Note that the ir-kbd-*
27modules work on 2.6.x kernels only through ...
28 25
26- ir-ctl: provide tools to handle remote controllers that support raw mode
27 via LIRC interface.
28
29Usually, the remote controller module is auto-loaded when the TV card is
30detected. However, for a few devices, you need to manually load the
31ir-kbd-i2c module.
29 32
30How it works 33How it works
31------------ 34------------
@@ -36,40 +39,35 @@ layer, i.e. you'll see the keys of the remote as normal key strokes
36 39
37Using the event devices (CONFIG_INPUT_EVDEV) it is possible for 40Using the event devices (CONFIG_INPUT_EVDEV) it is possible for
38applications to access the remote via /dev/input/event<n> devices. 41applications to access the remote via /dev/input/event<n> devices.
39You might have to create the special files using "/sbin/MAKEDEV 42The udev/systemd will automatically create the devices. If you install
40input". The input layer tools mentioned above use the event device. 43the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_, it may also
44automatically load a different keytable than the default one. Please see
45`v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ ir-keytable.1
46man page for details.
41 47
42The input layer tools are nice for trouble shooting, i.e. to check 48The ir-keytable tool is nice for trouble shooting, i.e. to check
43whenever the input device is really present, which of the devices it 49whenever the input device is really present, which of the devices it
44is, check whenever pressing keys on the remote actually generates 50is, check whenever pressing keys on the remote actually generates
45events and the like. You can also use the kbd utility to change the 51events and the like. You can also use any other input utility that changes
46keymaps (2.6.x kernels only through). 52the keymaps, like the input kbd utility.
47 53
48 54
49Using with lircd 55Using with lircd
50================ 56================
51 57
52The cvs version of the lircd daemon supports reading events from the 58The latest versions of the lircd daemon supports reading events from the
53linux input layer (via event device). The input layer tools tarball 59linux input layer (via event device). It also supports receiving IR codes
54comes with a lircd config file. 60in lirc mode.
55 61
56 62
57Using without lircd 63Using without lircd
58=================== 64===================
59 65
60XFree86 likely can be configured to recognise the remote keys. Once I 66Xorg recognizes several IR keycodes that have its numerical value lower
61simply tried to configure one of the multimedia keyboards as input 67than 247. With the advent of Wayland, the input driver got updated too,
62device, which had the effect that XFree86 recognised some of the keys 68and should now accept all keycodes. Yet, you may want to just reasign
63of my remote control and passed volume up/down key presses as 69the keycodes to something that your favorite media application likes.
64XF86AudioRaiseVolume and XF86AudioLowerVolume key events to the X11
65clients.
66
67It likely is possible to make that fly with a nice xkb config file,
68I know next to nothing about that through.
69
70
71Have fun,
72
73 Gerd
74 70
75-- 71This can be done by setting
72`v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ to load your own
73keytable in runtime. Please read ir-keytable.1 man page for details.