summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-11-19 18:07:12 +0000
committerGerd Knorr <devnull@localhost>2004-11-19 18:07:12 +0000
commit7175dee15a08b254c7847bf4bcba6552677eae7f (patch)
treeb3197a92fa5af73a50ca08b577cb3b2ade4ebec6
parentbe06ee9b223801a7f8f55d5303c84c5068728d16 (diff)
downloadmediapointer-dvb-s2-7175dee15a08b254c7847bf4bcba6552677eae7f.tar.gz
mediapointer-dvb-s2-7175dee15a08b254c7847bf4bcba6552677eae7f.tar.bz2
- misc cleanups.
- blackbird + empress updates.
-rw-r--r--linux/drivers/media/video/bttv-cards.c31
-rw-r--r--linux/drivers/media/video/bttv-driver.c22
-rw-r--r--linux/drivers/media/video/bttv-i2c.c8
-rw-r--r--linux/drivers/media/video/bttv-risc.c10
-rw-r--r--linux/drivers/media/video/bttv.h4
-rw-r--r--linux/drivers/media/video/bttvp.h23
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c10
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c3
-rw-r--r--linux/drivers/media/video/cx88/cx88-tvaudio.c4
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c4
-rw-r--r--linux/drivers/media/video/msp3400-driver.c8
-rw-r--r--linux/drivers/media/video/msp3400.c8
-rw-r--r--linux/drivers/media/video/saa6752hs.c98
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c98
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c8
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c15
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c20
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h3
-rw-r--r--linux/drivers/media/video/tda7432.c12
-rw-r--r--linux/drivers/media/video/tda9875.c4
-rw-r--r--linux/drivers/media/video/tvaudio.c4
-rw-r--r--linux/drivers/media/video/v4l2-common.c4
-rw-r--r--linux/include/linux/videodev2.h2
24 files changed, 189 insertions, 218 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c
index 398bd7e83..2e5d012fa 100644
--- a/linux/drivers/media/video/bttv-cards.c
+++ b/linux/drivers/media/video/bttv-cards.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-cards.c,v 1.34 2004/11/19 12:16:30 kraxel Exp $
+ $Id: bttv-cards.c,v 1.35 2004/11/19 18:07:12 kraxel Exp $
bttv-cards.c
@@ -82,12 +82,13 @@ static int tea5757_read(struct bttv *btv);
static int tea5757_write(struct bttv *btv, int value);
static void identify_by_eeprom(struct bttv *btv,
unsigned char eeprom_data[256]);
+static int __devinit pvr_boot(struct bttv *btv);
/* config variables */
static unsigned int triton1=0;
static unsigned int vsfx=0;
static unsigned int latency = UNSET;
-unsigned int no_overlay=-1;
+static unsigned int no_overlay=-1;
static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
@@ -2166,7 +2167,7 @@ struct tvcard bttv_tvcards[] = {
// .has_remote = 1,
}};
-const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
+static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
/* ----------------------------------------------------------------------- */
@@ -2335,10 +2336,10 @@ static void flyvideo_gpio(struct bttv *btv)
//todo: if(has_tda9874) btv->audio_hook = fv2000s_audio;
}
-int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
- 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
-int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
- 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
+static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
+ 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
+static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
+ 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
static void miro_pinnacle_gpio(struct bttv *btv)
{
@@ -2507,7 +2508,7 @@ static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
/* ----------------------------------------------------------------------- */
-void bttv_reset_audio(struct bttv *btv)
+static void bttv_reset_audio(struct bttv *btv)
{
/*
* BT878A has a audio-reset register.
@@ -2689,6 +2690,8 @@ void __devinit bttv_init_card2(struct bttv *btv)
}
btv->pll.pll_current = -1;
+ bttv_reset_audio(btv);
+
/* tuner configuration (from card list / autodetect / insmod option) */
if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
if(UNSET == btv->tuner_type)
@@ -2955,7 +2958,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
return 0;
}
-int __devinit pvr_boot(struct bttv *btv)
+static int __devinit pvr_boot(struct bttv *btv)
{
const struct firmware *fw_entry;
int rc;
@@ -3084,7 +3087,7 @@ static void __devinit osprey_eeprom(struct bttv *btv)
/* ----------------------------------------------------------------------- */
/* AVermedia specific stuff, from bktr_card.c */
-int tuner_0_table[] = {
+static int tuner_0_table[] = {
TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
@@ -3099,7 +3102,7 @@ int tuner_0_fm_table[] = {
PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL};
#endif
-int tuner_1_table[] = {
+static int tuner_1_table[] = {
TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
@@ -3293,7 +3296,7 @@ static void __devinit init_PXC200(struct bttv *btv)
* Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
*/
-void bus_low(struct bttv *btv, int bit)
+static void bus_low(struct bttv *btv, int bit)
{
if (btv->mbox_ior) {
gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
@@ -3310,7 +3313,7 @@ void bus_low(struct bttv *btv, int bit)
}
}
-void bus_high(struct bttv *btv, int bit)
+static void bus_high(struct bttv *btv, int bit)
{
if (btv->mbox_ior) {
gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
@@ -3327,7 +3330,7 @@ void bus_high(struct bttv *btv, int bit)
}
}
-int bus_in(struct bttv *btv, int bit)
+static int bus_in(struct bttv *btv, int bit)
{
if (btv->mbox_ior) {
gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index b85c14e95..bbaa84e12 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-driver.c,v 1.29 2004/11/10 11:07:24 kraxel Exp $
+ $Id: bttv-driver.c,v 1.30 2004/11/19 18:07:12 kraxel Exp $
bttv - Bt848 frame grabber driver
@@ -627,7 +627,7 @@ static const struct v4l2_queryctrl bttv_ctls[] = {
}
};
-const int BTTV_CTLS = ARRAY_SIZE(bttv_ctls);
+static const int BTTV_CTLS = ARRAY_SIZE(bttv_ctls);
/* ----------------------------------------------------------------------- */
/* resource management */
@@ -763,7 +763,7 @@ static void set_pll(struct bttv *btv)
}
/* used to switch between the bt848's analog/digital video capture modes */
-void bt848A_set_timing(struct bttv *btv)
+static void bt848A_set_timing(struct bttv *btv)
{
int i, len;
int table_idx = bttv_tvnorms[btv->tvnorm].sram;
@@ -1071,7 +1071,7 @@ static void init_bt848(struct bttv *btv)
init_irqreg(btv);
}
-void bttv_reinit_bt848(struct bttv *btv)
+static void bttv_reinit_bt848(struct bttv *btv)
{
unsigned long flags;
@@ -1275,7 +1275,7 @@ void bttv_gpio_tracking(struct bttv *btv, char *comment)
btv->c.nr,outbits,data & outbits, data & ~outbits, comment);
}
-void bttv_field_count(struct bttv *btv)
+static void bttv_field_count(struct bttv *btv)
{
int need_count = 0;
@@ -1475,7 +1475,7 @@ static const char *v4l1_ioctls[] = {
"SMICROCODE", "GVBIFMT", "SVBIFMT" };
#define V4L1_IOCTLS ARRAY_SIZE(v4l1_ioctls)
-int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
+static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
{
switch (cmd) {
case BTTV_VERSION:
@@ -2426,7 +2426,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
if (0 != retval)
goto fh_unlock_and_return;
spin_lock_irqsave(&btv->s_lock,flags);
- buffer_queue(file->private_data,&buf->vb);
+ buffer_queue(&fh->cap,&buf->vb);
spin_unlock_irqrestore(&btv->s_lock,flags);
up(&fh->cap.lock);
return 0;
@@ -2889,11 +2889,11 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
}
fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR;
field = videobuf_next_field(&fh->cap);
- if (0 != fh->cap.ops->buf_prepare(file->private_data,fh->cap.read_buf,field)) {
+ if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,field)) {
up(&fh->cap.lock);
return POLLERR;
}
- fh->cap.ops->buf_queue(file->private_data,fh->cap.read_buf);
+ fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf);
fh->cap.read_off = 0;
}
up(&fh->cap.lock);
@@ -2983,7 +2983,7 @@ static int bttv_release(struct inode *inode, struct file *file)
free_btres(btv,fh,RESOURCE_VIDEO);
}
if (fh->cap.read_buf) {
- buffer_release(file->private_data,fh->cap.read_buf);
+ buffer_release(&fh->cap,fh->cap.read_buf);
kfree(fh->cap.read_buf);
}
@@ -3038,7 +3038,7 @@ static struct video_device bttv_video_template =
.minor = -1,
};
-struct video_device bttv_vbi_template =
+static struct video_device bttv_vbi_template =
{
.name = "bt848/878 vbi",
.type = VID_TYPE_TUNER|VID_TYPE_TELETEXT,
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index ce4845b31..97bc453d2 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-i2c.c,v 1.14 2004/11/17 18:47:47 kraxel Exp $
+ $Id: bttv-i2c.c,v 1.15 2004/11/19 18:07:12 kraxel Exp $
bttv-i2c.c -- all the i2c code is here
@@ -51,7 +51,7 @@ MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time");
/* ----------------------------------------------------------------------- */
/* I2C functions - bitbanging adapter (software i2c) */
-void bttv_bit_setscl(void *data, int state)
+static void bttv_bit_setscl(void *data, int state)
{
struct bttv *btv = (struct bttv*)data;
@@ -63,7 +63,7 @@ void bttv_bit_setscl(void *data, int state)
btread(BT848_I2C);
}
-void bttv_bit_setsda(void *data, int state)
+static void bttv_bit_setsda(void *data, int state)
{
struct bttv *btv = (struct bttv*)data;
@@ -244,7 +244,7 @@ bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
return retval;
}
-int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
+static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
{
struct bttv *btv = i2c_get_adapdata(i2c_adap);
int retval = 0;
diff --git a/linux/drivers/media/video/bttv-risc.c b/linux/drivers/media/video/bttv-risc.c
index 8ef610c34..bdc5ce6c4 100644
--- a/linux/drivers/media/video/bttv-risc.c
+++ b/linux/drivers/media/video/bttv-risc.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-risc.c,v 1.9 2004/10/13 10:39:00 kraxel Exp $
+ $Id: bttv-risc.c,v 1.10 2004/11/19 18:07:12 kraxel Exp $
bttv-risc.c -- interfaces to other kernel modules
@@ -109,7 +109,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
return 0;
}
-int
+static int
bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
struct scatterlist *sglist,
unsigned int yoffset, unsigned int ybpl,
@@ -227,7 +227,7 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
return 0;
}
-int
+static int
bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
const struct bttv_format *fmt, struct bttv_overlay *ov,
int skip_even, int skip_odd)
@@ -315,7 +315,7 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
/* ---------------------------------------------------------- */
-void
+static void
bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
int width, int height, int interleaved, int norm)
{
@@ -363,7 +363,7 @@ bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
}
}
-void
+static void
bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int odd)
{
int off = odd ? 0x80 : 0x00;
diff --git a/linux/drivers/media/video/bttv.h b/linux/drivers/media/video/bttv.h
index 6b1778785..e28dd0021 100644
--- a/linux/drivers/media/video/bttv.h
+++ b/linux/drivers/media/video/bttv.h
@@ -1,5 +1,5 @@
/*
- * $Id: bttv.h,v 1.11 2004/11/10 11:07:24 kraxel Exp $
+ * $Id: bttv.h,v 1.12 2004/11/19 18:07:12 kraxel Exp $
*
* bttv - Bt848 frame grabber driver
*
@@ -340,8 +340,6 @@ void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits);
/* ---------------------------------------------------------- */
/* i2c */
-extern void bttv_bit_setscl(void *data, int state);
-extern void bttv_bit_setsda(void *data, int state);
extern void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg);
extern int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for);
extern int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
diff --git a/linux/drivers/media/video/bttvp.h b/linux/drivers/media/video/bttvp.h
index 8cbb5a861..d978cd97d 100644
--- a/linux/drivers/media/video/bttvp.h
+++ b/linux/drivers/media/video/bttvp.h
@@ -1,5 +1,5 @@
/*
- $Id: bttvp.h,v 1.12 2004/10/25 11:26:36 kraxel Exp $
+ $Id: bttvp.h,v 1.13 2004/11/19 18:07:12 kraxel Exp $
bttv - Bt848 frame grabber driver
@@ -183,22 +183,6 @@ int bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
struct scatterlist *sglist,
unsigned int offset, unsigned int bpl,
unsigned int pitch, unsigned int lines);
-int bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
- struct scatterlist *sglist,
- unsigned int yoffset, unsigned int ybpl,
- unsigned int ypadding, unsigned int ylines,
- unsigned int uoffset, unsigned int voffset,
- unsigned int hshift, unsigned int vshift,
- unsigned int cpadding);
-int bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
- const struct bttv_format *fmt,
- struct bttv_overlay *ov,
- int skip_top, int skip_bottom);
-
-/* calculate / apply geometry settings */
-void bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
- int width, int height, int interleaved, int norm);
-void bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int top);
/* control dma register + risc main loop */
void bttv_set_dma(struct bttv *btv, int override);
@@ -252,11 +236,6 @@ extern unsigned int bttv_gpio;
extern void bttv_gpio_tracking(struct bttv *btv, char *comment);
extern int init_bttv_i2c(struct bttv *btv);
extern int fini_bttv_i2c(struct bttv *btv);
-extern int pvr_boot(struct bttv *btv);
-
-extern int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg);
-extern void bttv_reinit_bt848(struct bttv *btv);
-extern void bttv_field_count(struct bttv *btv);
#define vprintk if (bttv_verbose) printk
#define dprintk if (bttv_debug >= 1) printk
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index 4dae5fd4a..ce8d9dbc9 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-blackbird.c,v 1.18 2004/11/17 18:47:47 kraxel Exp $
+ * $Id: cx88-blackbird.c,v 1.19 2004/11/19 18:07:12 kraxel Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -207,10 +207,6 @@ static int register_write(struct cx88_core *core, u32 address, u32 value)
cx_read(P1_RADDR0);
return wait_ready_gpio0_bit1(core,1);
-#if 0
- udelay(1000); /* without this, things don't go right (subsequent memory_write()'s don't get through */
- /* ? would this be safe here? set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); */
-#endif
}
@@ -283,7 +279,7 @@ static int blackbird_api_cmd(struct cx8802_dev *dev, u32 command,
timeout = jiffies + msecs_to_jiffies(10);
for (;;) {
memory_read(dev->core, dev->mailbox, &flag);
- if (0 == (flag & 4))
+ if (0 != (flag & 4))
break;
if (time_after(jiffies,timeout)) {
dprintk(0, "ERROR: API Mailbox timeout\n");
@@ -324,7 +320,7 @@ static int blackbird_find_mailbox(struct cx8802_dev *dev)
signaturecnt = 0;
if (4 == signaturecnt) {
dprintk(1, "Mailbox signature found\n");
- return i;
+ return i+1;
}
}
dprintk(0, "Mailbox signature values not found!\n");
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index 262a15fc9..a719d50b2 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-cards.c,v 1.48 2004/11/17 18:47:47 kraxel Exp $
+ * $Id: cx88-cards.c,v 1.49 2004/11/19 18:07:12 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* card-specific stuff.
@@ -225,6 +225,7 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_LEADTEK_PVR2000] = {
.name = "Leadtek PVR 2000",
.tuner_type = 38,
+ .tda9887_conf = TDA9887_PRESENT,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c
index caa22220f..ed80391a1 100644
--- a/linux/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c
@@ -1,5 +1,5 @@
/*
- $Id: cx88-tvaudio.c,v 1.24 2004/10/25 11:51:00 kraxel Exp $
+ $Id: cx88-tvaudio.c,v 1.25 2004/11/19 18:07:12 kraxel Exp $
cx88x-audio.c - Conexant CX23880/23881 audio downstream driver driver
@@ -338,7 +338,7 @@ static void set_audio_standard_NICAM(struct cx88_core *core)
static void set_audio_standard_NICAM_L(struct cx88_core *core)
{
- /* This is officially wierd.. register dumps indicate windows
+ /* This is officially weird.. register dumps indicate windows
* uses audio mode 4.. A2. Let's operate and find out. */
static const struct rlist nicam_l[] = {
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 116ecaeb2..45bccfeac 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.46 2004/11/07 14:44:59 kraxel Exp $
+ * $Id: cx88-video.c,v 1.47 2004/11/19 18:07:12 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -1077,7 +1077,7 @@ static int video_release(struct inode *inode, struct file *file)
res_free(dev,fh,RESOURCE_VIDEO);
}
if (fh->vidq.read_buf) {
- buffer_release(file->private_data,fh->vidq.read_buf);
+ buffer_release(&fh->vidq,fh->vidq.read_buf);
kfree(fh->vidq.read_buf);
}
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index aeb101cf5..03f2404a5 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -634,14 +634,6 @@ struct REGISTER_DUMP {
char *name;
};
-struct REGISTER_DUMP d1[] = {
- { 0x007e, "autodetect" },
- { 0x0023, "C_AD_BITS " },
- { 0x0038, "ADD_BITS " },
- { 0x003e, "CIB_BITS " },
- { 0x0057, "ERROR_RATE" },
-};
-
static int
autodetect_stereo(struct i2c_client *client)
{
diff --git a/linux/drivers/media/video/msp3400.c b/linux/drivers/media/video/msp3400.c
index aeb101cf5..03f2404a5 100644
--- a/linux/drivers/media/video/msp3400.c
+++ b/linux/drivers/media/video/msp3400.c
@@ -634,14 +634,6 @@ struct REGISTER_DUMP {
char *name;
};
-struct REGISTER_DUMP d1[] = {
- { 0x007e, "autodetect" },
- { 0x0023, "C_AD_BITS " },
- { 0x0038, "ADD_BITS " },
- { 0x003e, "CIB_BITS " },
- { 0x0057, "ERROR_RATE" },
-};
-
static int
autodetect_stereo(struct i2c_client *client)
{
diff --git a/linux/drivers/media/video/saa6752hs.c b/linux/drivers/media/video/saa6752hs.c
index 312173d5c..d37215ebb 100644
--- a/linux/drivers/media/video/saa6752hs.c
+++ b/linux/drivers/media/video/saa6752hs.c
@@ -262,8 +262,48 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
}
-static int saa6752hs_init(struct i2c_client* client,
- struct v4l2_mpeg_compression* params)
+static int saa6752hs_set_params(struct i2c_client* client,
+ struct v4l2_mpeg_compression* params)
+{
+ struct saa6752hs_state *h = i2c_get_clientdata(client);
+
+ /* check PIDs */
+ if (params->ts_pid_pmt <= MPEG_PID_MAX)
+ h->params.ts_pid_pmt = params->ts_pid_pmt;
+ if (params->ts_pid_pcr <= MPEG_PID_MAX)
+ h->params.ts_pid_pcr = params->ts_pid_pcr;
+ if (params->ts_pid_video <= MPEG_PID_MAX)
+ h->params.ts_pid_video = params->ts_pid_video;
+ if (params->ts_pid_audio <= MPEG_PID_MAX)
+ h->params.ts_pid_audio = params->ts_pid_audio;
+
+ /* check bitrate parameters */
+ if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) ||
+ (params->vi_bitrate.mode == V4L2_BITRATE_VBR))
+ h->params.vi_bitrate.mode = params->vi_bitrate.mode;
+ if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
+ h->params.st_bitrate.target = params->st_bitrate.target;
+ if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
+ h->params.vi_bitrate.target = params->vi_bitrate.target;
+ if (params->vi_bitrate.mode == V4L2_BITRATE_VBR)
+ h->params.vi_bitrate.max = params->vi_bitrate.max;
+ if (params->au_bitrate.mode != V4L2_BITRATE_NONE)
+ h->params.au_bitrate.target = params->au_bitrate.target;
+
+ /* range checks */
+ if (h->params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX)
+ h->params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX;
+ if (h->params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX)
+ h->params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX;
+ if (h->params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX)
+ h->params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX;
+ if (h->params.au_bitrate.target <= 256)
+ h->params.au_bitrate.target = 256;
+ else
+ h->params.au_bitrate.target = 384;
+}
+
+static int saa6752hs_init(struct i2c_client* client)
{
unsigned char buf[3];
struct saa6752hs_state *h;
@@ -271,50 +311,8 @@ static int saa6752hs_init(struct i2c_client* client,
unsigned char localPAT[256];
unsigned char localPMT[256];
- // grab the previous set of parameters
h = i2c_get_clientdata(client);
- // check the bitrate parameters first
- if (params != NULL) {
- /* check PIDs */
- if (params->ts_pid_pmt <= MPEG_PID_MAX)
- h->params.ts_pid_pmt = params->ts_pid_pmt;
- if (params->ts_pid_pcr <= MPEG_PID_MAX)
- h->params.ts_pid_pcr = params->ts_pid_pcr;
- if (params->ts_pid_video <= MPEG_PID_MAX)
- h->params.ts_pid_video = params->ts_pid_video;
- if (params->ts_pid_audio <= MPEG_PID_MAX)
- h->params.ts_pid_audio = params->ts_pid_audio;
-
- /* check bitrate parameters */
- if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) ||
- (params->vi_bitrate.mode == V4L2_BITRATE_VBR))
- h->params.vi_bitrate.mode = params->vi_bitrate.mode;
- if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
- h->params.st_bitrate.target = params->st_bitrate.target;
- if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
- h->params.vi_bitrate.target = params->vi_bitrate.target;
- if (params->vi_bitrate.mode == V4L2_BITRATE_VBR)
- h->params.vi_bitrate.max = params->vi_bitrate.max;
- if (params->au_bitrate.mode != V4L2_BITRATE_NONE)
- h->params.au_bitrate.target = params->au_bitrate.target;
-
- /* range checks */
- if (h->params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX)
- h->params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX;
- if (h->params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX)
- h->params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX;
- if (h->params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX)
- h->params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX;
- if (h->params.au_bitrate.target <= 256)
- h->params.au_bitrate.target = 256;
- else
- h->params.au_bitrate.target = 384;
-
- /* return actually used settings */
- *params = h->params;
- }
-
// set bitrate
saa6752hs_set_bitrate(client, &h->params);
@@ -427,8 +425,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
i2c_set_clientdata(&h->client, h);
i2c_attach_client(&h->client);
-
- saa6752hs_init(&h->client, NULL);
return 0;
}
@@ -458,11 +454,15 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
switch (cmd) {
case VIDIOC_S_MPEGCOMP:
- err = saa6752hs_init(client, params);
+ if (NULL == params) {
+ /* apply settings and start encoder */
+ saa6752hs_init(client);
+ break;
+ }
+ err = saa6752hs_set_params(client, params);
/* fall through */
case VIDIOC_G_MPEGCOMP:
- if (params)
- *params = h->params;
+ *params = h->params;
break;
default:
/* nothing */
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index 312173d5c..d37215ebb 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -262,8 +262,48 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
}
-static int saa6752hs_init(struct i2c_client* client,
- struct v4l2_mpeg_compression* params)
+static int saa6752hs_set_params(struct i2c_client* client,
+ struct v4l2_mpeg_compression* params)
+{
+ struct saa6752hs_state *h = i2c_get_clientdata(client);
+
+ /* check PIDs */
+ if (params->ts_pid_pmt <= MPEG_PID_MAX)
+ h->params.ts_pid_pmt = params->ts_pid_pmt;
+ if (params->ts_pid_pcr <= MPEG_PID_MAX)
+ h->params.ts_pid_pcr = params->ts_pid_pcr;
+ if (params->ts_pid_video <= MPEG_PID_MAX)
+ h->params.ts_pid_video = params->ts_pid_video;
+ if (params->ts_pid_audio <= MPEG_PID_MAX)
+ h->params.ts_pid_audio = params->ts_pid_audio;
+
+ /* check bitrate parameters */
+ if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) ||
+ (params->vi_bitrate.mode == V4L2_BITRATE_VBR))
+ h->params.vi_bitrate.mode = params->vi_bitrate.mode;
+ if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
+ h->params.st_bitrate.target = params->st_bitrate.target;
+ if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
+ h->params.vi_bitrate.target = params->vi_bitrate.target;
+ if (params->vi_bitrate.mode == V4L2_BITRATE_VBR)
+ h->params.vi_bitrate.max = params->vi_bitrate.max;
+ if (params->au_bitrate.mode != V4L2_BITRATE_NONE)
+ h->params.au_bitrate.target = params->au_bitrate.target;
+
+ /* range checks */
+ if (h->params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX)
+ h->params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX;
+ if (h->params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX)
+ h->params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX;
+ if (h->params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX)
+ h->params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX;
+ if (h->params.au_bitrate.target <= 256)
+ h->params.au_bitrate.target = 256;
+ else
+ h->params.au_bitrate.target = 384;
+}
+
+static int saa6752hs_init(struct i2c_client* client)
{
unsigned char buf[3];
struct saa6752hs_state *h;
@@ -271,50 +311,8 @@ static int saa6752hs_init(struct i2c_client* client,
unsigned char localPAT[256];
unsigned char localPMT[256];
- // grab the previous set of parameters
h = i2c_get_clientdata(client);
- // check the bitrate parameters first
- if (params != NULL) {
- /* check PIDs */
- if (params->ts_pid_pmt <= MPEG_PID_MAX)
- h->params.ts_pid_pmt = params->ts_pid_pmt;
- if (params->ts_pid_pcr <= MPEG_PID_MAX)
- h->params.ts_pid_pcr = params->ts_pid_pcr;
- if (params->ts_pid_video <= MPEG_PID_MAX)
- h->params.ts_pid_video = params->ts_pid_video;
- if (params->ts_pid_audio <= MPEG_PID_MAX)
- h->params.ts_pid_audio = params->ts_pid_audio;
-
- /* check bitrate parameters */
- if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) ||
- (params->vi_bitrate.mode == V4L2_BITRATE_VBR))
- h->params.vi_bitrate.mode = params->vi_bitrate.mode;
- if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
- h->params.st_bitrate.target = params->st_bitrate.target;
- if (params->vi_bitrate.mode != V4L2_BITRATE_NONE)
- h->params.vi_bitrate.target = params->vi_bitrate.target;
- if (params->vi_bitrate.mode == V4L2_BITRATE_VBR)
- h->params.vi_bitrate.max = params->vi_bitrate.max;
- if (params->au_bitrate.mode != V4L2_BITRATE_NONE)
- h->params.au_bitrate.target = params->au_bitrate.target;
-
- /* range checks */
- if (h->params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX)
- h->params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX;
- if (h->params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX)
- h->params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX;
- if (h->params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX)
- h->params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX;
- if (h->params.au_bitrate.target <= 256)
- h->params.au_bitrate.target = 256;
- else
- h->params.au_bitrate.target = 384;
-
- /* return actually used settings */
- *params = h->params;
- }
-
// set bitrate
saa6752hs_set_bitrate(client, &h->params);
@@ -427,8 +425,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
i2c_set_clientdata(&h->client, h);
i2c_attach_client(&h->client);
-
- saa6752hs_init(&h->client, NULL);
return 0;
}
@@ -458,11 +454,15 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
switch (cmd) {
case VIDIOC_S_MPEGCOMP:
- err = saa6752hs_init(client, params);
+ if (NULL == params) {
+ /* apply settings and start encoder */
+ saa6752hs_init(client);
+ break;
+ }
+ err = saa6752hs_set_params(client, params);
/* fall through */
case VIDIOC_G_MPEGCOMP:
- if (params)
- *params = h->params;
+ *params = h->params;
break;
default:
/* nothing */
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index 15a04db2c..7f0b0a477 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-cards.c,v 1.40 2004/11/18 14:05:57 kraxel Exp $
+ * $Id: saa7134-cards.c,v 1.41 2004/11/19 18:07:12 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -1211,9 +1211,9 @@ struct saa7134_board saa7134_boards[] = {
}
},
[SAA7134_BOARD_AVERMEDIA_307] = {
- /*
- Nickolay V. Shmyrev <nshmyrev@yandex.ru>
- Lots of thanks to Andrey Zolotarev <zolotarev_andrey@mail.ru>
+ /*
+ Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+ Lots of thanks to Andrey Zolotarev <zolotarev_andrey@mail.ru>
*/
.name = "Avermedia AVerTV Studio 307",
.audio_clock = 0x00187de7,
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index e4da789c3..af270b581 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-core.c,v 1.18 2004/11/19 12:16:30 kraxel Exp $
+ * $Id: saa7134-core.c,v 1.19 2004/11/19 18:07:12 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
@@ -236,7 +236,7 @@ static void dump_statusregs(struct saa7134_dev *dev)
/* ------------------------------------------------------------------ */
/* nr of (saa7134-)pages for the given buffer size */
-int saa7134_buffer_pages(int size)
+static int saa7134_buffer_pages(int size)
{
size = PAGE_ALIGN(size);
size += PAGE_SIZE; /* for non-page-aligned buffers */
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index 9d356f9ab..c74f1ee01 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-empress.c,v 1.6 2004/11/18 14:05:57 kraxel Exp $
+ * $Id: saa7134-empress.c,v 1.7 2004/11/19 18:07:12 kraxel Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -69,10 +69,10 @@ static void ts_reset_encoder(struct saa7134_dev* dev)
dev->empress_started = 0;
}
-static int ts_init_encoder(struct saa7134_dev* dev, void* arg)
+static int ts_init_encoder(struct saa7134_dev* dev)
{
ts_reset_encoder(dev);
- saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg);
+ saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, NULL);
dev->empress_started = 1;
return 0;
}
@@ -133,7 +133,7 @@ ts_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
struct saa7134_dev *dev = file->private_data;
if (!dev->empress_started)
- ts_init_encoder(dev, NULL);
+ ts_init_encoder(dev);
return videobuf_read_stream(&dev->empress_tsq,
data, count, ppos, 0,
@@ -298,7 +298,9 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
return saa7134_common_ioctl(dev, cmd, arg);
case VIDIOC_S_MPEGCOMP:
- return ts_init_encoder(dev, arg);
+ saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg);
+ ts_init_encoder(dev);
+ return 0;
case VIDIOC_G_MPEGCOMP:
saa7134_i2c_call_clients(dev, VIDIOC_G_MPEGCOMP, arg);
return 0;
@@ -348,7 +350,8 @@ static void empress_signal_update(void* data)
ts_reset_encoder(dev);
} else {
dprintk("video signal acquired\n");
- ts_init_encoder(dev, NULL);
+ if (dev->empress_users)
+ ts_init_encoder(dev);
}
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 7df558d76..8faafa1d2 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-video.c,v 1.21 2004/11/19 12:16:30 kraxel Exp $
+ * $Id: saa7134-video.c,v 1.22 2004/11/19 18:07:12 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -1304,11 +1304,11 @@ video_poll(struct file *file, struct poll_table_struct *wait)
up(&fh->cap.lock);
return POLLERR;
}
- if (0 != fh->cap.ops->buf_prepare(file->private_data,fh->cap.read_buf,fh->cap.field)) {
+ if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) {
up(&fh->cap.lock);
return POLLERR;
}
- fh->cap.ops->buf_queue(file->private_data,fh->cap.read_buf);
+ fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf);
fh->cap.read_off = 0;
}
up(&fh->cap.lock);
@@ -1377,7 +1377,7 @@ video_mmap(struct file *file, struct vm_area_struct * vma)
/* ------------------------------------------------------------------ */
-void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
+static void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
{
struct saa7134_tvnorm *norm = dev->tvnorm;
@@ -1400,8 +1400,8 @@ void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
#endif
}
-int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
- struct v4l2_format *f)
+static int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+ struct v4l2_format *f)
{
switch (f->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
@@ -1426,8 +1426,8 @@ int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
}
}
-int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
- struct v4l2_format *f)
+static int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+ struct v4l2_format *f)
{
int err;
@@ -1491,8 +1491,8 @@ int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
}
}
-int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
- struct v4l2_format *f)
+static int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+ struct v4l2_format *f)
{
unsigned long flags;
int err;
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 9ed25e47f..2d7c95892 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134.h,v 1.28 2004/11/18 14:05:57 kraxel Exp $
+ * $Id: saa7134.h,v 1.29 2004/11/19 18:07:12 kraxel Exp $
*
* v4l2 device driver for philips saa7134 based TV cards
*
@@ -500,7 +500,6 @@ struct saa7134_dev {
/* saa7134-core.c */
extern struct list_head saa7134_devlist;
-extern unsigned int saa7134_devcount;
void saa7134_print_ioctl(char *name, unsigned int cmd);
void saa7134_track_gpio(struct saa7134_dev *dev, char *msg);
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c
index 6ab76e480..e164e034d 100644
--- a/linux/drivers/media/video/tda7432.c
+++ b/linux/drivers/media/video/tda7432.c
@@ -66,13 +66,13 @@ MODULE_AUTHOR("Eric Sandeen <eric_sandeen@bigfoot.com>");
MODULE_DESCRIPTION("bttv driver for the tda7432 audio processor chip");
MODULE_LICENSE("GPL");
-MODULE_PARM(debug,"i");
-MODULE_PARM(loudness,"i");
+static int maxvol;
+static int loudness; /* disable loudness by default */
+static int debug; /* insmod parameter */
+module_param(debug, int, S_IRUGO | S_IWUSR);
+module_param(loudness, int, S_IRUGO);
MODULE_PARM_DESC(maxvol,"Set maximium volume to +20db (0), default is 0db(1)");
-MODULE_PARM(maxvol,"i");
-static int maxvol = 0;
-static int loudness = 0; /* disable loudness by default */
-static int debug = 0; /* insmod parameter */
+module_param(maxvol, int, S_IRUGO | S_IWUSR);
/* Address to scan (I2C address of this chip) */
diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c
index 54c3fa517..b56dbda9a 100644
--- a/linux/drivers/media/video/tda9875.c
+++ b/linux/drivers/media/video/tda9875.c
@@ -40,10 +40,10 @@
#include <media/id.h>
#endif
-MODULE_PARM(debug,"i");
+static int debug; /* insmod parameter */
+module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_LICENSE("GPL");
-static int debug = 0; /* insmod parameter */
/* Addresses to scan */
static unsigned short normal_i2c[] = {
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 949ae0b00..cf22ef6f8 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -1519,6 +1519,10 @@ static int chip_attach(struct i2c_adapter *adap, int addr,
static int chip_probe(struct i2c_adapter *adap)
{
+ /* don't attach on saa7146 based cards,
+ because dedicated drivers are used */
+ if ((adap->id & I2C_ALGO_SAA7146))
+ return 0;
#ifdef I2C_CLASS_TV_ANALOG
if (adap->class & I2C_CLASS_TV_ANALOG)
return i2c_probe(adap, &addr_data, chip_attach);
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index 5eb986bd6..621c6b650 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -88,6 +88,7 @@ MODULE_LICENSE("GPL");
* Video Standard Operations (contributed by Michael Schimek)
*/
+#if 0 /* seems to have no users */
/* This is the recommended method to deal with the framerate fields. More
sophisticated drivers will access the fields directly. */
unsigned int
@@ -99,6 +100,8 @@ v4l2_video_std_fps(struct v4l2_standard *vs)
(1 << 7)) / (1 << 8);
return 0;
}
+EXPORT_SYMBOL(v4l2_video_std_fps);
+#endif
/* Fill in the fields of a v4l2_standard structure according to the
'id' and 'transmission' parameters. Returns negative on error. */
@@ -263,7 +266,6 @@ char *v4l2_ioctl_names[256] = {
/* ----------------------------------------------------------------- */
-EXPORT_SYMBOL(v4l2_video_std_fps);
EXPORT_SYMBOL(v4l2_video_std_construct);
EXPORT_SYMBOL(v4l2_prio_init);
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index f3cac6fc3..5467cde16 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -16,6 +16,7 @@
#ifdef __KERNEL__
#include <linux/time.h> /* need struct timeval */
#endif
+#include <linux/compiler.h> /* need __user */
/*
* M I S C E L L A N E O U S
@@ -218,6 +219,7 @@ struct v4l2_pix_format
/* Vendor-specific formats */
#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */
+#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */
/*
* F O R M A T E N U M E R A T I O N