0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ======================================================
0004 Infrared remote control support in video4linux drivers
0005 ======================================================
0006
0007 Authors: Gerd Hoffmann, Mauro Carvalho Chehab
0008
0009 Basics
0010 ======
0011
0012 Most analog and digital TV boards support remote controllers. Several of
0013 them have a microprocessor that receives the IR carriers, convert into
0014 pulse/space sequences and then to scan codes, returning such codes to
0015 userspace ("scancode mode"). Other boards return just the pulse/space
0016 sequences ("raw mode").
0017
0018 The support for remote controller in scancode mode is provided by the
0019 standard Linux input layer. The support for raw mode is provided via LIRC.
0020
0021 In order to check the support and test it, it is suggested to download
0022 the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_. It provides
0023 two tools to handle remote controllers:
0024
0025 - ir-keytable: provides a way to query the remote controller, list the
0026 protocols it supports, enable in-kernel support for IR decoder or
0027 switch the protocol and to test the reception of scan codes;
0028
0029 - ir-ctl: provide tools to handle remote controllers that support raw mode
0030 via LIRC interface.
0031
0032 Usually, the remote controller module is auto-loaded when the TV card is
0033 detected. However, for a few devices, you need to manually load the
0034 ir-kbd-i2c module.
0035
0036 How it works
0037 ============
0038
0039 The modules register the remote as keyboard within the linux input
0040 layer, i.e. you'll see the keys of the remote as normal key strokes
0041 (if CONFIG_INPUT_KEYBOARD is enabled).
0042
0043 Using the event devices (CONFIG_INPUT_EVDEV) it is possible for
0044 applications to access the remote via /dev/input/event<n> devices.
0045 The udev/systemd will automatically create the devices. If you install
0046 the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_, it may also
0047 automatically load a different keytable than the default one. Please see
0048 `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ ir-keytable.1
0049 man page for details.
0050
0051 The ir-keytable tool is nice for trouble shooting, i.e. to check
0052 whenever the input device is really present, which of the devices it
0053 is, check whenever pressing keys on the remote actually generates
0054 events and the like. You can also use any other input utility that changes
0055 the keymaps, like the input kbd utility.
0056
0057
0058 Using with lircd
0059 ----------------
0060
0061 The latest versions of the lircd daemon supports reading events from the
0062 linux input layer (via event device). It also supports receiving IR codes
0063 in lirc mode.
0064
0065
0066 Using without lircd
0067 -------------------
0068
0069 Xorg recognizes several IR keycodes that have its numerical value lower
0070 than 247. With the advent of Wayland, the input driver got updated too,
0071 and should now accept all keycodes. Yet, you may want to just reassign
0072 the keycodes to something that your favorite media application likes.
0073
0074 This can be done by setting
0075 `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ to load your own
0076 keytable in runtime. Please read ir-keytable.1 man page for details.