Commit 02d32bda authored by Benjamin Valentin's avatar Benjamin Valentin Committed by Mauro Carvalho Chehab
Browse files

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: default avatarBenjamin Valentin <benpicco@googlemail.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent fd044de3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -16330,6 +16330,12 @@ F: include/linux/idr.h
F:	include/linux/xarray.h
F:	tools/testing/radix-tree

XBOX DVD IR REMOTE
M:	Benjamin Valentin <benpicco@googlemail.com>
S:	Maintained
F:	drivers/media/rc/xbox_remote.c
F:	drivers/media/rc/keymaps/rc-xbox-dvd.c

XC2028/3028 TUNER DRIVER
M:	Mauro Carvalho Chehab <mchehab@kernel.org>
L:	linux-media@vger.kernel.org
+12 −0
Original line number Diff line number Diff line
@@ -493,6 +493,18 @@ config IR_TANGO
	   The HW decoder supports NEC, RC-5, RC-6 IR protocols.
	   When compiled as a module, look for tango-ir.

config RC_XBOX_DVD
	tristate "Xbox DVD Movie Playback Kit"
	depends on RC_CORE
	depends on USB_ARCH_HAS_HCD
	select USB
	help
	   Say Y here if you want to use the Xbox DVD Movie Playback Kit.
	   These are IR remotes with USB receivers for the Original Xbox (2001).

	   To compile this driver as a module, choose M here: the module will be
	   called xbox_remote.

config IR_ZX
	tristate "ZTE ZX IR remote control"
	depends on RC_CORE
+1 −0
Original line number Diff line number Diff line
@@ -48,3 +48,4 @@ obj-$(CONFIG_IR_SIR) += sir_ir.o
obj-$(CONFIG_IR_MTK) += mtk-cir.o
obj-$(CONFIG_IR_ZX) += zx-irdec.o
obj-$(CONFIG_IR_TANGO) += tango-ir.o
obj-$(CONFIG_RC_XBOX_DVD) += xbox_remote.o
+1 −0
Original line number Diff line number Diff line
@@ -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
+63 −0
Original line number Diff line number Diff line
// 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");
Loading