summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgignore5
-rw-r--r--linux/drivers/media/Kconfig68
-rw-r--r--linux/drivers/media/dvb/dvb-usb/cxusb.c54
-rw-r--r--linux/drivers/media/video/video-buf.c12
-rw-r--r--v4l/Makefile4
-rwxr-xr-xv4l/scripts/make_kconfig.pl67
6 files changed, 193 insertions, 17 deletions
diff --git a/.hgignore b/.hgignore
index 2d7248488..a0e27c274 100644
--- a/.hgignore
+++ b/.hgignore
@@ -3,6 +3,11 @@ v4l/.tmp_versions/.*
v4l/[^/]*[.]c
v4l/.*[.]o
v4l/.*[.]ko
+v4l/.kconfig.d
+v4l/.tmpconfig.h
+v4l/Kconfig
+v4l/Kconfig.kern
.*[.]rej
.*[.]orig
.*[~]
+
diff --git a/linux/drivers/media/Kconfig b/linux/drivers/media/Kconfig
new file mode 100644
index 000000000..fffc711c2
--- /dev/null
+++ b/linux/drivers/media/Kconfig
@@ -0,0 +1,68 @@
+#
+# Multimedia device configuration
+#
+
+menu "Multimedia devices"
+
+config VIDEO_DEV
+ tristate "Video For Linux"
+ ---help---
+ Support for audio/video capture and overlay devices and FM radio
+ cards. The exact capabilities of each device vary. User tools for
+ this are available from
+ <ftp://ftp.uk.linux.org/pub/linux/video4linux/>.
+
+ This kernel includes support for the new Video for Linux Two API,
+ (V4L2) as well as the original system. Drivers and applications
+ need to be rewritten to use V4L2, but drivers for popular cards
+ and applications for most video capture functions already exist.
+
+ Documentation for the original API is included in the file
+ <file:Documentation/video4linux/API.html>. Documentation for V4L2 is
+ available on the web at <http://bytesex.org/v4l/>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called videodev.
+
+source "drivers/media/video/Kconfig"
+
+source "drivers/media/radio/Kconfig"
+
+source "drivers/media/dvb/Kconfig"
+
+source "drivers/media/common/Kconfig"
+
+config VIDEO_TUNER
+ tristate
+
+config VIDEO_BUF
+ tristate
+
+config VIDEO_BUF_DVB
+ tristate
+
+config VIDEO_BTCX
+ tristate
+
+config VIDEO_IR
+ tristate
+
+config VIDEO_TVEEPROM
+ tristate
+
+config USB_DABUSB
+ tristate "DABUSB driver"
+ depends on USB
+ ---help---
+ A Digital Audio Broadcasting (DAB) Receiver for USB and Linux
+ brought to you by the DAB-Team
+ <http://wwwbode.cs.tum.edu/Par/arch/dab/>. This driver can be taken
+ as an example for URB-based bulk, control, and isochronous
+ transactions. URB's are explained in
+ <Documentation/usb/URB.txt>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called dabusb.
+
+endmenu
+
diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c
index f20b2bda4..d63f6ec4f 100644
--- a/linux/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c
@@ -233,6 +233,45 @@ static struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
{ 0xfe, 0x4e, KEY_POWER },
};
+static struct dvb_usb_rc_key dvico_portable_rc_keys[] = {
+ { 0xfc, 0x02, KEY_SETUP }, /* Profile */
+ { 0xfc, 0x43, KEY_POWER2 },
+ { 0xfc, 0x06, KEY_EPG },
+ { 0xfc, 0x5a, KEY_BACK },
+ { 0xfc, 0x05, KEY_MENU },
+ { 0xfc, 0x47, KEY_INFO },
+ { 0xfc, 0x01, KEY_TAB },
+ { 0xfc, 0x42, KEY_PREVIOUSSONG },/* Replay */
+ { 0xfc, 0x49, KEY_VOLUMEUP },
+ { 0xfc, 0x09, KEY_VOLUMEDOWN },
+ { 0xfc, 0x54, KEY_CHANNELUP },
+ { 0xfc, 0x0b, KEY_CHANNELDOWN },
+ { 0xfc, 0x16, KEY_CAMERA },
+ { 0xfc, 0x40, KEY_TUNER }, /* ATV/DTV */
+ { 0xfc, 0x45, KEY_OPEN },
+ { 0xfc, 0x19, KEY_1 },
+ { 0xfc, 0x18, KEY_2 },
+ { 0xfc, 0x1b, KEY_3 },
+ { 0xfc, 0x1a, KEY_4 },
+ { 0xfc, 0x58, KEY_5 },
+ { 0xfc, 0x59, KEY_6 },
+ { 0xfc, 0x15, KEY_7 },
+ { 0xfc, 0x14, KEY_8 },
+ { 0xfc, 0x17, KEY_9 },
+ { 0xfc, 0x44, KEY_ANGLE }, /* Aspect */
+ { 0xfc, 0x55, KEY_0 },
+ { 0xfc, 0x07, KEY_ZOOM },
+ { 0xfc, 0x0a, KEY_REWIND },
+ { 0xfc, 0x08, KEY_PLAYPAUSE },
+ { 0xfc, 0x4b, KEY_FASTFORWARD },
+ { 0xfc, 0x5b, KEY_MUTE },
+ { 0xfc, 0x04, KEY_STOP },
+ { 0xfc, 0x56, KEY_RECORD },
+ { 0xfc, 0x57, KEY_POWER },
+ { 0xfc, 0x41, KEY_UNKNOWN }, /* INPUT */
+ { 0xfc, 0x00, KEY_UNKNOWN }, /* HD */
+};
+
static int cxusb_dee1601_demod_init(struct dvb_frontend* fe)
{
static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 };
@@ -511,6 +550,11 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = {
.i2c_algo = &cxusb_i2c_algo,
+ .rc_interval = 100,
+ .rc_key_map = dvico_portable_rc_keys,
+ .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys),
+ .rc_query = cxusb_rc_query,
+
.generic_bulk_ctrl_endpoint = 0x01,
/* parameter for the MPEG2-data transfer */
.urb = {
@@ -600,6 +644,11 @@ static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = {
.i2c_algo = &cxusb_i2c_algo,
+ .rc_interval = 100,
+ .rc_key_map = dvico_portable_rc_keys,
+ .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys),
+ .rc_query = cxusb_rc_query,
+
.generic_bulk_ctrl_endpoint = 0x01,
/* parameter for the MPEG2-data transfer */
.urb = {
@@ -640,6 +689,11 @@ static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties = {
.i2c_algo = &cxusb_i2c_algo,
+ .rc_interval = 100,
+ .rc_key_map = dvico_portable_rc_keys,
+ .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys),
+ .rc_query = cxusb_rc_query,
+
.generic_bulk_ctrl_endpoint = 0x01,
/* parameter for the MPEG2-data transfer */
.urb = {
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 715feea6b..4ae4e1e7a 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -406,19 +406,25 @@ void videobuf_queue_pci(struct videobuf_queue* q)
int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma)
{
struct videobuf_queue q;
+ struct videobuf_queue_ops qops;
q.dev=pci;
- q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg;
+ qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg;
+ qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg;
+ q.ops = &qops;
- return (videobuf_dma_unmap(&q,dma));
+ return (videobuf_dma_map(&q,dma));
}
int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma)
{
struct videobuf_queue q;
+ struct videobuf_queue_ops qops;
q.dev=pci;
- q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg;
+ qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg;
+ qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg;
+ q.ops = &qops;
return (videobuf_dma_unmap(&q,dma));
}
diff --git a/v4l/Makefile b/v4l/Makefile
index 039d71bce..772cac951 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -356,8 +356,8 @@ all:: default
default:: links .version
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
-qconfig:: links .version
- ./scripts/make_kconfig.pl /usr/src/linux-2.6.14 $(ARCH)
+xconfig:: links .version
+ ./scripts/make_kconfig.pl $(ARCH)
$(KDIR)/scripts/kconfig/qconf Kconfig
ivtv-checkout::
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index f612e83db..91c37693f 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -1,37 +1,80 @@
#!/usr/bin/perl
use FileHandle;
-my $KDIR=shift;
my $ARCH=shift;
+my %depend = ();
+my %config = ();
+
+sub add_config($)
+{
+ my $arg=shift;
+
+ if ($arg =~ m/^([A-Z0-9_]+)/) {
+ $config{$1} = 1;
+ }
+}
+
+sub check_deps($)
+{
+ my $arg=shift;
+ $arg=$arg." ";
+
+ while ($arg ne "") {
+ if ($arg =~ m/^([A-Z0-9_]+) /) {
+ my $val=$1;
+ my $prev=$depend{$val};
+ $depend { $val } = 1+$prev;
+ }
+ $arg =~ s/^[^ ]+ //;
+ }
+}
+
sub open_kconfig($$) {
my ($dir,$file)=@_;
my $in = new FileHandle;
-print "opening $file\n";
+#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\"]+drivers/media/(video|dvb)/Kconfig;) {
+# next;
+# }
if (m|^\s*source[\s\"]+([^\n\s\"]+)[\n\s\"]|) {
open_kconfig($dir,"$dir/$1");
next;
}
+ if (m|^\s+depends on (.*)\n|) {
+ check_deps ($1);
+ }
+ if (m|^\s+select (.*)\n|) {
+ check_deps ($1);
+ }
+ if (m|^\s*config (.*)\n|) {
+ add_config ($1);
+ }
+
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";
+open_kconfig ("../linux","../linux/drivers/media/Kconfig");
+
close OUT;
+
+while ( my ($key, $value) = each(%config) ) {
+ delete $depend{$key};
+}
+
+open OUT,">Kconfig.kern";
+while ( my ($key, $value) = each(%depend) ) {
+ print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault m\n\n";
+}
+close OUT;
+