From Fedora Project Wiki
(update for latest status)
m (fixor some links)
Line 54: Line 54:
* Making applications load a default application installed lirc configuration using lirc_readconfig()
* 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)
* 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]]
* 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]])
* 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]] (and [[http://svn.gnome.org/viewvc/totem?view=revision&revision=5530 as well]]), or for [[http://bugzilla.gnome.org/show_bug.cgi?id=545555 Rhythmbox]].
See this example of [http://svn.gnome.org/viewvc/totem?view=revision&revision=5529 how it was done for Totem] (and [http://svn.gnome.org/viewvc/totem?view=revision&revision=5530 as well]), or for [http://bugzilla.gnome.org/show_bug.cgi?id=545555 Rhythmbox].


== Dependencies ==
== Dependencies ==
Line 64: Line 64:
* [https://bugzilla.redhat.com/show_bug.cgi?id=442329 gnome-lirc-properties package review]  
* [https://bugzilla.redhat.com/show_bug.cgi?id=442329 gnome-lirc-properties package review]  
* [http://bugzilla.gnome.org/show_bug.cgi?id=530359 gnome-lirc-properties Fedora specific patches]  
* [http://bugzilla.gnome.org/show_bug.cgi?id=530359 gnome-lirc-properties Fedora specific patches]  
* [[https://bugzilla.redhat.com/show_bug.cgi?id=440231 lircd patch to avoid early exit when device isn't present]]
* [https://bugzilla.redhat.com/show_bug.cgi?id=440231 lircd patch to avoid early exit when device isn't present]


== Contingency Plan ==
== Contingency Plan ==

Revision as of 09:35, 14 August 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: 14 August 2008
  • Percentage of completion: 80%

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.

Keycodes specified in the remotes definitions are now based on the standard definitions, which means they should work out-of-the-box with a majority of applications.

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 (and as well), or for Rhythmbox.

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.

If you had a previous setup with lirc, it is recommended you regenerate the configuration files with gnome-lirc-properties, so that a majority of applications work with your new setup.

Comments and Discussion

See Talk:Features/BetterLIRCSupport