linux/drivers/media/rc/keymaps/rc-behold-columbus.c
<<
>>
Prefs
   1/* behold-columbus.h - Keytable for behold_columbus Remote Controller
   2 *
   3 * keymap imported from ir-keymaps.c
   4 *
   5 * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
   6 *
   7 * This program is free software; you can redistribute it and/or modify
   8 * it under the terms of the GNU General Public License as published by
   9 * the Free Software Foundation; either version 2 of the License, or
  10 * (at your option) any later version.
  11 */
  12
  13#include <media/rc-map.h>
  14#include <linux/module.h>
  15
  16/* Beholder Intl. Ltd. 2008
  17 * Dmitry Belimov d.belimov@google.com
  18 * Keytable is used by BeholdTV Columbus
  19 * The "ascii-art picture" below (in comments, first row
  20 * is the keycode in hex, and subsequent row(s) shows
  21 * the button labels (several variants when appropriate)
  22 * helps to descide which keycodes to assign to the buttons.
  23 */
  24
  25static struct rc_map_table behold_columbus[] = {
  26
  27        /*  0x13   0x11   0x1C   0x12  *
  28         *  Mute  Source  TV/FM  Power *
  29         *                             */
  30
  31        { 0x13, KEY_MUTE },
  32        { 0x11, KEY_VIDEO },
  33        { 0x1C, KEY_TUNER },    /* KEY_TV/KEY_RADIO     */
  34        { 0x12, KEY_POWER },
  35
  36        /*  0x01    0x02    0x03  0x0D    *
  37         *   1       2       3   Stereo   *
  38         *                                *
  39         *  0x04    0x05    0x06  0x19    *
  40         *   4       5       6   Snapshot *
  41         *                                *
  42         *  0x07    0x08    0x09  0x10    *
  43         *   7       8       9    Zoom    *
  44         *                                */
  45        { 0x01, KEY_1 },
  46        { 0x02, KEY_2 },
  47        { 0x03, KEY_3 },
  48        { 0x0D, KEY_SETUP },      /* Setup key */
  49        { 0x04, KEY_4 },
  50        { 0x05, KEY_5 },
  51        { 0x06, KEY_6 },
  52        { 0x19, KEY_CAMERA },   /* Snapshot key */
  53        { 0x07, KEY_7 },
  54        { 0x08, KEY_8 },
  55        { 0x09, KEY_9 },
  56        { 0x10, KEY_ZOOM },
  57
  58        /*  0x0A    0x00    0x0B       0x0C   *
  59         * RECALL    0    ChannelUp  VolumeUp *
  60         *                                    */
  61        { 0x0A, KEY_AGAIN },
  62        { 0x00, KEY_0 },
  63        { 0x0B, KEY_CHANNELUP },
  64        { 0x0C, KEY_VOLUMEUP },
  65
  66        /*   0x1B      0x1D      0x15        0x18     *
  67         * Timeshift  Record  ChannelDown  VolumeDown *
  68         *                                            */
  69
  70        { 0x1B, KEY_TIME },
  71        { 0x1D, KEY_RECORD },
  72        { 0x15, KEY_CHANNELDOWN },
  73        { 0x18, KEY_VOLUMEDOWN },
  74
  75        /*   0x0E   0x1E     0x0F     0x1A  *
  76         *   Stop   Pause  Previouse  Next  *
  77         *                                  */
  78
  79        { 0x0E, KEY_STOP },
  80        { 0x1E, KEY_PAUSE },
  81        { 0x0F, KEY_PREVIOUS },
  82        { 0x1A, KEY_NEXT },
  83
  84};
  85
  86static struct rc_map_list behold_columbus_map = {
  87        .map = {
  88                .scan    = behold_columbus,
  89                .size    = ARRAY_SIZE(behold_columbus),
  90                .rc_type = RC_TYPE_UNKNOWN,     /* Legacy IR type */
  91                .name    = RC_MAP_BEHOLD_COLUMBUS,
  92        }
  93};
  94
  95static int __init init_rc_map_behold_columbus(void)
  96{
  97        return rc_map_register(&behold_columbus_map);
  98}
  99
 100static void __exit exit_rc_map_behold_columbus(void)
 101{
 102        rc_map_unregister(&behold_columbus_map);
 103}
 104
 105module_init(init_rc_map_behold_columbus)
 106module_exit(exit_rc_map_behold_columbus)
 107
 108MODULE_LICENSE("GPL");
 109MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
 110