2019-08-15 15:41:57

by Christian Hewitt

[permalink] [raw]
Subject: [PATCH 0/7] media: rc: Add keymaps for common STB/SBC devices

This series submits keymaps for a number of Android STB/SBC devices that
are regularly used with the Kodi mediacentre distro LibreELEC.

Keymaps list buttons in rows, top-down, to aid visual comparison against
devices. It's common for users of other no-name Android boxes to try a
number of keymaps trying to find one that works and this reduces some of
the guesswork. If the assigned key differs from the marked key, e.g.
where Android 'mouse' buttons have been given a more useful purpose, the
keymap has been commented.

Christian Hewitt (7):
media: rc: add keymap for Amediatech X96-MAX remote
media: rc: add keymap for Khadas VIM/EDGE remote
media: rc: add keymap for Tanix TX3 mini remote
media: rc: add keymap for Tanix TX5 max remote
media: rc: add keymap for WeTek Hub remote
media: rc: add keymap for WeTeK Play 2 remote
media: rc: add keymap for HardKernel ODROID remote

drivers/media/rc/keymaps/Makefile | 7 +++
drivers/media/rc/keymaps/rc-khadas.c | 56 +++++++++++++++++
drivers/media/rc/keymaps/rc-odroid.c | 51 ++++++++++++++++
drivers/media/rc/keymaps/rc-tanix-tx3mini.c | 79 ++++++++++++++++++++++++
drivers/media/rc/keymaps/rc-tanix-tx5max.c | 71 +++++++++++++++++++++
drivers/media/rc/keymaps/rc-wetek-hub.c | 55 +++++++++++++++++
drivers/media/rc/keymaps/rc-wetek-play2.c | 95 +++++++++++++++++++++++++++++
drivers/media/rc/keymaps/rc-x96max.c | 85 ++++++++++++++++++++++++++
include/media/rc-map.h | 7 +++
9 files changed, 506 insertions(+)
create mode 100644 drivers/media/rc/keymaps/rc-khadas.c
create mode 100644 drivers/media/rc/keymaps/rc-odroid.c
create mode 100644 drivers/media/rc/keymaps/rc-tanix-tx3mini.c
create mode 100644 drivers/media/rc/keymaps/rc-tanix-tx5max.c
create mode 100644 drivers/media/rc/keymaps/rc-wetek-hub.c
create mode 100644 drivers/media/rc/keymaps/rc-wetek-play2.c
create mode 100644 drivers/media/rc/keymaps/rc-x96max.c

--
2.7.4


2019-08-15 15:43:10

by Christian Hewitt

[permalink] [raw]
Subject: [PATCH 3/7] media: rc: add keymap for Tanix TX3 mini remote

The Tanix TX3 mini Android STB ships with a simple NEC remote.

Signed-off-by: Christian Hewitt <[email protected]>
---
drivers/media/rc/keymaps/Makefile | 1 +
drivers/media/rc/keymaps/rc-tanix-tx3mini.c | 79 +++++++++++++++++++++++++++++
include/media/rc-map.h | 1 +
3 files changed, 81 insertions(+)
create mode 100644 drivers/media/rc/keymaps/rc-tanix-tx3mini.c

diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index 39192b0..31720d8 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -95,6 +95,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-snapstream-firefly.o \
rc-streamzap.o \
rc-tango.o \
+ rc-tanix-tx3mini.o \
rc-tbs-nec.o \
rc-technisat-ts35.o \
rc-technisat-usb2.o \
diff --git a/drivers/media/rc/keymaps/rc-tanix-tx3mini.c b/drivers/media/rc/keymaps/rc-tanix-tx3mini.c
new file mode 100644
index 0000000..e501398
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-tanix-tx3mini.c
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2018 Christian Hewitt
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+/*
+ * Keymap for the Tanix TX3 mini STB remote control
+ */
+
+static struct rc_map_table tanix_tx3mini[] = {
+
+ { 0x8051, KEY_POWER },
+ { 0x804d, KEY_MUTE },
+
+ { 0x8009, KEY_RED },
+ { 0x8011, KEY_GREEN },
+ { 0x8054, KEY_YELLOW },
+ { 0x804f, KEY_BLUE },
+
+ { 0x8056, KEY_VOLUMEDOWN },
+ { 0x80bd, KEY_PREVIOUS },
+ { 0x80bb, KEY_NEXT },
+ { 0x804e, KEY_VOLUMEUP },
+
+ { 0x8053, KEY_HOME },
+ { 0x801b, KEY_BACK },
+
+ { 0x8026, KEY_UP },
+ { 0x8028, KEY_DOWN },
+ { 0x8025, KEY_LEFT },
+ { 0x8027, KEY_RIGHT },
+ { 0x800d, KEY_OK },
+
+ { 0x8049, KEY_MENU },
+ { 0x8052, KEY_EPG }, // mouse
+
+ { 0x8031, KEY_1 },
+ { 0x8032, KEY_2 },
+ { 0x8033, KEY_3 },
+
+ { 0x8034, KEY_4 },
+ { 0x8035, KEY_5 },
+ { 0x8036, KEY_6 },
+
+ { 0x8037, KEY_7 },
+ { 0x8038, KEY_8 },
+ { 0x8039, KEY_9 },
+
+ { 0x8058, KEY_SUBTITLE }, // 1/a
+ { 0x8030, KEY_0 },
+ { 0x8044, KEY_DELETE },
+};
+
+static struct rc_map_list tanix_tx3mini_map = {
+ .map = {
+ .scan = tanix_tx3mini,
+ .size = ARRAY_SIZE(tanix_tx3mini),
+ .rc_proto = RC_PROTO_NEC,
+ .name = RC_MAP_TANIX_TX3MINI,
+ }
+};
+
+static int __init init_rc_map_tanix_tx3mini(void)
+{
+ return rc_map_register(&tanix_tx3mini_map);
+}
+
+static void __exit exit_rc_map_tanix_tx3mini(void)
+{
+ rc_map_unregister(&tanix_tx3mini_map);
+}
+
+module_init(init_rc_map_tanix_tx3mini)
+module_exit(exit_rc_map_tanix_tx3mini)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Christian Hewitt <[email protected]>");
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index 37508b0..44e6458 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -262,6 +262,7 @@ struct rc_map *rc_map_get(const char *name);
#define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly"
#define RC_MAP_STREAMZAP "rc-streamzap"
#define RC_MAP_TANGO "rc-tango"
+#define RC_MAP_TANIX_TX3MINI "rc-tanix-tx3mini"
#define RC_MAP_TBS_NEC "rc-tbs-nec"
#define RC_MAP_TECHNISAT_TS35 "rc-technisat-ts35"
#define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2"
--
2.7.4

2019-08-15 17:15:19

by Christian Hewitt

[permalink] [raw]
Subject: [PATCH 5/7] media: rc: add keymap for WeTek Hub remote

The WeTek Hub Android STB ships with a simple NEC remote.

Signed-off-by: Christian Hewitt <[email protected]>
---
drivers/media/rc/keymaps/Makefile | 1 +
drivers/media/rc/keymaps/rc-wetek-hub.c | 55 +++++++++++++++++++++++++++++++++
include/media/rc-map.h | 1 +
3 files changed, 57 insertions(+)
create mode 100644 drivers/media/rc/keymaps/rc-wetek-hub.c

diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index 85423cc..6d744ac 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -116,6 +116,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-videomate-m1f.o \
rc-videomate-s350.o \
rc-videomate-tv-pvr.o \
+ rc-wetek-hub.o \
rc-winfast.o \
rc-winfast-usbii-deluxe.o \
rc-su3000.o \
diff --git a/drivers/media/rc/keymaps/rc-wetek-hub.c b/drivers/media/rc/keymaps/rc-wetek-hub.c
new file mode 100644
index 0000000..8d114ae
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-wetek-hub.c
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2018 Christian Hewitt
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+/*
+ * This keymap is used with the WeTek Hub STB.
+ */
+
+static struct rc_map_table wetek_hub[] = {
+
+ { 0x77f1, KEY_POWER },
+
+ { 0x77f2, KEY_HOME },
+ { 0x77f3, KEY_MUTE }, // mouse
+
+ { 0x77f4, KEY_UP },
+ { 0x77f5, KEY_DOWN },
+ { 0x77f6, KEY_LEFT },
+ { 0x77f7, KEY_RIGHT },
+ { 0x77f8, KEY_OK },
+
+ { 0x77f9, KEY_BACK },
+ { 0x77fa, KEY_MENU },
+
+ { 0x77fb, KEY_VOLUMEUP },
+ { 0x77fc, KEY_VOLUMEDOWN },
+
+};
+
+static struct rc_map_list wetek_hub_map = {
+ .map = {
+ .scan = wetek_hub,
+ .size = ARRAY_SIZE(wetek_hub),
+ .rc_proto = RC_PROTO_NEC,
+ .name = RC_MAP_WETEK_HUB,
+ }
+};
+
+static int __init init_rc_map_wetek_hub(void)
+{
+ return rc_map_register(&wetek_hub_map);
+}
+
+static void __exit exit_rc_map_wetek_hub(void)
+{
+ rc_map_unregister(&wetek_hub_map);
+}
+
+module_init(init_rc_map_wetek_hub)
+module_exit(exit_rc_map_wetek_hub)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Christian Hewitt <[email protected]>");
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index a7ed5aa..e7fee29 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -283,6 +283,7 @@ struct rc_map *rc_map_get(const char *name);
#define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100"
#define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350"
#define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr"
+#define RC_MAP_WETEK_HUB "rc-wetek-hub"
#define RC_MAP_WINFAST "rc-winfast"
#define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe"
#define RC_MAP_SU3000 "rc-su3000"
--
2.7.4