From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Christoph Bartelmus <lirc@bartelmus.de>
Cc: jarod@wilsonet.com, awalls@radix.net, dmitry.torokhov@gmail.com,
j@jannau.net, jarod@redhat.com, khc@pm.waw.pl,
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 14:25:28 -0200 [thread overview]
Message-ID: <4B0EABF8.9000902@redhat.com> (raw)
In-Reply-To: <BDcbizrJjFB@christoph>
[-- Attachment #1: Type: text/plain, Size: 2589 bytes --]
Christoph Bartelmus wrote:
> Hi,
>
> on 25 Nov 09 at 12:44, Jarod Wilson wrote:
> [...]
>> Ah, but the approach I'd take to converting to in-kernel decoding[*] would
>> be this:
> [...]
>> [*] assuming, of course, that it was actually agreed upon that in-kernel
>> decoding was the right way, the only way, all others will be shot on sight.
>
> I'm happy to see that the discussion is getting along.
> But I'm still a bit hesitant about the in-kernel decoding. Maybe it's just
> because I'm not familiar at all with input layer toolset.
>
> 1. For sure in-kernel decoding will require some assistance from userspace
> to load the mapping from IR codes to keys.
Current drivers have the IR keycode tables in-kernel also, directly associated
with the board ID.
> So, if there needs to be a tool
> in userspace that does some kind of autodetection, why not have a tool
> that does some autodetection and autoconfigures lircd for the current
> device.
There are userspace tools to change the IR keycode maps. It shouldn't be hard to
change it to autodetect the hardware and to autoconfigure lircd.
> Lots of code duplication in kernel saved.
Huh? The code is already there.
> What's the actual benefit of in-kernel decoding?
There are two benefits:
1) the developer that adds the hardware also adds the IR code. He has the hardware
and the IR for testing, so it means a faster development cycle than waiting for someone
else with the same hardware and IR to recode it on some other place. You should
remember that not all developers use lirc;
2) the IR works out of the box.
> 2. What would be the format of the key map? lircd.conf files already exist
> for a lot of remote controls. Will we have a second incompatible format to
> map the keys in-kernel? Where are the tools that create the key maps for
> new remotes?
No matter what tool you use, the format should be very close: scancode -> key_code.
If you wan to take a look on a real example, I'm enclosing the keycode table used by
dib0700 driver, as generated/readed by a simple keycode application I made to test
the dynamic keycode loading:
http://linuxtv.org/hg/v4l-dvb/file/tip/v4l2-apps/util/keytable.c
Most of the keycodes there are RC5 keys. There are also some NEC keys,
as those devices can work with either RC5 or NEC keycodes, by using a different
parameter during module load.
In the case of this driver, the pulse/space is done in hardware by the DibCom chip. The
scancode is sent to PC via the USB interface.
I hope it helps for you to better understand how this works.
Cheers,
Mauro.
[-- Attachment #2: dib0700_rc_keys --]
[-- Type: text/plain, Size: 3541 bytes --]
0x0700 KEY_MUTE
0x0701 KEY_MENU
0x0739 KEY_POWER
0x0703 KEY_VOLUMEUP
0x0709 KEY_VOLUMEDOWN
0x0706 KEY_CHANNELUP
0x070c KEY_CHANNELDOWN
0x070f KEY_1
0x0715 KEY_2
0x0710 KEY_3
0x0718 KEY_4
0x071b KEY_5
0x071e KEY_6
0x0711 KEY_7
0x0721 KEY_8
0x0712 KEY_9
0x0727 KEY_0
0x0724 KEY_SCREEN
0x072a KEY_TEXT
0x072d KEY_REWIND
0x0730 KEY_PLAY
0x0733 KEY_FASTFORWARD
0x0736 KEY_RECORD
0x073c KEY_STOP
0x073f KEY_CANCEL
0xeb01 KEY_POWER
0xeb02 KEY_1
0xeb03 KEY_2
0xeb04 KEY_3
0xeb05 KEY_4
0xeb06 KEY_5
0xeb07 KEY_6
0xeb08 KEY_7
0xeb09 KEY_8
0xeb0a KEY_9
0xeb0b KEY_VIDEO
0xeb0c KEY_0
0xeb0d KEY_REFRESH
0xeb0f KEY_EPG
0xeb10 KEY_UP
0xeb11 KEY_LEFT
0xeb12 KEY_OK
0xeb13 KEY_RIGHT
0xeb14 KEY_DOWN
0xeb16 KEY_INFO
0xeb17 KEY_RED
0xeb18 KEY_GREEN
0xeb19 KEY_YELLOW
0xeb1a KEY_BLUE
0xeb1b KEY_CHANNELUP
0xeb1c KEY_VOLUMEUP
0xeb1d KEY_MUTE
0xeb1e KEY_VOLUMEDOWN
0xeb1f KEY_CHANNELDOWN
0xeb40 KEY_PAUSE
0xeb41 KEY_HOME
0xeb42 KEY_MENU
0xeb43 KEY_SUBTITLE
0xeb44 KEY_TEXT
0xeb45 KEY_DELETE
0xeb46 KEY_TV
0xeb47 KEY_DVD
0xeb48 KEY_STOP
0xeb49 KEY_VIDEO
0xeb4a KEY_AUDIO
0xeb4b KEY_SCREEN
0xeb4c KEY_PLAY
0xeb4d KEY_BACK
0xeb4e KEY_REWIND
0xeb4f KEY_FASTFORWARD
0xeb54 KEY_PREVIOUS
0xeb58 KEY_RECORD
0xeb5c KEY_NEXT
0x1e00 KEY_0
0x1e01 KEY_1
0x1e02 KEY_2
0x1e03 KEY_3
0x1e04 KEY_4
0x1e05 KEY_5
0x1e06 KEY_6
0x1e07 KEY_7
0x1e08 KEY_8
0x1e09 KEY_9
0x1e0a KEY_KPASTERISK
0x1e0b KEY_RED
0x1e0c KEY_RADIO
0x1e0d KEY_MENU
0x1e0e KEY_GRAVE
0x1e0f KEY_MUTE
0x1e10 KEY_VOLUMEUP
0x1e11 KEY_VOLUMEDOWN
0x1e12 KEY_CHANNEL
0x1e14 KEY_UP
0x1e15 KEY_DOWN
0x1e16 KEY_LEFT
0x1e17 KEY_RIGHT
0x1e18 KEY_VIDEO
0x1e19 KEY_AUDIO
0x1e1a KEY_MEDIA
0x1e1b KEY_EPG
0x1e1c KEY_TV
0x1e1e KEY_NEXT
0x1e1f KEY_BACK
0x1e20 KEY_CHANNELUP
0x1e21 KEY_CHANNELDOWN
0x1e24 KEY_LAST
0x1e25 KEY_OK
0x1e29 KEY_BLUE
0x1e2e KEY_GREEN
0x1e30 KEY_PAUSE
0x1e32 KEY_REWIND
0x1e34 KEY_FASTFORWARD
0x1e35 KEY_PLAY
0x1e36 KEY_STOP
0x1e37 KEY_RECORD
0x1e38 KEY_YELLOW
0x1e3b KEY_GOTO
0x1e3d KEY_POWER
0x0042 KEY_POWER
0x077c KEY_TUNER
0x0f4e KEY_PRINT
0x0840 KEY_SCREEN
0x0f71 KEY_DOT
0x0743 KEY_0
0x0c41 KEY_1
0x0443 KEY_2
0x0b7f KEY_3
0x0e41 KEY_4
0x0643 KEY_5
0x097f KEY_6
0x0d7e KEY_7
0x057c KEY_8
0x0a40 KEY_9
0x0e4e KEY_CLEAR
0x047c KEY_CHANNEL
0x0f41 KEY_LAST
0x0342 KEY_MUTE
0x064c KEY_RESERVED
0x0172 KEY_SHUFFLE
0x0c4e KEY_PLAYPAUSE
0x0b70 KEY_RECORD
0x037d KEY_VOLUMEUP
0x017d KEY_VOLUMEDOWN
0x0242 KEY_CHANNELUP
0x007d KEY_CHANNELDOWN
0x1d00 KEY_0
0x1d01 KEY_1
0x1d02 KEY_2
0x1d03 KEY_3
0x1d04 KEY_4
0x1d05 KEY_5
0x1d06 KEY_6
0x1d07 KEY_7
0x1d08 KEY_8
0x1d09 KEY_9
0x1d0a KEY_TEXT
0x1d0d KEY_MENU
0x1d0f KEY_MUTE
0x1d10 KEY_VOLUMEUP
0x1d11 KEY_VOLUMEDOWN
0x1d12 KEY_CHANNEL
0x1d14 KEY_UP
0x1d15 KEY_DOWN
0x1d16 KEY_LEFT
0x1d17 KEY_RIGHT
0x1d1c KEY_TV
0x1d1e KEY_NEXT
0x1d1f KEY_BACK
0x1d20 KEY_CHANNELUP
0x1d21 KEY_CHANNELDOWN
0x1d24 KEY_LAST
0x1d25 KEY_OK
0x1d30 KEY_PAUSE
0x1d32 KEY_REWIND
0x1d34 KEY_FASTFORWARD
0x1d35 KEY_PLAY
0x1d36 KEY_STOP
0x1d37 KEY_RECORD
0x1d3b KEY_GOTO
0x1d3d KEY_POWER
0x8613 KEY_MUTE
0x8612 KEY_POWER
0x8601 KEY_1
0x8602 KEY_2
0x8603 KEY_3
0x8604 KEY_4
0x8605 KEY_5
0x8606 KEY_6
0x8607 KEY_7
0x8608 KEY_8
0x8609 KEY_9
0x8600 KEY_0
0x860d KEY_CHANNELUP
0x8619 KEY_CHANNELDOWN
0x8610 KEY_VOLUMEUP
0x860c KEY_VOLUMEDOWN
0x860a KEY_CAMERA
0x860b KEY_ZOOM
0x861b KEY_BACKSPACE
0x8615 KEY_ENTER
0x861d KEY_UP
0x861e KEY_DOWN
0x860e KEY_LEFT
0x860f KEY_RIGHT
0x8618 KEY_RECORD
0x861a KEY_STOP
0x7a00 KEY_MENU
0x7a01 KEY_RECORD
0x7a02 KEY_PLAY
0x7a03 KEY_STOP
0x7a10 KEY_CHANNELUP
0x7a11 KEY_CHANNELDOWN
0x7a12 KEY_VOLUMEUP
0x7a13 KEY_VOLUMEDOWN
0x7a40 KEY_POWER
0x7a41 KEY_MUTE
next prev parent reply other threads:[~2009-11-26 16:25 UTC|newest]
Thread overview: 196+ 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 16:53 ` James Mastros
2009-11-23 20:09 ` Krzysztof Halasa
2009-11-23 17:05 ` James Mastros
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-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:59 ` Mauro Carvalho Chehab
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:26 ` Dmitry Torokhov
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 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 4:33 ` Dmitry Torokhov
2009-11-27 5:06 ` Jon Smirl
2009-11-27 7:33 ` Christoph Bartelmus
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:46 ` Krzysztof Halasa
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: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-25 16:53 ` Krzysztof Halasa
2009-11-25 17:20 ` Christoph Bartelmus
2009-11-25 17:40 ` Krzysztof Halasa
2009-11-25 18:07 ` Jarod Wilson
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 23:22 ` Gerd Hoffmann
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
2009-11-26 15:48 ` 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-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:08 ` Dmitry Torokhov
2009-11-26 16:25 ` Mauro Carvalho Chehab [this message]
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-26 13:54 ` Mauro Carvalho Chehab
2009-11-26 17:32 ` Jarod Wilson
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 13:40 ` Mauro Carvalho Chehab
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:40 ` Mauro Carvalho Chehab
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 13:30 ` Mauro Carvalho Chehab
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:34 ` Mauro Carvalho Chehab
2009-12-08 15:56 ` Jon Smirl
2009-12-08 16:27 ` Mauro Carvalho Chehab
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
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=4B0EABF8.9000902@redhat.com \
--to=mchehab@redhat.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@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).