V4L/DVB: ir-core: add imon pad and mce keymaps

This adds the keymaps for the hardware decode scancodes imon
devices create for their native imon pad (and mini) remotes,
and the hardware scancodes generated by the imon devices when
used with an rc6 windows media center ed. remote.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Jarod Wilson 2010-04-16 18:28:35 -03:00 committed by Mauro Carvalho Chehab
parent 1c0e0ee580
commit 1159f838c0
4 changed files with 301 additions and 0 deletions

View File

@ -30,6 +30,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-genius-tvgo-a11mce.o \
rc-gotview7135.o \
rc-hauppauge-new.o \
rc-imon-mce.o \
rc-imon-pad.o \
rc-iodata-bctv7e.o \
rc-kaiomy.o \
rc-kworld-315u.o \

View File

@ -0,0 +1,142 @@
/* rc5-imon-mce.c - Keytable for Windows Media Center RC-6 remotes for use
* with the SoundGraph iMON/Antec Veris hardware IR decoder
*
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/* mce-mode imon mce remote key table */
static struct ir_scancode imon_mce[] = {
/* keys sorted mostly by frequency of use to optimize lookups */
{ 0x800ff415, KEY_REWIND },
{ 0x800ff414, KEY_FASTFORWARD },
{ 0x800ff41b, KEY_PREVIOUS },
{ 0x800ff41a, KEY_NEXT },
{ 0x800ff416, KEY_PLAY },
{ 0x800ff418, KEY_PAUSE },
{ 0x800ff419, KEY_STOP },
{ 0x800ff417, KEY_RECORD },
{ 0x02000052, KEY_UP },
{ 0x02000051, KEY_DOWN },
{ 0x02000050, KEY_LEFT },
{ 0x0200004f, KEY_RIGHT },
{ 0x800ff41e, KEY_UP },
{ 0x800ff41f, KEY_DOWN },
{ 0x800ff420, KEY_LEFT },
{ 0x800ff421, KEY_RIGHT },
/* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */
{ 0x800ff40b, KEY_ENTER },
{ 0x02000028, KEY_ENTER },
/* the OK and Enter buttons decode to the same value on some remotes
{ 0x02000028, KEY_OK }, */
{ 0x800ff422, KEY_OK },
{ 0x0200002a, KEY_EXIT },
{ 0x800ff423, KEY_EXIT },
{ 0x02000029, KEY_DELETE },
/* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */
{ 0x800ff40a, KEY_DELETE },
{ 0x800ff40e, KEY_MUTE },
{ 0x800ff410, KEY_VOLUMEUP },
{ 0x800ff411, KEY_VOLUMEDOWN },
{ 0x800ff412, KEY_CHANNELUP },
{ 0x800ff413, KEY_CHANNELDOWN },
{ 0x0200001e, KEY_NUMERIC_1 },
{ 0x0200001f, KEY_NUMERIC_2 },
{ 0x02000020, KEY_NUMERIC_3 },
{ 0x02000021, KEY_NUMERIC_4 },
{ 0x02000022, KEY_NUMERIC_5 },
{ 0x02000023, KEY_NUMERIC_6 },
{ 0x02000024, KEY_NUMERIC_7 },
{ 0x02000025, KEY_NUMERIC_8 },
{ 0x02000026, KEY_NUMERIC_9 },
{ 0x02000027, KEY_NUMERIC_0 },
{ 0x800ff401, KEY_NUMERIC_1 },
{ 0x800ff402, KEY_NUMERIC_2 },
{ 0x800ff403, KEY_NUMERIC_3 },
{ 0x800ff404, KEY_NUMERIC_4 },
{ 0x800ff405, KEY_NUMERIC_5 },
{ 0x800ff406, KEY_NUMERIC_6 },
{ 0x800ff407, KEY_NUMERIC_7 },
{ 0x800ff408, KEY_NUMERIC_8 },
{ 0x800ff409, KEY_NUMERIC_9 },
{ 0x800ff400, KEY_NUMERIC_0 },
{ 0x02200025, KEY_NUMERIC_STAR },
{ 0x02200020, KEY_NUMERIC_POUND },
/* 0x800ff41d also KEY_BLUE on some receivers */
{ 0x800ff41d, KEY_NUMERIC_STAR },
/* 0x800ff41c also KEY_PREVIOUS on some receivers */
{ 0x800ff41c, KEY_NUMERIC_POUND },
{ 0x800ff446, KEY_TV },
{ 0x800ff447, KEY_AUDIO }, /* My Music */
{ 0x800ff448, KEY_PVR }, /* RecordedTV */
{ 0x800ff449, KEY_CAMERA },
{ 0x800ff44a, KEY_VIDEO },
/* 0x800ff424 also KEY_MENU on some receivers */
{ 0x800ff424, KEY_DVD },
/* 0x800ff425 also KEY_GREEN on some receivers */
{ 0x800ff425, KEY_TUNER }, /* LiveTV */
{ 0x800ff450, KEY_RADIO },
{ 0x800ff44c, KEY_LANGUAGE },
{ 0x800ff427, KEY_ZOOM }, /* Aspect */
{ 0x800ff45b, KEY_RED },
{ 0x800ff45c, KEY_GREEN },
{ 0x800ff45d, KEY_YELLOW },
{ 0x800ff45e, KEY_BLUE },
{ 0x800ff466, KEY_RED },
/* { 0x800ff425, KEY_GREEN }, */
{ 0x800ff468, KEY_YELLOW },
/* { 0x800ff41d, KEY_BLUE }, */
{ 0x800ff40f, KEY_INFO },
{ 0x800ff426, KEY_EPG }, /* Guide */
{ 0x800ff45a, KEY_SUBTITLE }, /* Caption/Teletext */
{ 0x800ff44d, KEY_TITLE },
{ 0x800ff40c, KEY_POWER },
{ 0x800ff40d, KEY_PROG1 }, /* Windows MCE button */
};
static struct rc_keymap imon_mce_map = {
.map = {
.scan = imon_mce,
.size = ARRAY_SIZE(imon_mce),
/* its actually RC6, but w/a hardware decoder */
.ir_type = IR_TYPE_UNKNOWN,
.name = RC_MAP_IMON_MCE,
}
};
static int __init init_rc_map_imon_mce(void)
{
return ir_register_map(&imon_mce_map);
}
static void __exit exit_rc_map_imon_mce(void)
{
ir_unregister_map(&imon_mce_map);
}
module_init(init_rc_map_imon_mce)
module_exit(exit_rc_map_imon_mce)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");

View File

@ -0,0 +1,155 @@
/* rc5-imon-pad.c - Keytable for SoundGraph iMON PAD and Antec Veris
* RM-200 Remote Control
*
* Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <media/rc-map.h>
/*
* standard imon remote key table, which isn't really entirely
* "standard", as different receivers decode the same key on the
* same remote to different hex codes, and the silkscreened names
* vary a bit between the SoundGraph and Antec remotes... ugh.
*/
static struct ir_scancode imon_pad[] = {
/* keys sorted mostly by frequency of use to optimize lookups */
{ 0x2a8195b7, KEY_REWIND },
{ 0x298315b7, KEY_REWIND },
{ 0x2b8115b7, KEY_FASTFORWARD },
{ 0x2b8315b7, KEY_FASTFORWARD },
{ 0x2b9115b7, KEY_PREVIOUS },
{ 0x298195b7, KEY_NEXT },
{ 0x2a8115b7, KEY_PLAY },
{ 0x2a8315b7, KEY_PLAY },
{ 0x2a9115b7, KEY_PAUSE },
{ 0x2b9715b7, KEY_STOP },
{ 0x298115b7, KEY_RECORD },
{ 0x01008000, KEY_UP },
{ 0x01007f00, KEY_DOWN },
{ 0x01000080, KEY_LEFT },
{ 0x0100007f, KEY_RIGHT },
{ 0x2aa515b7, KEY_UP },
{ 0x289515b7, KEY_DOWN },
{ 0x29a515b7, KEY_LEFT },
{ 0x2ba515b7, KEY_RIGHT },
{ 0x0200002c, KEY_SPACE }, /* Select/Space */
{ 0x2a9315b7, KEY_SPACE }, /* Select/Space */
{ 0x02000028, KEY_ENTER },
{ 0x28a195b7, KEY_ENTER },
{ 0x288195b7, KEY_EXIT },
{ 0x02000029, KEY_ESC },
{ 0x2bb715b7, KEY_ESC },
{ 0x0200002a, KEY_BACKSPACE },
{ 0x28a115b7, KEY_BACKSPACE },
{ 0x2b9595b7, KEY_MUTE },
{ 0x28a395b7, KEY_VOLUMEUP },
{ 0x28a595b7, KEY_VOLUMEDOWN },
{ 0x289395b7, KEY_CHANNELUP },
{ 0x288795b7, KEY_CHANNELDOWN },
{ 0x0200001e, KEY_NUMERIC_1 },
{ 0x0200001f, KEY_NUMERIC_2 },
{ 0x02000020, KEY_NUMERIC_3 },
{ 0x02000021, KEY_NUMERIC_4 },
{ 0x02000022, KEY_NUMERIC_5 },
{ 0x02000023, KEY_NUMERIC_6 },
{ 0x02000024, KEY_NUMERIC_7 },
{ 0x02000025, KEY_NUMERIC_8 },
{ 0x02000026, KEY_NUMERIC_9 },
{ 0x02000027, KEY_NUMERIC_0 },
{ 0x28b595b7, KEY_NUMERIC_1 },
{ 0x2bb195b7, KEY_NUMERIC_2 },
{ 0x28b195b7, KEY_NUMERIC_3 },
{ 0x2a8595b7, KEY_NUMERIC_4 },
{ 0x299595b7, KEY_NUMERIC_5 },
{ 0x2aa595b7, KEY_NUMERIC_6 },
{ 0x2b9395b7, KEY_NUMERIC_7 },
{ 0x2a8515b7, KEY_NUMERIC_8 },
{ 0x2aa115b7, KEY_NUMERIC_9 },
{ 0x2ba595b7, KEY_NUMERIC_0 },
{ 0x02200025, KEY_NUMERIC_STAR },
{ 0x28b515b7, KEY_NUMERIC_STAR },
{ 0x02200020, KEY_NUMERIC_POUND },
{ 0x29a115b7, KEY_NUMERIC_POUND },
{ 0x2b8515b7, KEY_VIDEO },
{ 0x299195b7, KEY_AUDIO },
{ 0x2ba115b7, KEY_CAMERA },
{ 0x28a515b7, KEY_TV },
{ 0x29a395b7, KEY_DVD },
{ 0x29a295b7, KEY_DVD },
/* the Menu key between DVD and Subtitle on the RM-200... */
{ 0x2ba385b7, KEY_MENU },
{ 0x2ba395b7, KEY_MENU },
{ 0x288515b7, KEY_BOOKMARKS },
{ 0x2ab715b7, KEY_MEDIA }, /* Thumbnail */
{ 0x298595b7, KEY_SUBTITLE },
{ 0x2b8595b7, KEY_LANGUAGE },
{ 0x29a595b7, KEY_ZOOM },
{ 0x2aa395b7, KEY_SCREEN }, /* FullScreen */
{ 0x299115b7, KEY_KEYBOARD },
{ 0x299135b7, KEY_KEYBOARD },
{ 0x01010000, BTN_LEFT },
{ 0x01020000, BTN_RIGHT },
{ 0x01010080, BTN_LEFT },
{ 0x01020080, BTN_RIGHT },
{ 0x688301b7, BTN_LEFT },
{ 0x688481b7, BTN_RIGHT },
{ 0x2a9395b7, KEY_CYCLEWINDOWS }, /* TaskSwitcher */
{ 0x2b8395b7, KEY_TIME }, /* Timer */
{ 0x289115b7, KEY_POWER },
{ 0x29b195b7, KEY_EJECTCD }, /* the one next to play */
{ 0x299395b7, KEY_EJECTCLOSECD }, /* eject (by TaskSw) */
{ 0x02800000, KEY_CONTEXT_MENU }, /* Left Menu */
{ 0x2b8195b7, KEY_CONTEXT_MENU }, /* Left Menu*/
{ 0x02000065, KEY_COMPOSE }, /* RightMenu */
{ 0x28b715b7, KEY_COMPOSE }, /* RightMenu */
{ 0x2ab195b7, KEY_PROG1 }, /* Go or MultiMon */
{ 0x29b715b7, KEY_DASHBOARD }, /* AppLauncher */
};
static struct rc_keymap imon_pad_map = {
.map = {
.scan = imon_pad,
.size = ARRAY_SIZE(imon_pad),
.ir_type = IR_TYPE_UNKNOWN,
.name = RC_MAP_IMON_PAD,
}
};
static int __init init_rc_map_imon_pad(void)
{
return ir_register_map(&imon_pad_map);
}
static void __exit exit_rc_map_imon_pad(void)
{
ir_unregister_map(&imon_pad_map);
}
module_init(init_rc_map_imon_pad)
module_exit(exit_rc_map_imon_pad)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");

View File

@ -79,6 +79,8 @@ void rc_map_init(void);
#define RC_MAP_GENIUS_TVGO_A11MCE "rc-genius-tvgo-a11mce"
#define RC_MAP_GOTVIEW7135 "rc-gotview7135"
#define RC_MAP_HAUPPAUGE_NEW "rc-hauppauge-new"
#define RC_MAP_IMON_MCE "rc-imon-mce"
#define RC_MAP_IMON_PAD "rc-imon-pad"
#define RC_MAP_IODATA_BCTV7E "rc-iodata-bctv7e"
#define RC_MAP_KAIOMY "rc-kaiomy"
#define RC_MAP_KWORLD_315U "rc-kworld-315u"