Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753817AbZLAHqQ (ORCPT ); Tue, 1 Dec 2009 02:46:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753408AbZLAHqP (ORCPT ); Tue, 1 Dec 2009 02:46:15 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:64236 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753390AbZLAHqO (ORCPT ); Tue, 1 Dec 2009 02:46:14 -0500 Date: 01 Dec 2009 08:45:00 +0100 From: lirc@bartelmus.de (Christoph Bartelmus) To: jonsmirl@gmail.com Cc: awalls@radix.net Cc: dmitry.torokhov@gmail.com Cc: j@jannau.net Cc: jarod@redhat.com Cc: jarod@wilsonet.com Cc: khc@pm.waw.pl Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: lirc-list@lists.sourceforge.net Cc: mchehab@redhat.com Cc: superm1@ubuntu.com Message-ID: In-Reply-To: <9e4733910911301335j6850cac3h784fa7c302e0c0ea@mail.gmail.com> Subject: Re: [RFC] What are the goals for the architecture of an in-kernel IR system? User-Agent: OpenXP/4.10.7369 (Linux) (i386) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V01U2FsdGVkX1/wK1p7NFU9TaruCHVnxN1DExUb4VHi4kAYnde xAzZPZi2pHytuvY2KXZyJhi6iw1K72+jXlMduKLr4qcjlMPuYO nCEUq1s/ntFpdz9WMcWwcLwsmk+t4q3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2848 Lines: 75 Hi Jon, on 30 Nov 09 at 16:35, Jon Smirl wrote: [...] > It would be interesting to split the lirc daemon. Put the protocol > decoder stuff in one daemon and the scripting support in the other. > The scripting daemon would then be optional. What would be the > relative sizes of the two daemons? > > -------------- > > The LIRC daemon always works with timing data, right? Timing data or hex codes (if decoding is done in hardware). > When it reads > the config files generated by irrecord it internally converts those to > timing data No. > and then matches the incoming data against it. Pattern matching is only done with raw mode config files. The normal case is that lircd is decoding the incoming data using the protocol description found in the config file. > Have you looked at the protocol engine idea? Running the protocol > engines in parallel until a match is achieved. Then map the > vendor/device/command triplet. The protocol engine concept fixes the > problem of Sony remotes in irrecord. No, only rewriting irrecord would fix the problem of Sony remotes. irrecord tries to guess the protocol parameters without any prior knowledge about any protocols. irrecord could also be rewritten to use the protocol engine concept without changing anything in the decoder itself. In fact partly this is already available. You can give irrecord a template config file and it will skip the protocol guessing step. This just would have to be extended so that the template config file could contain several protocol descriptions to match against. I havn't implemented this yet, because I don't care much. Sony remotes do work flawlessly also in raw mode. It's only a problem from the aesthetic view point. > Various Sony remote buttons > transmit in different protocols. irrecord assumes that a remote is > only using a single protocol. Since it can't figure out a protocol it > always records these remotes as raw. With manual intervention you can convert these raw config files afterwards with "irrecord -a". [...] > Button on remote programed to be Mot DVR --> protocol engine --> > Mot/dev/command --> MythTV which is looking for Mot/dev/command > No config files needed. You just move complexity to the application. MythTV would have to know how a Motorola command set looks like. Currently I would tend to an approach like this: - raw interface to userspace using LIRC - fixed set of in-kernel decoders that can handle bundled remotes That would allow zero configuration for simple use cases and full flexibility for more advanced use cases. Christoph -- 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/