summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-09-29 20:26:20 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-09-29 20:26:20 +0000
commitb48bc5877932642065cb06934a12e1cdf6f83ce9 (patch)
tree962504011f00156497f53c9260625191ae10e620 /v4l
parentf91f39fbb971167dc49830d38810607736ab1b18 (diff)
downloadmediapointer-dvb-s2-b48bc5877932642065cb06934a12e1cdf6f83ce9.tar.gz
mediapointer-dvb-s2-b48bc5877932642065cb06934a12e1cdf6f83ce9.tar.bz2
- Updated an entry to reflect changes on tuner-simple.c
- Added PCI subvendor ID to bttv boards Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'v4l')
-rw-r--r--v4l/ChangeLog16
-rw-r--r--v4l/scripts/bttv.pl51
-rw-r--r--v4l/scripts/cardlist12
3 files changed, 70 insertions, 9 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index ffc364768..ad9521e54 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,19 @@
+2005-09-29 20:23 mchehab
+
+ * doc/CARDLIST.tuner:
+ - Updated an entry to reflect changes on tuner-simple.c
+
+ * doc/CARDLIST.bttv:
+ - Added PCI subvendor ID to boards that have it
+
+ * scripts/bttv.pl:
+ - New script to generate PCI subvendor ID
+
+ * scripts/cardlist:
+ - Modified to generate also PCI ID for bttv boards.
+
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-09-29 19:45 mchehab
* bttv-cards.c: (identify_by_eeprom), (miro_pinnacle_gpio),
(bttv_init_card1), (bttv_init_card2), (osprey_eeprom),
diff --git a/v4l/scripts/bttv.pl b/v4l/scripts/bttv.pl
new file mode 100644
index 000000000..d42239346
--- /dev/null
+++ b/v4l/scripts/bttv.pl
@@ -0,0 +1,51 @@
+#!/usr/bin/perl -w
+use strict;
+
+my $new_entry = -1;
+my $nr = 0;
+my ($id,$subvendor,$subdevice);
+my %data;
+my $pciid=0;
+
+while (<>) {
+ # defines in header file
+ if (/#define\s+(BTTV_BOARD_\w+)\s+0x([0-9a-fA-F]*).*/) {
+ $data{$1}->{nr} = hex $2;
+
+ next;
+ }
+ # cx88_boards
+ if (/\[(BTTV_BOARD_\w+)\]/) {
+ $id = $1;
+ $data{$id}->{id} = $id;
+# $data{$id}->{nr} = $nr++;
+ };
+ if (/0x([0-9]...)([0-9]...)/) {
+ $subvendor = $2;
+ $subdevice = $1;
+ if (/(BTTV_BOARD_\w+)/) {
+ push @{$data{$1}->{subid}}, "$subvendor:$subdevice";
+ undef $subvendor;
+ undef $subdevice;
+ }
+ }
+
+ next unless defined($id);
+
+ if (!defined($data{$id}) || !defined($data{$id}->{name})) {
+ $data{$id}->{name} = $1 if (/\.name\s*=\s*\"([^\"]+)\"/);
+ }
+
+ if (/0x([0-9]...)([0-9]...)/) {
+ $subvendor = $1;
+ $subdevice = $2;
+ }
+
+}
+
+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";
+}
diff --git a/v4l/scripts/cardlist b/v4l/scripts/cardlist
index 33d6ad99e..24a3072bf 100644
--- a/v4l/scripts/cardlist
+++ b/v4l/scripts/cardlist
@@ -1,14 +1,9 @@
#!/bin/sh
-cat bttv-cards.c \
- | grep "\.name.*=" \
- | perl -ne '/"([^"]+)"/; printf("card=%d - %s\n",$i++,$1)' \
- | perl -ne 's/[ \t]+$//; print' > doc/CARDLIST.bttv
-LINE="`grep -n "gdi_tuner\[\]" cx88-cards.c|cut -f1 -d:`"
+scripts/bttv.pl bttv.h bttv-cards.c \
+ | perl -ne 's/[ \t]+$//; print' > doc/CARDLIST.bttv
-head -$LINE cx88-cards.c \
- | grep "\.name.*=" \
- | perl -ne '/"([^"]+)"/; printf("card=%d - %s\n",$i++,$1)' \
+scripts/cx88.pl cx88.h cx88-cards.c \
| perl -ne 's/[ \t]+$//; print' > doc/CARDLIST.cx88
cat tuner-simple.c \
@@ -19,4 +14,3 @@ cat tuner-simple.c \
scripts/saa7134.pl saa7134.h saa7134-cards.c \
| perl -ne 's/[ \t]+$//; print' > doc/CARDLIST.saa7134
-