From Fedora Project Wiki
(update with more details about the status, and LIRC architecture)
(update how to make the apps have defaults)
Line 13: Line 13:
* The user must set up the receiver and remote correctly in LIRC (not all receivers are shipped with a remote, and it's possible to use a number of different remotes with a single receiver). gnome-lirc-properties solves that problem allowing the user to set up receiver and remote
* The user must set up the receiver and remote correctly in LIRC (not all receivers are shipped with a remote, and it's possible to use a number of different remotes with a single receiver). gnome-lirc-properties solves that problem allowing the user to set up receiver and remote
* The user must assign remote keys to events that the applications will understand. LIRC event are strings such as "|<<" for rewind. LIRC has a number of de-facto events existing, but some more uncommon remotes will have buttons for which no events have been agreed upon. gnome-lirc-properties allows users to modify which event is assigned to which button, but doesn't mention whether specific applications support the event (other than Elisa, for which the program was created in the first place).
* The user must assign remote keys to events that the applications will understand. LIRC event are strings such as "|<<" for rewind. LIRC has a number of de-facto events existing, but some more uncommon remotes will have buttons for which no events have been agreed upon. gnome-lirc-properties allows users to modify which event is assigned to which button, but doesn't mention whether specific applications support the event (other than Elisa, for which the program was created in the first place).
* Applications then need to be set up with a configuration file that will transform the LIRC events (such as "|<<") into strings that the program can parse itself. How to make applications have sane defaults is still under discussion.
* Applications then need to be set up with a configuration file that will transform the LIRC events (such as "|<<") into strings that the program can parse itself.


== Owner ==
== Owner ==
Line 41: Line 41:
== Scope ==
== Scope ==


Will require changes to lirc, as well as inclusion of gnome-lirc-properties. We might also need to modify some applications to be setup out of the box.
Will require changes to lirc, as well as inclusion of gnome-lirc-properties. We also need to modify some applications to be setup out of the box.


== Test Plan ==
== Test Plan ==
Line 51: Line 51:
After launching the "Infrared Remote Control" preferences in the menus, clicking "Auto-detect" should be enough to get the remote working. See [http://www.hadess.net/2008/07/lirc-setup-now-in-fedora.html for screenshots].
After launching the "Infrared Remote Control" preferences in the menus, clicking "Auto-detect" should be enough to get the remote working. See [http://www.hadess.net/2008/07/lirc-setup-now-in-fedora.html for screenshots].


Applications should have a default configuration which makes them work with a large number of remote controls without any further configuration changes. How this will be done is still under discussion.
Applications should have a default configuration which makes them work with a large number of remote controls without any further configuration changes. This is achieved by:
* Making applications load a default application installed lirc configuration using lirc_readconfig()
* Making applications not fail if they can't load the user and system configurations (when passing NULL as the first argument of lirc_readconfig(), it will try to read ~/.lircrc and /etc/lirrc)
* The application installed lirc configuration must use [[http://arnaud.quette.free.fr/lirc/lirc-nns.html keys listed in this document]]
* Remote definitions need to use those definitions as well (see [[https://bugzilla.redhat.com/show_bug.cgi?id=457273 bugzilla]])
 
See this example of [[http://svn.gnome.org/viewvc/totem?view=revision&revision=5529 how it was done for Totem]].


== Dependencies ==
== Dependencies ==

Revision as of 17:11, 30 July 2008

Better LIRC support

Summary

LIRC is used in many media applications to provide support for Infra-red remote controls. This feature makes it easy to connect to remote controls and have them just work in many applications.

LIRC itself

LIRC does not use the Linux input layer available in the kernel. Instead, an LIRC daemon accesses the hardware directly (sometimes through a serial port, sometimes through a kernel module with a proprietary protocol), and acts as a broker to the applications.

Applications, instead of getting key events through X11 (which is fed by the Linux input layer), listen for events fed by the LIRC daemon, using an LIRC specific library. The main problems are:

  • The user must set up the receiver and remote correctly in LIRC (not all receivers are shipped with a remote, and it's possible to use a number of different remotes with a single receiver). gnome-lirc-properties solves that problem allowing the user to set up receiver and remote
  • The user must assign remote keys to events that the applications will understand. LIRC event are strings such as "|<<" for rewind. LIRC has a number of de-facto events existing, but some more uncommon remotes will have buttons for which no events have been agreed upon. gnome-lirc-properties allows users to modify which event is assigned to which button, but doesn't mention whether specific applications support the event (other than Elisa, for which the program was created in the first place).
  • Applications then need to be set up with a configuration file that will transform the LIRC events (such as "|<<") into strings that the program can parse itself.

Owner

  • Name: BastienNocera

Current status

  • Targeted release: Fedora 10
  • Last updated: 30 July 2008
  • Percentage of completion: 70%

LIRC is used in many media applications to provide support for Infra-red remote controls. Any Windows Media Center supported remote should work fine in lirc itself. The complete list of supported devices is too long to list. LIRC has a list sorted by hardware vendor.

LIRC, before gnome-lirc-properties, was very hard to configure, and it was tricky to configure the applications to use it.

All the required lirc patches are in lirc upstream and in rawhide. Upstream work on gnome-lirc-properties is finished, and gnome-lirc-properties was accepted in Fedora.

More changes will be necessary to allow applications to provide some sensible default keybindings.

Detailed Description

Currently setting up LIRC remote controls requires a lot of editing, by hand, with little or no hand-holding. It should be possible to use an infra-red remote control without needing to use a terminal, or edit text files by hand.

Benefit to Fedora

Fedora becomes easier to use in media-center scenarios where a remote control may come handy.

Scope

Will require changes to lirc, as well as inclusion of gnome-lirc-properties. We also need to modify some applications to be setup out of the box.

Test Plan

Using a supported remote control (see above for a list of supported remotes), we should be able to control Totem or Rhythmbox without needing access to a terminal.

User Experience

After launching the "Infrared Remote Control" preferences in the menus, clicking "Auto-detect" should be enough to get the remote working. See for screenshots.

Applications should have a default configuration which makes them work with a large number of remote controls without any further configuration changes. This is achieved by:

  • Making applications load a default application installed lirc configuration using lirc_readconfig()
  • Making applications not fail if they can't load the user and system configurations (when passing NULL as the first argument of lirc_readconfig(), it will try to read ~/.lircrc and /etc/lirrc)
  • The application installed lirc configuration must use [keys listed in this document]
  • Remote definitions need to use those definitions as well (see [bugzilla])

See this example of [how it was done for Totem].

Dependencies

Contingency Plan

This feature does not affect any other parts of the system, so no contingency plans are required.

Documentation

Release Notes

gnome-lirc-properties is a new graphical frontend to LIRC that makes it easy to connect and configure Infra-Red remote controls. Multimedia applications such as rhythmbox and totem can be remotely controlled in this way. To access the graphical frontend, use the "Infrared Remote Control" item in the menus.

Comments and Discussion

See Talk:Features/BetterLIRCSupport