1688c73c6SMauro Carvalho Chehab // SPDX-License-Identifier: GPL-2.0+
2688c73c6SMauro Carvalho Chehab // avermedia-cardbus.h - Keytable for avermedia_cardbus Remote Controller
3688c73c6SMauro Carvalho Chehab //
4688c73c6SMauro Carvalho Chehab // keymap imported from ir-keymaps.c
5688c73c6SMauro Carvalho Chehab //
6688c73c6SMauro Carvalho Chehab // Copyright (c) 2010 by Mauro Carvalho Chehab
732cf86f6SMauro Carvalho Chehab
832cf86f6SMauro Carvalho Chehab #include <media/rc-map.h>
97a707b89SPaul Gortmaker #include <linux/module.h>
1032cf86f6SMauro Carvalho Chehab
1132cf86f6SMauro Carvalho Chehab /* Oldrich Jedlicka <oldium.pro@seznam.cz> */
1232cf86f6SMauro Carvalho Chehab
132f4f58d6SMauro Carvalho Chehab static struct rc_map_table avermedia_cardbus[] = {
1432cf86f6SMauro Carvalho Chehab { 0x00, KEY_POWER },
1532cf86f6SMauro Carvalho Chehab { 0x01, KEY_TUNER }, /* TV/FM */
1632cf86f6SMauro Carvalho Chehab { 0x03, KEY_TEXT }, /* Teletext */
1732cf86f6SMauro Carvalho Chehab { 0x04, KEY_EPG },
18*1910ea42SBastien Nocera { 0x05, KEY_NUMERIC_1 },
19*1910ea42SBastien Nocera { 0x06, KEY_NUMERIC_2 },
20*1910ea42SBastien Nocera { 0x07, KEY_NUMERIC_3 },
2132cf86f6SMauro Carvalho Chehab { 0x08, KEY_AUDIO },
22*1910ea42SBastien Nocera { 0x09, KEY_NUMERIC_4 },
23*1910ea42SBastien Nocera { 0x0a, KEY_NUMERIC_5 },
24*1910ea42SBastien Nocera { 0x0b, KEY_NUMERIC_6 },
2532cf86f6SMauro Carvalho Chehab { 0x0c, KEY_ZOOM }, /* Full screen */
26*1910ea42SBastien Nocera { 0x0d, KEY_NUMERIC_7 },
27*1910ea42SBastien Nocera { 0x0e, KEY_NUMERIC_8 },
28*1910ea42SBastien Nocera { 0x0f, KEY_NUMERIC_9 },
2932cf86f6SMauro Carvalho Chehab { 0x10, KEY_PAGEUP }, /* 16-CH PREV */
30*1910ea42SBastien Nocera { 0x11, KEY_NUMERIC_0 },
3132cf86f6SMauro Carvalho Chehab { 0x12, KEY_INFO },
3232cf86f6SMauro Carvalho Chehab { 0x13, KEY_AGAIN }, /* CH RTN - channel return */
3332cf86f6SMauro Carvalho Chehab { 0x14, KEY_MUTE },
3432cf86f6SMauro Carvalho Chehab { 0x15, KEY_EDIT }, /* Autoscan */
3532cf86f6SMauro Carvalho Chehab { 0x17, KEY_SAVE }, /* Screenshot */
3632cf86f6SMauro Carvalho Chehab { 0x18, KEY_PLAYPAUSE },
3732cf86f6SMauro Carvalho Chehab { 0x19, KEY_RECORD },
3832cf86f6SMauro Carvalho Chehab { 0x1a, KEY_PLAY },
3932cf86f6SMauro Carvalho Chehab { 0x1b, KEY_STOP },
4032cf86f6SMauro Carvalho Chehab { 0x1c, KEY_FASTFORWARD },
4132cf86f6SMauro Carvalho Chehab { 0x1d, KEY_REWIND },
4232cf86f6SMauro Carvalho Chehab { 0x1e, KEY_VOLUMEDOWN },
4332cf86f6SMauro Carvalho Chehab { 0x1f, KEY_VOLUMEUP },
4432cf86f6SMauro Carvalho Chehab { 0x22, KEY_SLEEP }, /* Sleep */
4532cf86f6SMauro Carvalho Chehab { 0x23, KEY_ZOOM }, /* Aspect */
4632cf86f6SMauro Carvalho Chehab { 0x26, KEY_SCREEN }, /* Pos */
4732cf86f6SMauro Carvalho Chehab { 0x27, KEY_ANGLE }, /* Size */
4832cf86f6SMauro Carvalho Chehab { 0x28, KEY_SELECT }, /* Select */
4932cf86f6SMauro Carvalho Chehab { 0x29, KEY_BLUE }, /* Blue/Picture */
5032cf86f6SMauro Carvalho Chehab { 0x2a, KEY_BACKSPACE }, /* Back */
5156c0893cSJarod Wilson { 0x2b, KEY_VIDEO }, /* PIP (Picture-in-picture) */
5232cf86f6SMauro Carvalho Chehab { 0x2c, KEY_DOWN },
5332cf86f6SMauro Carvalho Chehab { 0x2e, KEY_DOT },
5432cf86f6SMauro Carvalho Chehab { 0x2f, KEY_TV }, /* Live TV */
5532cf86f6SMauro Carvalho Chehab { 0x32, KEY_LEFT },
5632cf86f6SMauro Carvalho Chehab { 0x33, KEY_CLEAR }, /* Clear */
5732cf86f6SMauro Carvalho Chehab { 0x35, KEY_RED }, /* Red/TV */
5832cf86f6SMauro Carvalho Chehab { 0x36, KEY_UP },
5932cf86f6SMauro Carvalho Chehab { 0x37, KEY_HOME }, /* Home */
6032cf86f6SMauro Carvalho Chehab { 0x39, KEY_GREEN }, /* Green/Video */
6132cf86f6SMauro Carvalho Chehab { 0x3d, KEY_YELLOW }, /* Yellow/Music */
6232cf86f6SMauro Carvalho Chehab { 0x3e, KEY_OK }, /* Ok */
6332cf86f6SMauro Carvalho Chehab { 0x3f, KEY_RIGHT },
6432cf86f6SMauro Carvalho Chehab { 0x40, KEY_NEXT }, /* Next */
6532cf86f6SMauro Carvalho Chehab { 0x41, KEY_PREVIOUS }, /* Previous */
6632cf86f6SMauro Carvalho Chehab { 0x42, KEY_CHANNELDOWN }, /* Channel down */
6732cf86f6SMauro Carvalho Chehab { 0x43, KEY_CHANNELUP }, /* Channel up */
6832cf86f6SMauro Carvalho Chehab };
6932cf86f6SMauro Carvalho Chehab
70d100e659SMauro Carvalho Chehab static struct rc_map_list avermedia_cardbus_map = {
7132cf86f6SMauro Carvalho Chehab .map = {
7232cf86f6SMauro Carvalho Chehab .scan = avermedia_cardbus,
7332cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(avermedia_cardbus),
746d741bfeSSean Young .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
7532cf86f6SMauro Carvalho Chehab .name = RC_MAP_AVERMEDIA_CARDBUS,
7632cf86f6SMauro Carvalho Chehab }
7732cf86f6SMauro Carvalho Chehab };
7832cf86f6SMauro Carvalho Chehab
init_rc_map_avermedia_cardbus(void)7932cf86f6SMauro Carvalho Chehab static int __init init_rc_map_avermedia_cardbus(void)
8032cf86f6SMauro Carvalho Chehab {
81d100e659SMauro Carvalho Chehab return rc_map_register(&avermedia_cardbus_map);
8232cf86f6SMauro Carvalho Chehab }
8332cf86f6SMauro Carvalho Chehab
exit_rc_map_avermedia_cardbus(void)8432cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_avermedia_cardbus(void)
8532cf86f6SMauro Carvalho Chehab {
86d100e659SMauro Carvalho Chehab rc_map_unregister(&avermedia_cardbus_map);
8732cf86f6SMauro Carvalho Chehab }
8832cf86f6SMauro Carvalho Chehab
8932cf86f6SMauro Carvalho Chehab module_init(init_rc_map_avermedia_cardbus)
9032cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_avermedia_cardbus)
9132cf86f6SMauro Carvalho Chehab
9232cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
9337e59f87SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab");
94