diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-03-31 21:27:41 -0400 |
---|---|---|
committer | Steven Toth <stoth@hauppauge.com> | 2008-03-31 21:27:41 -0400 |
commit | fb07179eec70f621e5b43d6235f166b3fa081621 (patch) | |
tree | d140d827a9a2f826674506bd3106d1ec2f1fa255 /v4l | |
parent | 4c0cab7cc8debfe1d245a47baa775aa190409082 (diff) | |
download | mediapointer-dvb-s2-fb07179eec70f621e5b43d6235f166b3fa081621.tar.gz mediapointer-dvb-s2-fb07179eec70f621e5b43d6235f166b3fa081621.tar.bz2 |
Scripts to maintain the CARDLIST file.
From: Steven Toth <stoth@hauppauge.com>
Scripts to maintain the CARDLIST file.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/scripts/au0828.pl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/v4l/scripts/au0828.pl b/v4l/scripts/au0828.pl new file mode 100644 index 000000000..822a54afb --- /dev/null +++ b/v4l/scripts/au0828.pl @@ -0,0 +1,48 @@ +#!/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+(AU08[\d]._BOARD_\w+)\s+(\d+)/) { + $data{$1}->{nr} = $2; + next; + } + # au0828_boards + if (/\[(AU0828_BOARD_\w+)\]/) { + $id = $1; + $data{$id}->{id} = $id; + $data{$id}->{type} = "(au0828)"; +# $data{$id}->{nr} = $nr++; + }; + + next unless defined($id); + + if (/USB_DEVICE.*0x([0-9a-fA-F]*).*0x([0-9a-fA-F]*)/ ) { + $subvendor=$1; + $subdevice=$2; + } + + if (/.*driver_info.*(AU08[\d]._BOARD_\w+)/ ) { + push @{$data{$1}->{subid}}, "$subvendor:$subdevice"; + } + + if (!defined($data{$id}) || !defined($data{$id}->{name})) { + $data{$id}->{name} = $1 if (/\.name\s*=\s*\"([^\"]+)\"/); + } + + # au0828_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"; +} |