diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-28 21:08:17 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-28 21:08:17 +0000 |
commit | fa411c56aae7a6ea6221e70dbda1be89ab919d32 (patch) | |
tree | 39e21932c41da4d9db068197f45b0fe69dd45637 /v4l | |
parent | d97761fd746e75acb55fae2af528ea2dc7e87999 (diff) | |
download | mediapointer-dvb-s2-fa411c56aae7a6ea6221e70dbda1be89ab919d32.tar.gz mediapointer-dvb-s2-fa411c56aae7a6ea6221e70dbda1be89ab919d32.tar.bz2 |
- Including script with the newer name.
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/scripts/em28xx.pl | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/v4l/scripts/em28xx.pl b/v4l/scripts/em28xx.pl new file mode 100644 index 000000000..278dfc214 --- /dev/null +++ b/v4l/scripts/em28xx.pl @@ -0,0 +1,62 @@ +#!/usr/bin/perl -w +use strict; + +my $new_entry = -1; +my $nr = 0; +my ($id,$subvendor,$subdevice); +my %data; + +while (<>) { + # defines in header file + if (/#define\s+(EM2820_BOARD_\w+)\s+(\d+)/) { + $data{$1}->{nr} = $2; + next; + } + if (/#define\s+(EM2800_BOARD_\w+)\s+(\d+)/) { + $data{$1}->{nr} = $2; + next; + } + # em2820_boards + if (/\[(EM2820_BOARD_\w+)\]/) { + $id = $1; + $data{$id}->{id} = $id; + $data{$id}->{type} = "(em2820/em2840)"; +# $data{$id}->{nr} = $nr++; + }; + if (/\[(EM2800_BOARD_\w+)\]/) { + $id = $1; + $data{$id}->{id} = $id; + $data{$id}->{type} = "(em2800)"; +# $data{$id}->{nr} = $nr++; + }; + + next unless defined($id); + + if (/USB_DEVICE.*0x([0-9a-fA-F]*).*0x([0-9a-fA-F]*).*driver_info.*(EM2820_BOARD_\w+)/ ) { + $subvendor=$1; + $subdevice=$2; + push @{$data{$3}->{subid}}, "$subvendor:$subdevice"; + } + + if (/USB_DEVICE.*0x([0-9a-fA-F]*).*0x([0-9a-fA-F]*).*driver_info.*(EM2800_BOARD_\w+)/ ) { + $subvendor=$1; + $subdevice=$2; + push @{$data{$3}->{subid}}, "$subvendor:$subdevice"; + } + + + if (!defined($data{$id}) || !defined($data{$id}->{name})) { + $data{$id}->{name} = $1 if (/\.name\s*=\s*\"([^\"]+)\"/); + } + + # em2820_USB_tbl + + +} + +foreach my $item (sort { $data{$a}->{nr} <=> $data{$b}->{nr} } keys %data) { + printf("%3d -> %-40s %-15s", $data{$item}->{nr}, $data{$item}->{name},$data{$item}->{type}); + printf(" [%s]",join(",",@{$data{$item}->{subid}})) + if defined($data{$item}->{subid}); + print "\n"; +} |