-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V4L/DVB: Break Remote Controller keymaps into modules
The original Remote Controller approach were very messy: a big file, that were part of ir-common kernel module, containing 64 different RC keymap tables, used by the V4L/DVB drivers. Better to break each RC keymap table into a separate module, registering them into rc core on a process similar to the fs/nls tables. As an userspace program is now in charge of loading those tables, adds an option to allow the complete removal of those tables from kernelspace. Yet, on embedded devices like Set Top Boxes and TV sets, maybe the only available input device is the IR. So, we should keep allowing the usage of in-kernel tables, but a latter patch should change the default to 'n', after giving some time for distros to add the v4l-utils with the ir-keytable program, to allow the table load via userspace. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
- Loading branch information
Mauro Carvalho Chehab
committed
May 19, 2010
1 parent
9ce50c1
commit 6686fa6
Showing
68 changed files
with
5,632 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
config RC_MAP | ||
tristate "Compile Remote Controller keymap modules" | ||
depends on IR_CORE | ||
default y | ||
|
||
---help--- | ||
This option enables the compilation of lots of Remote | ||
Controller tables. They are short tables, but if you | ||
don't use a remote controller, or prefer to load the | ||
tables on userspace, you should disable it. | ||
|
||
The ir-keytable program, available at v4l-utils package | ||
provide the tool and the same RC maps for load from | ||
userspace. Its available at | ||
http://git.linuxtv.org/v4l-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ | ||
rc-apac-viewcomp.o \ | ||
rc-asus-pc39.o \ | ||
rc-ati-tv-wonder-hd-600.o \ | ||
rc-avermedia-a16d.o \ | ||
rc-avermedia.o \ | ||
rc-avermedia-cardbus.o \ | ||
rc-avermedia-dvbt.o \ | ||
rc-avermedia-m135a-rm-jx.o \ | ||
rc-avertv-303.o \ | ||
rc-behold.o \ | ||
rc-behold-columbus.o \ | ||
rc-budget-ci-old.o \ | ||
rc-cinergy-1400.o \ | ||
rc-cinergy.o \ | ||
rc-dm1105-nec.o \ | ||
rc-dntv-live-dvb-t.o \ | ||
rc-dntv-live-dvbt-pro.o \ | ||
rc-empty.o \ | ||
rc-em-terratec.o \ | ||
rc-encore-enltv2.o \ | ||
rc-encore-enltv.o \ | ||
rc-encore-enltv-fm53.o \ | ||
rc-evga-indtube.o \ | ||
rc-eztv.o \ | ||
rc-flydvb.o \ | ||
rc-flyvideo.o \ | ||
rc-fusionhdtv-mce.o \ | ||
rc-gadmei-rm008z.o \ | ||
rc-genius-tvgo-a11mce.o \ | ||
rc-gotview7135.o \ | ||
rc-hauppauge-new.o \ | ||
rc-iodata-bctv7e.o \ | ||
rc-kaiomy.o \ | ||
rc-kworld-315u.o \ | ||
rc-kworld-plus-tv-analog.o \ | ||
rc-manli.o \ | ||
rc-msi-tvanywhere.o \ | ||
rc-msi-tvanywhere-plus.o \ | ||
rc-nebula.o \ | ||
rc-nec-terratec-cinergy-xs.o \ | ||
rc-norwood.o \ | ||
rc-npgtech.o \ | ||
rc-pctv-sedna.o \ | ||
rc-pinnacle-color.o \ | ||
rc-pinnacle-grey.o \ | ||
rc-pinnacle-pctv-hd.o \ | ||
rc-pixelview.o \ | ||
rc-pixelview-new.o \ | ||
rc-powercolor-real-angel.o \ | ||
rc-proteus-2309.o \ | ||
rc-purpletv.o \ | ||
rc-pv951.o \ | ||
rc-rc5-hauppauge-new.o \ | ||
rc-rc5-tv.o \ | ||
rc-real-audio-220-32-keys.o \ | ||
rc-tbs-nec.o \ | ||
rc-terratec-cinergy-xs.o \ | ||
rc-tevii-nec.o \ | ||
rc-tt-1500.o \ | ||
rc-videomate-s350.o \ | ||
rc-videomate-tv-pvr.o \ | ||
rc-winfast.o \ | ||
rc-winfast-usbii-deluxe.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* adstech-dvb-t-pci.h - Keytable for adstech_dvb_t_pci Remote Controller | ||
* | ||
* keymap imported from ir-keymaps.c | ||
* | ||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@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> | ||
|
||
/* ADS Tech Instant TV DVB-T PCI Remote */ | ||
|
||
static struct ir_scancode adstech_dvb_t_pci[] = { | ||
/* Keys 0 to 9 */ | ||
{ 0x4d, KEY_0 }, | ||
{ 0x57, KEY_1 }, | ||
{ 0x4f, KEY_2 }, | ||
{ 0x53, KEY_3 }, | ||
{ 0x56, KEY_4 }, | ||
{ 0x4e, KEY_5 }, | ||
{ 0x5e, KEY_6 }, | ||
{ 0x54, KEY_7 }, | ||
{ 0x4c, KEY_8 }, | ||
{ 0x5c, KEY_9 }, | ||
|
||
{ 0x5b, KEY_POWER }, | ||
{ 0x5f, KEY_MUTE }, | ||
{ 0x55, KEY_GOTO }, | ||
{ 0x5d, KEY_SEARCH }, | ||
{ 0x17, KEY_EPG }, /* Guide */ | ||
{ 0x1f, KEY_MENU }, | ||
{ 0x0f, KEY_UP }, | ||
{ 0x46, KEY_DOWN }, | ||
{ 0x16, KEY_LEFT }, | ||
{ 0x1e, KEY_RIGHT }, | ||
{ 0x0e, KEY_SELECT }, /* Enter */ | ||
{ 0x5a, KEY_INFO }, | ||
{ 0x52, KEY_EXIT }, | ||
{ 0x59, KEY_PREVIOUS }, | ||
{ 0x51, KEY_NEXT }, | ||
{ 0x58, KEY_REWIND }, | ||
{ 0x50, KEY_FORWARD }, | ||
{ 0x44, KEY_PLAYPAUSE }, | ||
{ 0x07, KEY_STOP }, | ||
{ 0x1b, KEY_RECORD }, | ||
{ 0x13, KEY_TUNER }, /* Live */ | ||
{ 0x0a, KEY_A }, | ||
{ 0x12, KEY_B }, | ||
{ 0x03, KEY_PROG1 }, /* 1 */ | ||
{ 0x01, KEY_PROG2 }, /* 2 */ | ||
{ 0x00, KEY_PROG3 }, /* 3 */ | ||
{ 0x06, KEY_DVD }, | ||
{ 0x48, KEY_AUX }, /* Photo */ | ||
{ 0x40, KEY_VIDEO }, | ||
{ 0x19, KEY_AUDIO }, /* Music */ | ||
{ 0x0b, KEY_CHANNELUP }, | ||
{ 0x08, KEY_CHANNELDOWN }, | ||
{ 0x15, KEY_VOLUMEUP }, | ||
{ 0x1c, KEY_VOLUMEDOWN }, | ||
}; | ||
|
||
static struct rc_keymap adstech_dvb_t_pci_map = { | ||
.map = { | ||
.scan = adstech_dvb_t_pci, | ||
.size = ARRAY_SIZE(adstech_dvb_t_pci), | ||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ | ||
.name = RC_MAP_ADSTECH_DVB_T_PCI, | ||
} | ||
}; | ||
|
||
static int __init init_rc_map_adstech_dvb_t_pci(void) | ||
{ | ||
return ir_register_map(&adstech_dvb_t_pci_map); | ||
} | ||
|
||
static void __exit exit_rc_map_adstech_dvb_t_pci(void) | ||
{ | ||
ir_unregister_map(&adstech_dvb_t_pci_map); | ||
} | ||
|
||
module_init(init_rc_map_adstech_dvb_t_pci) | ||
module_exit(exit_rc_map_adstech_dvb_t_pci) | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* apac-viewcomp.h - Keytable for apac_viewcomp Remote Controller | ||
* | ||
* keymap imported from ir-keymaps.c | ||
* | ||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@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> | ||
|
||
/* Attila Kondoros <attila.kondoros@chello.hu> */ | ||
|
||
static struct ir_scancode apac_viewcomp[] = { | ||
|
||
{ 0x01, KEY_1 }, | ||
{ 0x02, KEY_2 }, | ||
{ 0x03, KEY_3 }, | ||
{ 0x04, KEY_4 }, | ||
{ 0x05, KEY_5 }, | ||
{ 0x06, KEY_6 }, | ||
{ 0x07, KEY_7 }, | ||
{ 0x08, KEY_8 }, | ||
{ 0x09, KEY_9 }, | ||
{ 0x00, KEY_0 }, | ||
{ 0x17, KEY_LAST }, /* +100 */ | ||
{ 0x0a, KEY_LIST }, /* recall */ | ||
|
||
|
||
{ 0x1c, KEY_TUNER }, /* TV/FM */ | ||
{ 0x15, KEY_SEARCH }, /* scan */ | ||
{ 0x12, KEY_POWER }, /* power */ | ||
{ 0x1f, KEY_VOLUMEDOWN }, /* vol up */ | ||
{ 0x1b, KEY_VOLUMEUP }, /* vol down */ | ||
{ 0x1e, KEY_CHANNELDOWN }, /* chn up */ | ||
{ 0x1a, KEY_CHANNELUP }, /* chn down */ | ||
|
||
{ 0x11, KEY_VIDEO }, /* video */ | ||
{ 0x0f, KEY_ZOOM }, /* full screen */ | ||
{ 0x13, KEY_MUTE }, /* mute/unmute */ | ||
{ 0x10, KEY_TEXT }, /* min */ | ||
|
||
{ 0x0d, KEY_STOP }, /* freeze */ | ||
{ 0x0e, KEY_RECORD }, /* record */ | ||
{ 0x1d, KEY_PLAYPAUSE }, /* stop */ | ||
{ 0x19, KEY_PLAY }, /* play */ | ||
|
||
{ 0x16, KEY_GOTO }, /* osd */ | ||
{ 0x14, KEY_REFRESH }, /* default */ | ||
{ 0x0c, KEY_KPPLUS }, /* fine tune >>>> */ | ||
{ 0x18, KEY_KPMINUS }, /* fine tune <<<< */ | ||
}; | ||
|
||
static struct rc_keymap apac_viewcomp_map = { | ||
.map = { | ||
.scan = apac_viewcomp, | ||
.size = ARRAY_SIZE(apac_viewcomp), | ||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ | ||
.name = RC_MAP_APAC_VIEWCOMP, | ||
} | ||
}; | ||
|
||
static int __init init_rc_map_apac_viewcomp(void) | ||
{ | ||
return ir_register_map(&apac_viewcomp_map); | ||
} | ||
|
||
static void __exit exit_rc_map_apac_viewcomp(void) | ||
{ | ||
ir_unregister_map(&apac_viewcomp_map); | ||
} | ||
|
||
module_init(init_rc_map_apac_viewcomp) | ||
module_exit(exit_rc_map_apac_viewcomp) | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/* asus-pc39.h - Keytable for asus_pc39 Remote Controller | ||
* | ||
* keymap imported from ir-keymaps.c | ||
* | ||
* Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@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> | ||
|
||
/* | ||
* Marc Fargas <telenieko@telenieko.com> | ||
* this is the remote control that comes with the asus p7131 | ||
* which has a label saying is "Model PC-39" | ||
*/ | ||
|
||
static struct ir_scancode asus_pc39[] = { | ||
/* Keys 0 to 9 */ | ||
{ 0x15, KEY_0 }, | ||
{ 0x29, KEY_1 }, | ||
{ 0x2d, KEY_2 }, | ||
{ 0x2b, KEY_3 }, | ||
{ 0x09, KEY_4 }, | ||
{ 0x0d, KEY_5 }, | ||
{ 0x0b, KEY_6 }, | ||
{ 0x31, KEY_7 }, | ||
{ 0x35, KEY_8 }, | ||
{ 0x33, KEY_9 }, | ||
|
||
{ 0x3e, KEY_RADIO }, /* radio */ | ||
{ 0x03, KEY_MENU }, /* dvd/menu */ | ||
{ 0x2a, KEY_VOLUMEUP }, | ||
{ 0x19, KEY_VOLUMEDOWN }, | ||
{ 0x37, KEY_UP }, | ||
{ 0x3b, KEY_DOWN }, | ||
{ 0x27, KEY_LEFT }, | ||
{ 0x2f, KEY_RIGHT }, | ||
{ 0x25, KEY_VIDEO }, /* video */ | ||
{ 0x39, KEY_AUDIO }, /* music */ | ||
|
||
{ 0x21, KEY_TV }, /* tv */ | ||
{ 0x1d, KEY_EXIT }, /* back */ | ||
{ 0x0a, KEY_CHANNELUP }, /* channel / program + */ | ||
{ 0x1b, KEY_CHANNELDOWN }, /* channel / program - */ | ||
{ 0x1a, KEY_ENTER }, /* enter */ | ||
|
||
{ 0x06, KEY_PAUSE }, /* play/pause */ | ||
{ 0x1e, KEY_PREVIOUS }, /* rew */ | ||
{ 0x26, KEY_NEXT }, /* forward */ | ||
{ 0x0e, KEY_REWIND }, /* backward << */ | ||
{ 0x3a, KEY_FASTFORWARD }, /* forward >> */ | ||
{ 0x36, KEY_STOP }, | ||
{ 0x2e, KEY_RECORD }, /* recording */ | ||
{ 0x16, KEY_POWER }, /* the button that reads "close" */ | ||
|
||
{ 0x11, KEY_ZOOM }, /* full screen */ | ||
{ 0x13, KEY_MACRO }, /* recall */ | ||
{ 0x23, KEY_HOME }, /* home */ | ||
{ 0x05, KEY_PVR }, /* picture */ | ||
{ 0x3d, KEY_MUTE }, /* mute */ | ||
{ 0x01, KEY_DVD }, /* dvd */ | ||
}; | ||
|
||
static struct rc_keymap asus_pc39_map = { | ||
.map = { | ||
.scan = asus_pc39, | ||
.size = ARRAY_SIZE(asus_pc39), | ||
.ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ | ||
.name = RC_MAP_ASUS_PC39, | ||
} | ||
}; | ||
|
||
static int __init init_rc_map_asus_pc39(void) | ||
{ | ||
return ir_register_map(&asus_pc39_map); | ||
} | ||
|
||
static void __exit exit_rc_map_asus_pc39(void) | ||
{ | ||
ir_unregister_map(&asus_pc39_map); | ||
} | ||
|
||
module_init(init_rc_map_asus_pc39) | ||
module_exit(exit_rc_map_asus_pc39) | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); |
Oops, something went wrong.