Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: rc: add keymap for Amediatech X96-MAX remote

The X96-Max Android STB ships with a simple NEC remote. It includes
a TV section with preset buttons for controlling a TV. These are not
configurable, but are noted to aid visual recognition of the device.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Christian Hewitt and committed by
Mauro Carvalho Chehab
9b9e9e5b 619f6fc3

+85
+1
drivers/media/rc/keymaps/Makefile
··· 117 117 rc-winfast-usbii-deluxe.o \ 118 118 rc-su3000.o \ 119 119 rc-xbox-dvd.o \ 120 + rc-x96max.o \ 120 121 rc-zx-irdec.o
+83
drivers/media/rc/keymaps/rc-x96max.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com> 4 + 5 + #include <media/rc-map.h> 6 + #include <linux/module.h> 7 + 8 + // 9 + // Keytable for the X96-max STB remote control 10 + // 11 + 12 + static struct rc_map_table x96max[] = { 13 + { 0x140, KEY_POWER }, 14 + 15 + // ** TV CONTROL ** 16 + // SET 17 + // AV/TV 18 + // POWER 19 + // VOLUME UP 20 + // VOLUME DOWN 21 + 22 + { 0x118, KEY_VOLUMEUP }, 23 + { 0x110, KEY_VOLUMEDOWN }, 24 + 25 + { 0x143, KEY_MUTE }, // config 26 + 27 + { 0x100, KEY_EPG }, // mouse 28 + { 0x119, KEY_BACK }, 29 + 30 + { 0x116, KEY_UP }, 31 + { 0x151, KEY_LEFT }, 32 + { 0x150, KEY_RIGHT }, 33 + { 0x11a, KEY_DOWN }, 34 + { 0x113, KEY_OK }, 35 + 36 + { 0x111, KEY_HOME }, 37 + { 0x14c, KEY_CONTEXT_MENU }, 38 + 39 + { 0x159, KEY_PREVIOUS }, 40 + { 0x15a, KEY_PLAYPAUSE }, 41 + { 0x158, KEY_NEXT }, 42 + 43 + { 0x147, KEY_MENU }, // @ key 44 + { 0x101, KEY_NUMERIC_0 }, 45 + { 0x142, KEY_BACKSPACE }, 46 + 47 + { 0x14e, KEY_NUMERIC_1 }, 48 + { 0x10d, KEY_NUMERIC_2 }, 49 + { 0x10c, KEY_NUMERIC_3 }, 50 + 51 + { 0x14a, KEY_NUMERIC_4 }, 52 + { 0x109, KEY_NUMERIC_5 }, 53 + { 0x108, KEY_NUMERIC_6 }, 54 + 55 + { 0x146, KEY_NUMERIC_7 }, 56 + { 0x105, KEY_NUMERIC_8 }, 57 + { 0x104, KEY_NUMERIC_9 }, 58 + }; 59 + 60 + static struct rc_map_list x96max_map = { 61 + .map = { 62 + .scan = x96max, 63 + .size = ARRAY_SIZE(x96max), 64 + .rc_proto = RC_PROTO_NEC, 65 + .name = RC_MAP_X96MAX, 66 + } 67 + }; 68 + 69 + static int __init init_rc_map_x96max(void) 70 + { 71 + return rc_map_register(&x96max_map); 72 + } 73 + 74 + static void __exit exit_rc_map_x96max(void) 75 + { 76 + rc_map_unregister(&x96max_map); 77 + } 78 + 79 + module_init(init_rc_map_x96max) 80 + module_exit(exit_rc_map_x96max) 81 + 82 + MODULE_LICENSE("GPL"); 83 + MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
+1
include/media/rc-map.h
··· 271 271 #define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe" 272 272 #define RC_MAP_SU3000 "rc-su3000" 273 273 #define RC_MAP_XBOX_DVD "rc-xbox-dvd" 274 + #define RC_MAP_X96MAX "rc-x96max" 274 275 #define RC_MAP_ZX_IRDEC "rc-zx-irdec" 275 276 276 277 /*