summaryrefslogtreecommitdiff
path: root/drivers/media/rc/keymaps
diff options
context:
space:
mode:
authorBenjamin Valentin <benpicco@googlemail.com>2018-10-09 19:02:11 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-11-22 21:26:47 +0300
commit02d32bdad3123d7376244256936a6b3b6ee434e8 (patch)
tree5a0449be0149bf38b3e7aeb0f3f838b5041e9202 /drivers/media/rc/keymaps
parentfd044de30b78d26c3c4c610acdbfb3a2e3f5e422 (diff)
downloadlinux-02d32bdad3123d7376244256936a6b3b6ee434e8.tar.xz
media: rc: add driver for Xbox DVD Movie Playback Kit
The Xbox DVD Movie Playback Kit is a USB dongle with an IR remote for the Original Xbox. Historically it has been supported by the out-of-tree lirc_xbox driver, but this one has fallen out of favour and was just dropped from popular Kodi (formerly XBMC) distributions. This driver is heavily based on the ati_remote driver where all the boilerplate was taken from - I was mostly just removing code. Signed-off-by: Benjamin Valentin <benpicco@googlemail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/rc/keymaps')
-rw-r--r--drivers/media/rc/keymaps/Makefile1
-rw-r--r--drivers/media/rc/keymaps/rc-xbox-dvd.c63
2 files changed, 64 insertions, 0 deletions
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index d6b913a3032d..5b1399af6b3a 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -116,4 +116,5 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-winfast.o \
rc-winfast-usbii-deluxe.o \
rc-su3000.o \
+ rc-xbox-dvd.o \
rc-zx-irdec.o
diff --git a/drivers/media/rc/keymaps/rc-xbox-dvd.c b/drivers/media/rc/keymaps/rc-xbox-dvd.c
new file mode 100644
index 000000000000..61da6706715c
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-xbox-dvd.c
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Keytable for Xbox DVD remote
+// Copyright (c) 2018 by Benjamin Valentin <benpicco@googlemail.com>
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+/* based on lircd.conf.xbox */
+static struct rc_map_table xbox_dvd[] = {
+ {0x0b, KEY_OK},
+ {0xa6, KEY_UP},
+ {0xa7, KEY_DOWN},
+ {0xa8, KEY_RIGHT},
+ {0xa9, KEY_LEFT},
+ {0xc3, KEY_INFO},
+
+ {0xc6, KEY_9},
+ {0xc7, KEY_8},
+ {0xc8, KEY_7},
+ {0xc9, KEY_6},
+ {0xca, KEY_5},
+ {0xcb, KEY_4},
+ {0xcc, KEY_3},
+ {0xcd, KEY_2},
+ {0xce, KEY_1},
+ {0xcf, KEY_0},
+
+ {0xd5, KEY_ANGLE},
+ {0xd8, KEY_BACK},
+ {0xdd, KEY_PREVIOUSSONG},
+ {0xdf, KEY_NEXTSONG},
+ {0xe0, KEY_STOP},
+ {0xe2, KEY_REWIND},
+ {0xe3, KEY_FASTFORWARD},
+ {0xe5, KEY_TITLE},
+ {0xe6, KEY_PAUSE},
+ {0xea, KEY_PLAY},
+ {0xf7, KEY_MENU},
+};
+
+static struct rc_map_list xbox_dvd_map = {
+ .map = {
+ .scan = xbox_dvd,
+ .size = ARRAY_SIZE(xbox_dvd),
+ .rc_proto = RC_PROTO_UNKNOWN,
+ .name = RC_MAP_XBOX_DVD,
+ }
+};
+
+static int __init init_rc_map(void)
+{
+ return rc_map_register(&xbox_dvd_map);
+}
+
+static void __exit exit_rc_map(void)
+{
+ rc_map_unregister(&xbox_dvd_map);
+}
+
+module_init(init_rc_map)
+module_exit(exit_rc_map)
+
+MODULE_LICENSE("GPL");