diff options
Diffstat (limited to 'v4l/scripts')
-rw-r--r-- | v4l/scripts/cardlist | 15 | ||||
-rw-r--r-- | v4l/scripts/release.sh | 65 | ||||
-rw-r--r-- | v4l/scripts/saa7134.pl | 53 | ||||
-rw-r--r-- | v4l/scripts/update | 63 |
4 files changed, 196 insertions, 0 deletions
diff --git a/v4l/scripts/cardlist b/v4l/scripts/cardlist new file mode 100644 index 000000000..57b903dcb --- /dev/null +++ b/v4l/scripts/cardlist @@ -0,0 +1,15 @@ +#!/bin/sh + +cat bttv-cards.c \ + | grep "\.name.*=" \ + | perl -ne '/"([^"]+)"/; printf("card=%d - %s\n",$i++,$1)' \ + > doc/CARDLIST.bttv + +cat tuner.c \ + | grep "{ \"" \ + | perl -ne '/"([^"]+)"/; printf("tuner=%d - %s\n",$i++,$1)' \ + > doc/CARDLIST.tuner + +scripts/saa7134.pl saa7134-cards.c \ + > doc/CARDLIST.saa7134 + diff --git a/v4l/scripts/release.sh b/v4l/scripts/release.sh new file mode 100644 index 000000000..8d024b42a --- /dev/null +++ b/v4l/scripts/release.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +# config +release="$HOME/kernel/release" +ver_bt="0.9.12" +ver_sa="0.2.9" +ver_cx="0.0.1" + +# common files +files_v4l="v4l*.[ch] video-buf.[ch] videodev*.h" +files_tuner="tuner.[ch] tda9887.[ch]" +files_i2c="id.h audiochip.h i2c-compat.h" +files_common="$files_v4l $files_tuner $files_i2c doc" + +# other files +files_ir="ir-common.[ch]" +files_audio="msp3400.[ch] tvaudio.[ch]" + +files_bttv="bt848.h btcx*.[ch] bttv*.[ch] bt832.[ch] ir-kbd*.c" +files_saa="saa7134*.[ch] saa6752hs.[ch]" +files_cx="btcx*.[ch] cx*.[ch]" + + +###################################################################################### +# helpers + +function build_release () { + local name="$1"; shift + local version="$1"; shift + local files="$*" + local dest="$WORK/$name-$version" + local tarball="$release/$name-$version.tar.gz" + + # copy / prepare stuff + mkdir "$dest" + cp -av $files "$dest" || exit 1 + cp -v Makefile "$dest" + cp -v "scripts/config.$name" "$dest"/Make.config + ln -s . "$dest/media" + ln -s . "$dest/linux" + + # build test + (cd $dest; make) || exit 1 +# (cd $dest; ls *.o; sleep 5) + (cd $dest; make clean) + + # build tarball + tar czCf "$WORK" "$tarball" "$name-$version" +} + + +###################################################################################### +# main + +# tmp dir for my files +WORK="${TMPDIR-/tmp}/${0##*/}-$$" +mkdir "$WORK" || exit 1 +trap 'rm -rf "$WORK"' EXIT + +build_release "bttv" "$ver_bt" \ + "$files_common" "$files_ir" "$files_audio" "$files_bttv" +build_release "saa7134" "$ver_sa" \ + "$files_common" "$files_ir" "$files_audio" "$files_saa" +build_release "cx88" "$ver_cx" \ + "$files_common" "$files_cx" diff --git a/v4l/scripts/saa7134.pl b/v4l/scripts/saa7134.pl new file mode 100644 index 000000000..789d1c851 --- /dev/null +++ b/v4l/scripts/saa7134.pl @@ -0,0 +1,53 @@ +#!/usr/bin/perl -w +use strict; + +my %map = ( + "PCI_ANY_ID" => "0", + "PCI_VENDOR_ID_PHILIPS" => "1131", +); + +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 (<>) { + # saa7134_boards + if (/\[(SAA7134_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*\"([^\"]+)\"/); + } + + # saa7134_pci_tbl + $subvendor = fix_id($1) if (/\.subvendor\s*=\s*(\w+),/); + $subdevice = fix_id($1) if (/\.subdevice\s*=\s*(\w+),/); + if (/.driver_data\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 -> %-40s", $data{$item}->{nr}, $data{$item}->{name}); + printf(" [%s]",join(",",@{$data{$item}->{subid}})) + if defined($data{$item}->{subid}); + print "\n"; +} diff --git a/v4l/scripts/update b/v4l/scripts/update new file mode 100644 index 000000000..5c41e552a --- /dev/null +++ b/v4l/scripts/update @@ -0,0 +1,63 @@ +#!/bin/sh +source scripts/modules.sh +set -e + +case "`hostname --short`" in + eskarina) +# btopt="card=10" +# btopt="card=6 remote=1" + ;; + bogomips) + saopt="card=7" + ;; +esac + +########################################################################### +# unload + +# bttv +xrmmod ir-kbd-gpio +xrmmod ir-kbd-i2c +xrmmod bttv + +# cx88 +xrmmod cx8800 +xrmmod cx88xx + +# saa7134 +xrmmod saa7134 + +# common +xrmmod btcx-risc +xrmmod ir-common +xrmmod video-buf + +# i2c +xrmmod tuner +xrmmod msp3400 +xrmmod tvaudio +xrmmod tda9887 + +########################################################################## +# reload + +# common +v4l2basic +xinsmod video-buf debug=2 +xinsmod btcx-risc debug=1 +xinsmod ir-common debug=0 repeat=0 +xinsmod tuner debug=0 +xinsmod msp3400 debug=0 + +# bttv +xinsmod bttv bttv_debug=0 vbi_debug=0 irq_debug=0 \ + fdsr=0 chroma_agc=1 vbibufs=4 irq_iswitch=0 $btopt +test -f ir-kbd-i2c.ko && xinsmod ir-kbd-i2c debug=0 +test -f ir-kbd-gpio.ko && xinsmod ir-kbd-gpio debug=0 + +# cx88 +xinsmod cx88xx core_debug=2 +xinsmod cx8800 video_debug=2 + +# saa7134 +xinsmod saa7134 audio_debug=1 $saopt |