summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/Documentation/dvb/avermedia.txt4
-rw-r--r--linux/Documentation/dvb/cards.txt2
-rw-r--r--linux/Documentation/dvb/ci.txt4
-rw-r--r--linux/Documentation/dvb/faq.txt6
-rw-r--r--linux/Documentation/video4linux/CARDLIST.saa71343
-rw-r--r--linux/Documentation/video4linux/README.pvrusb22
-rw-r--r--linux/Documentation/video4linux/Zoran2
-rw-r--r--linux/Documentation/video4linux/cx2341x/fw-decoder-api.txt2
-rw-r--r--linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt2
-rw-r--r--linux/Documentation/video4linux/cx2341x/fw-osd-api.txt2
-rw-r--r--linux/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt2
-rw-r--r--linux/Documentation/video4linux/et61x251.txt4
-rw-r--r--linux/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt2
-rw-r--r--linux/Documentation/video4linux/meye.txt2
-rw-r--r--linux/Documentation/video4linux/sn9c102.txt4
-rw-r--r--linux/Documentation/video4linux/w9968cf.txt2
-rw-r--r--linux/Documentation/video4linux/zr36120.txt4
-rw-r--r--linux/drivers/media/Kconfig1
-rw-r--r--linux/drivers/media/dvb/cinergyT2/Kconfig2
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c2
-rw-r--r--linux/drivers/media/dvb/dvb-core/Kconfig2
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c1
-rw-r--r--linux/drivers/media/dvb/dvb-usb/usb-urb.c5
-rw-r--r--linux/drivers/media/dvb/frontends/tda10086.h9
-rw-r--r--linux/drivers/media/dvb/frontends/tda826x.h19
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c2
-rw-r--r--linux/drivers/media/radio/Kconfig3
-rw-r--r--linux/drivers/media/radio/radio-gemtek-pci.c2
-rw-r--r--linux/drivers/media/video/Kconfig2
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-cards.c2
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-i2c.c1
-rw-r--r--linux/drivers/media/video/cpia2/cpia2.h4
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-vbi.c25
-rw-r--r--linux/drivers/media/video/cx88/Kconfig2
-rw-r--r--linux/drivers/media/video/cx88/cx88-i2c.c1
-rw-r--r--linux/drivers/media/video/cx88/cx88-mpeg.c2
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c24
-rw-r--r--linux/drivers/media/video/cx88/cx88-vp3054-i2c.c1
-rw-r--r--linux/drivers/media/video/ov511.c7
-rw-r--r--linux/drivers/media/video/pwc/philips.txt4
-rw-r--r--linux/drivers/media/video/pwc/pwc-if.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c126
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-dvb.c104
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c1
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c93
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c66
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h4
-rw-r--r--linux/drivers/media/video/tveeprom.c4
-rw-r--r--linux/drivers/media/video/vivi.c12
-rw-r--r--linux/drivers/media/video/w9968cf.c7
-rw-r--r--linux/drivers/media/video/zoran_card.c11
-rw-r--r--linux/drivers/media/video/zr36120.c21
-rw-r--r--linux/include/linux/i2c-id.h1
-rw-r--r--linux/include/media/v4l2-dev.h2
-rw-r--r--v4l/compat.h5
-rwxr-xr-xv4l/scripts/check_config_defines.pl4
56 files changed, 475 insertions, 160 deletions
diff --git a/linux/Documentation/dvb/avermedia.txt b/linux/Documentation/dvb/avermedia.txt
index 8bab8461a..e44c009ac 100644
--- a/linux/Documentation/dvb/avermedia.txt
+++ b/linux/Documentation/dvb/avermedia.txt
@@ -45,9 +45,9 @@ Assumptions and Introduction
by circuitry on the card and is often presented uncompressed.
For a PAL TV signal encoded at a resolution of 768x576 24-bit
color pixels over 25 frames per second - a fair amount of data
- is generated and must be proceesed by the PC before it can be
+ is generated and must be processed by the PC before it can be
displayed on the video monitor screen. Some Analogue TV cards
- for PC's have onboard MPEG2 encoders which permit the raw
+ for PCs have onboard MPEG2 encoders which permit the raw
digital data stream to be presented to the PC in an encoded
and compressed form - similar to the form that is used in
Digital TV.
diff --git a/linux/Documentation/dvb/cards.txt b/linux/Documentation/dvb/cards.txt
index 9e1009244..ca58e339d 100644
--- a/linux/Documentation/dvb/cards.txt
+++ b/linux/Documentation/dvb/cards.txt
@@ -5,7 +5,7 @@ Hardware supported by the linuxtv.org DVB drivers
frontends (i.e. tuner / demodulator units) used, usually without
changing the product name, revision number or specs. Some cards
are also available in versions with different frontends for
- DVB-S/DVB-C/DVB-T. Thus the frontend drivers are listed seperately.
+ DVB-S/DVB-C/DVB-T. Thus the frontend drivers are listed separately.
Note 1: There is no guarantee that every frontend driver works
out of the box with every card, because of different wiring.
diff --git a/linux/Documentation/dvb/ci.txt b/linux/Documentation/dvb/ci.txt
index 95f0e73b2..531239b29 100644
--- a/linux/Documentation/dvb/ci.txt
+++ b/linux/Documentation/dvb/ci.txt
@@ -32,7 +32,7 @@ This application requires the following to function properly as of now.
descrambler to function,
eg: $ ca_zap channels.conf "TMC"
- (d) Hopeflly Enjoy your favourite subscribed channel as you do with
+ (d) Hopefully enjoy your favourite subscribed channel as you do with
a FTA card.
(3) Currently ca_zap, and dst_test, both are meant for demonstration
@@ -65,7 +65,7 @@ Modules that have been tested by this driver at present are
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With the High Level CI approach any new card with almost any random
architecture can be implemented with this style, the definitions
-insidethe switch statement can be easily adapted for any card, thereby
+inside the switch statement can be easily adapted for any card, thereby
eliminating the need for any additional ioctls.
The disadvantage is that the driver/hardware has to manage the rest. For
diff --git a/linux/Documentation/dvb/faq.txt b/linux/Documentation/dvb/faq.txt
index a42132d60..dbcedf583 100644
--- a/linux/Documentation/dvb/faq.txt
+++ b/linux/Documentation/dvb/faq.txt
@@ -5,7 +5,7 @@ Some very frequently asked questions about linuxtv-dvb
It's not a bug, it's a feature. Because the frontends have
significant power requirements (and hence get very hot), they
are powered down if they are unused (i.e. if the frontend device
- is closed). The dvb-core.o module paramter "dvb_shutdown_timeout"
+ is closed). The dvb-core.o module parameter "dvb_shutdown_timeout"
allow you to change the timeout (default 5 seconds). Setting the
timeout to 0 disables the timeout feature.
@@ -138,7 +138,7 @@ Some very frequently asked questions about linuxtv-dvb
- v4l2-common: common functions for Video4Linux-2 drivers
- - v4l1-compat: backward compatiblity layer for Video4Linux-1 legacy
+ - v4l1-compat: backward compatibility layer for Video4Linux-1 legacy
applications
- dvb-core: DVB core module. This provides you with the
@@ -153,7 +153,7 @@ Some very frequently asked questions about linuxtv-dvb
- video-buf: capture helper module for the saa7146_vv driver. This
one is responsible to handle capture buffers.
- - dvb-ttpci: The main driver for AV7110 based, full-featued
+ - dvb-ttpci: The main driver for AV7110 based, full-featured
DVB-S/C/T cards
eof
diff --git a/linux/Documentation/video4linux/CARDLIST.saa7134 b/linux/Documentation/video4linux/CARDLIST.saa7134
index 6fb82ac3b..8be8f9738 100644
--- a/linux/Documentation/video4linux/CARDLIST.saa7134
+++ b/linux/Documentation/video4linux/CARDLIST.saa7134
@@ -98,3 +98,6 @@
97 -> LifeView FlyDVB-S /Acorp TV134DS [5168:0300,4e42:0300]
98 -> Proteus Pro 2309 [0919:2003]
99 -> AVerMedia TV Hybrid A16AR [1461:2c00]
+100 -> Asus Europa2 OEM [1043:4860]
+101 -> Pinnacle PCTV 310i [11bd:002f]
+102 -> Avermedia AVerTV Studio 507 [1461:9715]
diff --git a/linux/Documentation/video4linux/README.pvrusb2 b/linux/Documentation/video4linux/README.pvrusb2
index c73a32c34..a4b7ae800 100644
--- a/linux/Documentation/video4linux/README.pvrusb2
+++ b/linux/Documentation/video4linux/README.pvrusb2
@@ -155,7 +155,7 @@ Source file list / functional overview:
pvrusb2-i2c-core.[ch] - This module provides an implementation of a
kernel-friendly I2C adaptor driver, through which other external
I2C client drivers (e.g. msp3400, tuner, lirc) may connect and
- operate corresponding chips within the the pvrusb2 device. It is
+ operate corresponding chips within the pvrusb2 device. It is
through here that other V4L modules can reach into this driver to
operate specific pieces (and those modules are in turn driven by
glue logic which is coordinated by pvrusb2-hdw, doled out by
diff --git a/linux/Documentation/video4linux/Zoran b/linux/Documentation/video4linux/Zoran
index 040a2c841..deb218f77 100644
--- a/linux/Documentation/video4linux/Zoran
+++ b/linux/Documentation/video4linux/Zoran
@@ -144,7 +144,7 @@ tv broadcast formats all aver the world.
The CCIR defines parameters needed for broadcasting the signal.
The CCIR has defined different standards: A,B,D,E,F,G,D,H,I,K,K1,L,M,N,...
-The CCIR says not much about about the colorsystem used !!!
+The CCIR says not much about the colorsystem used !!!
And talking about a colorsystem says not to much about how it is broadcast.
The CCIR standards A,E,F are not used any more.
diff --git a/linux/Documentation/video4linux/cx2341x/fw-decoder-api.txt b/linux/Documentation/video4linux/cx2341x/fw-decoder-api.txt
index 9df4fb3ea..78bf5f21e 100644
--- a/linux/Documentation/video4linux/cx2341x/fw-decoder-api.txt
+++ b/linux/Documentation/video4linux/cx2341x/fw-decoder-api.txt
@@ -102,7 +102,7 @@ Param[0]
Name CX2341X_DEC_GET_XFER_INFO
Enum 9/0x09
Description
- This API call may be used to detect an end of stream condtion.
+ This API call may be used to detect an end of stream condition.
Result[0]
Stream type
Result[1]
diff --git a/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt
index 001c68644..15df0df57 100644
--- a/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt
+++ b/linux/Documentation/video4linux/cx2341x/fw-encoder-api.txt
@@ -280,7 +280,7 @@ Param[0]
Param[1]
Unknown, but leaving this to 0 seems to work best. Indications are that
this might have to do with USB support, although passing anything but 0
- onl breaks things.
+ only breaks things.
-------------------------------------------------------------------------------
diff --git a/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt b/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt
index da98ae30a..0a602f3e6 100644
--- a/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt
+++ b/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt
@@ -97,7 +97,7 @@ Result[0]
Result[1]
top left vertical offset
Result[2]
- bottom right hotizontal offset
+ bottom right horizontal offset
Result[3]
bottom right vertical offset
diff --git a/linux/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt b/linux/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt
index 93fec32a1..faccee68f 100644
--- a/linux/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt
+++ b/linux/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt
@@ -30,7 +30,7 @@ provide for a handler)
GP_SAMPLE register is at 0x35C058
Bits are then right shifted into the GP_SAMPLE register at the specified
-rate; you get an interrupt when a full DWORD is recieved.
+rate; you get an interrupt when a full DWORD is received.
You need to recover the actual RC5 bits out of the (oversampled) IR sensor
bits. (Hint: look for the 0/1and 1/0 crossings of the RC5 bi-phase data) An
actual raw RC5 code will span 2-3 DWORDS, depending on the actual alignment.
diff --git a/linux/Documentation/video4linux/et61x251.txt b/linux/Documentation/video4linux/et61x251.txt
index cd584f20a..1bdee8f85 100644
--- a/linux/Documentation/video4linux/et61x251.txt
+++ b/linux/Documentation/video4linux/et61x251.txt
@@ -80,7 +80,7 @@ Some of the features of the driver are:
high compression quality (see also "Notes for V4L2 application developers"
paragraph);
- full support for the capabilities of every possible image sensors that can
- be connected to the ET61X[12]51 bridges, including, for istance, red, green,
+ be connected to the ET61X[12]51 bridges, including, for instance, red, green,
blue and global gain adjustments and exposure control (see "Supported
devices" paragraph for details);
- use of default color settings for sunlight conditions;
@@ -222,7 +222,7 @@ identifier - of the camera registered as "/dev/video0":
[root@localhost #] echo 1 > i2c_reg
[root@localhost #] cat i2c_val
-Note that if the sensor registers can not be read, "cat" will fail.
+Note that if the sensor registers cannot be read, "cat" will fail.
To avoid race conditions, all the I/O accesses to the files are serialized.
diff --git a/linux/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt b/linux/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt
index 93fec32a1..faccee68f 100644
--- a/linux/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt
+++ b/linux/Documentation/video4linux/hauppauge-wintv-cx88-ir.txt
@@ -30,7 +30,7 @@ provide for a handler)
GP_SAMPLE register is at 0x35C058
Bits are then right shifted into the GP_SAMPLE register at the specified
-rate; you get an interrupt when a full DWORD is recieved.
+rate; you get an interrupt when a full DWORD is received.
You need to recover the actual RC5 bits out of the (oversampled) IR sensor
bits. (Hint: look for the 0/1and 1/0 crossings of the RC5 bi-phase data) An
actual raw RC5 code will span 2-3 DWORDS, depending on the actual alignment.
diff --git a/linux/Documentation/video4linux/meye.txt b/linux/Documentation/video4linux/meye.txt
index 2137da975..ecb34160e 100644
--- a/linux/Documentation/video4linux/meye.txt
+++ b/linux/Documentation/video4linux/meye.txt
@@ -29,7 +29,7 @@ driver (PCI vendor/device is 0x136b/0xff01)
The third one, present in recent (more or less last year) Picturebooks
(C1M* models), is not supported. The manufacturer has given the specs
-to the developers under a NDA (which allows the develoment of a GPL
+to the developers under a NDA (which allows the development of a GPL
driver however), but things are not moving very fast (see
http://r-engine.sourceforge.net/) (PCI vendor/device is 0x10cf/0x2011).
diff --git a/linux/Documentation/video4linux/sn9c102.txt b/linux/Documentation/video4linux/sn9c102.txt
index 1d20895b4..8cda472db 100644
--- a/linux/Documentation/video4linux/sn9c102.txt
+++ b/linux/Documentation/video4linux/sn9c102.txt
@@ -60,7 +60,7 @@ It's worth to note that SONiX has never collaborated with the author during the
development of this project, despite several requests for enough detailed
specifications of the register tables, compression engine and video data format
of the above chips. Nevertheless, these informations are no longer necessary,
-becouse all the aspects related to these chips are known and have been
+because all the aspects related to these chips are known and have been
described in detail in this documentation.
The driver relies on the Video4Linux2 and USB core modules. It has been
@@ -85,7 +85,7 @@ Some of the features of the driver are:
high compression quality (see also "Notes for V4L2 application developers"
and "Video frame formats" paragraphs);
- full support for the capabilities of many of the possible image sensors that
- can be connected to the SN9C10x bridges, including, for istance, red, green,
+ can be connected to the SN9C10x bridges, including, for instance, red, green,
blue and global gain adjustments and exposure (see "Supported devices"
paragraph for details);
- use of default color settings for sunlight conditions;
diff --git a/linux/Documentation/video4linux/w9968cf.txt b/linux/Documentation/video4linux/w9968cf.txt
index 0d53ce774..e0bba8393 100644
--- a/linux/Documentation/video4linux/w9968cf.txt
+++ b/linux/Documentation/video4linux/w9968cf.txt
@@ -15,7 +15,7 @@ Index
5. Supported devices
6. Module dependencies
7. Module loading
-8. Module paramaters
+8. Module parameters
9. Contact information
10. Credits
diff --git a/linux/Documentation/video4linux/zr36120.txt b/linux/Documentation/video4linux/zr36120.txt
index ac6d92d01..1a1c2d03a 100644
--- a/linux/Documentation/video4linux/zr36120.txt
+++ b/linux/Documentation/video4linux/zr36120.txt
@@ -118,9 +118,9 @@ card is not there, please try if any other card gives some
response, and mail me if you got a working tvcard addition.
PS. <TVCard editors behold!)
- Dont forget to set video_input to the number of inputs
+ Don't forget to set video_input to the number of inputs
you defined in the video_mux part of the tvcard definition.
- Its a common error to add a channel but not incrementing
+ It's a common error to add a channel but not incrementing
video_input and getting angry with me/v4l/linux/linus :(
You are now ready to test the framegrabber with your favorite
diff --git a/linux/drivers/media/Kconfig b/linux/drivers/media/Kconfig
index ed4aa4e79..9f7e1fe8c 100644
--- a/linux/drivers/media/Kconfig
+++ b/linux/drivers/media/Kconfig
@@ -54,6 +54,7 @@ config VIDEO_V4L1_COMPAT
config VIDEO_V4L2
bool
+ depends on VIDEO_DEV
default y
source "drivers/media/video/Kconfig"
diff --git a/linux/drivers/media/dvb/cinergyT2/Kconfig b/linux/drivers/media/dvb/cinergyT2/Kconfig
index b5cdd57ec..3d778c5ab 100644
--- a/linux/drivers/media/dvb/cinergyT2/Kconfig
+++ b/linux/drivers/media/dvb/cinergyT2/Kconfig
@@ -56,7 +56,7 @@ config DVB_CINERGYT2_QUERY_INTERVAL
measurements.
Please keep in mind that these updates cause traffic on the tuner
- control bus and thus may or may not affect receiption sensitivity.
+ control bus and thus may or may not affect reception sensitivity.
The default value should be a safe choice for common applications.
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 48569a792..5964b27f9 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -1001,7 +1001,7 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
if (state > 0) {
#else
- if (state.event > PM_EVENT_ON) {
+ if (1) {
#endif
struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf);
diff --git a/linux/drivers/media/dvb/dvb-core/Kconfig b/linux/drivers/media/dvb/dvb-core/Kconfig
index e46eae3b9..1990eda10 100644
--- a/linux/drivers/media/dvb/dvb-core/Kconfig
+++ b/linux/drivers/media/dvb/dvb-core/Kconfig
@@ -19,6 +19,6 @@ config DVB_CORE_ATTACH
allow the card drivers to only load the frontend modules
they require. This saves several KBytes of memory.
- Note: You will need moudule-init-tools v3.2 or later for this feature.
+ Note: You will need module-init-tools v3.2 or later for this feature.
If unsure say Y.
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
index c972fe014..9878183ba 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c
@@ -26,7 +26,6 @@
-#define __KERNEL_SYSCALLS__
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
diff --git a/linux/drivers/media/dvb/dvb-usb/usb-urb.c b/linux/drivers/media/dvb/dvb-usb/usb-urb.c
index 8728cf347..572b2d9aa 100644
--- a/linux/drivers/media/dvb/dvb-usb/usb-urb.c
+++ b/linux/drivers/media/dvb/dvb-usb/usb-urb.c
@@ -122,8 +122,9 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num,
usb_free_stream_buffers(stream);
return -ENOMEM;
}
- deb_mem("buffer %d: %p (dma: %u)\n",
- stream->buf_num, stream->buf_list[stream->buf_num], stream->dma_addr[stream->buf_num]);
+ deb_mem("buffer %d: %p (dma: %Lu)\n",
+ stream->buf_num,
+stream->buf_list[stream->buf_num], (long long)stream->dma_addr[stream->buf_num]);
memset(stream->buf_list[stream->buf_num],0,size);
stream->state |= USB_STATE_URB_BUF;
}
diff --git a/linux/drivers/media/dvb/frontends/tda10086.h b/linux/drivers/media/dvb/frontends/tda10086.h
index e8061db11..18457adee 100644
--- a/linux/drivers/media/dvb/frontends/tda10086.h
+++ b/linux/drivers/media/dvb/frontends/tda10086.h
@@ -35,7 +35,16 @@ struct tda10086_config
u8 invert;
};
+#if defined(CONFIG_DVB_TDA10086) || defined(CONFIG_DVB_TDA10086_MODULE)
extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
struct i2c_adapter* i2c);
+#else
+static inline struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
+ struct i2c_adapter* i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
+ return NULL;
+}
+#endif // CONFIG_DVB_TDA10086
#endif // TDA10086_H
diff --git a/linux/drivers/media/dvb/frontends/tda826x.h b/linux/drivers/media/dvb/frontends/tda826x.h
index 330760763..83998c001 100644
--- a/linux/drivers/media/dvb/frontends/tda826x.h
+++ b/linux/drivers/media/dvb/frontends/tda826x.h
@@ -35,6 +35,19 @@
* @param has_loopthrough Set to 1 if the card has a loopthrough RF connector.
* @return FE pointer on success, NULL on failure.
*/
-extern struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c, int has_loopthrough);
-
-#endif
+#if defined(CONFIG_DVB_TDA826X) || defined(CONFIG_DVB_TDA826X_MODULE)
+extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr,
+ struct i2c_adapter *i2c,
+ int has_loopthrough);
+#else
+static inline struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe,
+ int addr,
+ struct i2c_adapter *i2c,
+ int has_loopthrough)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
+ return NULL;
+}
+#endif // CONFIG_DVB_TDA826X
+
+#endif // __DVB_TDA826X_H__
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index ac91d7350..36dd35db4 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -226,7 +226,7 @@ static void ttusb_dec_handle_irq( struct urb *urb, struct pt_regs *regs)
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- case -ETIMEDOUT:
+ case -ETIME:
/* this urb is dead, cleanup */
dprintk("%s:urb shutting down with status: %d\n",
__FUNCTION__, urb->status);
diff --git a/linux/drivers/media/radio/Kconfig b/linux/drivers/media/radio/Kconfig
index 7015517e2..6d96b17a7 100644
--- a/linux/drivers/media/radio/Kconfig
+++ b/linux/drivers/media/radio/Kconfig
@@ -195,8 +195,7 @@ config RADIO_MIROPCM20_RDS
---help---
Choose Y here if you want to see RDS/RBDS information like
RadioText, Programme Service name, Clock Time and date, Programme
- TYpe and Traffic Announcement/Programme identification. You also
- need to say Y to "miroSOUND PCM20 radio" and devfs!
+ Type and Traffic Announcement/Programme identification.
It's not possible to read the raw RDS packets from the device, so
the driver cant provide an V4L interface for this. But the
diff --git a/linux/drivers/media/radio/radio-gemtek-pci.c b/linux/drivers/media/radio/radio-gemtek-pci.c
index 83c7e0e5c..75f2756c1 100644
--- a/linux/drivers/media/radio/radio-gemtek-pci.c
+++ b/linux/drivers/media/radio/radio-gemtek-pci.c
@@ -450,7 +450,7 @@ static int __init gemtek_pci_init_module( void )
static void __exit gemtek_pci_cleanup_module( void )
{
- return pci_unregister_driver( &gemtek_pci_driver );
+ pci_unregister_driver(&gemtek_pci_driver);
}
MODULE_AUTHOR( "Vladimir Shebordaev <vshebordaev@mail.ru>" );
diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig
index c59a01984..fbe5b6168 100644
--- a/linux/drivers/media/video/Kconfig
+++ b/linux/drivers/media/video/Kconfig
@@ -353,7 +353,7 @@ config VIDEO_SAA6588
help
Support for Radio Data System (RDS) decoder. This allows seeing
radio station identification transmitted using this standard.
- Currentlly, it works only with bt8x8 chips.
+ Currently, it works only with bt8x8 chips.
To compile this driver as a module, choose M here: the
module will be called saa6588.
diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c
index 825b09a5a..2cdb6f340 100644
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c
@@ -2023,7 +2023,7 @@ struct tvcard bttv_tvcards[] = {
.no_msp34xx = 1,
.no_tda9875 = 1,
.no_tda7432 = 1,
- .muxsel = { 3, 0, 1, 2 },
+ .muxsel = { 3, 1 },
.pll = PLL_28,
.no_gpioirq = 1,
.has_dvb = 1,
diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c
index a4b9e9f81..7a3da391d 100644
--- a/linux/drivers/media/video/bt8xx/bttv-i2c.c
+++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c
@@ -113,7 +113,6 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = {
.getsda = bttv_bit_getsda,
.getscl = bttv_bit_getscl,
.udelay = 16,
- .mdelay = 10,
.timeout = 200,
};
diff --git a/linux/drivers/media/video/cpia2/cpia2.h b/linux/drivers/media/video/cpia2/cpia2.h
index b7226a418..24c47092e 100644
--- a/linux/drivers/media/video/cpia2/cpia2.h
+++ b/linux/drivers/media/video/cpia2/cpia2.h
@@ -51,10 +51,6 @@
/***
* Image defines
***/
-#ifndef true
-#define true 1
-#define false 0
-#endif
/* Misc constants */
#define ALLOW_CORRUPT 0 /* Causes collater to discard checksum */
diff --git a/linux/drivers/media/video/cx25840/cx25840-vbi.c b/linux/drivers/media/video/cx25840/cx25840-vbi.c
index 4b6417fe8..f78f8cd2d 100644
--- a/linux/drivers/media/video/cx25840/cx25840-vbi.c
+++ b/linux/drivers/media/video/cx25840/cx25840-vbi.c
@@ -236,6 +236,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg)
0, 0, V4L2_SLICED_VPS, 0, 0, /* 9 */
0, 0, 0, 0
};
+ int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_525_60);
int i;
fmt = arg;
@@ -247,13 +248,25 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg)
if ((cx25840_read(client, 0x404) & 0x10) == 0)
break;
- for (i = 7; i <= 23; i++) {
- u8 v = cx25840_read(client, 0x424 + i - 7);
+ if (is_pal) {
+ for (i = 7; i <= 23; i++) {
+ u8 v = cx25840_read(client, 0x424 + i - 7);
+
+ svbi->service_lines[0][i] = lcr2vbi[v >> 4];
+ svbi->service_lines[1][i] = lcr2vbi[v & 0xf];
+ svbi->service_set |=
+ svbi->service_lines[0][i] | svbi->service_lines[1][i];
+ }
+ }
+ else {
+ for (i = 10; i <= 21; i++) {
+ u8 v = cx25840_read(client, 0x424 + i - 10);
- svbi->service_lines[0][i] = lcr2vbi[v >> 4];
- svbi->service_lines[1][i] = lcr2vbi[v & 0xf];
- svbi->service_set |=
- svbi->service_lines[0][i] | svbi->service_lines[1][i];
+ svbi->service_lines[0][i] = lcr2vbi[v >> 4];
+ svbi->service_lines[1][i] = lcr2vbi[v & 0xf];
+ svbi->service_set |=
+ svbi->service_lines[0][i] | svbi->service_lines[1][i];
+ }
}
break;
}
diff --git a/linux/drivers/media/video/cx88/Kconfig b/linux/drivers/media/video/cx88/Kconfig
index 51d68f32a..0f9d96963 100644
--- a/linux/drivers/media/video/cx88/Kconfig
+++ b/linux/drivers/media/video/cx88/Kconfig
@@ -69,6 +69,6 @@ config VIDEO_CX88_VP3054
depends on VIDEO_CX88_DVB && DVB_MT352
---help---
This adds DVB-T support for cards based on the
- Connexant 2388x chip and the MT352 demodulator,
+ Conexant 2388x chip and the MT352 demodulator,
which also require support for the VP-3054
Secondary I2C bus, such at DNTV Live! DVB-T Pro.
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c
index 672747a5f..da24a0a56 100644
--- a/linux/drivers/media/video/cx88/cx88-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c
@@ -174,7 +174,6 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = {
.getsda = cx8800_bit_getsda,
.getscl = cx8800_bit_getscl,
.udelay = 16,
- .mdelay = 10,
.timeout = 200,
};
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c
index 0859f7e32..dd5fd1b64 100644
--- a/linux/drivers/media/video/cx88/cx88-mpeg.c
+++ b/linux/drivers/media/video/cx88/cx88-mpeg.c
@@ -613,6 +613,8 @@ struct cx8802_driver * cx8802_get_driver(struct cx8802_dev *dev, enum cx88_board
list_for_each(list,&cx8802_devlist) {
h = list_entry(list, struct cx8802_dev, devlist);
+ if (h != dev)
+ continue;
list_for_each(list2, &h->drvlist.devlist) {
d = list_entry(list2, struct cx8802_driver, devlist);
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 9782a3799..1f1640f0f 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1779,6 +1779,30 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
mutex_unlock(&core->lock);
return 0;
}
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+ /* ioctls to allow direct acces to the cx2388x registers */
+ case VIDIOC_INT_G_REGISTER:
+ {
+ struct v4l2_register *reg = arg;
+
+ if (reg->i2c_id != 0)
+ return -EINVAL;
+ /* cx2388x has a 24-bit register space */
+ reg->val = cx_read(reg->reg&0xffffff);
+ return 0;
+ }
+ case VIDIOC_INT_S_REGISTER:
+ {
+ struct v4l2_register *reg = arg;
+
+ if (reg->i2c_id != 0)
+ return -EINVAL;
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+ cx_write(reg->reg&0xffffff, reg->val);
+ return 0;
+ }
+#endif
default:
return v4l_compat_translate_ioctl(inode,file,cmd,arg,
diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c
index 504a02215..e9dd18827 100644
--- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c
@@ -104,7 +104,6 @@ static struct i2c_algo_bit_data vp3054_i2c_algo_template = {
.getsda = vp3054_bit_getsda,
.getscl = vp3054_bit_getscl,
.udelay = 16,
- .mdelay = 10,
.timeout = 200,
};
diff --git a/linux/drivers/media/video/ov511.c b/linux/drivers/media/video/ov511.c
index 51e4c4dfe..aeb30bdbc 100644
--- a/linux/drivers/media/video/ov511.c
+++ b/linux/drivers/media/video/ov511.c
@@ -301,10 +301,11 @@ static struct symbolic_list senlist[] = {
static struct symbolic_list urb_errlist[] = {
{ -ENOSR, "Buffer error (overrun)" },
{ -EPIPE, "Stalled (device not responding)" },
- { -EOVERFLOW, "Babble (bad cable?)" },
+ { -EOVERFLOW, "Babble (device sends too much data)" },
{ -EPROTO, "Bit-stuff error (bad cable?)" },
- { -EILSEQ, "CRC/Timeout" },
- { -ETIMEDOUT, "NAK (device does not respond)" },
+ { -EILSEQ, "CRC/Timeout (bad cable?)" },
+ { -ETIME, "Device does not respond to token" },
+ { -ETIMEDOUT, "Device does not respond to command" },
{ -1, NULL }
};
diff --git a/linux/drivers/media/video/pwc/philips.txt b/linux/drivers/media/video/pwc/philips.txt
index 11f751a6b..f5e848410 100644
--- a/linux/drivers/media/video/pwc/philips.txt
+++ b/linux/drivers/media/video/pwc/philips.txt
@@ -175,8 +175,8 @@ dev_hint
- If a device node is already occupied, registration will fail and
the webcam is not available.
- You can have up to 64 video devices; be sure to make enough device
- nodes in /dev if you want to spread the numbers (this does not apply
- to devfs). After /dev/video9 comes /dev/video10 (not /dev/videoA).
+ nodes in /dev if you want to spread the numbers.
+ After /dev/video9 comes /dev/video10 (not /dev/videoA).
- If a camera does not match any dev_hint, it will simply get assigned
the first available device node, just as it used to be.
diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c
index dd731a8e7..f00a606c5 100644
--- a/linux/drivers/media/video/pwc/pwc-if.c
+++ b/linux/drivers/media/video/pwc/pwc-if.c
@@ -736,7 +736,7 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs)
case -EOVERFLOW: errmsg = "Babble (bad cable?)"; break;
case -EPROTO: errmsg = "Bit-stuff error (bad cable?)"; break;
case -EILSEQ: errmsg = "CRC/Timeout (could be anything)"; break;
- case -ETIMEDOUT: errmsg = "NAK (device does not respond)"; break;
+ case -ETIME: errmsg = "Device does not respond"; break;
}
PWC_DEBUG_FLOW("pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg);
/* Give up after a number of contiguous errors on the USB bus.
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index d6850d5bd..f6b19bad3 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -3034,6 +3034,110 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1,
},
},
+ [SAA7134_BOARD_ASUS_EUROPA2_HYBRID] = {
+ .name = "Asus Europa2 OEM",
+ .audio_clock = 0x00187de7,
+ .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
+ .radio_type = UNSET,
+ .tuner_addr = ADDR_UNSET,
+ .radio_addr = ADDR_UNSET,
+ .tda9887_conf = TDA9887_PRESENT| TDA9887_PORT1_ACTIVE | TDA9887_PORT2_ACTIVE,
+ .mpeg = SAA7134_MPEG_DVB,
+ .inputs = {{
+ .name = name_tv,
+ .vmux = 3,
+ .amux = TV,
+ .tv = 1,
+ },{
+ .name = name_comp1,
+ .vmux = 4,
+ .amux = LINE2,
+ },{
+ .name = name_svideo,
+ .vmux = 8,
+ .amux = LINE2,
+ }},
+ .radio = {
+ .name = name_radio,
+ .amux = LINE1,
+ },
+ },
+ [SAA7134_BOARD_PINNACLE_PCTV_310i] = {
+ .name = "Pinnacle PCTV 310i",
+ .audio_clock = 0x00187de7,
+ .tuner_type = TUNER_PHILIPS_TDA8290,
+ .radio_type = UNSET,
+ .tuner_addr = ADDR_UNSET,
+ .radio_addr = ADDR_UNSET,
+ .mpeg = SAA7134_MPEG_DVB,
+ .gpiomask = 0x000200000,
+ .inputs = {{
+ .name = name_tv,
+ .vmux = 4,
+ .amux = TV,
+ .tv = 1,
+ },{
+ .name = name_comp1,
+ .vmux = 1,
+ .amux = LINE2,
+ },{
+ .name = name_comp2,
+ .vmux = 0,
+ .amux = LINE2,
+ },{
+ .name = name_svideo,
+ .vmux = 8,
+ .amux = LINE2,
+ }},
+ .radio = {
+ .name = name_radio,
+ .amux = TV,
+ .gpio = 0x0200000,
+ },
+ },
+ [SAA7134_BOARD_AVERMEDIA_STUDIO_507] = {
+ /* Mikhail Fedotov <mo_fedotov@mail.ru> */
+ .name = "Avermedia AVerTV Studio 507",
+ .audio_clock = 0x00187de7,
+ .tuner_type = TUNER_PHILIPS_FM1256_IH3,
+ .radio_type = UNSET,
+ .tuner_addr = ADDR_UNSET,
+ .radio_addr = ADDR_UNSET,
+ .tda9887_conf = TDA9887_PRESENT,
+ .gpiomask = 0x03,
+ .inputs = {{
+ .name = name_tv,
+ .vmux = 1,
+ .amux = TV,
+ .tv = 1,
+ .gpio = 0x00,
+ },{
+ .name = name_comp1,
+ .vmux = 0,
+ .amux = LINE2,
+ .gpio = 0x00,
+ },{
+ .name = name_comp2,
+ .vmux = 3,
+ .amux = LINE2,
+ .gpio = 0x00,
+ },{
+ .name = name_svideo,
+ .vmux = 8,
+ .amux = LINE2,
+ .gpio = 0x00,
+ }},
+ .radio = {
+ .name = name_radio,
+ .amux = LINE2,
+ .gpio = 0x01,
+ },
+ .mute = {
+ .name = name_mute,
+ .amux = LINE1,
+ .gpio = 0x00,
+ },
+ },
};
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3637,6 +3741,24 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subdevice = 0x2c00,
.driver_data = SAA7134_BOARD_AVERMEDIA_A16AR,
},{
+ .vendor = PCI_VENDOR_ID_PHILIPS,
+ .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
+ .subvendor = 0x1043,
+ .subdevice = 0x4860,
+ .driver_data = SAA7134_BOARD_ASUS_EUROPA2_HYBRID,
+ },{
+ .vendor = PCI_VENDOR_ID_PHILIPS,
+ .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
+ .subvendor = 0x11bd,
+ .subdevice = 0x002f,
+ .driver_data = SAA7134_BOARD_PINNACLE_PCTV_310i,
+ },{
+ .vendor = PCI_VENDOR_ID_PHILIPS,
+ .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
+ .subvendor = 0x1461, /* Avermedia Technologies Inc */
+ .subdevice = 0x9715,
+ .driver_data = SAA7134_BOARD_AVERMEDIA_STUDIO_507,
+ },{
/* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -3760,6 +3882,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
case SAA7134_BOARD_AVERMEDIA_305:
case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
case SAA7134_BOARD_AVERMEDIA_307:
+ case SAA7134_BOARD_AVERMEDIA_STUDIO_507:
case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
/* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */
case SAA7134_BOARD_VIDEOMATE_TV_PVR:
@@ -3835,6 +3958,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
break;
/* i2c remotes */
case SAA7134_BOARD_PINNACLE_PCTV_110i:
+ case SAA7134_BOARD_PINNACLE_PCTV_310i:
case SAA7134_BOARD_UPMOST_PURPLE_TV:
dev->has_remote = SAA7134_REMOTE_I2C;
break;
@@ -3948,6 +4072,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
break;
case SAA7134_BOARD_PHILIPS_EUROPA:
case SAA7134_BOARD_VIDEOMATE_DVBT_300:
+ case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
/* The Philips EUROPA based hybrid boards have the tuner connected through
* the channel decoder. We have to make it transparent to find it
*/
@@ -3965,6 +4090,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
}
break;
case SAA7134_BOARD_PHILIPS_TIGER:
+ case SAA7134_BOARD_PINNACLE_PCTV_310i:
case SAA7134_BOARD_TEVION_DVBT_220RF:
case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
case SAA7134_BOARD_MEDION_MD8800_QUADRO:
diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c
index 0718f131a..b18e9a504 100644
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -294,7 +294,7 @@ static int philips_tu1216_tuner_60_set_params(struct dvb_frontend *fe, struct dv
return philips_tda6651_pll_set(0x60, fe, params);
}
-static int philips_tu1216_request_firmware(struct dvb_frontend *fe,
+static int philips_tda1004x_request_firmware(struct dvb_frontend *fe,
const struct firmware **fw, char *name)
{
struct saa7134_dev *dev = fe->dvb->priv;
@@ -309,7 +309,7 @@ static struct tda1004x_config philips_tu1216_60_config = {
.xtal_freq = TDA10046_XTAL_4M,
.agc_config = TDA10046_AGC_DEFAULT,
.if_freq = TDA10046_FREQ_3617,
- .request_firmware = philips_tu1216_request_firmware,
+ .request_firmware = philips_tda1004x_request_firmware,
};
/* ------------------------------------------------------------------ */
@@ -332,7 +332,7 @@ static struct tda1004x_config philips_tu1216_61_config = {
.xtal_freq = TDA10046_XTAL_4M,
.agc_config = TDA10046_AGC_DEFAULT,
.if_freq = TDA10046_FREQ_3617,
- .request_firmware = philips_tu1216_request_firmware,
+ .request_firmware = philips_tda1004x_request_firmware,
};
/* ------------------------------------------------------------------ */
@@ -813,32 +813,40 @@ static int philips_tda827xa_tuner_sleep(u8 addr, struct dvb_frontend *fe)
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
return 0;
}
/* ------------------------------------------------------------------ */
-static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
+static int tda8290_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
{
- int ret;
struct saa7134_dev *dev = fe->dvb->priv;
static u8 tda8290_close[] = { 0x21, 0xc0};
static u8 tda8290_open[] = { 0x21, 0x80};
struct i2c_msg tda8290_msg = {.addr = 0x4b,.flags = 0, .len = 2};
-
- /* close tda8290 i2c bridge */
- tda8290_msg.buf = tda8290_close;
- ret = i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1);
- if (ret != 1)
+ if (enable) {
+ tda8290_msg.buf = tda8290_close;
+ } else {
+ tda8290_msg.buf = tda8290_open;
+ }
+ if (i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1) != 1)
return -EIO;
msleep(20);
+ return 0;
+}
+
+/* ------------------------------------------------------------------ */
+
+static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
+{
+ int ret;
+
ret = philips_tda827xa_pll_set(0x61, fe, params);
if (ret != 0)
return ret;
- /* open tda8290 i2c bridge */
- tda8290_msg.buf = tda8290_open;
- i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1);
- return ret;
+ return 0;
}
static int philips_tiger_tuner_init(struct dvb_frontend *fe)
@@ -875,6 +883,46 @@ static struct tda1004x_config philips_tiger_config = {
/* ------------------------------------------------------------------ */
+static struct tda1004x_config pinnacle_pctv_310i_config = {
+ .demod_address = 0x08,
+ .invert = 1,
+ .invert_oclk = 0,
+ .xtal_freq = TDA10046_XTAL_16M,
+ .agc_config = TDA10046_AGC_TDA827X,
+ .if_freq = TDA10046_FREQ_045,
+ .request_firmware = philips_tda1004x_request_firmware,
+};
+
+/* ------------------------------------------------------------------ */
+
+static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe)
+{
+ struct saa7134_dev *dev = fe->dvb->priv;
+ static u8 data[] = { 0x3c, 0x33, 0x6a};
+ struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
+
+ if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1)
+ return -EIO;
+ /* make sure the DVB-T antenna input is set */
+ saa_setl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000);
+ return 0;
+}
+
+static int asus_p7131_dual_tuner_sleep(struct dvb_frontend *fe)
+{
+ struct saa7134_dev *dev = fe->dvb->priv;
+ static u8 data[] = { 0x3c, 0x33, 0x68};
+ struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
+
+ i2c_transfer(&dev->i2c_adap, &msg, 1);
+ philips_tda827xa_tuner_sleep( 0x61, fe);
+ /* reset antenna inputs for analog usage */
+ saa_clearl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000);
+ return 0;
+}
+
+/* ------------------------------------------------------------------ */
+
static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
{
int ret;
@@ -1139,21 +1187,33 @@ static int dvb_init(struct saa7134_dev *dev)
&philips_tiger_config,
&dev->i2c_adap);
if (dev->dvb.frontend) {
+ dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
}
break;
- case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
+ case SAA7134_BOARD_PINNACLE_PCTV_310i:
dev->dvb.frontend = dvb_attach(tda10046_attach,
- &philips_tiger_config,
+ &pinnacle_pctv_310i_config,
&dev->i2c_adap);
if (dev->dvb.frontend) {
+ dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
}
break;
+ case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
+ dev->dvb.frontend = dvb_attach(tda10046_attach,
+ &philips_tiger_config,
+ &dev->i2c_adap);
+ if (dev->dvb.frontend) {
+ dev->dvb.frontend->ops.tuner_ops.init = asus_p7131_dual_tuner_init;
+ dev->dvb.frontend->ops.tuner_ops.sleep = asus_p7131_dual_tuner_sleep;
+ dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
+ }
+ break;
case SAA7134_BOARD_FLYDVBT_LR301:
dev->dvb.frontend = dvb_attach(tda10046_attach,
&tda827x_lifeview_config,
@@ -1241,6 +1301,18 @@ static int dvb_init(struct saa7134_dev *dev)
}
}
break;
+ case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
+ dev->dvb.frontend = tda10046_attach(&medion_cardbus,
+ &dev->i2c_adap);
+ if (dev->dvb.frontend) {
+ dev->original_demod_sleep = dev->dvb.frontend->ops.sleep;
+ dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep;
+ dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init;
+ dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep;
+ dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params;
+ }
+ break;
+
default:
printk("%s: Huh? unknown DVB card?\n",dev->name);
break;
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index 0799ce916..78b0c7485 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -185,6 +185,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
case SAA7134_BOARD_AVERMEDIA_307:
case SAA7134_BOARD_AVERMEDIA_STUDIO_305:
case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
+ case SAA7134_BOARD_AVERMEDIA_STUDIO_507:
case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
case SAA7134_BOARD_AVERMEDIA_A16AR:
ir_codes = ir_codes_avermedia;
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index af7ded81c..019e3eada 100644
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -73,12 +73,12 @@ static struct mainscan {
int carr;
} mainscan[] = {
{
- .name = "M",
- .std = V4L2_STD_NTSC | V4L2_STD_PAL_M,
+ .name = "MN",
+ .std = V4L2_STD_MN,
.carr = 4500,
},{
- .name = "BG",
- .std = V4L2_STD_PAL_BG,
+ .name = "BGH",
+ .std = V4L2_STD_B | V4L2_STD_GH,
.carr = 5500,
},{
.name = "I",
@@ -86,7 +86,7 @@ static struct mainscan {
.carr = 6000,
},{
.name = "DKL",
- .std = V4L2_STD_PAL_DK | V4L2_STD_SECAM,
+ .std = V4L2_STD_DK | V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC,
.carr = 6500,
}
};
@@ -94,76 +94,70 @@ static struct mainscan {
static struct saa7134_tvaudio tvaudio[] = {
{
.name = "PAL-B/G FM-stereo",
- .std = V4L2_STD_PAL,
+ .std = V4L2_STD_PAL_BG,
.mode = TVAUDIO_FM_BG_STEREO,
.carr1 = 5500,
.carr2 = 5742,
},{
.name = "PAL-D/K1 FM-stereo",
- .std = V4L2_STD_PAL,
+ .std = V4L2_STD_PAL_DK,
.carr1 = 6500,
.carr2 = 6258,
.mode = TVAUDIO_FM_BG_STEREO,
},{
.name = "PAL-D/K2 FM-stereo",
- .std = V4L2_STD_PAL,
+ .std = V4L2_STD_PAL_DK,
.carr1 = 6500,
.carr2 = 6742,
.mode = TVAUDIO_FM_BG_STEREO,
},{
.name = "PAL-D/K3 FM-stereo",
- .std = V4L2_STD_PAL,
+ .std = V4L2_STD_PAL_DK,
.carr1 = 6500,
.carr2 = 5742,
.mode = TVAUDIO_FM_BG_STEREO,
},{
.name = "PAL-B/G NICAM",
- .std = V4L2_STD_PAL,
+ .std = V4L2_STD_PAL_BG,
.carr1 = 5500,
.carr2 = 5850,
.mode = TVAUDIO_NICAM_FM,
},{
.name = "PAL-I NICAM",
- .std = V4L2_STD_PAL,
+ .std = V4L2_STD_PAL_I,
.carr1 = 6000,
.carr2 = 6552,
.mode = TVAUDIO_NICAM_FM,
},{
.name = "PAL-D/K NICAM",
- .std = V4L2_STD_PAL,
+ .std = V4L2_STD_PAL_DK,
.carr1 = 6500,
.carr2 = 5850,
.mode = TVAUDIO_NICAM_FM,
},{
.name = "SECAM-L NICAM",
- .std = V4L2_STD_SECAM,
+ .std = V4L2_STD_SECAM_L,
.carr1 = 6500,
.carr2 = 5850,
.mode = TVAUDIO_NICAM_AM,
},{
- .name = "SECAM-L MONO",
- .std = V4L2_STD_SECAM,
+ .name = "SECAM-D/K NICAM",
+ .std = V4L2_STD_SECAM_DK,
.carr1 = 6500,
- .carr2 = -1,
- .mode = TVAUDIO_AM_MONO,
+ .carr2 = 5850,
+ .mode = TVAUDIO_NICAM_FM,
},{
- .name = "SECAM-D/K",
- .std = V4L2_STD_SECAM,
- .carr1 = 6500,
- .carr2 = -1,
- .mode = TVAUDIO_FM_MONO,
+ .name = "NTSC-A2 FM-stereo",
+ .std = V4L2_STD_NTSC,
+ .carr1 = 4500,
+ .carr2 = 4724,
+ .mode = TVAUDIO_FM_K_STEREO,
},{
.name = "NTSC-M",
.std = V4L2_STD_NTSC,
.carr1 = 4500,
.carr2 = -1,
.mode = TVAUDIO_FM_MONO,
- },{
- .name = "NTSC-A2 FM-stereo",
- .std = V4L2_STD_NTSC,
- .carr1 = 4500,
- .carr2 = 4724,
- .mode = TVAUDIO_FM_K_STEREO,
}
};
#define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio))
@@ -341,12 +335,6 @@ static void tvaudio_setmode(struct saa7134_dev *dev,
saa_writeb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0xa1);
saa_writeb(SAA7134_NICAM_CONFIG, 0x00);
break;
- case TVAUDIO_AM_MONO:
- saa_writeb(SAA7134_DEMODULATOR, 0x12);
- saa_writeb(SAA7134_DCXO_IDENT_CTRL, 0x00);
- saa_writeb(SAA7134_FM_DEEMPHASIS, 0x44);
- saa_writeb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0xa0);
- break;
case TVAUDIO_FM_SAT_STEREO:
/* not implemented (yet) */
break;
@@ -391,7 +379,6 @@ static int tvaudio_checkcarrier(struct saa7134_dev *dev, struct mainscan *scan)
}
printk("\n");
}
-
if (dev->tvnorm->id & scan->std) {
tvaudio_setcarrier(dev,scan->carr-90,scan->carr-90);
saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
@@ -444,7 +431,6 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
switch (audio->mode) {
case TVAUDIO_FM_MONO:
- case TVAUDIO_AM_MONO:
return V4L2_TUNER_SUB_MONO;
case TVAUDIO_FM_K_STEREO:
case TVAUDIO_FM_BG_STEREO:
@@ -513,7 +499,6 @@ static int tvaudio_setstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
switch (audio->mode) {
case TVAUDIO_FM_MONO:
- case TVAUDIO_AM_MONO:
/* nothing to do ... */
break;
case TVAUDIO_FM_K_STEREO:
@@ -582,6 +567,7 @@ static int tvaudio_thread(void *data)
if (1 == nscan) {
/* only one candidate -- skip scan ;) */
+ dprintk("only one main carrier candidate - skipping scan\n");
max1 = 12345;
carrier = default_carrier;
} else {
@@ -629,7 +615,6 @@ static int tvaudio_thread(void *data)
dev->automute = 0;
saa_andorb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0x30, 0x00);
saa7134_tvaudio_setmute(dev);
-
/* find the exact tv audio norm */
for (audio = UNSET, i = 0; i < TVAUDIO; i++) {
if (dev->tvnorm->id != UNSET &&
@@ -637,7 +622,7 @@ static int tvaudio_thread(void *data)
continue;
if (tvaudio[i].carr1 != carrier)
continue;
-
+ /* Note: at least the primary carrier is right here */
if (UNSET == audio)
audio = i;
tvaudio_setmode(dev,&tvaudio[i],"trying");
@@ -652,6 +637,7 @@ static int tvaudio_thread(void *data)
if (UNSET == audio)
continue;
tvaudio_setmode(dev,&tvaudio[audio],"using");
+
tvaudio_setstereo(dev,&tvaudio[audio],V4L2_TUNER_MODE_MONO);
dev->tvaudio = &tvaudio[audio];
@@ -794,7 +780,6 @@ static int mute_input_7133(struct saa7134_dev *dev)
int mask;
struct saa7134_input *in;
- /* Hac 0506 route OSS sound simultanously */
xbarin = 0x03;
switch (dev->input->amux) {
case TV:
@@ -886,18 +871,16 @@ static int tvaudio_thread_ddep(void *data)
} else {
/* (let chip) scan for sound carrier */
norms = 0;
- if (dev->tvnorm->id & V4L2_STD_PAL) {
- dprintk("PAL scan\n");
- norms |= 0x2c; /* B/G + D/K + I */
- }
- if (dev->tvnorm->id & V4L2_STD_NTSC) {
- dprintk("NTSC scan\n");
- norms |= 0x40; /* M */
- }
- if (dev->tvnorm->id & V4L2_STD_SECAM) {
- dprintk("SECAM scan\n");
- norms |= 0x18; /* L + D/K */
- }
+ if (dev->tvnorm->id & (V4L2_STD_B | V4L2_STD_GH))
+ norms |= 0x04;
+ if (dev->tvnorm->id & V4L2_STD_PAL_I)
+ norms |= 0x20;
+ if (dev->tvnorm->id & V4L2_STD_DK)
+ norms |= 0x08;
+ if (dev->tvnorm->id & V4L2_STD_MN)
+ norms |= 0x40;
+ if (dev->tvnorm->id & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC))
+ norms |= 0x10;
if (0 == norms)
norms = 0x7c; /* all */
dprintk("scanning:%s%s%s%s%s\n",
@@ -1086,7 +1069,11 @@ int saa7134_tvaudio_fini(struct saa7134_dev *dev)
int saa7134_tvaudio_do_scan(struct saa7134_dev *dev)
{
- if (dev->thread.pid >= 0) {
+ if (dev->input->amux != TV) {
+ dprintk("sound IF not in use, skipping scan\n");
+ dev->automute = 0;
+ saa7134_tvaudio_setmute(dev);
+ } else if (dev->thread.pid >= 0) {
dev->thread.mode = UNSET;
dev->thread.scan2++;
wake_up_interruptible(&dev->thread.wq);
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 3a2fde062..8f456a439 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -44,12 +44,16 @@ static unsigned int gbuffers = 8;
static unsigned int noninterlaced = 1;
static unsigned int gbufsize = 720*576*4;
static unsigned int gbufsize_max = 720*576*4;
+static char secam[] = "--";
module_param(video_debug, int, 0644);
MODULE_PARM_DESC(video_debug,"enable debug messages [video]");
module_param(gbuffers, int, 0444);
MODULE_PARM_DESC(gbuffers,"number of capture buffers, range 2-32");
module_param(noninterlaced, int, 0644);
MODULE_PARM_DESC(noninterlaced,"capture non interlaced video");
+module_param_string(secam, secam, sizeof(secam), 0644);
+MODULE_PARM_DESC(secam, "force SECAM variant, either DK,L or Lc");
+
#define dprintk(fmt, arg...) if (video_debug) \
printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg)
@@ -280,7 +284,43 @@ static struct saa7134_tvnorm tvnorms[] = {
.id = V4L2_STD_SECAM,
NORM_625_50,
- .sync_control = 0x18, /* old: 0x58, */
+ .sync_control = 0x18,
+ .luma_control = 0x1b,
+ .chroma_ctrl1 = 0xd1,
+ .chroma_gain = 0x80,
+ .chroma_ctrl2 = 0x00,
+ .vgate_misc = 0x1c,
+
+ },{
+ .name = "SECAM-DK",
+ .id = V4L2_STD_SECAM_DK,
+ NORM_625_50,
+
+ .sync_control = 0x18,
+ .luma_control = 0x1b,
+ .chroma_ctrl1 = 0xd1,
+ .chroma_gain = 0x80,
+ .chroma_ctrl2 = 0x00,
+ .vgate_misc = 0x1c,
+
+ },{
+ .name = "SECAM-L",
+ .id = V4L2_STD_SECAM_L,
+ NORM_625_50,
+
+ .sync_control = 0x18,
+ .luma_control = 0x1b,
+ .chroma_ctrl1 = 0xd1,
+ .chroma_gain = 0x80,
+ .chroma_ctrl2 = 0x00,
+ .vgate_misc = 0x1c,
+
+ },{
+ .name = "SECAM-Lc",
+ .id = V4L2_STD_SECAM_LC,
+ NORM_625_50,
+
+ .sync_control = 0x18,
.luma_control = 0x1b,
.chroma_ctrl1 = 0xd1,
.chroma_gain = 0x80,
@@ -1777,6 +1817,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
{
v4l2_std_id *id = arg;
unsigned int i;
+ v4l2_std_id fixup;
for (i = 0; i < TVNORMS; i++)
if (*id == tvnorms[i].id)
@@ -1787,7 +1828,22 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
break;
if (i == TVNORMS)
return -EINVAL;
-
+ if ((*id & V4L2_STD_SECAM) && (secam[0] != '-')) {
+ if (secam[0] == 'L' || secam[0] == 'l') {
+ if (secam[1] == 'C' || secam[1] == 'c')
+ fixup = V4L2_STD_SECAM_LC;
+ else
+ fixup = V4L2_STD_SECAM_L;
+ } else {
+ if (secam[0] == 'D' || secam[0] == 'd')
+ fixup = V4L2_STD_SECAM_DK;
+ else
+ fixup = V4L2_STD_SECAM;
+ }
+ for (i = 0; i < TVNORMS; i++)
+ if (fixup == tvnorms[i].id)
+ break;
+ }
mutex_lock(&dev->lock);
if (res_check(fh, RESOURCE_OVERLAY)) {
spin_lock_irqsave(&dev->slock,flags);
@@ -2200,7 +2256,11 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
t->type = V4L2_TUNER_RADIO;
saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t);
-
+ if (dev->input->amux == TV) {
+ t->signal = 0xf800 - ((saa_readb(0x581) & 0x1f) << 11);
+ t->rxsubchans = (saa_readb(0x529) & 0x08) ?
+ V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
+ }
return 0;
}
case VIDIOC_S_TUNER:
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 2a4320c38..2b3f39e53 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -70,7 +70,6 @@ enum saa7134_tvaudio_mode {
TVAUDIO_FM_K_STEREO = 4,
TVAUDIO_NICAM_AM = 5,
TVAUDIO_NICAM_FM = 6,
- TVAUDIO_AM_MONO = 7
};
enum saa7134_audio_in {
@@ -236,6 +235,9 @@ struct saa7134_format {
#define SAA7134_BOARD_FLYDVBS_LR300 97
#define SAA7134_BOARD_PROTEUS_2309 98
#define SAA7134_BOARD_AVERMEDIA_A16AR 99
+#define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100
+#define SAA7134_BOARD_PINNACLE_PCTV_310i 101
+#define SAA7134_BOARD_AVERMEDIA_STUDIO_507 102
#define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index 7670ae921..f963cee12 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -226,8 +226,8 @@ hauppauge_tuner[] =
{ TUNER_TCL_2002MB, "TCL M2523_3DB_E"},
{ TUNER_ABSENT, "Philips 8275A"},
{ TUNER_ABSENT, "Microtune MT2060"},
- { TUNER_ABSENT, "Philips FM1236 MK5"},
- { TUNER_ABSENT, "Philips FM1216ME MK5"},
+ { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK5"},
+ { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216ME MK5"},
{ TUNER_ABSENT, "TCL M2523_3DI_E"},
{ TUNER_ABSENT, "Samsung THPD5222FG30A"},
/* 120-129 */
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c
index b907f6f23..61672a219 100644
--- a/linux/drivers/media/video/vivi.c
+++ b/linux/drivers/media/video/vivi.c
@@ -279,7 +279,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
/* Get first addr pointed to pixel position */
oldpg=get_addr_pos(pos,pages,to_addr);
- pg=pfn_to_page(to_addr[oldpg].sg->dma_address >> PAGE_SHIFT);
+ pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT);
basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset;
/* We will just duplicate the second pixel at the packet */
@@ -294,7 +294,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
for (color=0;color<4;color++) {
pgpos=get_addr_pos(pos,pages,to_addr);
if (pgpos!=oldpg) {
- pg=pfn_to_page(to_addr[pgpos].sg->dma_address >> PAGE_SHIFT);
+ pg=pfn_to_page(sg_dma_address(to_addr[pgpos].sg) >> PAGE_SHIFT);
kunmap_atomic(basep, KM_BOUNCE_READ);
basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset;
oldpg=pgpos;
@@ -346,8 +346,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
for (color=0;color<4;color++) {
pgpos=get_addr_pos(pos,pages,to_addr);
if (pgpos!=oldpg) {
- pg=pfn_to_page(to_addr[pgpos].
- sg->dma_address
+ pg=pfn_to_page(sg_dma_address(
+ to_addr[pgpos].sg)
>> PAGE_SHIFT);
kunmap_atomic(basep,
KM_BOUNCE_READ);
@@ -405,7 +405,7 @@ static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
struct timeval ts;
/* Test if DMA mapping is ready */
- if (!vb->dma.sglist[0].dma_address)
+ if (!sg_dma_address(&vb->dma.sglist[0]))
return;
prep_to_addr(to_addr,vb);
@@ -859,7 +859,7 @@ static int vivi_map_sg(void *dev, struct scatterlist *sg, int nents,
for (i = 0; i < nents; i++ ) {
BUG_ON(!sg[i].page);
- sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
+ sg_dma_address(&sg[i]) = page_to_phys(sg[i].page) + sg[i].offset;
}
return nents;
diff --git a/linux/drivers/media/video/w9968cf.c b/linux/drivers/media/video/w9968cf.c
index 20f211b55..2912326a5 100644
--- a/linux/drivers/media/video/w9968cf.c
+++ b/linux/drivers/media/video/w9968cf.c
@@ -586,15 +586,14 @@ static struct w9968cf_symbolic_list urb_errlist[] = {
{ -EFBIG, "Too much ISO frames requested" },
{ -ENOSR, "Buffer error (overrun)" },
{ -EPIPE, "Specified endpoint is stalled (device not responding)"},
- { -EOVERFLOW, "Babble (bad cable?)" },
+ { -EOVERFLOW, "Babble (too much data)" },
{ -EPROTO, "Bit-stuff error (bad cable?)" },
{ -EILSEQ, "CRC/Timeout" },
- { -ETIMEDOUT, "NAK (device does not respond)" },
+ { -ETIME, "Device does not respond to token" },
+ { -ETIMEDOUT, "Device does not respond to command" },
{ -1, NULL }
};
-
-
/****************************************************************************
* Memory management functions *
****************************************************************************/
diff --git a/linux/drivers/media/video/zoran_card.c b/linux/drivers/media/video/zoran_card.c
index d929791ad..cbd046a3a 100644
--- a/linux/drivers/media/video/zoran_card.c
+++ b/linux/drivers/media/video/zoran_card.c
@@ -823,7 +823,6 @@ static struct i2c_algo_bit_data zoran_i2c_bit_data_template = {
.getsda = zoran_i2c_getsda,
.getscl = zoran_i2c_getscl,
.udelay = 10,
- .mdelay = 0,
.timeout = 100,
};
@@ -1282,9 +1281,7 @@ find_zr36057 (void)
zoran_num = 0;
while (zoran_num < BUZ_MAX &&
- (dev =
- pci_find_device(PCI_VENDOR_ID_ZORAN,
- PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) {
+ (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) {
card_num = card[zoran_num];
zr = &zoran[zoran_num];
memset(zr, 0, sizeof(struct zoran)); // Just in case if previous cycle failed
@@ -1545,7 +1542,8 @@ find_zr36057 (void)
goto zr_detach_vfe;
}
}
-
+ /* Success so keep the pci_dev referenced */
+ pci_dev_get(zr->pci_dev);
zoran_num++;
continue;
@@ -1567,6 +1565,9 @@ find_zr36057 (void)
iounmap(zr->zr36057_mem);
continue;
}
+ if (dev) /* Clean up ref count on early exit */
+ pci_dev_put(dev);
+
if (zoran_num == 0) {
dprintk(1, KERN_INFO "No known MJPEG cards found.\n");
}
diff --git a/linux/drivers/media/video/zr36120.c b/linux/drivers/media/video/zr36120.c
index 9240638a0..b5ffe53c4 100644
--- a/linux/drivers/media/video/zr36120.c
+++ b/linux/drivers/media/video/zr36120.c
@@ -1840,16 +1840,16 @@ int __init find_zoran(void)
struct zoran *ztv;
struct pci_dev *dev = NULL;
unsigned char revision;
- int zoran_num=0;
+ int zoran_num = 0;
- while ((dev = pci_find_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev)))
+ while ((dev = pci_get_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev)))
{
/* Ok, a ZR36120/ZR36125 found! */
ztv = &zorans[zoran_num];
ztv->dev = dev;
if (pci_enable_device(dev))
- return -EIO;
+ continue;
pci_read_config_byte(dev, PCI_CLASS_REVISION, &revision);
printk(KERN_INFO "zoran: Zoran %x (rev %d) ",
@@ -1867,17 +1867,18 @@ int __init find_zoran(void)
{
iounmap(ztv->zoran_mem);
printk(KERN_ERR "zoran: Bad irq number or handler\n");
- return -EINVAL;
+ continue;
}
if (result==-EBUSY)
printk(KERN_ERR "zoran: IRQ %d busy, change your PnP config in BIOS\n",dev->irq);
if (result < 0) {
iounmap(ztv->zoran_mem);
- return result;
+ continue;
}
/* Enable bus-mastering */
pci_set_master(dev);
-
+ /* Keep a reference */
+ pci_dev_get(dev);
zoran_num++;
}
if(zoran_num)
@@ -2041,6 +2042,9 @@ void release_zoran(int max)
if (ztv->zoran_mem)
iounmap(ztv->zoran_mem);
+ /* Drop PCI device */
+ pci_dev_put(ztv->dev);
+
video_unregister_device(&ztv->video_dev);
video_unregister_device(&ztv->vbi_dev);
}
@@ -2057,13 +2061,12 @@ int __init zr36120_init(void)
handle_chipset();
zoran_cards = find_zoran();
- if (zoran_cards<0)
- /* no cards found, no need for a driver */
+ if (zoran_cards <= 0)
return -EIO;
/* initialize Zorans */
for (card=0; card<zoran_cards; card++) {
- if (init_zoran(card)<0) {
+ if (init_zoran(card) < 0) {
/* only release the zorans we have registered */
release_zoran(card);
return -EIO;
diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h
index 9418519a5..0a8f750cb 100644
--- a/linux/include/linux/i2c-id.h
+++ b/linux/include/linux/i2c-id.h
@@ -193,6 +193,7 @@
#define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */
#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */
#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */
+#define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */
/* --- PCF 8584 based algorithms */
#define I2C_HW_P_LP 0x020000 /* Parallel port interface */
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index 739800642..5136305c4 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -367,7 +367,7 @@ extern int video_usercopy(struct inode *inode, struct file *file,
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
-static inline int
+static inline int __must_check
video_device_create_file(struct video_device *vfd,
struct class_device_attribute *attr)
{
diff --git a/v4l/compat.h b/v4l/compat.h
index 3192ef87d..b245c95e2 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -315,6 +315,11 @@ usb_to_input_id(const struct usb_device *dev, struct input_id *id)
#define PCIAGP_FAIL 0
#endif
+#ifndef true
+#define true 1
+#define false 0
+#endif
+
#endif
/*
* Local variables:
diff --git a/v4l/scripts/check_config_defines.pl b/v4l/scripts/check_config_defines.pl
index 91643d23c..6d0256dcf 100755
--- a/v4l/scripts/check_config_defines.pl
+++ b/v4l/scripts/check_config_defines.pl
@@ -12,8 +12,8 @@ if($#ARGV < 0) {
$kdir = shift;
if($#ARGV < 0) {
- @ARGV = `hg manifest | cut "-d " -f3 | grep '.[ch]\$'`;
- $? == 0 and die "Error getting manifest: $!";
+ @ARGV = `hg manifest | cut "-d " -f3 | grep \\.[ch]\$`;
+ $? != 0 and die "Error getting manifest: $!";
chomp @ARGV;
}