132cf86f6SMauro Carvalho Chehab /* manli.h - Keytable for manli Remote Controller 232cf86f6SMauro Carvalho Chehab * 332cf86f6SMauro Carvalho Chehab * keymap imported from ir-keymaps.c 432cf86f6SMauro Carvalho Chehab * 532cf86f6SMauro Carvalho Chehab * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com> 632cf86f6SMauro Carvalho Chehab * 732cf86f6SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify 832cf86f6SMauro Carvalho Chehab * it under the terms of the GNU General Public License as published by 932cf86f6SMauro Carvalho Chehab * the Free Software Foundation; either version 2 of the License, or 1032cf86f6SMauro Carvalho Chehab * (at your option) any later version. 1132cf86f6SMauro Carvalho Chehab */ 1232cf86f6SMauro Carvalho Chehab 1332cf86f6SMauro Carvalho Chehab #include <media/rc-map.h> 14*7a707b89SPaul Gortmaker #include <linux/module.h> 1532cf86f6SMauro Carvalho Chehab 1632cf86f6SMauro Carvalho Chehab /* Michael Tokarev <mjt@tls.msk.ru> 1732cf86f6SMauro Carvalho Chehab keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at 1832cf86f6SMauro Carvalho Chehab least, and probably other cards too. 1932cf86f6SMauro Carvalho Chehab The "ascii-art picture" below (in comments, first row 2032cf86f6SMauro Carvalho Chehab is the keycode in hex, and subsequent row(s) shows 2132cf86f6SMauro Carvalho Chehab the button labels (several variants when appropriate) 2232cf86f6SMauro Carvalho Chehab helps to descide which keycodes to assign to the buttons. 2332cf86f6SMauro Carvalho Chehab */ 2432cf86f6SMauro Carvalho Chehab 252f4f58d6SMauro Carvalho Chehab static struct rc_map_table manli[] = { 2632cf86f6SMauro Carvalho Chehab 2732cf86f6SMauro Carvalho Chehab /* 0x1c 0x12 * 2832cf86f6SMauro Carvalho Chehab * FUNCTION POWER * 2932cf86f6SMauro Carvalho Chehab * FM (|) * 3032cf86f6SMauro Carvalho Chehab * */ 3132cf86f6SMauro Carvalho Chehab { 0x1c, KEY_RADIO }, /*XXX*/ 3232cf86f6SMauro Carvalho Chehab { 0x12, KEY_POWER }, 3332cf86f6SMauro Carvalho Chehab 3432cf86f6SMauro Carvalho Chehab /* 0x01 0x02 0x03 * 3532cf86f6SMauro Carvalho Chehab * 1 2 3 * 3632cf86f6SMauro Carvalho Chehab * * 3732cf86f6SMauro Carvalho Chehab * 0x04 0x05 0x06 * 3832cf86f6SMauro Carvalho Chehab * 4 5 6 * 3932cf86f6SMauro Carvalho Chehab * * 4032cf86f6SMauro Carvalho Chehab * 0x07 0x08 0x09 * 4132cf86f6SMauro Carvalho Chehab * 7 8 9 * 4232cf86f6SMauro Carvalho Chehab * */ 4332cf86f6SMauro Carvalho Chehab { 0x01, KEY_1 }, 4432cf86f6SMauro Carvalho Chehab { 0x02, KEY_2 }, 4532cf86f6SMauro Carvalho Chehab { 0x03, KEY_3 }, 4632cf86f6SMauro Carvalho Chehab { 0x04, KEY_4 }, 4732cf86f6SMauro Carvalho Chehab { 0x05, KEY_5 }, 4832cf86f6SMauro Carvalho Chehab { 0x06, KEY_6 }, 4932cf86f6SMauro Carvalho Chehab { 0x07, KEY_7 }, 5032cf86f6SMauro Carvalho Chehab { 0x08, KEY_8 }, 5132cf86f6SMauro Carvalho Chehab { 0x09, KEY_9 }, 5232cf86f6SMauro Carvalho Chehab 5332cf86f6SMauro Carvalho Chehab /* 0x0a 0x00 0x17 * 5432cf86f6SMauro Carvalho Chehab * RECALL 0 +100 * 5532cf86f6SMauro Carvalho Chehab * PLUS * 5632cf86f6SMauro Carvalho Chehab * */ 5732cf86f6SMauro Carvalho Chehab { 0x0a, KEY_AGAIN }, /*XXX KEY_REWIND? */ 5832cf86f6SMauro Carvalho Chehab { 0x00, KEY_0 }, 5932cf86f6SMauro Carvalho Chehab { 0x17, KEY_DIGITS }, /*XXX*/ 6032cf86f6SMauro Carvalho Chehab 6132cf86f6SMauro Carvalho Chehab /* 0x14 0x10 * 6232cf86f6SMauro Carvalho Chehab * MENU INFO * 6332cf86f6SMauro Carvalho Chehab * OSD */ 6432cf86f6SMauro Carvalho Chehab { 0x14, KEY_MENU }, 6532cf86f6SMauro Carvalho Chehab { 0x10, KEY_INFO }, 6632cf86f6SMauro Carvalho Chehab 6732cf86f6SMauro Carvalho Chehab /* 0x0b * 6832cf86f6SMauro Carvalho Chehab * Up * 6932cf86f6SMauro Carvalho Chehab * * 7032cf86f6SMauro Carvalho Chehab * 0x18 0x16 0x0c * 7132cf86f6SMauro Carvalho Chehab * Left Ok Right * 7232cf86f6SMauro Carvalho Chehab * * 7332cf86f6SMauro Carvalho Chehab * 0x015 * 7432cf86f6SMauro Carvalho Chehab * Down * 7532cf86f6SMauro Carvalho Chehab * */ 7632cf86f6SMauro Carvalho Chehab { 0x0b, KEY_UP }, 7732cf86f6SMauro Carvalho Chehab { 0x18, KEY_LEFT }, 7832cf86f6SMauro Carvalho Chehab { 0x16, KEY_OK }, /*XXX KEY_SELECT? KEY_ENTER? */ 7932cf86f6SMauro Carvalho Chehab { 0x0c, KEY_RIGHT }, 8032cf86f6SMauro Carvalho Chehab { 0x15, KEY_DOWN }, 8132cf86f6SMauro Carvalho Chehab 8232cf86f6SMauro Carvalho Chehab /* 0x11 0x0d * 8332cf86f6SMauro Carvalho Chehab * TV/AV MODE * 8432cf86f6SMauro Carvalho Chehab * SOURCE STEREO * 8532cf86f6SMauro Carvalho Chehab * */ 8632cf86f6SMauro Carvalho Chehab { 0x11, KEY_TV }, /*XXX*/ 8732cf86f6SMauro Carvalho Chehab { 0x0d, KEY_MODE }, /*XXX there's no KEY_STEREO */ 8832cf86f6SMauro Carvalho Chehab 8932cf86f6SMauro Carvalho Chehab /* 0x0f 0x1b 0x1a * 9032cf86f6SMauro Carvalho Chehab * AUDIO Vol+ Chan+ * 9132cf86f6SMauro Carvalho Chehab * TIMESHIFT??? * 9232cf86f6SMauro Carvalho Chehab * * 9332cf86f6SMauro Carvalho Chehab * 0x0e 0x1f 0x1e * 9432cf86f6SMauro Carvalho Chehab * SLEEP Vol- Chan- * 9532cf86f6SMauro Carvalho Chehab * */ 9632cf86f6SMauro Carvalho Chehab { 0x0f, KEY_AUDIO }, 9732cf86f6SMauro Carvalho Chehab { 0x1b, KEY_VOLUMEUP }, 9832cf86f6SMauro Carvalho Chehab { 0x1a, KEY_CHANNELUP }, 9932cf86f6SMauro Carvalho Chehab { 0x0e, KEY_TIME }, 10032cf86f6SMauro Carvalho Chehab { 0x1f, KEY_VOLUMEDOWN }, 10132cf86f6SMauro Carvalho Chehab { 0x1e, KEY_CHANNELDOWN }, 10232cf86f6SMauro Carvalho Chehab 10332cf86f6SMauro Carvalho Chehab /* 0x13 0x19 * 10432cf86f6SMauro Carvalho Chehab * MUTE SNAPSHOT* 10532cf86f6SMauro Carvalho Chehab * */ 10632cf86f6SMauro Carvalho Chehab { 0x13, KEY_MUTE }, 10732cf86f6SMauro Carvalho Chehab { 0x19, KEY_CAMERA }, 10832cf86f6SMauro Carvalho Chehab 10932cf86f6SMauro Carvalho Chehab /* 0x1d unused ? */ 11032cf86f6SMauro Carvalho Chehab }; 11132cf86f6SMauro Carvalho Chehab 112d100e659SMauro Carvalho Chehab static struct rc_map_list manli_map = { 11332cf86f6SMauro Carvalho Chehab .map = { 11432cf86f6SMauro Carvalho Chehab .scan = manli, 11532cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(manli), 11652b66144SMauro Carvalho Chehab .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */ 11732cf86f6SMauro Carvalho Chehab .name = RC_MAP_MANLI, 11832cf86f6SMauro Carvalho Chehab } 11932cf86f6SMauro Carvalho Chehab }; 12032cf86f6SMauro Carvalho Chehab 12132cf86f6SMauro Carvalho Chehab static int __init init_rc_map_manli(void) 12232cf86f6SMauro Carvalho Chehab { 123d100e659SMauro Carvalho Chehab return rc_map_register(&manli_map); 12432cf86f6SMauro Carvalho Chehab } 12532cf86f6SMauro Carvalho Chehab 12632cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_manli(void) 12732cf86f6SMauro Carvalho Chehab { 128d100e659SMauro Carvalho Chehab rc_map_unregister(&manli_map); 12932cf86f6SMauro Carvalho Chehab } 13032cf86f6SMauro Carvalho Chehab 13132cf86f6SMauro Carvalho Chehab module_init(init_rc_map_manli) 13232cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_manli) 13332cf86f6SMauro Carvalho Chehab 13432cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL"); 13532cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); 136