From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753657AbZK0CXo (ORCPT ); Thu, 26 Nov 2009 21:23:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753445AbZK0CXo (ORCPT ); Thu, 26 Nov 2009 21:23:44 -0500 Received: from static-72-93-233-3.bstnma.fios.verizon.net ([72.93.233.3]:41138 "EHLO mail.wilsonet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752415AbZK0CXm (ORCPT ); Thu, 26 Nov 2009 21:23:42 -0500 Message-ID: <4B0F3963.8040701@wilsonet.com> Date: Thu, 26 Nov 2009 21:28:51 -0500 From: Jarod Wilson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4 MIME-Version: 1.0 To: Dmitry Torokhov CC: Krzysztof Halasa , Mauro Carvalho Chehab , Jarod Wilson , linux-kernel@vger.kernel.org, Mario Limonciello , linux-input@vger.kernel.org, linux-media@vger.kernel.org, Janne Grunau , Christoph Bartelmus Subject: Re: [RFC] Should we create a raw input interface for IR's ? - Was: Re: [PATCH 1/3 v2] lirc core device driver infrastructure References: <200910200956.33391.jarod@redhat.com> <200910200958.50574.jarod@redhat.com> <4B0A765F.7010204@redhat.com> <4B0A81BF.4090203@redhat.com> <20091123173726.GE17813@core.coreip.homeip.net> <4B0B6321.3050001@wilsonet.com> <20091126053109.GE23244@core.coreip.homeip.net> <20091126232311.GD6936@core.coreip.homeip.net> In-Reply-To: <20091126232311.GD6936@core.coreip.homeip.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/26/2009 06:23 PM, Dmitry Torokhov wrote: > On Thu, Nov 26, 2009 at 01:16:01AM -0500, Jarod Wilson wrote: >> On Nov 26, 2009, at 12:31 AM, Dmitry Torokhov wrote: >> >>> On Mon, Nov 23, 2009 at 11:37:53PM -0500, Jarod Wilson wrote: >>>> On 11/23/2009 12:37 PM, Dmitry Torokhov wrote: >>>>> On Mon, Nov 23, 2009 at 03:14:56PM +0100, Krzysztof Halasa wrote: >>>>>> Mauro Carvalho Chehab writes: >>>>>> >>>>>>> Event input has the advantage that the keystrokes will provide an unique >>>>>>> representation that is independent of the device. >>>>>> >>>>>> This can hardly work as the only means, the remotes have different keys, >>>>>> the user almost always has to provide customized key<>function mapping. >>>>>> >>>>> >>>>> Is it true? I would expect the remotes to have most of the keys to have >>>>> well-defined meanings (unless it is one of the programmable remotes)... >>>> >>>> Its the cases like programmable universal remotes that really throw >>>> things for a loop. That, and people wanting to use random remote X that >>>> came with the amp or tv or set top box, with IR receiver Y. >>> >>> Right, but still the keys usually do have the well-defined meaning, >> >> Except when they don't. I have two very similar remotes, one that was bundled with a system from CaptiveWorks, and one that was bundled with an Antec Veris IR/LCD (SoundGraph iMON rebrand). Outside of the Antec remote having a mouse pad instead of up/down/left/right/enter, they have an identical layout, and the keys in the same locations on the remotes send the same IR signal. But the button names vary a LOT between the two. So on the DVD key on the Antec and the MUTE key on the CW send the same signal. Same with Audio vs. Eject, TV vs. History, etc. Moral of the story is that not all IR protocols spell things out particularly well for what a given code should actually mean. > > I guess we are talking about different things. While the 2 remotes may > use different protocols to communicate The remotes use the exact same protocol. Their respective bundled receivers however, do translate key presses differently. Perhaps this is a bad example though, because both of these remotes came with receivers that do onboard decoding. But there's nothing stopping me from wanting to use either of these remotes with an mceusb IR transceiver. > and may use the same codes to > mean different things they buttons have well-defined meaning and we > could map that to input keycodes. Then what is left is to load the > proper mapping for particular device into the kernel. In this case, its not the device, but the remote, that we need a different mapping for. > This can be done > either automatically (when we know the mapping) or with the help of the > user (owner of the system). Yep, that'd work. Just trying to illustrate that the same code doesn't always mean anywhere near the same thing from one remote to another. >>> teh >>> issue is in mapping raw code to the appropriate keycode. This can be >>> done either by lirc config file (when lirc is used) or by some other >>> means. >> >> The desire to map a button press to multiple keystrokes isn't uncommon either, though I presume that's doable within the input layer context too. > > No, at present we expect 1:1 button->event mapping leaving macro > expansion (i.e. KEY_PROG1 -> "do some multi-step sequence" to > userspace). Hm. So ctrl-x, alt-tab, etc. would have to be faked in userspace somehow. Bummer. -- Jarod Wilson jarod@wilsonet.com