Remote controllers-V4L: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
===Introduction===
While some drivers, such as the ATI Remote Wonder, are in the mainline kernel, most are provided by the [http://www.lirc.org lirc project], which cannot be put in mainline in its current state. Gerd Knorr expressed interest in getting the driver into the kernel eventually.

Several remote controllers are now supported in the mainline Linux kernel.

Others are still only supported by the [http://www.lirc.org lirc project].


===Winfast and Hauppauge remotes supported in kernel===
===Winfast and Hauppauge remotes supported in kernel===
Line 7: Line 11:


* For the CX88_BOARD_WINFAST2000XP_EXPERT in cx88-input.c, see http://seclists.org/lists/linux-kernel/2005/Mar/3081.html
* For the CX88_BOARD_WINFAST2000XP_EXPERT in cx88-input.c, see http://seclists.org/lists/linux-kernel/2005/Mar/3081.html

===Infrared remote control support in video4linux drivers===
Documentation/video4linux/README.ir (from 2.6.12-rc2)

====Basics====

Current versions use the linux input layer to support infrared remote controls. I suggest to download my input layer tools
from [http://bytesex.org/snapshot http://bytesex.org/snapshot/input-<date>.tar.gz]

Modules you have to load:

saa7134 statically built in, i.e. just the driver :)
bttv ir-kbd-gpio or ir-kbd-i2c depending on your card.

ir-kbd-gpio and ir-kbd-i2c don't support all the cards that lirc supports
(yet), mainly for the reason that the code of lirc_i2c and lirc_gpio
was very confusing and I decided to basically start over from scratch.
Feel free to contact me in case of trouble. Note that the ir-kbd-*
modules work on 2.6.x kernels only through ...

====How it works====

The modules register the remote as keyboard within the linux input
layer, i.e. you'll see the keys of the remote as normal key strokes
(if CONFIG_INPUT_KEYBOARD is enabled).

Using the event devices (CONFIG_INPUT_EVDEV) it is possible for
applications to access the remote via /dev/input/event<n> devices.
You might have to create the special files using "/sbin/MAKEDEV
input". The input layer tools mentioned above use the event device.

The input layer tools are nice for trouble shooting, i.e. to check
whenever the input device is really present, which of the devices it
is, check whenever pressing keys on the remote actually generates
events and the like. You can also use the kbd utility to change the
keymaps (2.6.x kernels only through).

====Using with lircd====

The cvs version of the lircd daemon supports reading events from the
linux input layer (via event device). The input layer tools tarball
comes with a lircd config file.

====Using without lircd====

XFree86 likely can be configured to recognise the remote keys. Once I
simply tried to configure one of the multimedia keyboards as input
device, which had the effect that XFree86 recognised some of the keys
of my remote control and passed volume up/down key presses as
XF86AudioRaiseVolume and XF86AudioLowerVolume key events to the X11
clients.

It likely is possible to make that fly with a nice xkb config file,
I know next to nothing about that through.

Have fun,

Gerd

--
Gerd Knorr <kraxel@bytesex.org>

Revision as of 23:31, 29 April 2005

Introduction

Several remote controllers are now supported in the mainline Linux kernel.

Others are still only supported by the lirc project.

Winfast and Hauppauge remotes supported in kernel

Kernel version remote control support for Leadtek Winfast remote controls, shipped with both bttv and cx88 cards, and for Hauppauge Remote Control (the newer, gray remotes; seems there are multiple slightly different versions), shipped with cx88 and ivtv cards, was added in 2.6.12:

Infrared remote control support in video4linux drivers

Documentation/video4linux/README.ir (from 2.6.12-rc2)

Basics

Current versions use the linux input layer to support infrared remote controls. I suggest to download my input layer tools from http://bytesex.org/snapshot/input-<date>.tar.gz

Modules you have to load:

 saa7134       statically built in, i.e. just the driver :)
 bttv          ir-kbd-gpio or ir-kbd-i2c depending on your card.

ir-kbd-gpio and ir-kbd-i2c don't support all the cards that lirc supports (yet), mainly for the reason that the code of lirc_i2c and lirc_gpio was very confusing and I decided to basically start over from scratch. Feel free to contact me in case of trouble. Note that the ir-kbd-* modules work on 2.6.x kernels only through ...

How it works

The modules register the remote as keyboard within the linux input layer, i.e. you'll see the keys of the remote as normal key strokes (if CONFIG_INPUT_KEYBOARD is enabled).

Using the event devices (CONFIG_INPUT_EVDEV) it is possible for applications to access the remote via /dev/input/event<n> devices. You might have to create the special files using "/sbin/MAKEDEV input". The input layer tools mentioned above use the event device.

The input layer tools are nice for trouble shooting, i.e. to check whenever the input device is really present, which of the devices it is, check whenever pressing keys on the remote actually generates events and the like. You can also use the kbd utility to change the keymaps (2.6.x kernels only through).

Using with lircd

The cvs version of the lircd daemon supports reading events from the linux input layer (via event device). The input layer tools tarball comes with a lircd config file.

Using without lircd

XFree86 likely can be configured to recognise the remote keys. Once I simply tried to configure one of the multimedia keyboards as input device, which had the effect that XFree86 recognised some of the keys of my remote control and passed volume up/down key presses as XF86AudioRaiseVolume and XF86AudioLowerVolume key events to the X11 clients.

It likely is possible to make that fly with a nice xkb config file, I know next to nothing about that through.

Have fun,

Gerd

-- Gerd Knorr <kraxel@bytesex.org>