Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758578AbZKYN27 (ORCPT ); Wed, 25 Nov 2009 08:28:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758363AbZKYN25 (ORCPT ); Wed, 25 Nov 2009 08:28:57 -0500 Received: from mail-fx0-f213.google.com ([209.85.220.213]:34830 "EHLO mail-fx0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964930AbZKYN2y (ORCPT ); Wed, 25 Nov 2009 08:28:54 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=lglge8EmdIzYGfuzgn7Nb0XtA7NidAdsXEr55axN/DKWSzYGsQGqabtML+bS9URFkB IM89V30g7zp0PCVosL6s4kQWdeDE6ytJZa69UUH4ZywwEbdywm6ASzzhH53SBvqK1V/b kvLDOt3ZBfYh1v5okVqx9OAz5iKCzoXorq4dc= Subject: Re: IR raw input is not sutable for input system From: Maxim Levitsky To: Trent Piepho Cc: Jarod Wilson , Dmitry Torokhov , 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 In-Reply-To: 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> <1259105571.28219.20.camel@maxim-laptop> Content-Type: text/plain; charset="UTF-8" Date: Wed, 25 Nov 2009 15:28:54 +0200 Message-ID: <1259155734.4875.23.camel@maxim-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2381 Lines: 59 On Tue, 2009-11-24 at 19:32 -0800, Trent Piepho wrote: > On Wed, 25 Nov 2009, Maxim Levitsky wrote: > > > > Its not the case. > > There are many protocols, I know that by experimenting with my universal > > remote. There are many receivers, and all have different accuracy. > > Most remotes aren't designed to be used with PC, thus user has to invent > > mapping between buttons and actions. > > Its is not possible to identify remotes accurately, many remotes send > > just a 8 bit integer that specifies the 'model' thus many remotes can > > share it. > > The signal recevied by the ir receiver contains glitches. Depending on the > receiver there can be quite a few. It is also not trivial to turn the raw > signal sent by the remote into a digital value, even if you know what to > expect. It takes digital signal processing techniques to turn the messy > sequence of inaccurate mark and space lengths into a best guess at what > digital code the remote sent. Exactly > > It's like turning raw VBI data into decoded ASCII teletext from a simulated > keyboard device, all in the kernel. You hit a nail on the head with this one. > > > Kernel job is to take the information from device and present it to > > userspace using uniform format, that is kernel does 1:1 translating, but > > doesn't parse the data. > > One thing that could be done, unless it has changed much since I wrote it > 10+ years ago, is to take the mark/space protocol the ir device uses and sent > that data to lircd via the input layer. It would be less efficient, but > would avoid another kernel interface. Of course the input layer to lircd > interface would be somewhat different than other input devices, so > it's not entirely correct to say another interface is avoided. I agree with this one, but it is very optional. I also want to add that lirc can and does behave just like an input device. It sends the parsed events using uinput, so your remote appears just like a keyboard. It can even act like a mouse, and btw I use that feature, and it works just fine. So lets put lirc into the kernel finally? Best regards, Maxim Levitsky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/