media: rc: add keymap for Videostrong KII Pro
Subsystems (2)
PATCH v2 1/1 media: rc: add keymap for Videostrong KII Pro
Changes since v1:
- fix styling issues
--- drivers/media/rc/keymaps/Makefile | 1 + .../media/rc/keymaps/rc-videostrong-kii-pro.c | 84 +++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 86 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.c
drivers/media/rc/keymaps/Makefile +1 -0
@@ -117,6 +117,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-videostrong-kii-pro.o \ rc-wetek-hub.o \ rc-wetek-play2.o \ rc-winfast.o \
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +84 -0
84 lines not on this page · raw message
include/media/rc-map.h +1 -0
@@ -271,6 +271,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_KII_PRO "rc-videostrong-kii-pro"#define RC_MAP_WETEK_HUB "rc-wetek-hub"#define RC_MAP_WETEK_PLAY2 "rc-wetek-play2"#define RC_MAP_WINFAST "rc-winfast"
Signature · 1 line
2.24.0
Sean Young
maintainerHi Mohammad,
Quoted 29 lines · Mohammad Rasim
Changes since v1:
- fix styling issuesSigned-off-by Mohammad Rasim <[email protected]>--- drivers/media/rc/keymaps/Makefile | 1 + .../media/rc/keymaps/rc-videostrong-kii-pro.c | 84 +++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 86 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.cdrivers/media/rc/keymaps/Makefile +1
-0@@ -117,6 +117,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-videostrong-kii-pro.o \ rc-wetek-hub.o \ rc-wetek-play2.o \ rc-winfast.o \drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +1
-0@@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0+
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 11
Quoted 10 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+// +// Copyright (C) 2019 Mohammad Rasim <[email protected]> + +#include <media/rc-map.h> +#include <linux/module.h> + +// +// Keytable for the Videostrong KII Pro STB remote control +// +
I assume it's this remote:
https://i1.wp.com/www.eyalo.com/wp-content/uploads/2016/10/KIIPro-items1.jpg
or
Quoted 5 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +5
-0+static struct rc_map_table kii_pro[] = { + {0x59 ,KEY_POWER }, + {0x19 ,KEY_MUTE }, + {0x42 ,KEY_RED }, + {0x40 ,KEY_GREEN },
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 26
Quoted 10 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+ { 0x00, KEY_YELLOW }, + { 0x03, KEY_BLUE }, + { 0x4a, KEY_BACK }, + { 0x48, KEY_FORWARD }, + { 0x08, KEY_PREVIOUSSONG}, + { 0x0b, KEY_NEXTSONG}, + { 0x46, KEY_PLAYPAUSE }, + { 0x44, KEY_STOP }, + { 0x1f, KEY_FAVORITES}, //KEY_F5? + { 0x04, KEY_RECORD},
KEY_PVR?
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 32
Quoted 6 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +6
-0+ { 0x4d, KEY_EPG}, + { 0x02, KEY_INFO}, + { 0x09, KEY_SUBTITLE}, + { 0x01, KEY_AUDIO}, + { 0x0d, KEY_HOMEPAGE}, + { 0x11, KEY_G}, // DTV ?
KEY_TV?
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 42
Quoted 10 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+ { 0x06, KEY_UP}, + { 0x5a, KEY_LEFT}, + { 0x1a, KEY_ENTER}, // KEY_OK ? + { 0x1b, KEY_RIGHT}, + { 0x16, KEY_DOWN}, + { 0x45, KEY_MENU}, + { 0x05, KEY_ESC}, + { 0x13, KEY_VOLUMEUP }, + { 0x17, KEY_VOLUMEDOWN }, + { 0x58, KEY_F6},
KEY_APPSELECT?
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 43
Quoted 1 line
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +1
-0+ { 0x12, KEY_KATAKANA}, // mouse
I realise mouse doesn't have a good mapping. However katakana, the Japanese script, seems a little odd.
Quoted 5 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +5
-0+ { 0x55, KEY_PAGEUP}, // KEY_CHANNELUP ? + { 0x15, KEY_PAGEDOWN}, //KEY_CHANNELDOWN ? + { 0x52, KEY_1}, + { 0x50, KEY_2}, + { 0x10, KEY_3},
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 58
Quoted 10 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+ { 0x56, KEY_4}, + { 0x54, KEY_5}, + { 0x14, KEY_6}, + { 0x4e, KEY_7}, + { 0x4c, KEY_8}, + { 0x0c, KEY_9}, + { 0x18, KEY_F7}, + { 0x0f, KEY_0}, + { 0x51, KEY_BACKSPACE}, +
Please remove this blank line.
Quoted 40 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +26
-0+}; + +static struct rc_map_list kii_pro_map = { + .map = { + .scan = kii_pro, + .size =ARRAY_SIZE (kii_pro), + .rc_proto =RC_PROTO_NEC , + .name =RC_MAP_KII_PRO , + } +}; + +static int __init init_rc_map_kii_pro (void ) +{ +return rc_map_register (&kii_pro_map); +} + +static void __exit exit_rc_map_kii_pro(void) +{ +rc_map_unregister (&kii_pro_map); +} + +module_init(init_rc_map_kii_pro) +module_exit(exit_rc_map_kii_pro) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR ("Mohammad Rasim <[email protected]>" );include/media/rc-map.h +1
-0@@ -271,6 +271,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_KII_PRO "rc-videostrong-kii-pro"#define RC_MAP_WETEK_HUB "rc-wetek-hub"#define RC_MAP_WETEK_PLAY2 "rc-wetek-play2"#define RC_MAP_WINFAST "rc-winfast"Signature · 1 line
2.24.0
Quoted 45 lines · Sean Young
Hi Mohammad,
Quoted 29 lines · Mohammad Rasim
Changes since v1:
- fix styling issuesSigned-off-by Mohammad Rasim <[email protected]>--- drivers/media/rc/keymaps/Makefile | 1 + .../media/rc/keymaps/rc-videostrong-kii-pro.c | 84 +++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 86 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.cdrivers/media/rc/keymaps/Makefile +1
-0@@ -117,6 +117,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-videostrong-kii-pro.o \ rc-wetek-hub.o \ rc-wetek-play2.o \ rc-winfast.o \drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +1
-0@@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0+ drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 11
Quoted 10 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+// +// Copyright (C) 2019 Mohammad Rasim <[email protected]> + +#include <media/rc-map.h> +#include <linux/module.h> + +// +// Keytable for the Videostrong KII Pro STB remote control +// +I assume it's this remote:
Yes, your assumption is right
The vendor driver uses this file to setup keymaps
https://github.com/OpenVisionE2/amremote/blob/master/k1pro.conf
Quoted 9 lines
Quoted 9 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +9
-0+static struct rc_map_table kii_pro[] = { + {0x59 ,KEY_POWER }, + {0x19 ,KEY_MUTE }, + {0x42 ,KEY_RED }, + {0x40 ,KEY_GREEN }, + {0x00 ,KEY_YELLOW }, + {0x03 ,KEY_BLUE }, + {0x4a ,KEY_BACK }, + {0x48 ,KEY_FORWARD },
Quoted 8 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 26
Quoted 6 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +6
-0+ { 0x08, KEY_PREVIOUSSONG}, + { 0x0b, KEY_NEXTSONG}, + { 0x46, KEY_PLAYPAUSE }, + { 0x44, KEY_STOP }, + { 0x1f, KEY_FAVORITES}, //KEY_F5? + { 0x04, KEY_RECORD},
KEY_PVR?
What's the difference between the two ? on vendor dtv app this button starts recording the current program
Quoted 9 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 32
Quoted 7 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +6
-0+ { 0x4d, KEY_EPG}, + { 0x02, KEY_INFO}, + { 0x09, KEY_SUBTITLE}, + { 0x01, KEY_AUDIO}, + { 0x0d, KEY_HOMEPAGE}, + { 0x11, KEY_G}, // DTV ?
KEY_TV?
Ok, will use this in the next version.
Quoted 13 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 42
Quoted 11 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+ { 0x06, KEY_UP}, + { 0x5a, KEY_LEFT}, + { 0x1a, KEY_ENTER}, // KEY_OK ? + { 0x1b, KEY_RIGHT}, + { 0x16, KEY_DOWN}, + { 0x45, KEY_MENU}, + { 0x05, KEY_ESC}, + { 0x13, KEY_VOLUMEUP }, + { 0x17, KEY_VOLUMEDOWN }, + { 0x58, KEY_F6},
KEY_APPSELECT?
Ok.
Quoted 6 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 43
Quoted 2 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +1
-0+ { 0x12, KEY_KATAKANA}, // mouseI realise mouse doesn't have a good mapping. However katakana, the Japanese script, seems a little odd.
What do you suggest ? I was thinking of using KEY_VENDOR but i don't really know what that code does
Quoted 9 lines
Quoted 9 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +9
-0+ { 0x55, KEY_PAGEUP}, // KEY_CHANNELUP ? + { 0x15, KEY_PAGEDOWN}, //KEY_CHANNELDOWN ? + { 0x52, KEY_1}, + { 0x50, KEY_2}, + { 0x10, KEY_3}, + { 0x56, KEY_4}, + { 0x54, KEY_5}, + { 0x14, KEY_6}, + { 0x4e, KEY_7},
Quoted 8 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 58
Quoted 6 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +6
-0+ { 0x4c, KEY_8}, + { 0x0c, KEY_9}, + { 0x18, KEY_F7}, + { 0x0f, KEY_0}, + { 0x51, KEY_BACKSPACE}, +Please remove this blank line.
Ok
Quoted 41 lines
Quoted 41 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +26
-0+}; + +static struct rc_map_list kii_pro_map = { + .map = { + .scan = kii_pro, + .size =ARRAY_SIZE (kii_pro), + .rc_proto =RC_PROTO_NEC , + .name =RC_MAP_KII_PRO , + } +}; + +static int __init init_rc_map_kii_pro (void ) +{ +return rc_map_register (&kii_pro_map); +} + +static void __exit exit_rc_map_kii_pro(void) +{ +rc_map_unregister (&kii_pro_map); +} + +module_init(init_rc_map_kii_pro) +module_exit(exit_rc_map_kii_pro) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR ("Mohammad Rasim <[email protected]>" );include/media/rc-map.h +1
-1@@ -271,6 +271,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_KII_PRO "rc-videostrong-kii-pro"#define RC_MAP_WETEK_HUB "rc-wetek-hub"#define RC_MAP_WETEK_PLAY2 "rc-wetek-play2"#define RC_MAP_WINFAST "rc-winfast" --2.24.0
Sean Young
maintainerQuoted 74 lines · Mohammad Rasim
Quoted 45 lines · Sean Young
Hi Mohammad,
Quoted 29 lines · Mohammad Rasim
Changes since v1:
- fix styling issuesSigned-off-by Mohammad Rasim <[email protected]>--- drivers/media/rc/keymaps/Makefile | 1 + .../media/rc/keymaps/rc-videostrong-kii-pro.c | 84 +++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 86 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-videostrong-kii-pro.cdrivers/media/rc/keymaps/Makefile +1
-0@@ -117,6 +117,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-videostrong-kii-pro.o \ rc-wetek-hub.o \ rc-wetek-play2.o \ rc-winfast.o \drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +1
-0@@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0+ drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 11
Quoted 10 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+// +// Copyright (C) 2019 Mohammad Rasim <[email protected]> + +#include <media/rc-map.h> +#include <linux/module.h> + +// +// Keytable for the Videostrong KII Pro STB remote control +// +I assume it's this remote:
Yes, your assumption is right
The vendor driver uses this file to setup keymaps
https://github.com/OpenVisionE2/amremote/blob/master/k1pro.confQuoted 9 lines
Quoted 9 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +9
-0+static struct rc_map_table kii_pro[] = { + {0x59 ,KEY_POWER }, + {0x19 ,KEY_MUTE }, + {0x42 ,KEY_RED }, + {0x40 ,KEY_GREEN }, + {0x00 ,KEY_YELLOW }, + {0x03 ,KEY_BLUE }, + {0x4a ,KEY_BACK }, + {0x48 ,KEY_FORWARD },Quoted 8 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 26
Quoted 6 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +6
-0+ { 0x08, KEY_PREVIOUSSONG}, + { 0x0b, KEY_NEXTSONG}, + { 0x46, KEY_PLAYPAUSE }, + { 0x44, KEY_STOP }, + { 0x1f, KEY_FAVORITES}, //KEY_F5? + { 0x04, KEY_RECORD},
KEY_PVR?
Quoted 2 lines
What's the difference between the two ? on vendor dtv app this button starts recording the current program
A PVR is a personal video recorder. When pressing the button you expect the PVR app to open or start recording. The remote does say PVR.
Quoted 25 lines
Quoted 9 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 32
Quoted 7 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +6
-0+ { 0x4d, KEY_EPG}, + { 0x02, KEY_INFO}, + { 0x09, KEY_SUBTITLE}, + { 0x01, KEY_AUDIO}, + { 0x0d, KEY_HOMEPAGE}, + { 0x11, KEY_G}, // DTV ?
KEY_TV?Ok, will use this in the next version.
Quoted 13 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 42
Quoted 11 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +10
-0+ { 0x06, KEY_UP}, + { 0x5a, KEY_LEFT}, + { 0x1a, KEY_ENTER}, // KEY_OK ? + { 0x1b, KEY_RIGHT}, + { 0x16, KEY_DOWN}, + { 0x45, KEY_MENU}, + { 0x05, KEY_ESC}, + { 0x13, KEY_VOLUMEUP }, + { 0x17, KEY_VOLUMEDOWN }, + { 0x58, KEY_F6},
KEY_APPSELECT?Ok.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 43
Quoted 1 line
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +1
-0+ { 0x12, KEY_KATAKANA}, // mouseI realise mouse doesn't have a good mapping. However katakana, the Japanese script, seems a little odd.
What do you suggest ? I was thinking of using
KEY_VENDORbut i don't really know what that code does
KEY_VENDOR is for a vendor-specific key. Since this button doesn't have a good mapping, KEY_VENDOR is fine. Keep the comment though, so it can be updated once there is a good mapping for the mouse key.
Quoted 51 lines
Quoted 9 lines
Quoted 9 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +9
-0+ { 0x55, KEY_PAGEUP}, // KEY_CHANNELUP ? + { 0x15, KEY_PAGEDOWN}, //KEY_CHANNELDOWN ? + { 0x52, KEY_1}, + { 0x50, KEY_2}, + { 0x10, KEY_3}, + { 0x56, KEY_4}, + { 0x54, KEY_5}, + { 0x14, KEY_6}, + { 0x4e, KEY_7},Quoted 8 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c line 58
Quoted 6 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +6
-0+ { 0x4c, KEY_8}, + { 0x0c, KEY_9}, + { 0x18, KEY_F7}, + { 0x0f, KEY_0}, + { 0x51, KEY_BACKSPACE}, +Please remove this blank line.
Ok
Quoted 33 lines
Quoted 33 lines
drivers/media/rc/keymaps/rc-videostrong-kii-pro.c new file +26
-0+}; + +static struct rc_map_list kii_pro_map = { + .map = { + .scan = kii_pro, + .size =ARRAY_SIZE (kii_pro), + .rc_proto =RC_PROTO_NEC , + .name =RC_MAP_KII_PRO , + } +}; + +static int __init init_rc_map_kii_pro (void ) +{ +return rc_map_register (&kii_pro_map); +} + +static void __exit exit_rc_map_kii_pro(void) +{ +rc_map_unregister (&kii_pro_map); +} + +module_init(init_rc_map_kii_pro) +module_exit(exit_rc_map_kii_pro) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR ("Mohammad Rasim <[email protected]>" );include/media/rc-map.h +0
-0@@ -271,6 +271,7 @@ struct rc_map *rc_map_get(const char *name);#define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100"
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
include/media/rc-map.h +1
-1#define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350"#define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" +#define RC_MAP_KII_PRO "rc-videostrong-kii-pro"#define RC_MAP_WETEK_HUB "rc-wetek-hub"#define RC_MAP_WETEK_PLAY2 "rc-wetek-play2"#define RC_MAP_WINFAST "rc-winfast" --2.24.0
Thanks
Sean