@@ -375,6 +375,7 @@ static const struct {
[RC_PROTO_RCMM12] = { "rc-mm-12", 0x0fff },
[RC_PROTO_RCMM24] = { "rc-mm-24", 0xffffff },
[RC_PROTO_RCMM32] = { "rc-mm-32", 0xffffffff },
+ [RC_PROTO_XBOX_DVD] = { "xbox-dvd", 0xfff },
};
static bool str_like(const char *a, const char *b)
@@ -10,7 +10,7 @@ CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - </dev/null 2>&1 \
%.o: %.c bpf_helpers.h
$(CLANG) $(CLANG_SYS_INCLUDES) -D__linux__ -I$(top_srcdir)/include -target bpf -O2 -c $<
-PROTOCOLS = grundig.o pulse_distance.o pulse_length.o rc_mm.o manchester.o xbox.o imon_rsc.o
+PROTOCOLS = grundig.o pulse_distance.o pulse_length.o rc_mm.o manchester.o xbox-dvd.o imon_rsc.o
all: $(PROTOCOLS)
similarity index 99%
rename from utils/keytable/bpf_protocols/xbox.c
rename to utils/keytable/bpf_protocols/xbox-dvd.c
@@ -51,7 +51,7 @@ static inline int eq_margin(unsigned d1, unsigned d2)
return ((d1 > (d2 - BPF_PARAM(margin))) && (d1 < (d2 + BPF_PARAM(margin))));
}
-SEC("xbox")
+SEC("xbox-dvd")
int bpf_decoder(unsigned int *sample)
{
unsigned int key = 0;
@@ -128,6 +128,7 @@ enum sysfs_protocols {
SYSFS_CEC = (1 << 13),
SYSFS_IMON = (1 << 14),
SYSFS_RCMM = (1 << 15),
+ SYSFS_XBOX_DVD = (1 << 16),
SYSFS_INVALID = 0,
};
@@ -163,6 +164,7 @@ const struct protocol_map_entry protocol_map[] = {
{ "cec", NULL, SYSFS_CEC },
{ "imon", NULL, SYSFS_IMON },
{ "rc-mm", NULL, SYSFS_RCMM },
+ { "xbox-dvd", NULL, SYSFS_XBOX_DVD },
{ NULL, NULL, SYSFS_INVALID },
};
@@ -1621,7 +1623,7 @@ static void print_scancodes(const struct lirc_scancode *scancodes, unsigned coun
{
unsigned i;
- for (i=0; i< count; i++) {
+ for (i = 0; i < count; i++) {
const char *p = protocol_name(scancodes[i].rc_proto);
printf(_("%llu.%06llu: "),
@@ -1,6 +1,6 @@
[[protocols]]
-name = "XBox DVD"
-protocol = "xbox"
+name = "xbox_dvd"
+protocol = "xbox_dvd"
[protocols.scancodes]
0xa0b = "KEY_OK"
0xaa6 = "KEY_UP"
deleted file mode 100644
@@ -1,31 +0,0 @@
-[[protocols]]
-name = "XBox DVD"
-protocol = "xbox"
-[protocols.scancodes]
-0xa0b = "KEY_OK"
-0xaa6 = "KEY_UP"
-0xaa7 = "KEY_DOWN"
-0xaa8 = "KEY_RIGHT"
-0xaa9 = "KEY_LEFT"
-0xac3 = "KEY_INFO"
-0xac6 = "KEY_9"
-0xac7 = "KEY_8"
-0xac8 = "KEY_7"
-0xac9 = "KEY_6"
-0xaca = "KEY_5"
-0xacb = "KEY_4"
-0xacc = "KEY_3"
-0xacd = "KEY_2"
-0xace = "KEY_1"
-0xacf = "KEY_0"
-0xad5 = "KEY_ANGLE"
-0xad8 = "KEY_BACK"
-0xadd = "KEY_PREVIOUSSONG"
-0xadf = "KEY_NEXTSONG"
-0xae0 = "KEY_STOP"
-0xae2 = "KEY_REWIND"
-0xae3 = "KEY_FASTFORWARD"
-0xae5 = "KEY_TITLE"
-0xae6 = "KEY_PAUSE"
-0xaea = "KEY_PLAY"
-0xaf7 = "KEY_MENU"
Rename the bpf protocol to match. Now we can use the generated keymap for the XBox DVD remote. Signed-off-by: Sean Young <sean@mess.org> --- utils/common/ir-encode.c | 1 + utils/keytable/bpf_protocols/Makefile.am | 2 +- .../bpf_protocols/{xbox.c => xbox-dvd.c} | 2 +- utils/keytable/keytable.c | 4 ++- utils/keytable/rc_keymaps/xbox_dvd.toml | 4 +-- .../rc_keymaps_userspace/xbox_dvd.toml | 31 ------------------- 6 files changed, 8 insertions(+), 36 deletions(-) rename utils/keytable/bpf_protocols/{xbox.c => xbox-dvd.c} (99%) delete mode 100644 utils/keytable/rc_keymaps_userspace/xbox_dvd.toml