Skip to content

Commit e31604d

Browse files
nprothHans Verkuil
authored andcommitted
media: rc: add keymap for MyGica UTV3 remote
Add keymap for the simple IR (RC-5) remote that comes with the MyGica UTV3 Analog USB2.0 TV Box video capture card. Signed-off-by: Nils Rothaug <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 32c1935 commit e31604d

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

drivers/media/rc/keymaps/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ obj-$(CONFIG_RC_MAP) += \
8484
rc-msi-digivox-ii.o \
8585
rc-msi-tvanywhere.o \
8686
rc-msi-tvanywhere-plus.o \
87+
rc-mygica-utv3.o \
8788
rc-nebula.o \
8889
rc-nec-terratec-cinergy-xs.o \
8990
rc-norwood.o \
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/* rc-mygica-utv3.c - Keytable for the MyGica UTV3 Analog USB2.0 TV Box
3+
*
4+
* Copyright (c) 2024 by Nils Rothaug
5+
*/
6+
7+
#include <media/rc-map.h>
8+
#include <linux/module.h>
9+
10+
static struct rc_map_table mygica_utv3[] = {
11+
{ 0x0d, KEY_MUTE },
12+
{ 0x38, KEY_VIDEO }, /* Source */
13+
{ 0x14, KEY_RADIO }, /* FM Radio */
14+
{ 0x0c, KEY_POWER2 },
15+
16+
{ 0x01, KEY_NUMERIC_1},
17+
{ 0x02, KEY_NUMERIC_2},
18+
{ 0x03, KEY_NUMERIC_3},
19+
{ 0x04, KEY_NUMERIC_4},
20+
{ 0x05, KEY_NUMERIC_5},
21+
{ 0x06, KEY_NUMERIC_6},
22+
{ 0x07, KEY_NUMERIC_7},
23+
{ 0x08, KEY_NUMERIC_8},
24+
{ 0x09, KEY_NUMERIC_9},
25+
{ 0x00, KEY_NUMERIC_0},
26+
27+
{ 0x0a, KEY_DIGITS }, /* Single/double/triple digit */
28+
{ 0x0e, KEY_CAMERA }, /* Snapshot */
29+
{ 0x0f, KEY_ZOOM }, /* Full Screen */
30+
{ 0x29, KEY_LAST }, /* Recall (return to previous channel) */
31+
32+
{ 0x17, KEY_PLAY },
33+
{ 0x1f, KEY_RECORD },
34+
{ 0x0b, KEY_STOP },
35+
{ 0x16, KEY_PAUSE },
36+
37+
{ 0x20, KEY_CHANNELUP },
38+
{ 0x21, KEY_CHANNELDOWN },
39+
{ 0x10, KEY_VOLUMEUP },
40+
{ 0x11, KEY_VOLUMEDOWN },
41+
{ 0x26, KEY_REWIND },
42+
{ 0x27, KEY_FASTFORWARD },
43+
};
44+
45+
static struct rc_map_list mygica_utv3_map = {
46+
.map = {
47+
.scan = mygica_utv3,
48+
.size = ARRAY_SIZE(mygica_utv3),
49+
.rc_proto = RC_PROTO_RC5,
50+
.name = RC_MAP_MYGICA_UTV3,
51+
}
52+
};
53+
54+
static int __init init_rc_map_mygica_utv3(void)
55+
{
56+
return rc_map_register(&mygica_utv3_map);
57+
}
58+
59+
static void __exit exit_rc_map_mygica_utv3(void)
60+
{
61+
rc_map_unregister(&mygica_utv3_map);
62+
}
63+
64+
module_init(init_rc_map_mygica_utv3)
65+
module_exit(exit_rc_map_mygica_utv3)
66+
67+
MODULE_LICENSE("GPL");
68+
MODULE_AUTHOR("Nils Rothaug");
69+
MODULE_DESCRIPTION("MyGica UTV3 Analog USB2.0 TV Box remote keytable");

include/media/rc-map.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ struct rc_map *rc_map_get(const char *name);
290290
#define RC_MAP_MSI_DIGIVOX_III "rc-msi-digivox-iii"
291291
#define RC_MAP_MSI_TVANYWHERE "rc-msi-tvanywhere"
292292
#define RC_MAP_MSI_TVANYWHERE_PLUS "rc-msi-tvanywhere-plus"
293+
#define RC_MAP_MYGICA_UTV3 "rc-mygica-utv3"
293294
#define RC_MAP_NEBULA "rc-nebula"
294295
#define RC_MAP_NEC_TERRATEC_CINERGY_XS "rc-nec-terratec-cinergy-xs"
295296
#define RC_MAP_NORWOOD "rc-norwood"

0 commit comments

Comments
 (0)