* [PATCH 1/2] media: rc: add keymap for Xbox 360 Universal Media remote
@ 2021-01-26 17:40 Bastien Nocera
2021-01-26 17:40 ` [PATCH 2/2] media: rc: add keymap for Dell RC 260 remote Bastien Nocera
0 siblings, 1 reply; 3+ messages in thread
From: Bastien Nocera @ 2021-01-26 17:40 UTC (permalink / raw)
To: linux-media; +Cc: Bastien Nocera
Captured using a raw IR receiver. Manual linked in the remote definition
itself.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
drivers/media/rc/keymaps/Makefile | 1 +
drivers/media/rc/keymaps/rc-xbox-360.c | 83 ++++++++++++++++++++++++++
include/media/rc-map.h | 1 +
3 files changed, 85 insertions(+)
create mode 100644 drivers/media/rc/keymaps/rc-xbox-360.c
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index b252a1d2ebd6..37ce3cbf0c0c 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -127,6 +127,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-winfast.o \
rc-winfast-usbii-deluxe.o \
rc-su3000.o \
+ rc-xbox-360.o \
rc-xbox-dvd.o \
rc-x96max.o \
rc-zx-irdec.o
diff --git a/drivers/media/rc/keymaps/rc-xbox-360.c b/drivers/media/rc/keymaps/rc-xbox-360.c
new file mode 100644
index 000000000000..231aa00514af
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-xbox-360.c
@@ -0,0 +1,83 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Keytable for Xbox 360 Universal Media remote
+// Copyright (c) 2021 Bastien Nocera <hadess@hadess.net>
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+/*
+ * Manual for remote available at:
+ * http://download.microsoft.com/download/b/c/e/bce76f3f-db51-4c98-b79d-b3d21e90ccc1/universalmediaremote_na_0609.pdf
+ */
+static struct rc_map_table xbox_360[] = {
+ {KEY_EJECTCD, 0x800f7428},
+ {KEY_HOMEPAGE, 0x800f7464},
+ {KEY_POWER, 0x800f740c},
+ {KEY_STOP, 0x800f7419},
+ {KEY_PAUSE, 0x800f7418},
+ {KEY_REWIND, 0x800f7415},
+ {KEY_FASTFORWARD, 0x800f7414},
+ {KEY_PREVIOUS, 0x800f741b},
+ {KEY_NEXT, 0x800f741a},
+ {KEY_PLAY, 0x800f7416},
+ {KEY_PROPS, 0x800f744f}, /* "Display" */
+ {KEY_BACK, 0x800f7423},
+ {KEY_MEDIA_TOP_MENU, 0x800f7424}, /* "DVD Menu" */
+ {KEY_ROOT_MENU, 0x800f7451}, /* "Title" */
+ {KEY_INFO, 0x800f740f},
+ {KEY_UP, 0x800f741e},
+ {KEY_LEFT, 0x800f7420},
+ {KEY_RIGHT, 0x800f7421},
+ {KEY_DOWN, 0x800f741f},
+ {KEY_OK, 0x800f7422},
+ {KEY_YELLOW, 0x800f7426},
+ {KEY_BLUE, 0x800f7468},
+ {KEY_GREEN, 0x800f7466},
+ {KEY_RED, 0x800f7425},
+ {KEY_VOLUMEUP, 0x800f7410},
+ {KEY_VOLUMEDOWN, 0x800f7411},
+ /* TV key doesn't light the IR LED */
+ {KEY_MUTE, 0x800f740e},
+ {KEY_CHANNELUP, 0x800f746c},
+ {KEY_CHANNELDOWN, 0x800f746d},
+ {KEY_LEFTMETA, 0x800f740d},
+ {KEY_ENTER, 0x800f740b},
+ {KEY_RECORD, 0x800f7417},
+ {KEY_CLEAR, 0x800f740a},
+ {KEY_NUMERIC_1, 0x800f7401},
+ {KEY_NUMERIC_2, 0x800f7402},
+ {KEY_NUMERIC_3, 0x800f7403},
+ {KEY_NUMERIC_4, 0x800f7404},
+ {KEY_NUMERIC_5, 0x800f7405},
+ {KEY_NUMERIC_6, 0x800f7406},
+ {KEY_NUMERIC_7, 0x800f7407},
+ {KEY_NUMERIC_8, 0x800f7408},
+ {KEY_NUMERIC_9, 0x800f7409},
+ {KEY_NUMERIC_0, 0x800f7400},
+ {KEY_102ND, 0x800f741d}, /* "100" */
+ {KEY_CANCEL, 0x800f741c},
+};
+
+static struct rc_map_list xbox_360_map = {
+ .map = {
+ .scan = xbox_360,
+ .size = ARRAY_SIZE(xbox_360),
+ .rc_proto = RC_PROTO_RC6_MCE,
+ .name = RC_MAP_XBOX_360,
+ }
+};
+
+static int __init init_rc_map(void)
+{
+ return rc_map_register(&xbox_360_map);
+}
+
+static void __exit exit_rc_map(void)
+{
+ rc_map_unregister(&xbox_360_map);
+}
+
+module_init(init_rc_map)
+module_exit(exit_rc_map)
+
+MODULE_LICENSE("GPL");
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index 999b750bc6b8..9b7608e58b52 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -331,6 +331,7 @@ struct rc_map *rc_map_get(const char *name);
#define RC_MAP_WINFAST "rc-winfast"
#define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe"
#define RC_MAP_X96MAX "rc-x96max"
+#define RC_MAP_XBOX_360 "rc-xbox-360"
#define RC_MAP_XBOX_DVD "rc-xbox-dvd"
#define RC_MAP_ZX_IRDEC "rc-zx-irdec"
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] media: rc: add keymap for Dell RC 260 remote
2021-01-26 17:40 [PATCH 1/2] media: rc: add keymap for Xbox 360 Universal Media remote Bastien Nocera
@ 2021-01-26 17:40 ` Bastien Nocera
2021-03-01 10:50 ` Sean Young
0 siblings, 1 reply; 3+ messages in thread
From: Bastien Nocera @ 2021-01-26 17:40 UTC (permalink / raw)
To: linux-media; +Cc: Bastien Nocera
Apparently used in the Dell Inspiron Zino HD 410 desktop:
http://web.archive.org/web/20180805000711/http://www.dell.com/ba/p/desktops/inspiron-zino-hd-410/pd
Captured using a raw IR receiver. Manual linked in the remote definition
itself.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
drivers/media/rc/keymaps/Makefile | 1 +
drivers/media/rc/keymaps/rc-dell-rc260.c | 79 ++++++++++++++++++++++++
include/media/rc-map.h | 1 +
3 files changed, 81 insertions(+)
create mode 100644 drivers/media/rc/keymaps/rc-dell-rc260.c
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index 37ce3cbf0c0c..84eca88ffb55 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-cinergy-1400.o \
rc-cinergy.o \
rc-d680-dmb.o \
+ rc-dell-rc260.o \
rc-delock-61959.o \
rc-dib0700-nec.o \
rc-dib0700-rc5.o \
diff --git a/drivers/media/rc/keymaps/rc-dell-rc260.c b/drivers/media/rc/keymaps/rc-dell-rc260.c
new file mode 100644
index 000000000000..2ca69daca990
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-dell-rc260.c
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Keytable for Dell RC 260 remote
+// Copyright (c) 2021 Bastien Nocera <hadess@hadess.net>
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+/* Manual available at:
+ * https://archive.org/details/manualsonline-id-b1c9aa7c-e060-40b0-816a-918536a02fac/
+ */
+static struct rc_map_table dell_rc260[] = {
+ {KEY_HOMEPAGE, 0x803404a9},
+ {KEY_POWER, 0x8034040c},
+ {KEY_RECORD, 0x80340437},
+ {KEY_PAUSE, 0x80340430},
+ {KEY_STOP, 0x80340431},
+ {KEY_REWIND, 0x80340429},
+ {KEY_PLAY, 0x8034042c},
+ {KEY_FASTFORWARD, 0x80340428},
+ {KEY_PREVIOUS, 0x80340421},
+ {KEY_NEXT, 0x80340420},
+ {KEY_BACK, 0x80340483},
+ {KEY_INFO, 0x803404cb},
+ {KEY_LEFTMETA, 0x8034045d},
+ {KEY_UP, 0x80340458},
+ {KEY_LEFT, 0x8034045a},
+ {KEY_RIGHT, 0x8034045b},
+ {KEY_DOWN, 0x80340459},
+ {KEY_OK, 0x8034045c},
+ {KEY_VOLUMEUP, 0x80340410},
+ {KEY_VOLUMEDOWN, 0x80340411},
+ {KEY_CHANNELUP, 0x8034041e},
+ {KEY_CHANNELDOWN, 0x8034041f},
+ {KEY_MUTE, 0x8034040d},
+ {KEY_NUMERIC_1, 0x80340401},
+ {KEY_NUMERIC_2, 0x80340402},
+ {KEY_NUMERIC_3, 0x80340403},
+ {KEY_NUMERIC_4, 0x80340404},
+ {KEY_NUMERIC_5, 0x80340405},
+ {KEY_NUMERIC_6, 0x80340406},
+ {KEY_NUMERIC_7, 0x80340407},
+ {KEY_NUMERIC_8, 0x80340408},
+ {KEY_NUMERIC_9, 0x80340409},
+ {KEY_NUMERIC_0, 0x80340400},
+ {KEY_NUMERIC_STAR, 0x80340433},
+ {KEY_NUMERIC_POUND, 0x80340432},
+ {KEY_CLEAR, 0x8034043a},
+ /* Teletext key doesn't light the IR LED */
+ {KEY_EPG, 0x8034043e},
+ {KEY_ENTER, 0x80340434},
+ {KEY_RED, 0x8034046d},
+ {KEY_GREEN, 0x8034046e},
+ {KEY_YELLOW, 0x8034046f},
+ {KEY_BLUE, 0x80340470}
+};
+
+static struct rc_map_list dell_rc260_map = {
+ .map = {
+ .scan = dell_rc260,
+ .size = ARRAY_SIZE(dell_rc260),
+ .rc_proto = RC_PROTO_RC6_6A_24,
+ .name = RC_MAP_DELL_RC260,
+ }
+};
+
+static int __init init_rc_map(void)
+{
+ return rc_map_register(&dell_rc260_map);
+}
+
+static void __exit exit_rc_map(void)
+{
+ rc_map_unregister(&dell_rc260_map);
+}
+
+module_init(init_rc_map)
+module_exit(exit_rc_map)
+
+MODULE_LICENSE("GPL");
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index 9b7608e58b52..7385903be3cc 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -225,6 +225,7 @@ struct rc_map *rc_map_get(const char *name);
#define RC_MAP_CINERGY "rc-cinergy"
#define RC_MAP_CINERGY_1400 "rc-cinergy-1400"
#define RC_MAP_D680_DMB "rc-d680-dmb"
+#define RC_MAP_DELL_RC260 "rc-dell-rc260"
#define RC_MAP_DELOCK_61959 "rc-delock-61959"
#define RC_MAP_DIB0700_NEC_TABLE "rc-dib0700-nec"
#define RC_MAP_DIB0700_RC5_TABLE "rc-dib0700-rc5"
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] media: rc: add keymap for Dell RC 260 remote
2021-01-26 17:40 ` [PATCH 2/2] media: rc: add keymap for Dell RC 260 remote Bastien Nocera
@ 2021-03-01 10:50 ` Sean Young
0 siblings, 0 replies; 3+ messages in thread
From: Sean Young @ 2021-03-01 10:50 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-media
Hi Bastien,
Sorry for not getting back to you sooner, I somehow missed this.
On Tue, Jan 26, 2021 at 06:40:34PM +0100, Bastien Nocera wrote:
> Apparently used in the Dell Inspiron Zino HD 410 desktop:
> http://web.archive.org/web/20180805000711/http://www.dell.com/ba/p/desktops/inspiron-zino-hd-410/pd
>
> Captured using a raw IR receiver. Manual linked in the remote definition
> itself.
>
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
> ---
> drivers/media/rc/keymaps/Makefile | 1 +
> drivers/media/rc/keymaps/rc-dell-rc260.c | 79 ++++++++++++++++++++++++
> include/media/rc-map.h | 1 +
> 3 files changed, 81 insertions(+)
> create mode 100644 drivers/media/rc/keymaps/rc-dell-rc260.c
>
> diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
> index 37ce3cbf0c0c..84eca88ffb55 100644
> --- a/drivers/media/rc/keymaps/Makefile
> +++ b/drivers/media/rc/keymaps/Makefile
> @@ -25,6 +25,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
> rc-cinergy-1400.o \
> rc-cinergy.o \
> rc-d680-dmb.o \
> + rc-dell-rc260.o \
> rc-delock-61959.o \
> rc-dib0700-nec.o \
> rc-dib0700-rc5.o \
> diff --git a/drivers/media/rc/keymaps/rc-dell-rc260.c b/drivers/media/rc/keymaps/rc-dell-rc260.c
> new file mode 100644
> index 000000000000..2ca69daca990
> --- /dev/null
> +++ b/drivers/media/rc/keymaps/rc-dell-rc260.c
> @@ -0,0 +1,79 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +// Keytable for Dell RC 260 remote
> +// Copyright (c) 2021 Bastien Nocera <hadess@hadess.net>
> +
> +#include <media/rc-map.h>
> +#include <linux/module.h>
> +
> +/* Manual available at:
> + * https://archive.org/details/manualsonline-id-b1c9aa7c-e060-40b0-816a-918536a02fac/
> + */
> +static struct rc_map_table dell_rc260[] = {
> + {KEY_HOMEPAGE, 0x803404a9},
> + {KEY_POWER, 0x8034040c},
> + {KEY_RECORD, 0x80340437},
> + {KEY_PAUSE, 0x80340430},
> + {KEY_STOP, 0x80340431},
> + {KEY_REWIND, 0x80340429},
> + {KEY_PLAY, 0x8034042c},
> + {KEY_FASTFORWARD, 0x80340428},
> + {KEY_PREVIOUS, 0x80340421},
> + {KEY_NEXT, 0x80340420},
> + {KEY_BACK, 0x80340483},
> + {KEY_INFO, 0x803404cb},
> + {KEY_LEFTMETA, 0x8034045d},
> + {KEY_UP, 0x80340458},
> + {KEY_LEFT, 0x8034045a},
> + {KEY_RIGHT, 0x8034045b},
> + {KEY_DOWN, 0x80340459},
> + {KEY_OK, 0x8034045c},
> + {KEY_VOLUMEUP, 0x80340410},
> + {KEY_VOLUMEDOWN, 0x80340411},
> + {KEY_CHANNELUP, 0x8034041e},
> + {KEY_CHANNELDOWN, 0x8034041f},
> + {KEY_MUTE, 0x8034040d},
> + {KEY_NUMERIC_1, 0x80340401},
> + {KEY_NUMERIC_2, 0x80340402},
> + {KEY_NUMERIC_3, 0x80340403},
> + {KEY_NUMERIC_4, 0x80340404},
> + {KEY_NUMERIC_5, 0x80340405},
> + {KEY_NUMERIC_6, 0x80340406},
> + {KEY_NUMERIC_7, 0x80340407},
> + {KEY_NUMERIC_8, 0x80340408},
> + {KEY_NUMERIC_9, 0x80340409},
> + {KEY_NUMERIC_0, 0x80340400},
> + {KEY_NUMERIC_STAR, 0x80340433},
> + {KEY_NUMERIC_POUND, 0x80340432},
> + {KEY_CLEAR, 0x8034043a},
> + /* Teletext key doesn't light the IR LED */
> + {KEY_EPG, 0x8034043e},
> + {KEY_ENTER, 0x80340434},
> + {KEY_RED, 0x8034046d},
> + {KEY_GREEN, 0x8034046e},
> + {KEY_YELLOW, 0x8034046f},
> + {KEY_BLUE, 0x80340470}
> +};
> +
> +static struct rc_map_list dell_rc260_map = {
> + .map = {
> + .scan = dell_rc260,
> + .size = ARRAY_SIZE(dell_rc260),
> + .rc_proto = RC_PROTO_RC6_6A_24,
That's a 24 bit protocol but the scancodes are 32 bit. Looks like this should
be RC_PROTO_RC6_6A_32?
Thanks
Sean
> + .name = RC_MAP_DELL_RC260,
> + }
> +};
> +
> +static int __init init_rc_map(void)
> +{
> + return rc_map_register(&dell_rc260_map);
> +}
> +
> +static void __exit exit_rc_map(void)
> +{
> + rc_map_unregister(&dell_rc260_map);
> +}
> +
> +module_init(init_rc_map)
> +module_exit(exit_rc_map)
> +
> +MODULE_LICENSE("GPL");
> diff --git a/include/media/rc-map.h b/include/media/rc-map.h
> index 9b7608e58b52..7385903be3cc 100644
> --- a/include/media/rc-map.h
> +++ b/include/media/rc-map.h
> @@ -225,6 +225,7 @@ struct rc_map *rc_map_get(const char *name);
> #define RC_MAP_CINERGY "rc-cinergy"
> #define RC_MAP_CINERGY_1400 "rc-cinergy-1400"
> #define RC_MAP_D680_DMB "rc-d680-dmb"
> +#define RC_MAP_DELL_RC260 "rc-dell-rc260"
> #define RC_MAP_DELOCK_61959 "rc-delock-61959"
> #define RC_MAP_DIB0700_NEC_TABLE "rc-dib0700-nec"
> #define RC_MAP_DIB0700_RC5_TABLE "rc-dib0700-rc5"
> --
> 2.29.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-01 10:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 17:40 [PATCH 1/2] media: rc: add keymap for Xbox 360 Universal Media remote Bastien Nocera
2021-01-26 17:40 ` [PATCH 2/2] media: rc: add keymap for Dell RC 260 remote Bastien Nocera
2021-03-01 10:50 ` Sean Young
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.