From 8ed9b0a29d5966db959676d8522476fbb5baae92 Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Sat, 9 May 2009 20:17:28 -0400 Subject: SAA7164: Add support for the NXP SAA7164 silicon From: Steven Toth This patch adds support for all of the known shipping Hauppauge HVR-2200 and HVR-2250 boards. Digital TV ATSC/QAM and DVB-T is enabled at this time. Both tuners are supported. Volatiles and typedefs need rework, the rest is coding style compliant. Priority: normal Signed-off-by: Steven Toth --- v4l/scripts/cardlist | 3 +++ v4l/scripts/fix_dvb_customise.pl | 3 ++- v4l/scripts/saa7164.pl | 57 ++++++++++++++++++++++++++++++++++++++++ v4l/versions.txt | 1 + 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 v4l/scripts/saa7164.pl (limited to 'v4l') diff --git a/v4l/scripts/cardlist b/v4l/scripts/cardlist index 7c903539c..ebf372610 100755 --- a/v4l/scripts/cardlist +++ b/v4l/scripts/cardlist @@ -23,3 +23,6 @@ scripts/cx23885.pl ../linux/drivers/media/video/cx23885/cx23885.h ../linux/drive scripts/au0828.pl ../linux/drivers/media/video/au0828/au0828-cards.h ../linux/drivers/media/video/au0828/au0828-cards.c \ | perl -ne 's/[ \t]+$//; print' > ../linux/Documentation/video4linux/CARDLIST.au0828 + +scripts/saa7164.pl ../linux/drivers/media/video/saa7164/saa7164.h ../linux/drivers/media/video/saa7164/saa7164-cards.c \ + | perl -ne 's/[ \t]+$//; print' > ../linux/Documentation/video4linux/CARDLIST.saa7164 diff --git a/v4l/scripts/fix_dvb_customise.pl b/v4l/scripts/fix_dvb_customise.pl index 86a6bcf8c..04aa1350c 100755 --- a/v4l/scripts/fix_dvb_customise.pl +++ b/v4l/scripts/fix_dvb_customise.pl @@ -182,7 +182,8 @@ sub found_ref($$) my $ref = $driver_config{$n}; printf "$ref needs %s\n", $header if ($debug); - if ($ref =~ m/(PVRUSB2|CX23885|CX88|EM28XX|SAA3134)/) { + if ($ref =~ m/(PVRUSB2|CX23885|CX88|EM28XX|SAA3134 + |SAA7164)/) { $ref .="_DVB"; } diff --git a/v4l/scripts/saa7164.pl b/v4l/scripts/saa7164.pl new file mode 100644 index 000000000..95c5eb579 --- /dev/null +++ b/v4l/scripts/saa7164.pl @@ -0,0 +1,57 @@ +#!/usr/bin/perl -w +use strict; + +my %map = ( + "PCI_ANY_ID" => "0", +); + +sub fix_id($) { + my $id = shift; + $id = $map{$id} if defined($map{$id}); + $id =~ s/^0x//; + return $id; +} + +my $new_entry = -1; +my $nr = 0; +my ($id,$subvendor,$subdevice); +my %data; + +while (<>) { + # defines in header file + if (/#define\s+(SAA7164_BOARD_\w+)\s+(\d+)/) { + $data{$1}->{nr} = $2; + next; + } + # saa7164_boards + if (/\[(SAA7164_BOARD_\w+)\]/) { + $id = $1; + $data{$id}->{id} = $id; +# $data{$id}->{nr} = $nr++; + }; + next unless defined($id); + + if (!defined($data{$id}) || !defined($data{$id}->{name})) { + $data{$id}->{name} = $1 if (/\.name\s*=\s*\"([^\"]+)\"/); + } + + # saa7164_pci_tbl + $subvendor = fix_id($1) if (/\.subvendor\s*=\s*(\w+),/); + $subdevice = fix_id($1) if (/\.subdevice\s*=\s*(\w+),/); + if (/.card\s*=\s*(\w+),/) { + if (defined($data{$1}) && + defined($subvendor) && $subvendor ne "0" && + defined($subdevice) && $subdevice ne "0") { + push @{$data{$1}->{subid}}, "$subvendor:$subdevice"; + undef $subvendor; + undef $subdevice; + } + } +} + +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/versions.txt b/v4l/versions.txt index 1995c9006..3d13e826a 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -28,6 +28,7 @@ SOC_CAMERA_PLATFORM VIDEO_TVP514X # requires id_table and new i2c stuff RADIO_TEA5764 +VIDEO_SAA7164 VIDEO_THS7303 VIDEO_ADV7343 RADIO_SI4713 -- cgit v1.2.3 From e3255aa9a39e6d17b11bdc91e55782c9a7d940dc Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 16 Sep 2009 12:40:58 -0300 Subject: DocBook: rename main DocBook to media-specs and fix build rules From: Mauro Carvalho Chehab Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'v4l') diff --git a/v4l/Makefile b/v4l/Makefile index 42618efa6..6fe949f27 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -58,21 +58,19 @@ v4l2-spec:: $(MAKE) -C ../v4l2-spec man:: - $(MAKE) -C ../v4l2-spec man + $(MAKE) -C ../media-specs man dvb-spec:: $(MAKE) -C ../dvb-spec/dvbapi -spec:: v4l2-spec dvb-spec +media-spec:: + $(MAKE) -C ../media-specs + +spec:: media-spec apps:: $(MAKE) -C ../v4l2-apps -docbooks:: - $(MAKE) -C ../staging-specs prep - mkdir -p ../linux/Documentation/Docbook - cp -r ../staging-specs/*.xml ../staging-specs/dvb/ ../staging-specs/v4l ../linux/Documentation/Docbook - ################################################# # Object specific rules -- cgit v1.2.3