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