Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 // msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus Remote Controller
0003 //
0004 // keymap imported from ir-keymaps.c
0005 //
0006 // Copyright (c) 2010 by Mauro Carvalho Chehab
0007 
0008 #include <media/rc-map.h>
0009 #include <linux/module.h>
0010 
0011 /*
0012   Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
0013   is marked "KS003". The controller is I2C at address 0x30, but does not seem
0014   to respond to probes until a read is performed from a valid device.
0015   I don't know why...
0016 
0017   Note: This remote may be of similar or identical design to the
0018   Pixelview remote (?).  The raw codes and duplicate button codes
0019   appear to be the same.
0020 
0021   Henry Wong <henry@stuffedcow.net>
0022   Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com>
0023 */
0024 
0025 static struct rc_map_table msi_tvanywhere_plus[] = {
0026 
0027 /*  ---- Remote Button Layout ----
0028 
0029     POWER   SOURCE  SCAN    MUTE
0030     TV/FM   1       2       3
0031     |>      4       5       6
0032     <|      7       8       9
0033     ^^UP    0       +       RECALL
0034     vvDN    RECORD  STOP    PLAY
0035 
0036     MINIMIZE          ZOOM
0037 
0038           CH+
0039       VOL-                   VOL+
0040           CH-
0041 
0042     SNAPSHOT           MTS
0043 
0044      <<      FUNC    >>     RESET
0045 */
0046 
0047     { 0x01, KEY_NUMERIC_1 },    /* 1 */
0048     { 0x0b, KEY_NUMERIC_2 },    /* 2 */
0049     { 0x1b, KEY_NUMERIC_3 },    /* 3 */
0050     { 0x05, KEY_NUMERIC_4 },    /* 4 */
0051     { 0x09, KEY_NUMERIC_5 },    /* 5 */
0052     { 0x15, KEY_NUMERIC_6 },    /* 6 */
0053     { 0x06, KEY_NUMERIC_7 },    /* 7 */
0054     { 0x0a, KEY_NUMERIC_8 },    /* 8 */
0055     { 0x12, KEY_NUMERIC_9 },    /* 9 */
0056     { 0x02, KEY_NUMERIC_0 },    /* 0 */
0057     { 0x10, KEY_KPPLUS },       /* + */
0058     { 0x13, KEY_AGAIN },        /* Recall */
0059 
0060     { 0x1e, KEY_POWER },        /* Power */
0061     { 0x07, KEY_VIDEO },        /* Source */
0062     { 0x1c, KEY_SEARCH },       /* Scan */
0063     { 0x18, KEY_MUTE },     /* Mute */
0064 
0065     { 0x03, KEY_RADIO },        /* TV/FM */
0066     /* The next four keys are duplicates that appear to send the
0067        same IR code as Ch+, Ch-, >>, and << .  The raw code assigned
0068        to them is the actual code + 0x20 - they will never be
0069        detected as such unless some way is discovered to distinguish
0070        these buttons from those that have the same code. */
0071     { 0x3f, KEY_RIGHT },        /* |> and Ch+ */
0072     { 0x37, KEY_LEFT },     /* <| and Ch- */
0073     { 0x2c, KEY_UP },       /* ^^Up and >> */
0074     { 0x24, KEY_DOWN },     /* vvDn and << */
0075 
0076     { 0x00, KEY_RECORD },       /* Record */
0077     { 0x08, KEY_STOP },     /* Stop */
0078     { 0x11, KEY_PLAY },     /* Play */
0079 
0080     { 0x0f, KEY_CLOSE },        /* Minimize */
0081     { 0x19, KEY_ZOOM },     /* Zoom */
0082     { 0x1a, KEY_CAMERA },       /* Snapshot */
0083     { 0x0d, KEY_LANGUAGE },     /* MTS */
0084 
0085     { 0x14, KEY_VOLUMEDOWN },   /* Vol- */
0086     { 0x16, KEY_VOLUMEUP },     /* Vol+ */
0087     { 0x17, KEY_CHANNELDOWN },  /* Ch- */
0088     { 0x1f, KEY_CHANNELUP },    /* Ch+ */
0089 
0090     { 0x04, KEY_REWIND },       /* << */
0091     { 0x0e, KEY_MENU },     /* Function */
0092     { 0x0c, KEY_FASTFORWARD },  /* >> */
0093     { 0x1d, KEY_RESTART },      /* Reset */
0094 };
0095 
0096 static struct rc_map_list msi_tvanywhere_plus_map = {
0097     .map = {
0098         .scan     = msi_tvanywhere_plus,
0099         .size     = ARRAY_SIZE(msi_tvanywhere_plus),
0100         .rc_proto = RC_PROTO_UNKNOWN,   /* Legacy IR type */
0101         .name     = RC_MAP_MSI_TVANYWHERE_PLUS,
0102     }
0103 };
0104 
0105 static int __init init_rc_map_msi_tvanywhere_plus(void)
0106 {
0107     return rc_map_register(&msi_tvanywhere_plus_map);
0108 }
0109 
0110 static void __exit exit_rc_map_msi_tvanywhere_plus(void)
0111 {
0112     rc_map_unregister(&msi_tvanywhere_plus_map);
0113 }
0114 
0115 module_init(init_rc_map_msi_tvanywhere_plus)
0116 module_exit(exit_rc_map_msi_tvanywhere_plus)
0117 
0118 MODULE_LICENSE("GPL");
0119 MODULE_AUTHOR("Mauro Carvalho Chehab");