All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>,
	Jarod Wilson <jarod@wilsonet.com>,
	Krzysztof Halasa <khc@pm.waw.pl>,
	Christoph Bartelmus <lirc@bartelmus.de>,
	awalls@radix.net, dmitry.torokhov@gmail.com, j@jannau.net,
	jarod@redhat.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	superm1@ubuntu.com
Subject: Re: [RFC] Should we create a raw input interface for IR's ? - Was: Re: [PATCH 1/3 v2] lirc core device driver infrastructure
Date: Thu, 26 Nov 2009 12:45:39 -0200	[thread overview]
Message-ID: <4B0E9493.1090200@redhat.com> (raw)
In-Reply-To: <4B0DA885.7010601@redhat.com>

Gerd Hoffmann wrote:
> On 11/25/09 19:20, Devin Heitmueller wrote:
>> On Wed, Nov 25, 2009 at 1:07 PM, Jarod Wilson<jarod@wilsonet.com>
>> wrote:
>>> Took me a minute to figure out exactly what you were talking
>>> about. You're referring to the current in-kernel decoding done on
>>> an ad-hoc basis for assorted remotes bundled with capture devices,
>>> correct?
>>>
>>> Admittedly, unifying those and the lirc driven devices hasn't
>>> really been on my radar.
> 
> I think at the end of the day we'll want to have all IR drivers use the
> same interface.  The way the current in-kernel input layer drivers work
> obviously isn't perfect too, so we *must* consider both worlds to get a
> good solution for long-term ...
> 
>> This is one of the key use cases I would be very concerned with. For
>> many users who have bought tuner products, the bundled remotes work
>> "out-of-the-box", regardless of whether lircd is installed.
> 
> I bet this simply isn't going to change.
> 
>> I have no objection so much as to saying "well, you have to install
>> the lircd service now", but there needs to be a way for the driver to
>>  automatically tell lirc what the default remote control should be,
>> to avoid a regression in functionality.
> 
> *Requiring* lircd for the current in-kernel drivers doesn't make sense
> at all.  Allowing lircd being used so it can do some more advanced stuff
> makes sense though.
> 
>> This is why I think we really should put together a list of use
>> cases, so that we can see how any given proposal addresses those use
>> cases. I offered to do such, but nobody seemed really interested in
>> this.
> 
> Lets have a look at the problems the current input layer bits have
> compared to lirc:
> 
> 
> (1) ir code (say rc5) -> keycode conversion looses information.
> 
> I think this can easily be addressed by adding a IR event type to the
> input layer, which could look like this:
> 
>   input_event->type  = EV_IR
>   input_event->code  = IR_RC5
>   input_event->value = <rc5 value>

Agreed. We're doing this already with some drivers (dvb-usb ones). I've
started working on a patchset to extend this to the remaining drivers.
I'm not sure whare were already merged from this tree, but my intention
is to extend this to all drivers.

> In case the 32bit value is too small we might want send two events
> instead, with ->code being set to IR_<code>_1 and IR_<code>_2

Well, RC6 mode 6 uses 32 bits. I don't know if is there any case for
more than 32 bits. However, on some I2C IR chips, we see some cases
where the IR scancode key is encapsulated into some protocol with more
bytes. It seems that those extra bytes are used to handle key repetition
sort of events. I'm not sure if it would make sense to pass the raw 
data to userspace. Probably not.

> Advantages:
>   * Applications (including lircd) can get access to the unmodified
>     rc5/rc6/... codes.
>   * All the ir-code -> keycode mapping magic can be handled by the
>     core input layer then.  All the driver needs to do is to pass on
>     the information which keymap should be loaded by default (for the
>     bundled remote if any).  The configuration can happen in userspace
>     (sysfs attribute + udev + small utility in tools/ir/).

I like the idea of such small utility to load the keymap table.

>   * lirc drivers which get ir codes from the hardware can be converted
>     to pure input layer drivers without regressions.  lircd is not
>     required any more.
> 
> 
> (2) input layer doesn't give access to the raw samples.
> 
> Not sure how to deal with that best.  Passing them through the input
> layer would certainly be possible to hack up.  But what would be the
> point?  The input layer wouldn't do any processing on them.  It wouldn't
> buy us much.  So we might want to simply stick with todays lirc
> interface for the raw samples.

If we need such interface, the better is to keep using the lirc interface.
Yet, I'm not sure if we should really keep outputing raw samples, since
several devices won't support it.

> Drivers which support both ir codes (be it by hardware or by in-kernel
> decoding) and raw samples would register two devices then, one input
> device and one lirc device.  It would probably a good idea to stop
> sending events to the input layer as soon as someone (most likely lircd)
> opens the lirc device to avoid keystrokes showing up twice.
> 
> By default the in-kernel bits will be at work, but optionally you can
> have lircd grab the raw samples and do fancy advanced decoding.
> 
> 
> (3) input layer doesn't allow transmitting IR codes.
> 
> If we keep the lirc interface for raw samples anyway, then we can keep
> it for sending too, problem solved ;)  How does sending hardware work
> btw?  Do they all accept just raw samples?  Or does some hardware also
> accept ir-codes?

I would do it in a way that it will accept scancodes and raw samples, 
since, even if we currently have only devices that accept raw samples, 
it would be more future-proof to allow sending scancodes also.

Cheers,
Mauro

  parent reply	other threads:[~2009-11-26 14:46 UTC|newest]

Thread overview: 249+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 13:56 [PATCH 0/3 v2] linux infrared remote control drivers Jarod Wilson
2009-10-20 13:58 ` [PATCH 1/3 v2] lirc core device driver infrastructure Jarod Wilson
2009-11-23 11:47   ` Mauro Carvalho Chehab
2009-11-23 12:36     ` [RFC] Should we create a raw input interface for IR's ? - Was: " Mauro Carvalho Chehab
2009-11-23 14:14       ` Krzysztof Halasa
2009-11-23 15:20         ` Devin Heitmueller
2009-11-23 15:20           ` Devin Heitmueller
2009-11-23 16:53           ` James Mastros
2009-11-23 16:53             ` James Mastros
2009-11-23 20:09             ` Krzysztof Halasa
2009-11-23 17:05           ` James Mastros
2009-11-23 17:05             ` James Mastros
2009-11-23 17:12             ` Devin Heitmueller
2009-11-23 17:12               ` Devin Heitmueller
2009-11-23 17:12               ` Devin Heitmueller
2009-11-23 17:50             ` Mauro Carvalho Chehab
2009-11-23 20:14               ` Krzysztof Halasa
2009-11-23 16:19         ` Stefan Richter
2009-11-23 17:39           ` Mauro Carvalho Chehab
2009-11-23 20:23             ` Krzysztof Halasa
2009-11-26 12:16               ` Mauro Carvalho Chehab
2009-11-26 18:18                 ` Krzysztof Halasa
2009-11-26 19:06                   ` Mauro Carvalho Chehab
2009-11-28  2:39                     ` Mauro Carvalho Chehab
2009-11-28  2:54                       ` Dmitry Torokhov
2009-11-28  9:43                         ` Mauro Carvalho Chehab
2009-11-28 10:31                           ` Stefan Richter
2009-11-28 10:43                           ` Arnd Bergmann
2009-11-23 17:29         ` Mauro Carvalho Chehab
2009-11-23 19:17           ` Jarod Wilson
2009-11-23 20:46             ` Krzysztof Halasa
2009-11-23 21:10             ` Christoph Bartelmus
2009-11-23 21:10               ` Christoph Bartelmus
2009-11-24  4:18               ` Jarod Wilson
2009-11-23 20:41           ` Krzysztof Halasa
2009-11-26 12:36             ` Mauro Carvalho Chehab
2009-11-26 13:22               ` Andy Walls
2009-11-26 18:24               ` Krzysztof Halasa
2009-11-26 19:08                 ` Mauro Carvalho Chehab
2009-11-26 20:33                   ` Krzysztof Halasa
2009-11-26 21:05                     ` Mauro Carvalho Chehab
2009-11-26 21:27                       ` Krzysztof Halasa
2009-11-26 22:07                         ` Mauro Carvalho Chehab
2009-11-27  0:19                           ` Krzysztof Halasa
2009-11-27  0:34                             ` Arnd Bergmann
2009-11-26 23:14                         ` Dmitry Torokhov
2009-11-26 23:10                       ` Dmitry Torokhov
2009-11-26 22:59                   ` Trent Piepho
2009-11-27  0:45                     ` Krzysztof Halasa
2009-11-27  2:50                     ` hermann pitton
2009-11-26 20:37               ` Christoph Bartelmus
2009-11-26 20:37                 ` Christoph Bartelmus
2009-11-26 20:59                 ` Mauro Carvalho Chehab
2009-11-26 22:05                   ` Christoph Bartelmus
2009-11-26 22:05                     ` Christoph Bartelmus
2009-11-26 22:14                     ` Mauro Carvalho Chehab
2009-11-26 23:09                   ` Trent Piepho
2009-11-23 17:37         ` Dmitry Torokhov
2009-11-23 20:51           ` Krzysztof Halasa
2009-11-26  5:21             ` Dmitry Torokhov
2009-11-26 17:46               ` Krzysztof Halasa
2009-11-26 17:50                 ` Mauro Carvalho Chehab
2009-11-26 21:39                 ` Dmitry Torokhov
2009-11-27  0:13                   ` Krzysztof Halasa
2009-11-27  0:13                     ` Krzysztof Halasa
2009-11-27  0:26                     ` Dmitry Torokhov
2009-11-27  0:37                       ` Krzysztof Halasa
2009-11-27  0:37                         ` Krzysztof Halasa
2009-11-24  4:37           ` Jarod Wilson
2009-11-24 23:32             ` IR raw input is not sutable for input system Maxim Levitsky
2009-11-25  3:32               ` Trent Piepho
2009-11-25 13:28                 ` Maxim Levitsky
2009-11-25 21:32                   ` Sean Young
2009-11-25 22:30                     ` Krzysztof Halasa
2009-11-25 22:52                       ` Maxim Levitsky
2009-11-26 18:36                         ` Krzysztof Halasa
2009-11-25 17:18                 ` Krzysztof Halasa
2009-11-26  5:41                 ` Dmitry Torokhov
2009-11-25 17:12               ` Krzysztof Halasa
2009-11-26  5:38               ` Dmitry Torokhov
2009-11-26  5:31             ` [RFC] Should we create a raw input interface for IR's ? - Was: Re: [PATCH 1/3 v2] lirc core device driver infrastructure Dmitry Torokhov
2009-11-26  6:16               ` Jarod Wilson
2009-11-26  6:16                 ` Jarod Wilson
2009-11-26 16:07                 ` Mauro Carvalho Chehab
2009-11-26 23:23                 ` Dmitry Torokhov
2009-11-27  2:28                   ` Jarod Wilson
2009-11-27  3:08                     ` Jon Smirl
2009-11-27  3:08                       ` Jon Smirl
2009-11-27  3:08                       ` Jon Smirl
2009-11-27  4:33                       ` Dmitry Torokhov
2009-11-27  4:33                         ` Dmitry Torokhov
2009-11-27  5:06                         ` Jon Smirl
2009-11-27  5:06                           ` Jon Smirl
2009-11-27  7:33                           ` Christoph Bartelmus
2009-11-27  7:33                             ` Christoph Bartelmus
2009-11-27 15:33                             ` Jon Smirl
2009-11-27 15:33                               ` Jon Smirl
2009-11-27 15:33                               ` Jon Smirl
2009-11-30  5:01                           ` Jarod Wilson
2009-11-27  4:30                     ` Dmitry Torokhov
2009-11-23 21:11         ` Christoph Bartelmus
2009-11-23 21:11           ` Christoph Bartelmus
2009-11-23 21:46           ` Krzysztof Halasa
2009-11-23 21:46             ` Krzysztof Halasa
2009-11-23 21:54             ` Devin Heitmueller
2009-11-23 21:54               ` Devin Heitmueller
2009-11-23 22:31               ` Krzysztof Halasa
2009-11-23 22:37                 ` Devin Heitmueller
2009-11-23 22:37                   ` Devin Heitmueller
2009-11-23 22:53                   ` Krzysztof Halasa
2009-12-12 22:04                 ` david
2009-11-24  1:14             ` Andy Walls
2009-11-26 13:25               ` Mauro Carvalho Chehab
2009-11-26 13:48                 ` Andy Walls
2009-11-26 16:35                   ` Mauro Carvalho Chehab
2009-11-24  0:53           ` Andy Walls
2009-11-24 13:32             ` Jarod Wilson
2009-11-24 13:32               ` Jarod Wilson
2009-11-25 16:53               ` Krzysztof Halasa
2009-11-25 17:20                 ` Christoph Bartelmus
2009-11-25 17:20                   ` Christoph Bartelmus
2009-11-25 17:40                   ` Krzysztof Halasa
2009-11-25 17:40                     ` Krzysztof Halasa
2009-11-25 18:07                     ` Jarod Wilson
2009-11-25 18:07                       ` Jarod Wilson
2009-11-25 18:20                       ` Devin Heitmueller
2009-11-25 18:20                         ` Devin Heitmueller
2009-11-25 18:43                         ` [RFC] Should we create a raw input interface for IR's ? Jarod Wilson
2009-11-25 20:49                           ` Krzysztof Halasa
2009-11-26  5:53                             ` Dmitry Torokhov
2009-11-26 18:40                               ` Krzysztof Halasa
2009-11-26 23:28                                 ` Dmitry Torokhov
2009-11-27  0:28                                   ` Krzysztof Halasa
2009-11-25 20:47                         ` [RFC] Should we create a raw input interface for IR's ? - Was: Re: [PATCH 1/3 v2] lirc core device driver infrastructure Krzysztof Halasa
2009-11-25 21:58                         ` Gerd Hoffmann
2009-11-25 22:31                           ` Christoph Bartelmus
2009-11-25 22:31                             ` Christoph Bartelmus
2009-11-25 23:22                             ` Gerd Hoffmann
2009-11-26  7:28                               ` Christoph Bartelmus
2009-11-26  7:28                                 ` Christoph Bartelmus
2009-11-26  8:39                                 ` Gerd Hoffmann
2009-11-26 16:41                               ` Krzysztof Halasa
2009-11-26  4:26                           ` Andy Walls
2009-11-26 14:45                           ` Mauro Carvalho Chehab [this message]
2009-11-26 15:48                             ` Jon Smirl
2009-11-26 15:48                               ` Jon Smirl
2009-11-26 15:48                               ` Jon Smirl
2009-11-26 16:03                               ` Jon Smirl
2009-11-26 16:03                                 ` Jon Smirl
2009-11-26 23:45                           ` Dmitry Torokhov
2009-11-26  3:50                         ` Andy Walls
2009-11-25 20:44                       ` Krzysztof Halasa
2009-11-25 20:44                         ` Krzysztof Halasa
2009-11-26  3:31                       ` Andy Walls
2009-11-26  4:00                         ` hermann pitton
2009-11-26  5:41                         ` Jarod Wilson
2009-11-26 14:28                       ` Mauro Carvalho Chehab
2009-11-25 17:44                 ` Jarod Wilson
2009-11-25 19:27                   ` Krzysztof Halasa
2009-11-26  4:46                     ` Jarod Wilson
2009-11-26  8:01                   ` Christoph Bartelmus
2009-11-26  8:01                     ` Christoph Bartelmus
2009-11-26  8:08                     ` Dmitry Torokhov
2009-11-26 16:25                     ` Mauro Carvalho Chehab
2009-11-26 18:13                       ` Krzysztof Halasa
2009-11-26 18:55                         ` Mauro Carvalho Chehab
2009-11-26 20:28                           ` Krzysztof Halasa
2009-11-26 21:28                             ` Mauro Carvalho Chehab
2009-11-27  7:45                       ` Christoph Bartelmus
2009-11-27  7:45                         ` Christoph Bartelmus
2009-11-26 13:54               ` Mauro Carvalho Chehab
2009-11-26 17:32                 ` Jarod Wilson
2009-11-26 17:49                   ` Mauro Carvalho Chehab
2009-11-26 17:49                     ` Mauro Carvalho Chehab
2009-11-26 23:50                     ` Dmitry Torokhov
2009-11-27  1:45                       ` Mauro Carvalho Chehab
2009-11-25 16:45             ` Krzysztof Halasa
2009-11-26 14:05               ` Mauro Carvalho Chehab
2009-11-26 19:43                 ` Andy Walls
2009-12-07 18:19                   ` Jarod Wilson
2009-12-07 23:02                     ` Mauro Carvalho Chehab
2009-12-08  2:42                     ` Andy Walls
2009-12-08  4:22                       ` Dmitry Torokhov
2009-12-08 11:44                         ` Mauro Carvalho Chehab
2009-12-08 14:13                           ` Krzysztof Halasa
2009-12-08 14:25                             ` Mauro Carvalho Chehab
2009-12-08 17:06                           ` Dmitry Torokhov
2009-12-08 12:35                         ` Andy Walls
2009-12-08 12:52                           ` Jon Smirl
2009-12-08 12:52                             ` Jon Smirl
2009-12-08 12:52                             ` Jon Smirl
2009-12-08 13:40                             ` Mauro Carvalho Chehab
2009-12-08 14:01                               ` Jon Smirl
2009-12-08 14:01                                 ` Jon Smirl
2009-12-08 14:01                                 ` Jon Smirl
2009-12-08 14:16                                 ` Mauro Carvalho Chehab
2009-12-08 14:31                                   ` Jon Smirl
2009-12-08 14:31                                     ` Jon Smirl
2009-12-08 14:40                                     ` Mauro Carvalho Chehab
2009-12-08 16:19                                       ` Jon Smirl
2009-12-08 16:19                                         ` Jon Smirl
2009-12-08 16:19                                         ` Jon Smirl
2009-12-08 23:30                                         ` Krzysztof Halasa
2009-12-09  0:04                                           ` Mauro Carvalho Chehab
2009-12-08 17:16                             ` Dmitry Torokhov
2009-12-08 17:16                               ` Dmitry Torokhov
2009-12-08 13:30                           ` Mauro Carvalho Chehab
2009-12-08 13:47                             ` Jon Smirl
2009-12-08 13:47                               ` Jon Smirl
2009-12-08 13:47                               ` Jon Smirl
2009-12-08 13:59                               ` Mauro Carvalho Chehab
2009-12-08 14:19                                 ` Jon Smirl
2009-12-08 14:19                                   ` Jon Smirl
2009-12-08 14:19                                   ` Jon Smirl
2009-12-08 14:34                                   ` Mauro Carvalho Chehab
2009-12-08 15:56                                     ` Jon Smirl
2009-12-08 15:56                                       ` Jon Smirl
2009-12-08 15:56                                       ` Jon Smirl
2009-12-08 16:27                                       ` Mauro Carvalho Chehab
2009-12-08 18:15                                         ` Jon Smirl
2009-12-08 18:15                                           ` Jon Smirl
2009-12-08 18:15                                           ` Jon Smirl
2009-12-09  0:28                                           ` Mauro Carvalho Chehab
2009-12-08 16:22                                     ` Ferenc Wagner
2009-12-08 11:32                       ` Mauro Carvalho Chehab
2009-12-08 12:46                         ` Andy Walls
2009-12-08 17:19                           ` Dmitry Torokhov
2009-12-09  0:07                             ` Mauro Carvalho Chehab
2009-11-26  5:49             ` Dmitry Torokhov
2009-11-26  6:23               ` Jarod Wilson
2009-11-26  9:14                 ` Gerd Hoffmann
2009-11-26 17:15                   ` Jarod Wilson
2009-11-26 12:28                 ` Andy Walls
2009-11-26 13:17             ` Mauro Carvalho Chehab
2009-11-23 22:25       ` Krzysztof Halasa
2009-11-24 23:23       ` Matthieu CASTET
2009-10-20 14:00 ` [PATCH 2/3 v2] lirc driver for Windows MCE IR transceivers Jarod Wilson
2009-11-13 20:43   ` Stefan Lippers-Hollmann
2009-11-15  6:55     ` Jarod Wilson
2009-11-23 12:46   ` Mauro Carvalho Chehab
2009-10-20 14:00 ` [PATCH 3/3 v2] lirc driver for SoundGraph iMON IR receivers and displays Jarod Wilson
2009-11-23 12:58   ` Mauro Carvalho Chehab
2009-11-24  4:31     ` Jarod Wilson
2009-11-04 22:56 ` [PATCH 0/3 v2] linux infrared remote control drivers Jarod Wilson
2009-11-05  0:07   ` Andy Walls
2009-11-05  3:28     ` Jarod Wilson
2009-11-05  0:31   ` Mauro Carvalho Chehab
2009-11-05  3:41     ` Jarod Wilson
2009-11-23 15:20 [RFC] Should we create a raw input interface for IR's ? - Was: Re: [PATCH 1/3 v2] lirc core device driver infrastructure Emmanuel Fusté

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0E9493.1090200@redhat.com \
    --to=mchehab@redhat.com \
    --cc=awalls@radix.net \
    --cc=dheitmueller@kernellabs.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=j@jannau.net \
    --cc=jarod@redhat.com \
    --cc=jarod@wilsonet.com \
    --cc=khc@pm.waw.pl \
    --cc=kraxel@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lirc@bartelmus.de \
    --cc=superm1@ubuntu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.