diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-06 15:28:53 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-06 15:28:53 +0000 |
commit | dd95dd37f98ff4756ad1fcd1d2e66649c1853dff (patch) | |
tree | 366c67278c05c56b4a121c62b74d7abe544a5063 /v4l/scripts/em2820.pl | |
parent | 9291ddf268b831d712b49a928a5526037f274aef (diff) | |
download | mediapointer-dvb-s2-dd95dd37f98ff4756ad1fcd1d2e66649c1853dff.tar.gz mediapointer-dvb-s2-dd95dd37f98ff4756ad1fcd1d2e66649c1853dff.tar.bz2 |
- Added scripts and CARDLIST for em2820.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'v4l/scripts/em2820.pl')
-rw-r--r-- | v4l/scripts/em2820.pl | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/v4l/scripts/em2820.pl b/v4l/scripts/em2820.pl new file mode 100644 index 000000000..ba498f0fd --- /dev/null +++ b/v4l/scripts/em2820.pl @@ -0,0 +1,47 @@ +#!/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; +# } + # em2820_boards + if (/\[(EM2820_BOARD_\w+)\]/) { + $id = $1; + $data{$id}->{id} = $id; + $data{$id}->{nr} = $nr++; + }; + +# { USB_DEVICE(0x0ccd, 0x0036), .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, + + 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 (!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 -> %-51s", $data{$item}->{nr}, $data{$item}->{name}); + printf(" [%s]",join(",",@{$data{$item}->{subid}})) + if defined($data{$item}->{subid}); + print "\n"; +} |