summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-08-29 15:14:22 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-08-29 15:14:22 -0300
commit877785ea4eb2b8cd7adbb1c7dc074aef1ed57f00 (patch)
tree664cbb00ef70d2b14d6c6bc9261ab2e1f371c753
parent64cff4f7b669a14d338b176254dd0f7eaedf396e (diff)
downloadmediapointer-dvb-s2-877785ea4eb2b8cd7adbb1c7dc074aef1ed57f00.tar.gz
mediapointer-dvb-s2-877785ea4eb2b8cd7adbb1c7dc074aef1ed57f00.tar.bz2
gen_keytables: generate also dvb-usb.h based keybables
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--v4l2-apps/util/Makefile26
-rwxr-xr-xv4l2-apps/util/gen_keytables.pl6
2 files changed, 27 insertions, 5 deletions
diff --git a/v4l2-apps/util/Makefile b/v4l2-apps/util/Makefile
index 6f9d1071a..29f3f4852 100644
--- a/v4l2-apps/util/Makefile
+++ b/v4l2-apps/util/Makefile
@@ -1,5 +1,26 @@
# Makefile for linuxtv.org v4l2-apps/util
+IR_FILES = "linux/drivers/media/common/ir-keymaps.c \
+linux/drivers/media/dvb/dvb-usb/a800.c \
+linux/drivers/media/dvb/dvb-usb/af9005-remote.c \
+linux/drivers/media/dvb/dvb-usb/af9015.c \
+linux/drivers/media/dvb/dvb-usb/af9015.h \
+linux/drivers/media/dvb/dvb-usb/anysee.c \
+linux/drivers/media/dvb/dvb-usb/cinergyT2-core.c \
+linux/drivers/media/dvb/dvb-usb/cxusb.c \
+linux/drivers/media/dvb/dvb-usb/dib0700_devices.c \
+linux/drivers/media/dvb/dvb-usb/dibusb-common.c \
+linux/drivers/media/dvb/dvb-usb/digitv.c \
+linux/drivers/media/dvb/dvb-usb/dtt200u.c \
+linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c \
+linux/drivers/media/dvb/dvb-usb/dvb-usb.h \
+linux/drivers/media/dvb/dvb-usb/dw2102.c \
+linux/drivers/media/dvb/dvb-usb/m920x.c \
+linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c \
+linux/drivers/media/dvb/dvb-usb/opera1.c \
+linux/drivers/media/dvb/dvb-usb/vp702x.c \
+linux/drivers/media/dvb/dvb-usb/vp7045.c "
+
ifeq ($(KERNEL_DIR),)
KERNEL_DIR = /usr
endif
@@ -62,8 +83,9 @@ parse.h: $(KERNEL_DIR)/include/linux/input.h
@printf "\t{ NULL, 0}\n};\n" >>parse.h
keytables:
- -mkdir -p keycodes
- ./gen_keytables.pl ../../linux/drivers/media/common/ir-keymaps.c
+ @-mkdir -p keycodes
+ @echo storing existing keycodes at keycodes/
+ @for i in `echo $(IR_FILES)`; do ./gen_keytables.pl ../../$$i; done
keytable: keytable.c parse.h keytables
diff --git a/v4l2-apps/util/gen_keytables.pl b/v4l2-apps/util/gen_keytables.pl
index 5c569f559..5a5398017 100755
--- a/v4l2-apps/util/gen_keytables.pl
+++ b/v4l2-apps/util/gen_keytables.pl
@@ -5,8 +5,8 @@ my $keyname="";
my $debug=0;
while (<>) {
- if (m/struct\s+ir_scancode\s+(\w[\w\d_]+)/) {
- $keyname = $1;
+ if (m/struct\s+(dvb_usb_rc_key|ir_scancode)\s+(\w[\w\d_]+)/) {
+ $keyname = $2;
$keyname =~ s/^ir_codes_//;
print "Generating keycodes/$keyname\n" if $debug;
@@ -14,7 +14,7 @@ while (<>) {
next;
}
if ($keyname ne "") {
- if (m/(0x[\d\w]+).*(KEY_[^\s\,]+)/) {
+ if (m/(0x[\dA-Fa-f]+).*(KEY_[^\s\,]+)/) {
printf OUT "%s %s\n",$1, $2;
next;
}