Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 // manli.h - Keytable for manli 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 /* Michael Tokarev <mjt@tls.msk.ru>
0012    keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
0013    least, and probably other cards too.
0014    The "ascii-art picture" below (in comments, first row
0015    is the keycode in hex, and subsequent row(s) shows
0016    the button labels (several variants when appropriate)
0017    helps to decide which keycodes to assign to the buttons.
0018  */
0019 
0020 static struct rc_map_table manli[] = {
0021 
0022     /*  0x1c            0x12  *
0023      * FUNCTION         POWER *
0024      *   FM              (|)  *
0025      *                        */
0026     { 0x1c, KEY_RADIO },    /*XXX*/
0027     { 0x12, KEY_POWER },
0028 
0029     /*  0x01    0x02    0x03  *
0030      *   1       2       3    *
0031      *                        *
0032      *  0x04    0x05    0x06  *
0033      *   4       5       6    *
0034      *                        *
0035      *  0x07    0x08    0x09  *
0036      *   7       8       9    *
0037      *                        */
0038     { 0x01, KEY_NUMERIC_1 },
0039     { 0x02, KEY_NUMERIC_2 },
0040     { 0x03, KEY_NUMERIC_3 },
0041     { 0x04, KEY_NUMERIC_4 },
0042     { 0x05, KEY_NUMERIC_5 },
0043     { 0x06, KEY_NUMERIC_6 },
0044     { 0x07, KEY_NUMERIC_7 },
0045     { 0x08, KEY_NUMERIC_8 },
0046     { 0x09, KEY_NUMERIC_9 },
0047 
0048     /*  0x0a    0x00    0x17  *
0049      * RECALL    0      +100  *
0050      *                  PLUS  *
0051      *                        */
0052     { 0x0a, KEY_AGAIN },    /*XXX KEY_REWIND? */
0053     { 0x00, KEY_NUMERIC_0 },
0054     { 0x17, KEY_DIGITS },   /*XXX*/
0055 
0056     /*  0x14            0x10  *
0057      *  MENU            INFO  *
0058      *  OSD                   */
0059     { 0x14, KEY_MENU },
0060     { 0x10, KEY_INFO },
0061 
0062     /*          0x0b          *
0063      *           Up           *
0064      *                        *
0065      *  0x18    0x16    0x0c  *
0066      *  Left     Ok     Right *
0067      *                        *
0068      *         0x015          *
0069      *         Down           *
0070      *                        */
0071     { 0x0b, KEY_UP },
0072     { 0x18, KEY_LEFT },
0073     { 0x16, KEY_OK },   /*XXX KEY_SELECT? KEY_ENTER? */
0074     { 0x0c, KEY_RIGHT },
0075     { 0x15, KEY_DOWN },
0076 
0077     /*  0x11            0x0d  *
0078      *  TV/AV           MODE  *
0079      *  SOURCE         STEREO *
0080      *                        */
0081     { 0x11, KEY_TV },   /*XXX*/
0082     { 0x0d, KEY_MODE }, /*XXX there's no KEY_STEREO */
0083 
0084     /*  0x0f    0x1b    0x1a  *
0085      *  AUDIO   Vol+    Chan+ *
0086      *        TIMESHIFT???    *
0087      *                        *
0088      *  0x0e    0x1f    0x1e  *
0089      *  SLEEP   Vol-    Chan- *
0090      *                        */
0091     { 0x0f, KEY_AUDIO },
0092     { 0x1b, KEY_VOLUMEUP },
0093     { 0x1a, KEY_CHANNELUP },
0094     { 0x0e, KEY_TIME },
0095     { 0x1f, KEY_VOLUMEDOWN },
0096     { 0x1e, KEY_CHANNELDOWN },
0097 
0098     /*         0x13     0x19  *
0099      *         MUTE   SNAPSHOT*
0100      *                        */
0101     { 0x13, KEY_MUTE },
0102     { 0x19, KEY_CAMERA },
0103 
0104     /* 0x1d unused ? */
0105 };
0106 
0107 static struct rc_map_list manli_map = {
0108     .map = {
0109         .scan     = manli,
0110         .size     = ARRAY_SIZE(manli),
0111         .rc_proto = RC_PROTO_UNKNOWN,   /* Legacy IR type */
0112         .name     = RC_MAP_MANLI,
0113     }
0114 };
0115 
0116 static int __init init_rc_map_manli(void)
0117 {
0118     return rc_map_register(&manli_map);
0119 }
0120 
0121 static void __exit exit_rc_map_manli(void)
0122 {
0123     rc_map_unregister(&manli_map);
0124 }
0125 
0126 module_init(init_rc_map_manli)
0127 module_exit(exit_rc_map_manli)
0128 
0129 MODULE_LICENSE("GPL");
0130 MODULE_AUTHOR("Mauro Carvalho Chehab");