132cf86f6SMauro Carvalho Chehab /* msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus 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> 1432cf86f6SMauro Carvalho Chehab 1532cf86f6SMauro Carvalho Chehab /* 1632cf86f6SMauro Carvalho Chehab Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card 1732cf86f6SMauro Carvalho Chehab is marked "KS003". The controller is I2C at address 0x30, but does not seem 1832cf86f6SMauro Carvalho Chehab to respond to probes until a read is performed from a valid device. 1932cf86f6SMauro Carvalho Chehab I don't know why... 2032cf86f6SMauro Carvalho Chehab 2132cf86f6SMauro Carvalho Chehab Note: This remote may be of similar or identical design to the 2232cf86f6SMauro Carvalho Chehab Pixelview remote (?). The raw codes and duplicate button codes 2332cf86f6SMauro Carvalho Chehab appear to be the same. 2432cf86f6SMauro Carvalho Chehab 2532cf86f6SMauro Carvalho Chehab Henry Wong <henry@stuffedcow.net> 2632cf86f6SMauro Carvalho Chehab Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com> 2732cf86f6SMauro Carvalho Chehab */ 2832cf86f6SMauro Carvalho Chehab 2932cf86f6SMauro Carvalho Chehab static struct ir_scancode msi_tvanywhere_plus[] = { 3032cf86f6SMauro Carvalho Chehab 3132cf86f6SMauro Carvalho Chehab /* ---- Remote Button Layout ---- 3232cf86f6SMauro Carvalho Chehab 3332cf86f6SMauro Carvalho Chehab POWER SOURCE SCAN MUTE 3432cf86f6SMauro Carvalho Chehab TV/FM 1 2 3 3532cf86f6SMauro Carvalho Chehab |> 4 5 6 3632cf86f6SMauro Carvalho Chehab <| 7 8 9 3732cf86f6SMauro Carvalho Chehab ^^UP 0 + RECALL 3832cf86f6SMauro Carvalho Chehab vvDN RECORD STOP PLAY 3932cf86f6SMauro Carvalho Chehab 4032cf86f6SMauro Carvalho Chehab MINIMIZE ZOOM 4132cf86f6SMauro Carvalho Chehab 4232cf86f6SMauro Carvalho Chehab CH+ 4332cf86f6SMauro Carvalho Chehab VOL- VOL+ 4432cf86f6SMauro Carvalho Chehab CH- 4532cf86f6SMauro Carvalho Chehab 4632cf86f6SMauro Carvalho Chehab SNAPSHOT MTS 4732cf86f6SMauro Carvalho Chehab 4832cf86f6SMauro Carvalho Chehab << FUNC >> RESET 4932cf86f6SMauro Carvalho Chehab */ 5032cf86f6SMauro Carvalho Chehab 5132cf86f6SMauro Carvalho Chehab { 0x01, KEY_1 }, /* 1 */ 5232cf86f6SMauro Carvalho Chehab { 0x0b, KEY_2 }, /* 2 */ 5332cf86f6SMauro Carvalho Chehab { 0x1b, KEY_3 }, /* 3 */ 5432cf86f6SMauro Carvalho Chehab { 0x05, KEY_4 }, /* 4 */ 5532cf86f6SMauro Carvalho Chehab { 0x09, KEY_5 }, /* 5 */ 5632cf86f6SMauro Carvalho Chehab { 0x15, KEY_6 }, /* 6 */ 5732cf86f6SMauro Carvalho Chehab { 0x06, KEY_7 }, /* 7 */ 5832cf86f6SMauro Carvalho Chehab { 0x0a, KEY_8 }, /* 8 */ 5932cf86f6SMauro Carvalho Chehab { 0x12, KEY_9 }, /* 9 */ 6032cf86f6SMauro Carvalho Chehab { 0x02, KEY_0 }, /* 0 */ 6132cf86f6SMauro Carvalho Chehab { 0x10, KEY_KPPLUS }, /* + */ 6232cf86f6SMauro Carvalho Chehab { 0x13, KEY_AGAIN }, /* Recall */ 6332cf86f6SMauro Carvalho Chehab 6432cf86f6SMauro Carvalho Chehab { 0x1e, KEY_POWER }, /* Power */ 6532cf86f6SMauro Carvalho Chehab { 0x07, KEY_TUNER }, /* Source */ 6632cf86f6SMauro Carvalho Chehab { 0x1c, KEY_SEARCH }, /* Scan */ 6732cf86f6SMauro Carvalho Chehab { 0x18, KEY_MUTE }, /* Mute */ 6832cf86f6SMauro Carvalho Chehab 6932cf86f6SMauro Carvalho Chehab { 0x03, KEY_RADIO }, /* TV/FM */ 7032cf86f6SMauro Carvalho Chehab /* The next four keys are duplicates that appear to send the 7132cf86f6SMauro Carvalho Chehab same IR code as Ch+, Ch-, >>, and << . The raw code assigned 7232cf86f6SMauro Carvalho Chehab to them is the actual code + 0x20 - they will never be 7332cf86f6SMauro Carvalho Chehab detected as such unless some way is discovered to distinguish 7432cf86f6SMauro Carvalho Chehab these buttons from those that have the same code. */ 7532cf86f6SMauro Carvalho Chehab { 0x3f, KEY_RIGHT }, /* |> and Ch+ */ 7632cf86f6SMauro Carvalho Chehab { 0x37, KEY_LEFT }, /* <| and Ch- */ 7732cf86f6SMauro Carvalho Chehab { 0x2c, KEY_UP }, /* ^^Up and >> */ 7832cf86f6SMauro Carvalho Chehab { 0x24, KEY_DOWN }, /* vvDn and << */ 7932cf86f6SMauro Carvalho Chehab 8032cf86f6SMauro Carvalho Chehab { 0x00, KEY_RECORD }, /* Record */ 8132cf86f6SMauro Carvalho Chehab { 0x08, KEY_STOP }, /* Stop */ 8232cf86f6SMauro Carvalho Chehab { 0x11, KEY_PLAY }, /* Play */ 8332cf86f6SMauro Carvalho Chehab 8432cf86f6SMauro Carvalho Chehab { 0x0f, KEY_CLOSE }, /* Minimize */ 8532cf86f6SMauro Carvalho Chehab { 0x19, KEY_ZOOM }, /* Zoom */ 8632cf86f6SMauro Carvalho Chehab { 0x1a, KEY_CAMERA }, /* Snapshot */ 8732cf86f6SMauro Carvalho Chehab { 0x0d, KEY_LANGUAGE }, /* MTS */ 8832cf86f6SMauro Carvalho Chehab 8932cf86f6SMauro Carvalho Chehab { 0x14, KEY_VOLUMEDOWN }, /* Vol- */ 9032cf86f6SMauro Carvalho Chehab { 0x16, KEY_VOLUMEUP }, /* Vol+ */ 9132cf86f6SMauro Carvalho Chehab { 0x17, KEY_CHANNELDOWN }, /* Ch- */ 9232cf86f6SMauro Carvalho Chehab { 0x1f, KEY_CHANNELUP }, /* Ch+ */ 9332cf86f6SMauro Carvalho Chehab 9432cf86f6SMauro Carvalho Chehab { 0x04, KEY_REWIND }, /* << */ 9532cf86f6SMauro Carvalho Chehab { 0x0e, KEY_MENU }, /* Function */ 9632cf86f6SMauro Carvalho Chehab { 0x0c, KEY_FASTFORWARD }, /* >> */ 9732cf86f6SMauro Carvalho Chehab { 0x1d, KEY_RESTART }, /* Reset */ 9832cf86f6SMauro Carvalho Chehab }; 9932cf86f6SMauro Carvalho Chehab 10032cf86f6SMauro Carvalho Chehab static struct rc_keymap msi_tvanywhere_plus_map = { 10132cf86f6SMauro Carvalho Chehab .map = { 10232cf86f6SMauro Carvalho Chehab .scan = msi_tvanywhere_plus, 10332cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(msi_tvanywhere_plus), 10452b66144SMauro Carvalho Chehab .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */ 10532cf86f6SMauro Carvalho Chehab .name = RC_MAP_MSI_TVANYWHERE_PLUS, 10632cf86f6SMauro Carvalho Chehab } 10732cf86f6SMauro Carvalho Chehab }; 10832cf86f6SMauro Carvalho Chehab 10932cf86f6SMauro Carvalho Chehab static int __init init_rc_map_msi_tvanywhere_plus(void) 11032cf86f6SMauro Carvalho Chehab { 11132cf86f6SMauro Carvalho Chehab return ir_register_map(&msi_tvanywhere_plus_map); 11232cf86f6SMauro Carvalho Chehab } 11332cf86f6SMauro Carvalho Chehab 11432cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_msi_tvanywhere_plus(void) 11532cf86f6SMauro Carvalho Chehab { 11632cf86f6SMauro Carvalho Chehab ir_unregister_map(&msi_tvanywhere_plus_map); 11732cf86f6SMauro Carvalho Chehab } 11832cf86f6SMauro Carvalho Chehab 11932cf86f6SMauro Carvalho Chehab module_init(init_rc_map_msi_tvanywhere_plus) 12032cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_msi_tvanywhere_plus) 12132cf86f6SMauro Carvalho Chehab 12232cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL"); 12332cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); 124