LWN: Comments on "Kernel support for infrared receivers" https://lwn.net/Articles/364515/ This is a special feed containing comments posted to the individual LWN article titled "Kernel support for infrared receivers". en-us Sun, 12 Oct 2025 20:19:43 +0000 Sun, 12 Oct 2025 20:19:43 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Kernel support for infrared receivers https://lwn.net/Articles/366699/ https://lwn.net/Articles/366699/ dlang <div class="FormattedComment"> it makes sense to have a default keymap that responds to all volume_up keys, but then have the option of loading a different keymap that only responds to specific volume_up keys.<br> <p> it's not as simple as saying 'respond to sony_tv/* events' there are many different sony_tv mappings, some of which overlap<br> </div> Tue, 15 Dec 2009 20:26:54 +0000 Kernel support for infrared receivers https://lwn.net/Articles/366585/ https://lwn.net/Articles/366585/ incase <div class="FormattedComment"> Well, the problem with IR is that most people I know of have multiple remotes, of which only one should actually be handled by Linux. So if "all" (well, most) remotes "just work" with Linux, too many events will be handled by the Linux apps. <br> From the application point of view, you are right, the application should just check for "volume up" (and any other type of event it is interested in) and do the right thing. <br> From the user point of view however, it must be possible to ignore some "volume up" events.<br> The easiest way to achieve that is to actually provide<br> "remote_type/vol_up" events and allow the user to tell the system to ignore (or only process) "sony_tv/*" events for example (though I'm not sure how this should work, via a userspace tools, sysfs, ioctl or whatever).<br> <p> The filtering/routing to different applications is a secondary concern for me. I can solve that in other ways.<br> </div> Tue, 15 Dec 2009 09:28:28 +0000 Kernel support for infrared receivers https://lwn.net/Articles/366490/ https://lwn.net/Articles/366490/ dlang <div class="FormattedComment"> no scheme can address those problems, but what you can get from evdev is that the application doesn't have to know about IR remotes specificly.<br> <p> the app can watch for 'volume_up', and do the right thing no matter if the button pressed in on a multimedia keyboard, an IR remote, a RF remote, a USB device, etc.<br> <p> wither you use LIRC or evdev, there has to be a mapping loaded to map the particular keystrokes to particular scancodes.<br> <p> this is just like keyboards. different keyboards put the letters in different places without the system having any way to detect this. this doesn't prevent the system from defaulting to a common keymap, but providing the ability to load more specific ones. <br> </div> Mon, 14 Dec 2009 18:02:28 +0000 Kernel support for infrared receivers https://lwn.net/Articles/366451/ https://lwn.net/Articles/366451/ incase <div class="FormattedComment"> I really don't know wether I want the kernel to "just work" in the sense of generating evdev events for any IR code received.<br> <p> One reason is that IR codes are not standardized, I once had a TV remote that would turn up the volume on my HiFi amplifier when hitting the key for teletext. In other words: I could have a remote that has the same keycode for the "1" key as some other remote has for the "channel up" key. So which translation should the kernel provide as an evdev event?<br> <p> The other problem is which remote codes I want the Linux machine to interpret and which ones I don't want it to "see". I don't want Linux to turn up the volume if I hit the "volume up" key on my amplifiers remote (or on my universal remote when in amplifier mode).<br> <p> Which all boils down to: Even if the kernel could provide a standardized evdev interface for IR events, it would still require configuration. Also I sometimes want to have some IR events routed to one application and others to a different one, which is possible with current LIRC, but I don't see too many options how this could be done with an evdev interface, especially if none of those applications run under X11 (like my VDR and some background tools I control via IR right now).<br> <p> All in all, I would probably prefer to have LIRC merged mainly "as-is", unless the evdev approach can tackle my "problems" above.<br> </div> Mon, 14 Dec 2009 11:25:29 +0000 Kernel support for infrared receivers https://lwn.net/Articles/366363/ https://lwn.net/Articles/366363/ cybernytrix <div class="FormattedComment"> Looks like all you need is a LIRC config =&gt; C code generator that can be loaded into the kernel. Any takers?<br> <p> </div> Sun, 13 Dec 2009 01:59:24 +0000 Kernel support for infrared receivers https://lwn.net/Articles/366165/ https://lwn.net/Articles/366165/ Russ.Dill@gmail.com <div class="FormattedComment"> I don't think that any of these plans save you. Sure you have a standard receiver that can push events to evdev, but there are still 5 bazillion remotes. You could even have two remotes that same the same code for different events. I get the impression that evdev would be sending the ir code.<br> </div> Fri, 11 Dec 2009 07:22:55 +0000 Kernel support for infrared receivers https://lwn.net/Articles/365030/ https://lwn.net/Articles/365030/ guus <div class="FormattedComment"> One objection to use evdev I saw was that some LIRC specific behaviour, like mode switch, is then not possible anymore. I have however written a utility that allows input events to be translated into LIRC events, allowing legacy LIRC clients to work with any evdev based remote control.<br> <p> <a href="http://packages.debian.org/inputlirc">http://packages.debian.org/inputlirc</a><br> <a href="http://git.sliepen.org/inputlirc/">http://git.sliepen.org/inputlirc/</a><br> </div> Thu, 03 Dec 2009 19:52:11 +0000 Kernel support for infrared receivers https://lwn.net/Articles/364915/ https://lwn.net/Articles/364915/ seanyoung <div class="FormattedComment"> I've been following this discussion on lkml and found it really painful to watch. The discussion on whether this belongs in kernel space or not seems to be ignored and in stead the debate focusses on how to translate IR codes to key codes.<br> <p> Doing this in kernel-space is not the right place IMHO. <br> - IR drivers can exist in user-space too (e.g. libusb) and are perfectly valid, many of the current IR drivers are in user-space. Decoding IR in kernel-space for a user-space IR driver can't be right<br> - Decoding IR is not trivial at all. I've written a NEC decoder for a laserdisc emulator[3] and I've had to make any tweaks to make it match the behaviour of the original laserdisc player. I'd rather not reboot to apply changes to a IR decoder<br> - Having another daemon in user-space is not a problem at all, this allows extra security, can be swapped out, etc etc<br> <p> Now my opinion is of no consequence, however noone has convinced Alan Cox either[1][2] which I find telling for whole thread.<br> <p> [2] <a href="http://lkml.indiana.edu/hypermail/linux/kernel/0911.3/02376.html">http://lkml.indiana.edu/hypermail/linux/kernel/0911.3/023...</a><br> [1] <a href="http://lkml.indiana.edu/hypermail/linux/kernel/0911.3/02371.html">http://lkml.indiana.edu/hypermail/linux/kernel/0911.3/023...</a><br> [3] <a href="http://openmsx.svn.sourceforge.net/viewvc/openmsx/openmsx/trunk/src/laserdisc/LaserdiscPlayer.cc">http://openmsx.svn.sourceforge.net/viewvc/openmsx/openmsx...</a><br> </div> Thu, 03 Dec 2009 13:35:38 +0000 Kernel support for infrared receivers https://lwn.net/Articles/364863/ https://lwn.net/Articles/364863/ Alphix <div class="FormattedComment"> Thinking that everyone who argues for in-kernel decoding lacks the necessary experience and knowledge is a bit presumptuous of you.<br> <p> I have dealt with the devices (and I wrote the winbond-cir.c driver which is in the 2.6.32 kernel).<br> <p> There aren't nearly as many protocols as you seem to think, especially not if you weigh the different protocols by market share. Providing in-kernel decoders for RC5, RC6, Sony12/15/20 and NEC(x)1/2 would mean that the vast majority of all remotes you're likely to find in someone's home would work out-of-the-box (for less than 20k of code). It would be easy to support further protocols by providing an additional kernel module if size is an issue.<br> <p> Saying that the kernel should have no protocol understanding because you might wish to decode the signals from the remote to your 1976 airconditioner using a diode hooked to the mic connector on your soundcard sound to me like saying TCP/IP and the e1000 driver shouldn't be in the kernel because you might want to run SNA/SDLC over your homebrew hardware connected to a serial port (hint, you can - from userspace).<br> <p> It's not like LIRC is a magic solution that can decode every single protocol either, some protocols will require a very high frequency sampling for a robust decode, which means hardware will have to be setup in advance, which in turn means that you need to know in advance which mode you want the hardware to operate in...LIRC doesn't have any framework for that as far as I know.<br> <p> In-kernel decoding means that you abstract away the differences between hardware that does the decoding for you and hardware which doesn't (which sounds like a perfect description of why we want device drivers in the first place - to abstract away hardware differences).<br> <p> Finally, if you do have a truly bizarre remote, the ability to decode raw signals in userspace isn't something any of the people discussing in-kernel LIRC want to remove - they just want to provide something which is more user-friendly in the vast majority of cases.<br> <p> </div> Thu, 03 Dec 2009 08:29:32 +0000 Reminds me of a recent touch-screen debate. https://lwn.net/Articles/364851/ https://lwn.net/Articles/364851/ xtifr <div class="FormattedComment"> "Principles of openness and freedom" are great when you're working on your own stuff, more-or-less independent of others, as the LIRC folks seem to have been doing for some time, but when you start to work with others, new considerations can come into play, such as compatibility, comprehensibility, not stepping on toes, demarcation of boundaries, etc., etc. It's called cooperation, and if LIRC is going to be accepted into the main kernel source tree, then the devs are going to have to cooperate with the folks in charge of the main tree.<br> <p> If everyone working on drivers were to just do whatever they want, without consideration for how the rest of the kernel operates and is maintained, the kernel would have collapsed under the weight of a million tiny incomprehensibly incompatible interfaces (III) a long time ago! That's why "benevolent dictators" are so critical to successful projects.<br> </div> Thu, 03 Dec 2009 05:41:18 +0000 Reminds me of a recent touch-screen debate. https://lwn.net/Articles/364815/ https://lwn.net/Articles/364815/ neilbrown <div class="FormattedComment"> touch screens - such as on the Openmoko freerunner - tend to deliver noisy data, particularly when touched lightly. Should this be processed in-kernel then passed out as nice clean mouse events, or should the raw data get to user space to be processed, and then possibly sent back through the kernel (via uevent) or directly to the application?<br> <p> It sounds like much the same problem, and it seems likely that the same theme will keep coming up as Linux gets used in more interesting devices.<br> <p> To my mind, the principles of freedom and openness suggest that the author of a particular driver should be free to manage the processing however (s)he wants. As long as we do get the fully processed events coming from the input subsystem in the kernel, the path they take to get there must be left to the author or maintainer of the code.<br> <p> Putting it a different way, I think that the interface that needs to be stable is the interface to applications, not the interface to the kernel. More and more, there are user-space programs that work closely with the kernel to provide particular functionality. Freezing the interface between those programs and the kernel seems silly. Freezing the interface between the functionality and the applications is where the focus should be. For both LIRC and touch screens, the frozen interface should be the input subsystem. Where raw noisy inputs are processed is just an implementation detail.<br> <p> </div> Wed, 02 Dec 2009 22:34:18 +0000 Kernel support for infrared receivers https://lwn.net/Articles/364804/ https://lwn.net/Articles/364804/ PhracturedBlue <div class="FormattedComment"> Just this week I went through the process of setting up an LIRC config. IN my case I have an MCE IR receiver, but for various reasons I'm not using an MCE Remote, and didn't want to use an MCE protocol. With LIRC, I could (with a bit of work) specify a config file that maps an RC-5 protocol with a bunch of special buttons to something usable by MythTV. I could never have done that in Windows, and I hope they keep the flexibility of being able to use the hardware to its fullest potential should they move stuff into the kernel. I had the fun of trying to tweak a v4l kernel module for a TV card with a built-in IR receiver a few years back to not send key-repeats so quickly, and it involved writing a bunch of code and a lot of trial and error. Using LIRC's config files is a joy in comparison.<br> <p> </div> Wed, 02 Dec 2009 21:32:02 +0000 Kernel support for infrared receivers https://lwn.net/Articles/364767/ https://lwn.net/Articles/364767/ daney <div class="FormattedComment"> I think the people proposing that protocol decoding for raw IR pulse data be done in the kernel have never dealt with the corresponding devices. There are literally hundreds of different incompatible protocols, and the data is often dirty and can have interference from things like fluorescent lights.<br> <p> <p> </div> Wed, 02 Dec 2009 19:59:59 +0000 Kernel support for infrared receivers https://lwn.net/Articles/364773/ https://lwn.net/Articles/364773/ fb <div class="FormattedComment"> Having gone through the adventure of configuring LIRC for a number of applications, I very much welcome its inclusion in the kernel, and hopefully a standardization of its input codes.<br> <p> Having to manually configure what each button will do for each application is very annoying, and it seems like a waste. Specially when you compare with multimedia keyboards that will send all sorts of standard X codes that all applications accept, and know how to act upon.<br> </div> Wed, 02 Dec 2009 19:34:51 +0000