Skip to contentSkip to conversation

ir-ctl/keytable: add see also to reference to man pages

PATCH New Sean Young 1 participant 2 messages Feb 19, 2019 Media (V4L/DVB)

lore
Share & tools
lore

Sean Young

author
#0 lore raw

PATCH 1/2 ir-ctl/keytable: add see also to reference to man pages

Add hint to how you can start to figure out what protocol a remote uses.

---
 utils/ir-ctl/ir-ctl.1.in        | 3 +++
 utils/keytable/ir-keytable.1.in | 9 +++++++++
 2 files changed, 12 insertions(+)
utils/ir-ctl/ir-ctl.1.in +3 -0
index 226bf606..f6192dab 100644
@@ -233,3 +233,6 @@ License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
+.SH SEE ALSO
+To display decoded IR, or set IR decoding options, use
+ir\-keytable(1).
utils/keytable/ir-keytable.1.in +9 -0
index c8ff722e..e7fd7760 100644
@@ -118,6 +118,13 @@ To read the current keytable, on the second remote controller:
 To enable NEC protocol and load a BPF protocol, with a parameter for the BPF protocol:
 .br
 	\fBir\-keytable \-p nec,pulse_distance \-e pulse_header=9000
+.PP
+If you do not know what protocol a remote uses, it can be helpful to first
+try with all kernel decoders enabled. The decoded protocol and scancodes
+will be displayed in the output:
+.br
+	\fBir\-keytable \-c \-p all \-t\fR
+
 .SH BUGS
 Report bugs to \fBLinux Media Mailing List <[email protected]>\fR
 .SH COPYRIGHT
@@ -127,3 +134,5 @@ License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
+.SH SEE ALSO
+To transmit IR or receive raw IR, use ir\-ctl(1).
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH 2/2 rc-mm protocol support

---
 utils/common/ir-encode.c  | 3 +++
 utils/keytable/keytable.c | 2 ++
 2 files changed, 5 insertions(+)
utils/common/ir-encode.c +3 -0
index ccc75032..4bd1b694 100644
@@ -372,6 +372,9 @@ static const struct {
 	[RC_PROTO_XMP] = { "xmp" },
 	[RC_PROTO_CEC] = { "cec" },
 	[RC_PROTO_IMON] = { "imon", 0x7fffffff },
+	[RC_PROTO_RCMM12] = { "rc-mm-12", 0x0fff },
+	[RC_PROTO_RCMM24] = { "rc-mm-24", 0xffffff },
+	[RC_PROTO_RCMM32] = { "rc-mm-32", 0xffffffff },
 };
 
 static bool str_like(const char *a, const char *b)
utils/keytable/keytable.c +2 -0
index 0aceb015..0726e5fd 100644
@@ -127,6 +127,7 @@ enum sysfs_protocols {
 	SYSFS_XMP		= (1 << 12),
 	SYSFS_CEC		= (1 << 13),
 	SYSFS_IMON		= (1 << 14),
+	SYSFS_RCMM		= (1 << 15),
 	SYSFS_INVALID		= 0,
 };
 
@@ -161,6 +162,7 @@ const struct protocol_map_entry protocol_map[] = {
 	{ "xmp",	"/xmp_decoder",	SYSFS_XMP	},
 	{ "cec",	NULL,		SYSFS_CEC	},
 	{ "imon",	NULL,		SYSFS_IMON	},
+	{ "rc-mm",	NULL,		SYSFS_RCMM	},
 	{ NULL,		NULL,		SYSFS_INVALID	},
 };
 
Signature · 1 line
2.20.1