2017-12-01 16:47:11 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
// encore-enltv.h - Keytable for encore_enltv Remote Controller
|
|
|
|
//
|
|
|
|
// keymap imported from ir-keymaps.c
|
|
|
|
//
|
|
|
|
// Copyright (c) 2010 by Mauro Carvalho Chehab
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
|
|
|
|
#include <media/rc-map.h>
|
2011-07-03 22:03:12 +04:00
|
|
|
#include <linux/module.h>
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
|
|
|
|
/* Encore ENLTV-FM - black plastic, white front cover with white glowing buttons
|
|
|
|
Juan Pablo Sormani <sorman@gmail.com> */
|
|
|
|
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-17 21:46:09 +03:00
|
|
|
static struct rc_map_table encore_enltv[] = {
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
|
|
|
|
/* Power button does nothing, neither in Windows app,
|
|
|
|
although it sends data (used for BIOS wakeup?) */
|
|
|
|
{ 0x0d, KEY_MUTE },
|
|
|
|
|
|
|
|
{ 0x1e, KEY_TV },
|
|
|
|
{ 0x00, KEY_VIDEO },
|
|
|
|
{ 0x01, KEY_AUDIO }, /* music */
|
2011-01-24 18:18:36 +03:00
|
|
|
{ 0x02, KEY_CAMERA }, /* picture */
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
|
2019-06-24 18:42:14 +03:00
|
|
|
{ 0x1f, KEY_NUMERIC_1 },
|
|
|
|
{ 0x03, KEY_NUMERIC_2 },
|
|
|
|
{ 0x04, KEY_NUMERIC_3 },
|
|
|
|
{ 0x05, KEY_NUMERIC_4 },
|
|
|
|
{ 0x1c, KEY_NUMERIC_5 },
|
|
|
|
{ 0x06, KEY_NUMERIC_6 },
|
|
|
|
{ 0x07, KEY_NUMERIC_7 },
|
|
|
|
{ 0x08, KEY_NUMERIC_8 },
|
|
|
|
{ 0x1d, KEY_NUMERIC_9 },
|
|
|
|
{ 0x0a, KEY_NUMERIC_0 },
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
|
|
|
|
{ 0x09, KEY_LIST }, /* -/-- */
|
|
|
|
{ 0x0b, KEY_LAST }, /* recall */
|
|
|
|
|
|
|
|
{ 0x14, KEY_HOME }, /* win start menu */
|
|
|
|
{ 0x15, KEY_EXIT }, /* exit */
|
|
|
|
{ 0x16, KEY_CHANNELUP }, /* UP */
|
|
|
|
{ 0x12, KEY_CHANNELDOWN }, /* DOWN */
|
|
|
|
{ 0x0c, KEY_VOLUMEUP }, /* RIGHT */
|
|
|
|
{ 0x17, KEY_VOLUMEDOWN }, /* LEFT */
|
|
|
|
|
|
|
|
{ 0x18, KEY_ENTER }, /* OK */
|
|
|
|
|
|
|
|
{ 0x0e, KEY_ESC },
|
|
|
|
{ 0x13, KEY_CYCLEWINDOWS }, /* desktop */
|
|
|
|
{ 0x11, KEY_TAB },
|
|
|
|
{ 0x19, KEY_SWITCHVIDEOMODE }, /* switch */
|
|
|
|
|
|
|
|
{ 0x1a, KEY_MENU },
|
|
|
|
{ 0x1b, KEY_ZOOM }, /* fullscreen */
|
|
|
|
{ 0x44, KEY_TIME }, /* time shift */
|
|
|
|
{ 0x40, KEY_MODE }, /* source */
|
|
|
|
|
|
|
|
{ 0x5a, KEY_RECORD },
|
|
|
|
{ 0x42, KEY_PLAY }, /* play/pause */
|
|
|
|
{ 0x45, KEY_STOP },
|
|
|
|
{ 0x43, KEY_CAMERA }, /* camera icon */
|
|
|
|
|
|
|
|
{ 0x48, KEY_REWIND },
|
|
|
|
{ 0x4a, KEY_FASTFORWARD },
|
|
|
|
{ 0x49, KEY_PREVIOUS },
|
|
|
|
{ 0x4b, KEY_NEXT },
|
|
|
|
|
|
|
|
{ 0x4c, KEY_FAVORITES }, /* tv wall */
|
|
|
|
{ 0x4d, KEY_SOUND }, /* DVD sound */
|
|
|
|
{ 0x4e, KEY_LANGUAGE }, /* DVD lang */
|
|
|
|
{ 0x4f, KEY_TEXT }, /* DVD text */
|
|
|
|
|
|
|
|
{ 0x50, KEY_SLEEP }, /* shutdown */
|
|
|
|
{ 0x51, KEY_MODE }, /* stereo > main */
|
|
|
|
{ 0x52, KEY_SELECT }, /* stereo > sap */
|
2011-01-24 18:18:38 +03:00
|
|
|
{ 0x53, KEY_TEXT }, /* teletext */
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
|
|
|
|
|
|
|
|
{ 0x59, KEY_RED }, /* AP1 */
|
|
|
|
{ 0x41, KEY_GREEN }, /* AP2 */
|
|
|
|
{ 0x47, KEY_YELLOW }, /* AP3 */
|
|
|
|
{ 0x57, KEY_BLUE }, /* AP4 */
|
|
|
|
};
|
|
|
|
|
2010-11-17 21:56:53 +03:00
|
|
|
static struct rc_map_list encore_enltv_map = {
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
.map = {
|
2017-08-07 23:20:58 +03:00
|
|
|
.scan = encore_enltv,
|
|
|
|
.size = ARRAY_SIZE(encore_enltv),
|
|
|
|
.rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
|
|
|
|
.name = RC_MAP_ENCORE_ENLTV,
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static int __init init_rc_map_encore_enltv(void)
|
|
|
|
{
|
2010-11-17 21:56:53 +03:00
|
|
|
return rc_map_register(&encore_enltv_map);
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit exit_rc_map_encore_enltv(void)
|
|
|
|
{
|
2010-11-17 21:56:53 +03:00
|
|
|
rc_map_unregister(&encore_enltv_map);
|
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>
2010-04-02 10:05:46 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
module_init(init_rc_map_encore_enltv)
|
|
|
|
module_exit(exit_rc_map_encore_enltv)
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
2014-02-07 14:03:07 +04:00
|
|
|
MODULE_AUTHOR("Mauro Carvalho Chehab");
|