brintos

brintos / linux-shallow public Read only

0
0
Text · 2.9 KiB · 188944b Raw
77 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3======================================================4Infrared remote control support in video4linux drivers5======================================================6 7Authors: Gerd Hoffmann, Mauro Carvalho Chehab8 9Basics10======11 12Most analog and digital TV boards support remote controllers. Several of13them have a microprocessor that receives the IR carriers, convert into14pulse/space sequences and then to scan codes, returning such codes to15userspace ("scancode mode"). Other boards return just the pulse/space16sequences ("raw mode").17 18The support for remote controller in scancode mode is provided by the19standard Linux input layer. The support for raw mode is provided via LIRC.20 21In order to check the support and test it, it is suggested to download22the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_. It provides23two tools to handle remote controllers:24 25- ir-keytable: provides a way to query the remote controller, list the26  protocols it supports, enable in-kernel support for IR decoder or27  switch the protocol and to test the reception of scan codes;28 29- ir-ctl: provide tools to handle remote controllers that support raw mode30  via LIRC interface.31 32Usually, the remote controller module is auto-loaded when the TV card is33detected. However, for a few devices, you need to manually load the34ir-kbd-i2c module.35 36How it works37============38 39The modules register the remote as keyboard within the linux input40layer, i.e. you'll see the keys of the remote as normal key strokes41(if CONFIG_INPUT_KEYBOARD is enabled).42 43Using the event devices (CONFIG_INPUT_EVDEV) it is possible for44applications to access the remote via /dev/input/event<n> devices.45The udev/systemd will automatically create the devices. If you install46the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_, it may also47automatically load a different keytable than the default one. Please see48`v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ ir-keytable.149man page for details.50 51The ir-keytable tool is nice for trouble shooting, i.e. to check52whenever the input device is really present, which of the devices it53is, check whenever pressing keys on the remote actually generates54events and the like.  You can also use any other input utility that changes55the keymaps, like the input kbd utility.56 57 58Using with lircd59----------------60 61The latest versions of the lircd daemon supports reading events from the62linux input layer (via event device). It also supports receiving IR codes63in lirc mode.64 65 66Using without lircd67-------------------68 69Xorg recognizes several IR keycodes that have its numerical value lower70than 247. With the advent of Wayland, the input driver got updated too,71and should now accept all keycodes. Yet, you may want to just reassign72the keycodes to something that your favorite media application likes.73 74This can be done by setting75`v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ to load your own76keytable in runtime. Please read  ir-keytable.1 man page for details.77