summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2006-03-16 20:37:51 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2006-03-16 20:37:51 -0500
commitd30a31decd05aa55764418cce0b9cce695885439 (patch)
tree8fffef97b8b6d19639ed547eb7d6253b0f336e48 /v4l
parente0449a4964c2aec77cf02c33d2a9375b647530ce (diff)
parent32027c8007a8b9e82f70f5eb52387db827ff8b2d (diff)
downloadmediapointer-dvb-s2-d30a31decd05aa55764418cce0b9cce695885439.tar.gz
mediapointer-dvb-s2-d30a31decd05aa55764418cce0b9cce695885439.tar.bz2
merged ~mkrufky/pending
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'v4l')
-rw-r--r--v4l/Make.config12
-rw-r--r--v4l/Makefile39
-rwxr-xr-xv4l/scripts/hghead.pl152
-rwxr-xr-xv4l/scripts/insmod.sh5
-rwxr-xr-xv4l/scripts/make_kconfig.pl37
-rwxr-xr-xv4l/scripts/usbaudio_setup.sh106
6 files changed, 335 insertions, 16 deletions
diff --git a/v4l/Make.config b/v4l/Make.config
index 0dd4365ce..7d8ae8e8d 100644
--- a/v4l/Make.config
+++ b/v4l/Make.config
@@ -9,7 +9,6 @@ CONFIG_VIDEO_TVAUDIO := m
CONFIG_VIDEO_CX88 := m
CONFIG_TVP5150 := m
-CONFIG_SAA711X := m
#enable experimental support for xc3028 tuner
CONFIG_XC3028 := m
@@ -20,13 +19,18 @@ CONFIG_VIDEO_ALSA := y
CONFIG_VIDEO_ADV_DEBUG := y
-CONFIG_VIDEO_PVRUSB2 := n
+CONFIG_VIDEO_PVRUSB2 := m
CONFIG_VIDEO_IVTV := n
CONFIG_DVB_FIRESAT := n
-CONFIG_VIDEO_CPIA2 := m
+CONFIG_VIRTUAL_DEVICE := m
+CONFIG_VIDEO_CPIA2 := m
+
+CONFIG_VIDEO_CX88_IVTV := n
+
+CONFIG_VIDEO_MXB := m
# doesn't build on older kernels
@@ -112,4 +116,4 @@ ifeq ($(CONFIG_DVB_CORE),m)
endif
CONFIG_VIDEO_IVTV := $(if $(wildcard $(src)/ivtv-svnversion.h),m)
-CONFIG_VIDEO_PVRUSB2 := $(if $(wildcard $(src)/.pvrusb2-merge),m)
+CONFIG_VIDEO_CX88_IVTV := $(if $(wildcard $(src)/cx88-ivtv.c),m)
diff --git a/v4l/Makefile b/v4l/Makefile
index dcc8cc020..fd757e928 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -88,11 +88,15 @@ ifeq ($(CONFIG_VIDEO_DEV),m)
obj-m += videodev.o
endif
+obj-$(CONFIG_VIDEO_MXB) += mxb.o tea6420.o tea6415c.o tda9840.o
+obj-$(CONFIG_VIDEO_DPC) += dpc7146.o
+obj-$(CONFIG_VIDEO_HEXIUM_ORION)+= hexium_orion.o
+obj-$(CONFIG_VIDEO_HEXIUM_GEMINI)+= hexium_gemini.o
obj-$(CONFIG_VIDEO_BTTV) += btcx-risc.o ir-common.o bttv.o tveeprom.o
obj-$(CONFIG_VIDEO_CX88) += btcx-risc.o cx88xx.o cx8800.o cx8802.o \
cx88-blackbird.o tveeprom.o
+obj-$(CONFIG_VIDEO_CX88_IVTV) += cx88-ivtv.o
obj-$(CONFIG_TVP5150) += tvp5150.o
-obj-$(CONFIG_SAA711X) += saa711x.o
obj-$(CONFIG_EM28XX) += em28xx.o tveeprom.o
obj-$(CONFIG_VIDEO_DECODER) += saa7115.o cx25840.o saa7127.o bt832.o
@@ -104,6 +108,7 @@ ifeq ($(CONFIG_VIDEO_ALSA),y)
# obj-$(CONFIG_VIDEO_BTTV) += bt87x.o
endif
+obj-$(CONFIG_VIRTUAL_DEVICE) += vivi.o
obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o saa6752hs.o
obj-$(CONFIG_VIDEO_SAA7134) += saa7134-oss.o
obj-$(CONFIG_VIDEO_IR) += ir-common.o
@@ -122,7 +127,7 @@ obj-$(CONFIG_DVB_FRONTENDS) += dvb-pll.o cx22702.o or51132.o lgdt330x.o \
dib3000-common.o dib3000mb.o dib3000mc.o \
ves1820.o cx22700.o tda8083.o ves1x93.o \
stv0297.o sp8870.o l64781.o s5h1420.o \
- tda10021.o at76c651.o tda80xx.o
+ tda10021.o at76c651.o tda80xx.o zl10353.o
obj-$(CONFIG_DVB_CORE) += dvb-core.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP) += stv0297_cs2.o
@@ -187,6 +192,7 @@ ifeq ($(CONFIG_VIDEO_CX88_DVB),m)
EXTRA_CFLAGS += -DHAVE_OR51132=1
EXTRA_CFLAGS += -DHAVE_LGDT330X=1
EXTRA_CFLAGS += -DHAVE_MT352=1
+ EXTRA_CFLAGS += -DHAVE_ZL10353=1
EXTRA_CFLAGS += -DHAVE_NXT200X=1
EXTRA_CFLAGS += -DHAVE_CX24123=1
EXTRA_CFLAGS += -DHAVE_VP3054_I2C=1
@@ -216,6 +222,11 @@ $(obj)/av7110_firm.h: $(obj)/fdump
EXTRA_CFLAGS += -DCONFIG_DVB_AV7110_FIRMWARE_FILE
endif
+ifeq ($(ARCH),)
+ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/ \
+ -e s/s390x/s390/ -e s/parisc64/parisc/ )
+endif
#################################################
# compile modules
@@ -301,10 +312,11 @@ inst_video += tvmixer.ko v4l1-compat.ko v4l2-common.ko wm8775.ko cs53l32a.ko
inst_video += video-buf.ko video-buf-dvb.ko
inst_video += videodev.ko
inst_video += ir-kbd-i2c.ko msp3400.ko
-inst_video += tvp5150.ko saa711x.ko saa7134-alsa.ko saa7134-oss.ko
+inst_video += tvp5150.ko saa7134-alsa.ko saa7134-oss.ko
inst_video += saa7115.ko cx25840.ko saa7127.ko compat_ioctl32.ko
-inst_cx88 := cx8800.ko cx8802.ko cx88-alsa.ko
-inst_cx88 += cx88-blackbird.ko cx88xx.ko cx88-dvb.ko cx88-vp3054-i2c.ko
+inst_cx88 := cx88xx.ko cx8800.ko cx8802.ko cx88-alsa.ko cx88-dvb.ko
+inst_video += vivi.ko
+inst_cx88 += cx88-blackbird.ko cx88-vp3054-i2c.ko cx88-ivtv.ko
inst_saa7134 := saa6752hs.ko saa7134.ko saa7134-empress.ko saa7134-dvb.ko
inst_em28xx := em28xx.ko
inst_bt8xx := bt878.ko dvb-bt8xx.ko dst.ko dst_ca.ko
@@ -314,7 +326,7 @@ inst_frontends += nxt200x.ko cx24123.ko mt312.ko stv0299.ko
inst_frontends += bcm3510.ko dib3000mb.ko dib3000mc.ko ves1820.ko
inst_frontends += cx22700.ko tda8083.ko ves1x93.ko stv0297.ko sp8870.ko
inst_frontends += l64781.ko s5h1420.ko tda10021.ko at76c651.ko tda80xx.ko
-inst_frontends += stv0297_cs2.ko
+inst_frontends += stv0297_cs2.ko zl10353.ko
inst_dvb-core := dvb-core.ko
inst_saa7146 := saa7146.ko saa7146_vv.ko
inst_b2c2 := b2c2-flexcop.ko b2c2-flexcop-pci.ko b2c2-flexcop-usb.ko
@@ -343,10 +355,9 @@ all:: default
default:: links .version
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
-pvrusb2::
- @echo creating pvrusb2 symbolic links...
- @find ../v4l_experimental/pvrusb2 -name '*.[ch]' -type f -exec ln -sf '{}' . \;
- @echo 'm' > .pvrusb2-merge
+qconfig:: links .version
+ ./scripts/make_kconfig.pl /usr/src/linux-2.6.14 $(ARCH)
+ $(KDIR)/scripts/kconfig/qconf Kconfig
ivtv-checkout::
@if [ ! -d ivtv ]; then \
@@ -367,6 +378,10 @@ ivtv:: ivtv-links
@echo '#define IVTV_DRIVER_VERSION_COMMENT "(v4l-dvb + ivtv virtual merge)"' > ivtv-svnversion.h
@echo ivtv trunk merged. Run make to build the entire tree.
+cx88-ivtv::
+ @echo creating cx88-ivtv symbolic links...
+ @ln -sf ../v4l_experimental/cx88-ivtv.c .
+
links::
@echo creating symbolic links...
@find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \;
@@ -521,7 +536,9 @@ rmmodules::
clean::
@find . -name '*.c' -type l -exec rm '{}' \;
@find . -name '*.h' -type l -exec rm '{}' \;
- -rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump ivtv-svnversion.h .pvrusb2-merge
+ -rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump \
+ ivtv-svnversion.h \
+ Kconfig Kconfig.kern .config .config.cmd
distclean:: clean
-rm -f .version .*.o.flags .*.o.d
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl
new file mode 100755
index 000000000..ddaef0767
--- /dev/null
+++ b/v4l/scripts/hghead.pl
@@ -0,0 +1,152 @@
+#!/usr/bin/perl
+use strict;
+use Date::Parse;
+
+#################################################################
+# analyse diffs
+
+my $in = shift;
+my $line;
+my $subject;
+my $from=0;
+my $sub_ok=0;
+my $init=0;
+my $num=0;
+my $maint_ok=0;
+my $noblank=1;
+my $maintainer_name=$ENV{CHANGE_LOG_NAME};
+my $maintainer_email=$ENV{CHANGE_LOG_EMAIL_ADDRESS};
+my $from="";
+my $body="";
+my $signed="";
+my $fromname="";
+
+open IN, "<$in";
+
+while ($line = <IN>) {
+ if ($line =~ m/Index.*/) {
+ last;
+ }
+ if ($line =~ m/^diff .*/) {
+ last;
+ }
+ if ($line =~ m/^\-\-\- .*/) {
+ last;
+ }
+ if ($line =~ m/^\-\-\-.*/) {
+ last;
+ }
+ if ($line =~ m/^\+\+\+ .*/) {
+ last;
+ }
+
+ if ($line =~ m/^Date:\s*(.*)/) {
+ my $time = str2time($1);
+# my $timestr = gmtime($time);
+
+ if ($time) {
+ print "# Date: $time\n";
+ }
+ next;
+ }
+ if ($line =~ m/^From:/) {
+ if ($line =~ m/^From:[\s\"]*([^\"]*)[\s\"]*<(.*)>/) {
+ if ($1 eq "") {
+ next;
+ }
+ my $name=$1;
+ my $email=$2;
+ $name =~ s/\s+$//;
+ $email =~ s/\s+$//;
+ $fromname="$name <$email>";
+ $from= "From: $fromname\n";
+ next;
+ }
+ print "Bad: author line have a wrong syntax\n";
+ die;
+ }
+
+ if ($line =~ m/^Subject:\s*(.*\n)/) {
+ $subject=$1;
+ next;
+ }
+
+ if ($line =~ m;^ .*\/.*\| *[0-9]*;) {
+ next;
+ }
+ if ($line =~m/\d+\s*file.* changed, /) {
+ next;
+ }
+
+ if ($line =~ m/^Signed-off-by:.*/) {
+ $noblank=1;
+ if ($line =~ m/$maintainer_name/) {
+ $maint_ok=1;
+ }
+
+ $signed="$signed$line";
+ next;
+ }
+ if ($line =~ m/^Acked-by:.*/) {
+ $signed="$signed$line";
+ next;
+ }
+
+ if ($line =~ m/^[a-zA-Z\-]*:/) {
+ if ($line =~ m/Changeset:\s*(.*)\n/) {
+ $num=$1;
+ }
+ print "# $line";
+ next;
+ }
+
+ if ($line =~ m|^(V4L\/DVB\s*\(.+\)\s*:.*\n)|) {
+ $subject=$1;
+ $line="\n";
+ }
+
+ if ($sub_ok == 0) {
+ $sub_ok=1;
+ substr( $subject, 0, 1 ) = uc (substr ($subject, 0, 1));
+ if ($subject =~ m|V4L\/DVB\s*(.+)|) {
+ $subject=$1;
+ }
+ if ($line =~ m/^\n/) {
+ next;
+ }
+ }
+
+ if ($noblank) {
+ if ($line =~ m/^\n/) {
+ next;
+ }
+ }
+ if (!$init) {
+ $init=1;
+ $noblank=0;
+ }
+ $body="$body$line";
+}
+close IN;
+
+if ($from eq "") {
+ print "Bad: author doesn't exist!\n";
+ die;
+}
+
+if (!$maint_ok) {
+ $signed=$signed."Signed-off-by: $maintainer_name <$maintainer_email>\n";
+}
+
+if (!$signed =~ m/$from/) {
+ print "Bad: Author didn't signed his patch!\n";
+ die;
+}
+
+$body=~s/\n+$//;
+$body=~s/^\n+$//;
+
+# First from is used by hg to recognize commiter name
+print "#Committer: $maintainer_name <$maintainer_email>\n";
+print "$subject\n$from\n$body\n\n$signed";
+
diff --git a/v4l/scripts/insmod.sh b/v4l/scripts/insmod.sh
index bf22a69ce..e4ebb1494 100755
--- a/v4l/scripts/insmod.sh
+++ b/v4l/scripts/insmod.sh
@@ -122,6 +122,8 @@ case "$1" in
insmod ./saa6752hs.ko
insmod ./em28xx.ko
+ insmod ./vivi.ko
+
echo
;;
debug)
@@ -232,6 +234,7 @@ case "$1" in
insmod ./saa6752hs.ko
insmod ./em28xx.ko
+ insmod ./vivi.ko
echo
;;
unload)
@@ -246,7 +249,7 @@ case "$1" in
# video4linux cards
rmmod cx88-alsa cx88-blackbird cx88-dvb cx88-vp3054-i2c cx8802 cx8800 \
cx88xx saa7134-oss saa7134-alsa saa7134-empress saa7134-dvb \
- saa7134 dvb-bt8xx dst_ca dst bt878 bttv em28xx
+ saa7134 dvb-bt8xx dst_ca dst bt878 bttv em28xx vivi
# frontends
rmmod dib3000mb dib3000mc dib3000_common nxt200x ves1x93 \
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
new file mode 100755
index 000000000..f612e83db
--- /dev/null
+++ b/v4l/scripts/make_kconfig.pl
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+use FileHandle;
+
+my $KDIR=shift;
+my $ARCH=shift;
+
+sub open_kconfig($$) {
+ my ($dir,$file)=@_;
+ my $in = new FileHandle;
+
+print "opening $file\n";
+ open $in,"$file";
+ while (<$in>) {
+ if (m;^\s*source[\s\"]+drivers/media/(video|dvb)/Kconfig;) {
+ next;
+ }
+ if (m|^\s*source[\s\"]+([^\n\s\"]+)[\n\s\"]|) {
+ open_kconfig($dir,"$dir/$1");
+ next;
+ }
+ s/^main(menu\s\"[^\"]+)/\1 - DON'T CHANGE IT!/;
+ print OUT $_;
+ }
+ close $in;
+}
+
+open OUT,">Kconfig.kern";
+open_kconfig($KDIR,"$KDIR/arch/$ARCH/Kconfig");
+print OUT "endmenu\n";
+close OUT;
+
+open OUT,">Kconfig";
+print OUT "mainmenu \"V4L/DVB menu\"\n";
+open_kconfig ("../linux","../linux/drivers/media/video/Kconfig");
+open_kconfig ("../linux","../linux/drivers/media/dvb/Kconfig");
+print OUT "source Kconfig.kern\n";
+close OUT;
diff --git a/v4l/scripts/usbaudio_setup.sh b/v4l/scripts/usbaudio_setup.sh
new file mode 100755
index 000000000..66fdd23df
--- /dev/null
+++ b/v4l/scripts/usbaudio_setup.sh
@@ -0,0 +1,106 @@
+#!/bin/bash
+#
+# Copyright (C) 2006 Markus Rechberger <mrechberger@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+which /usr/bin/dialog >/dev/null
+if [ "0" != "$?" ]; then
+echo "this tool requires \"dialog\" (http://hightek.org/dialog/)"
+exit 1
+fi
+uid=`id -u`
+if [ "0" != "$uid" ]; then
+echo "this tool must be run as root, you can disable this message by editing the script but only do that unless you know what you're doing!"
+exit 1
+fi
+which gcc > /dev/null
+if [ "0" != "$?" ]; then
+echo "this tool won't work unless you install gcc"
+exit 1
+fi
+test -f ossid
+if [ "0" != "$?" ]; then
+cat > ossid.c <<_EOF
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <linux/soundcard.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int main(int argc, char **argv){
+ int fd;
+ struct mixer_info *info;
+ fd=open(argv[1],O_RDONLY);
+ if(fd>=0){
+ info=malloc(sizeof(struct mixer_info));
+ ioctl(fd,SOUND_MIXER_INFO,info);
+ printf("%c \"%s %s\"\n",(argv[1][strlen(argv[1])-1]=='p')?'0':(argv[1][strlen(argv[1])-1]+1),info->name,info->id);
+ free(info);
+ close(fd);
+ } else {
+ return 1;
+ }
+ return 0;
+}
+_EOF
+gcc ossid.c -o ossid
+rm ossid.c
+fi
+
+test -f /proc/asound/cards
+if [ "0" != "$?" ]; then
+dialog --title "Welcome" --backtitle "Empia Sound Configuration" \
+--msgbox "Your system doesn't support ALSA, please have a look at \
+www.alsa-project.org and set it up properly \
+
+
+Press any key to continue... " 11 50
+exit 1;
+fi
+
+dialog --title "Welcome" --backtitle "Empia Sound Configuration" \
+--msgbox "This tool was written to ease up sound configuration for
+* Terratec Hybrid XS
+* Terratec Cinergy 250 USB 2.0
+* Hauppauge HVR 900
+* and possible others :)
+
+first select an usb audio source, as target choose your soundcard
+Press any key to continue... " 13 60
+
+ls /dev/dsp* | while read a; do ./ossid $a; done | xargs dialog --menu "Choose your TV Audio source:" 12 60 5 2>/tmp/em2880_source.$$
+ls /dev/dsp* | while read a; do ./ossid $a; done | xargs dialog --menu "Choose your output soundcard device:" 12 60 5 2>/tmp/em2880_dst.$$
+
+source=`egrep '^[0-9p]' /tmp/em2880_source.$$`
+dst=`egrep '^[0-9p]' /tmp/em2880_dst.$$`
+
+echo "playing $source to $dst";
+if [ "$source" = "0" ]; then
+ device="/dev/dsp"
+else
+ device="/dev/dsp`expr $source - 1`"
+fi
+
+if [ "$dst" = "0" ]; then
+ device2="/dev/dsp"
+else
+ device2="/dev/dsp`expr $source - 1`"
+fi
+clear
+echo "Using command: sox -r 48000 -w -c 2 -t ossdsp $device -t ossdsp $device2"
+sox -r 48000 -w -c 2 -t ossdsp $device -t ossdsp $device2