From 4faae47ad7fcefa192d328f69f76477976cf40a7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 6 Aug 2006 09:10:06 -0300 Subject: On some cases, depth were not returned. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/bt8xx/bttv-driver.c | 8 ++++++++ linux/drivers/media/video/v4l1-compat.c | 12 +++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 7f75861b0..2e03d2240 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -2456,6 +2456,14 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, fbuf->bytesperline = btv->fbuf.fmt.bytesperline; if (fh->ovfmt) fbuf->depth = fh->ovfmt->depth; + else { + if (fbuf->width) + fbuf->depth = ((fbuf->bytesperline<<3) + + (fbuf->width-1) ) + /fbuf->width; + else + fbuf->depth = 0; + } return 0; } case VIDIOCSFBUF: diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c index dc6f00e12..bb8d55523 100644 --- a/linux/drivers/media/video/v4l1-compat.c +++ b/linux/drivers/media/video/v4l1-compat.c @@ -361,6 +361,8 @@ v4l_compat_translate_ioctl(struct inode *inode, { struct video_buffer *buffer = arg; + memset(buffer, 0, sizeof(*buffer)); + err = drv(inode, file, VIDIOC_G_FBUF, &fbuf2); if (err < 0) { dprintk("VIDIOCGFBUF / VIDIOC_G_FBUF: %d\n",err); @@ -373,7 +375,7 @@ v4l_compat_translate_ioctl(struct inode *inode, switch (fbuf2.fmt.pixelformat) { case V4L2_PIX_FMT_RGB332: buffer->depth = 8; - break; + break; case V4L2_PIX_FMT_RGB555: buffer->depth = 15; break; @@ -389,9 +391,13 @@ v4l_compat_translate_ioctl(struct inode *inode, default: buffer->depth = 0; } - if (0 != fbuf2.fmt.bytesperline) + if (fbuf2.fmt.bytesperline) { buffer->bytesperline = fbuf2.fmt.bytesperline; - else { + if (!buffer->depth && buffer->width) + buffer->depth = ((fbuf2.fmt.bytesperline<<3) + + (buffer->width-1) ) + /buffer->width; + } else { buffer->bytesperline = (buffer->width * buffer->depth + 7) & 7; buffer->bytesperline >>= 3; -- cgit v1.2.3 From 82dff6ef69cc6308e8793007bda9818fd8e9226c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 6 Aug 2006 10:16:27 -0300 Subject: Fix most Compat32 stuff on V4L2 From: Mauro Carvalho Chehab Tested on x64 with a bttv board. Most Get ioctls are fixed. The only non-completely working one is VIDIOCGAUDIO. All other IOR ioctls give the same results on x86_64 and i386 architectures. Thanks to Alastair Poole for part of this patch and tests on ppc64. Signed-off-by: Alastair Poole Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/compat_ioctl32.c | 119 ++++++++++++++++++++++------- 1 file changed, 93 insertions(+), 26 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/compat_ioctl32.c b/linux/drivers/media/video/compat_ioctl32.c index 8e80a76ec..ea5efbd64 100644 --- a/linux/drivers/media/video/compat_ioctl32.c +++ b/linux/drivers/media/video/compat_ioctl32.c @@ -60,6 +60,56 @@ static int put_video_tuner32(struct video_tuner *kp, struct video_tuner32 __user return 0; } +#if 0 /*FIXME */ +struct video_audio32 { + compat_int_t audio; + __u16 volume; + __u16 bass, treble; + __u32 flags; + __u8 name[16]; +// char name[16]; + __u16 mode; + __u16 balance; + __u16 step; +}; + +static int get_video_audio32(struct video_audio *kp, + struct video_audio32 __user *up) +{ + if (!access_ok(VERIFY_READ, up, sizeof(struct video_audio32)) || + get_user(kp->audio, &up->audio) || + get_user(kp->volume, &up->volume) || + get_user(kp->bass, &up->bass) || + get_user(kp->treble, &up->treble) || + get_user(kp->flags, &up->flags) || + copy_from_user(kp->name, up->name, sizeof(up->name)) || + get_user(kp->mode, &up->mode) || + get_user(kp->balance, &up->balance) || + get_user(kp->step, &up->step)) + return -EFAULT; + + return 0; +} + +static int put_video_audio32(struct video_audio *kp, + struct video_audio32 __user *up) +{ + if (!access_ok(VERIFY_WRITE, up, sizeof(struct video_audio32)) || + put_user(kp->audio, &up->audio) || + put_user(kp->volume, &up->volume) || + put_user(kp->bass, &up->bass) || + put_user(kp->treble, &up->treble) || + put_user(kp->flags, &up->flags) || + copy_to_user(kp->name, up->name, sizeof(up->name)) || + put_user(kp->mode, &up->mode) || + put_user(kp->balance, &up->balance) || + put_user(kp->step, &up->step)) + return -EFAULT; + + return 0; +} +#endif + struct video_buffer32 { compat_caddr_t base; compat_int_t height, width, depth, bytesperline; @@ -620,6 +670,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg struct video_buffer vb; struct video_window vw; struct video_code vc; + struct video_audio va; #endif struct v4l2_format v2f; struct v4l2_buffer v2b; @@ -637,31 +688,31 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg /* First, convert the command. */ switch(cmd) { #ifdef CONFIG_VIDEO_V4L1_COMPAT - case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; - case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; - case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; - case VIDIOCGFBUF32: cmd = VIDIOCGFBUF; break; - case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; - case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; - case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break; - case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break; + case VIDIOCGTUNER32: realcmd = cmd = VIDIOCGTUNER; break; + case VIDIOCSTUNER32: realcmd = cmd = VIDIOCSTUNER; break; + case VIDIOCGWIN32: realcmd = cmd = VIDIOCGWIN; break; + case VIDIOCGFBUF32: realcmd = cmd = VIDIOCGFBUF; break; + case VIDIOCSFBUF32: realcmd = cmd = VIDIOCSFBUF; break; + case VIDIOCGFREQ32: realcmd = cmd = VIDIOCGFREQ; break; + case VIDIOCSFREQ32: realcmd = cmd = VIDIOCSFREQ; break; + case VIDIOCSMICROCODE32: realcmd = cmd = VIDIOCSMICROCODE; break; #endif - case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break; - case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break; - case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break; - case VIDIOC_QBUF32: cmd = VIDIOC_QBUF; break; - case VIDIOC_DQBUF32: cmd = VIDIOC_DQBUF; break; - case VIDIOC_STREAMON32: cmd = VIDIOC_STREAMON; break; - case VIDIOC_STREAMOFF32: cmd = VIDIOC_STREAMOFF; break; - case VIDIOC_G_FBUF32: cmd = VIDIOC_G_FBUF; break; - case VIDIOC_S_FBUF32: cmd = VIDIOC_S_FBUF; break; - case VIDIOC_OVERLAY32: cmd = VIDIOC_OVERLAY; break; + case VIDIOC_G_FMT32: realcmd = cmd = VIDIOC_G_FMT; break; + case VIDIOC_S_FMT32: realcmd = cmd = VIDIOC_S_FMT; break; + case VIDIOC_QUERYBUF32: realcmd = cmd = VIDIOC_QUERYBUF; break; + case VIDIOC_QBUF32: realcmd = cmd = VIDIOC_QBUF; break; + case VIDIOC_DQBUF32: realcmd = cmd = VIDIOC_DQBUF; break; + case VIDIOC_STREAMON32: realcmd = cmd = VIDIOC_STREAMON; break; + case VIDIOC_STREAMOFF32: realcmd = cmd = VIDIOC_STREAMOFF; break; + case VIDIOC_G_FBUF32: realcmd = cmd = VIDIOC_G_FBUF; break; + case VIDIOC_S_FBUF32: realcmd = cmd = VIDIOC_S_FBUF; break; + case VIDIOC_OVERLAY32: realcmd = cmd = VIDIOC_OVERLAY; break; case VIDIOC_ENUMSTD32: realcmd = VIDIOC_ENUMSTD; break; case VIDIOC_ENUMINPUT32: realcmd = VIDIOC_ENUMINPUT; break; - case VIDIOC_S_CTRL32: cmd = VIDIOC_S_CTRL; break; - case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break; - case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break; - case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break; + case VIDIOC_S_CTRL32: realcmd = cmd = VIDIOC_S_CTRL; break; + case VIDIOC_G_INPUT32: realcmd = cmd = VIDIOC_G_INPUT; break; + case VIDIOC_S_INPUT32: realcmd = cmd = VIDIOC_S_INPUT; break; + case VIDIOC_TRY_FMT32: realcmd = cmd = VIDIOC_TRY_FMT; break; }; switch(cmd) { @@ -678,6 +729,13 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg compatible_arg = 0; break; +#if 0 /*FIXME*/ + case VIDIOCSAUDIO: + err = get_video_audio32(&karg.va, up); + compatible_arg = 0; + break; +#endif + case VIDIOCSFREQ: #endif case VIDIOC_S_INPUT: @@ -685,7 +743,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg case VIDIOC_STREAMON: case VIDIOC_STREAMOFF: err = get_user(karg.vx, (u32 __user *)up); - compatible_arg = 0; + compatible_arg = 1; break; case VIDIOC_S_FBUF: @@ -741,6 +799,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg case VIDIOC_G_FBUF: case VIDIOC_G_INPUT: compatible_arg = 0; + break; #ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCSMICROCODE: err = microcode32(&karg.vc, up); @@ -757,7 +816,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg mm_segment_t old_fs = get_fs(); set_fs(KERNEL_DS); - err = native_ioctl(file, realcmd, (unsigned long)&karg); + err = native_ioctl(file, realcmd, (unsigned long) &karg); set_fs(old_fs); } if(err == 0) { @@ -774,6 +833,12 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg case VIDIOCGFBUF: err = put_video_buffer32(&karg.vb, up); break; +#if 0 /*FIXME*/ + case VIDIOCGAUDIO: + err = put_video_audio32(&karg.va, up); + break; +#endif + #endif case VIDIOC_G_FBUF: err = put_v4l2_framebuffer32(&karg.v2fb, up); @@ -843,10 +908,14 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) case VIDIOCSFBUF32: case VIDIOCGFREQ32: case VIDIOCSFREQ32: + case VIDIOCGAUDIO: + case VIDIOCSAUDIO: #endif case VIDIOC_QUERYCAP: case VIDIOC_ENUM_FMT: case VIDIOC_G_FMT32: + case VIDIOC_CROPCAP: + case VIDIOC_S_CROP: case VIDIOC_S_FMT32: case VIDIOC_REQBUFS: case VIDIOC_QUERYBUF32: @@ -884,8 +953,6 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) case VIDIOCSPICT: case VIDIOCCAPTURE: case VIDIOCKEY: - case VIDIOCGAUDIO: - case VIDIOCSAUDIO: case VIDIOCSYNC: case VIDIOCMCAPTURE: case VIDIOCGMBUF: -- cgit v1.2.3 From 31f22c060bcca02a2d814be341d9169b9d00bd8d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 6 Aug 2006 17:03:50 -0300 Subject: Improve hardware algorithm by setting the appropriate registers From: Mauro Carvalho Chehab Hardware algorithm needs to be configured to: 1) Increase timeout constants, to detect weaker signals; 2) do a wider zigzag search. Acked-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/frontends/cx24123.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/frontends/cx24123.c b/linux/drivers/media/dvb/frontends/cx24123.c index 7f729c02a..d13036d0a 100644 --- a/linux/drivers/media/dvb/frontends/cx24123.c +++ b/linux/drivers/media/dvb/frontends/cx24123.c @@ -202,7 +202,7 @@ static struct { {0x06, 0x31}, /* MPEG (default) */ {0x0b, 0x00}, /* Freq search start point (default) */ {0x0c, 0x00}, /* Demodulator sample gain (default) */ - {0x0d, 0x02}, /* Frequency search range = Fsymbol / 4 (default) */ + {0x0d, 0x7f}, /* Force driver to shift until the maximum (+-10 MHz) */ {0x0e, 0x03}, /* Default non-inverted, FEC 3/4 (default) */ {0x0f, 0xfe}, /* FEC search mask (all supported codes) */ {0x10, 0x01}, /* Default search inversion, no repeat (default) */ @@ -233,6 +233,7 @@ static struct { {0x46, 0x0d}, /* Symbol rate estimator on (default) */ {0x56, 0xc1}, /* Error Counter = Viterbi BER */ {0x57, 0xff}, /* Error Counter Window (default) */ + {0x5c, 0x20}, /* Acquisition AFC Expiration window (default is 0x10) */ {0x67, 0x83}, /* Non-DCII symbol clock */ }; @@ -790,13 +791,15 @@ static int cx24123_read_status(struct dvb_frontend* fe, fe_status_t* status) if (lock & 0x01) *status |= FE_HAS_SIGNAL; if (sync & 0x02) - *status |= FE_HAS_CARRIER; + *status |= FE_HAS_CARRIER; /* Phase locked */ if (sync & 0x04) *status |= FE_HAS_VITERBI; + + /* Reed-Solomon Status */ if (sync & 0x08) *status |= FE_HAS_SYNC; if (sync & 0x80) - *status |= FE_HAS_LOCK; + *status |= FE_HAS_LOCK; /*Full Sync */ return 0; } @@ -823,6 +826,7 @@ static int cx24123_read_ber(struct dvb_frontend* fe, u32* ber) static int cx24123_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) { struct cx24123_state *state = fe->demodulator_priv; + *signal_strength = cx24123_readreg(state, 0x3b) << 8; /* larger = better */ dprintk("%s: Signal strength = %d\n",__FUNCTION__,*signal_strength); -- cgit v1.2.3 From 41480cd76fdedd7a28a0e90cc602efd596a81eb9 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Mon, 7 Aug 2006 07:04:26 +0200 Subject: [av7110] Support Grundig DVB-T tuner for sub-system 13c2:0001 From: Oliver Endriss Some DVB-T cards with Grundig 29504-401 tuner use subsystem id 13c2:0001 (reported by Stuart Butterfield). Signed-off-by: Oliver Endriss --- linux/drivers/media/dvb/ttpci/av7110.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index b08c54e79..7de01222a 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -2150,12 +2150,19 @@ static int frontend_init(struct av7110 *av7110) break; case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X - - // ALPS TDLB7 + // try ALPS TDLB7 first, then Grundig 29504-401 av7110->fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; + break; } + /* fall-thru */ + + case 0x0008: // Hauppauge/TT DVB-T + // Grundig 29504-401 + av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); + if (av7110->fe) + av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; break; case 0x0002: // Hauppauge/TT DVB-C premium rev2.X @@ -2190,14 +2197,6 @@ static int frontend_init(struct av7110 *av7110) } break; - case 0x0008: // Hauppauge/TT DVB-T - - av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; - } - break; - case 0x000A: // Hauppauge/TT Nexus-CA rev1.X av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap); -- cgit v1.2.3 From d9d5fc49ab313764d9b32189e259e7ef2d970927 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 7 Aug 2006 10:44:33 -0300 Subject: LNB voltage control was inverted for the benefit of geniatech cards on Kworld From: Yeasah Pell 1) It sets LNBDCPol differently based on the card type. Now it should work properly for both the kworld and geniatech cards. 2) It stops returning an error for the SEC_VOLTAGE_OFF voltage command (the cx88-dvb level handles the actual voltage on/off, but it still passes the ioctl down to the cx24123 level, which previously rejected the OFF as invalid so the ioctl would report failure) Signed-off-by: Yeasah Pell Acked-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/frontends/cx24123.c | 7 +++++++ linux/drivers/media/dvb/frontends/cx24123.h | 3 +++ linux/drivers/media/video/cx88/cx88-dvb.c | 1 + 3 files changed, 11 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/frontends/cx24123.c b/linux/drivers/media/dvb/frontends/cx24123.c index d13036d0a..842dc9a02 100644 --- a/linux/drivers/media/dvb/frontends/cx24123.c +++ b/linux/drivers/media/dvb/frontends/cx24123.c @@ -672,6 +672,10 @@ static int cx24123_initfe(struct dvb_frontend* fe) for (i = 0; i < sizeof(cx24123_regdata) / sizeof(cx24123_regdata[0]); i++) cx24123_writereg(state, cx24123_regdata[i].reg, cx24123_regdata[i].data); + /* Set the LNB polarity */ + if(state->config->lnb_polarity) + cx24123_writereg(state, 0x32, cx24123_readreg(state, 0x32) | 0x02); + return 0; } @@ -689,6 +693,9 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage case SEC_VOLTAGE_18: dprintk("%s: setting voltage 18V\n", __FUNCTION__); return cx24123_writereg(state, 0x29, val | 0x80); + case SEC_VOLTAGE_OFF: + /* already handled in cx88-dvb */ + return 0; default: return -EINVAL; }; diff --git a/linux/drivers/media/dvb/frontends/cx24123.h b/linux/drivers/media/dvb/frontends/cx24123.h index 6a8cb4c41..57a1dae1d 100644 --- a/linux/drivers/media/dvb/frontends/cx24123.h +++ b/linux/drivers/media/dvb/frontends/cx24123.h @@ -30,6 +30,9 @@ struct cx24123_config /* Need to set device param for start_dma */ int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); + + /* 0 = LNB voltage normal, 1 = LNB voltage inverted */ + int lnb_polarity; }; #if defined(CONFIG_DVB_CX24123) || defined(CONFIG_DVB_CX24123_MODULE) diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index d147454f1..07914f558 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -499,6 +499,7 @@ static struct cx24123_config hauppauge_novas_config = { static struct cx24123_config kworld_dvbs_100_config = { .demod_address = 0x15, .set_ts_params = cx24123_set_ts_param, + .lnb_polarity = 1, }; static int dvb_register(struct cx8802_dev *dev) -- cgit v1.2.3 From 0a39bdda978bb695afe7bb17b722e361be76d02b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 7 Aug 2006 13:18:56 -0300 Subject: remove null chars from dvb names From: Dave Jones DVB null terminates its device names, which seems odd, and should be unnecessary. Signed-off-by: Dave Jones Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/ttpci/av7110.c | 2 +- linux/drivers/media/dvb/ttpci/budget-ci.c | 2 +- linux/drivers/media/dvb/ttpci/budget-patch.c | 2 +- linux/drivers/media/dvb/ttpci/budget.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 7de01222a..3a01341fa 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -2823,7 +2823,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension av7110_extension = { - .name = "dvb\0", + .name = "dvb", .flags = SAA7146_I2C_SHORT_DELAY, .module = THIS_MODULE, diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c index 2c4089cab..2a2e9b400 100644 --- a/linux/drivers/media/dvb/ttpci/budget-ci.c +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c @@ -1153,7 +1153,7 @@ static struct pci_device_id pci_tbl[] = { MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { - .name = "budget_ci dvb\0", + .name = "budget_ci dvb", .flags = SAA7146_I2C_SHORT_DELAY, .module = THIS_MODULE, diff --git a/linux/drivers/media/dvb/ttpci/budget-patch.c b/linux/drivers/media/dvb/ttpci/budget-patch.c index 175bdab83..2cc2f0c5b 100644 --- a/linux/drivers/media/dvb/ttpci/budget-patch.c +++ b/linux/drivers/media/dvb/ttpci/budget-patch.c @@ -648,7 +648,7 @@ static void __exit budget_patch_exit(void) } static struct saa7146_extension budget_extension = { - .name = "budget_patch dvb\0", + .name = "budget_patch dvb", .flags = 0, .module = THIS_MODULE, diff --git a/linux/drivers/media/dvb/ttpci/budget.c b/linux/drivers/media/dvb/ttpci/budget.c index 886eb6a27..e58f0391e 100644 --- a/linux/drivers/media/dvb/ttpci/budget.c +++ b/linux/drivers/media/dvb/ttpci/budget.c @@ -545,7 +545,7 @@ static struct pci_device_id pci_tbl[] = { MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { - .name = "budget dvb\0", + .name = "budget dvb", .flags = SAA7146_I2C_SHORT_DELAY, .module = THIS_MODULE, -- cgit v1.2.3 From e265a4b0ea1a0ef711d27f58ab249e459e52da5c Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Mon, 7 Aug 2006 15:43:21 -0700 Subject: Fix possible crash in Hauppauge eeprom reading From: Trent Piepho If an eeprom defined two tuners and they supported more than eight standards combined (as opposed to each), it would overflow an array. Signed-off-by: Trent Piepho --- linux/drivers/media/video/tveeprom.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c index 2f73bcf33..7670ae921 100644 --- a/linux/drivers/media/video/tveeprom.c +++ b/linux/drivers/media/video/tveeprom.c @@ -609,6 +609,8 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, tvee->tuner_formats |= hauppauge_tuner_fmt[i].id; t_fmt_name1[j++] = hauppauge_tuner_fmt[i].name; } + } + for (i = j = 0; i < 8; i++) { if (t_format2 & (1 << i)) { tvee->tuner2_formats |= hauppauge_tuner_fmt[i].id; t_fmt_name2[j++] = hauppauge_tuner_fmt[i].name; -- cgit v1.2.3 From bcc24b6e0f61df9c9192b82f36894450d65b6f53 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Mon, 7 Aug 2006 15:44:05 -0700 Subject: Add missing include linux/mm.h to some compat code From: Trent Piepho Some compat functions for kernel < 2.6.15 needed linux/mm.h, which wasn't included. Signed-off-by: Trent Piepho --- linux/drivers/media/video/em28xx/em28xx-core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c index ff0cd9563..c7f7869f5 100644 --- a/linux/drivers/media/video/em28xx/em28xx-core.c +++ b/linux/drivers/media/video/em28xx/em28xx-core.c @@ -64,6 +64,7 @@ module_param(alt, int, 0644); MODULE_PARM_DESC(alt, "alternate setting to use for video endpoint"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) +#include static void *rvmalloc(size_t size) { void *mem; -- cgit v1.2.3 From 7f984a8ea578fbd3c41a53a18eecb9b67dcfb542 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Mon, 7 Aug 2006 16:01:01 -0700 Subject: Whitespace cleanup From: Trent Piepho from whitespace cleaning script Signed-off-by: Trent Piepho --- linux/drivers/media/video/bt8xx/bttv-driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 2e03d2240..f927e5658 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -2459,8 +2459,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, else { if (fbuf->width) fbuf->depth = ((fbuf->bytesperline<<3) - + (fbuf->width-1) ) - /fbuf->width; + + (fbuf->width-1) ) + /fbuf->width; else fbuf->depth = 0; } -- cgit v1.2.3 From d0107f4299414236448ef5f59fd237e0a370827d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 8 Aug 2006 10:52:22 -0300 Subject: git-dvb: cadet build fix From: Andrew Morton drivers/media/radio/radio-cadet.c: In function 'cadet_do_ioctl': drivers/media/radio/radio-cadet.c:362: warning: implicit declaration of function 'KERNEL_VERSION' Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/radio/radio-cadet.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/radio/radio-cadet.c b/linux/drivers/media/radio/radio-cadet.c index fd7bc09fc..6e089a100 100644 --- a/linux/drivers/media/radio/radio-cadet.c +++ b/linux/drivers/media/radio/radio-cadet.c @@ -30,6 +30,7 @@ * Changed API to V4L2 */ +#include #include /* Modules */ #include /* Initdata */ #include /* request_region */ -- cgit v1.2.3 From eb1b1058e914cbc5e03eb96ccf8084c98d358ddc Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 8 Aug 2006 15:21:47 -0300 Subject: Fix a warning on PPC64 From: Mauro Carvalho Chehab drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c: In function 'set_standard': drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c:33: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'v4l2_std_id' Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c index 8a9933dec..05ea17afe 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c @@ -31,7 +31,7 @@ static void set_standard(struct pvr2_hdw *hdw) v4l2_std_id vs; vs = hdw->std_mask_cur; pvr2_trace(PVR2_TRACE_CHIPS, - "i2c v4l2 set_standard(0x%llx)",(__u64)vs); + "i2c v4l2 set_standard(0x%llx)",(long long unsigned)vs); pvr2_i2c_core_cmd(hdw,VIDIOC_S_STD,&vs); } -- cgit v1.2.3 From 0da4fac60c51c9949031d8a9bfe92f4337855278 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Wed, 9 Aug 2006 00:51:04 +0200 Subject: [dvb_attach] dvb_frontend_detach fix From: Oliver Endriss dvb_frontend_detach() used invalid config option CONFIG_DVB_DETACH, so dvb_frontend_detach() did not call symbol_put_addr(). Replaced CONFIG_DVB_DETACH by CONFIG_DVB_CORE_ATTACH. Signed-off-by: Oliver Endriss --- linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index ba5ffa981..378261485 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1119,7 +1119,7 @@ int dvb_unregister_frontend(struct dvb_frontend* fe) } EXPORT_SYMBOL(dvb_unregister_frontend); -#ifdef CONFIG_DVB_DETACH +#ifdef CONFIG_DVB_CORE_ATTACH void dvb_frontend_detach(struct dvb_frontend* fe) { void *ptr; -- cgit v1.2.3 From 7d52f0c7fe10bdf1739ecb67e24825f0e4089fb8 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Wed, 9 Aug 2006 00:58:27 +0200 Subject: [lnbp21] release callback fixed From: Oliver Endriss lnbp21 module must use fe->ops.release_sec, not fe->ops.release. The release function of the frontend driver was never called for cards with lnbp21... Signed-off-by: Oliver Endriss --- linux/drivers/media/dvb/frontends/lnbp21.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/frontends/lnbp21.c b/linux/drivers/media/dvb/frontends/lnbp21.c index 37bba32f2..2d2f58c26 100644 --- a/linux/drivers/media/dvb/frontends/lnbp21.c +++ b/linux/drivers/media/dvb/frontends/lnbp21.c @@ -122,7 +122,7 @@ struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter * } /* install release callback */ - fe->ops.release = lnbp21_release; + fe->ops.release_sec = lnbp21_release; /* override frontend ops */ fe->ops.set_voltage = lnbp21_set_voltage; -- cgit v1.2.3 From fedb78d416ebfda50eb774e52c78ddb3830ac234 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Wed, 9 Aug 2006 16:43:29 +0200 Subject: [saa7146] Fixed image grabbing (VIDIOCGMBUF ioctl) From: Oliver Endriss Fixed regression reported by Peter Holik: Image grabbing failed because of invalid config option VIDEO_V4L1_COMPAT. Should be CONFIG_VIDEO_V4L1_COMPAT. Signed-off-by: Oliver Endriss --- linux/drivers/media/common/saa7146_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c index 8b5dce34d..1fb373ee2 100644 --- a/linux/drivers/media/common/saa7146_video.c +++ b/linux/drivers/media/common/saa7146_video.c @@ -1191,7 +1191,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int } return err; } -#ifdef VIDEO_V4L1_COMPAT +#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGMBUF: { struct video_mbuf *mbuf = arg; -- cgit v1.2.3 From 8dc45646a3e2d0c595f491a0772da77893dafb6a Mon Sep 17 00:00:00 2001 From: Chris Pascoe Date: Thu, 10 Aug 2006 16:17:16 +1000 Subject: Fix "no data from ZL10353 based USB tuner" problem From: Chris Pascoe Force parallel transport stream output on the ZL10353 attached to a bluebird device. Addresses the problem where a frontend lock was observed, but no MPEG transport data was received. Signed-off-by: Chris Pascoe --- linux/drivers/media/dvb/dvb-usb/cxusb.c | 1 + linux/drivers/media/dvb/frontends/zl10353.c | 5 ++++- linux/drivers/media/dvb/frontends/zl10353.h | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c index addc51391..3ec6232bc 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.c +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c @@ -349,6 +349,7 @@ static struct mt352_config cxusb_dee1601_config = { static struct zl10353_config cxusb_zl10353_dee1601_config = { .demod_address = 0x0f, + .parallel_ts = 1, }; static struct mt352_config cxusb_mt352_config = { diff --git a/linux/drivers/media/dvb/frontends/zl10353.c b/linux/drivers/media/dvb/frontends/zl10353.c index 1d22d53dc..d8313b9d7 100644 --- a/linux/drivers/media/dvb/frontends/zl10353.c +++ b/linux/drivers/media/dvb/frontends/zl10353.c @@ -251,9 +251,12 @@ static int zl10353_init(struct dvb_frontend *fe) if (debug_regs) zl10353_dump_regs(fe); #endif + if (state->config.parallel_ts) + zl10353_reset_attach[2] &= ~0x20; /* Do a "hard" reset if not already done */ - if (zl10353_read_register(state, 0x50) != 0x03) { + if (zl10353_read_register(state, 0x50) != zl10353_reset_attach[1] || + zl10353_read_register(state, 0x51) != zl10353_reset_attach[2]) { rc = zl10353_write(fe, zl10353_reset_attach, sizeof(zl10353_reset_attach)); #if 1 diff --git a/linux/drivers/media/dvb/frontends/zl10353.h b/linux/drivers/media/dvb/frontends/zl10353.h index 6aec655d8..79a947215 100644 --- a/linux/drivers/media/dvb/frontends/zl10353.h +++ b/linux/drivers/media/dvb/frontends/zl10353.h @@ -31,6 +31,9 @@ struct zl10353_config /* set if no pll is connected to the secondary i2c bus */ int no_tuner; + + /* set if parallel ts output is required */ + int parallel_ts; }; #if defined(CONFIG_DVB_ZL10353) || defined(CONFIG_DVB_ZL10353_MODULE) -- cgit v1.2.3 From 8eae10c5b69ebbac4e264522e1c83f203b1f01c1 Mon Sep 17 00:00:00 2001 From: Chris Pascoe Date: Thu, 10 Aug 2006 16:17:42 +1000 Subject: Tuning tweaks for ZL10353 From: Chris Pascoe More register setup which improves the ZL10353's tuning characteristics. Signed-off-by: Chris Pascoe --- linux/drivers/media/dvb/frontends/zl10353.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/frontends/zl10353.c b/linux/drivers/media/dvb/frontends/zl10353.c index d8313b9d7..51d50dcf5 100644 --- a/linux/drivers/media/dvb/frontends/zl10353.c +++ b/linux/drivers/media/dvb/frontends/zl10353.c @@ -144,6 +144,8 @@ static int zl10353_set_parameters(struct dvb_frontend *fe, zl10353_single_write(fe, 0x5E, 0x00); zl10353_single_write(fe, 0x65, 0x5A); zl10353_single_write(fe, 0x66, 0xE9); + zl10353_single_write(fe, 0x6C, 0xCD); + zl10353_single_write(fe, 0x6D, 0x7E); zl10353_single_write(fe, 0x62, 0x0A); // if there is no attached secondary tuner, we call set_params to program @@ -172,6 +174,7 @@ static int zl10353_set_parameters(struct dvb_frontend *fe, // even if there isn't a PLL attached to the secondary bus zl10353_write(fe, pllbuf, sizeof(pllbuf)); + zl10353_single_write(fe, 0x5F, 0x13); zl10353_single_write(fe, 0x70, 0x01); udelay(250); zl10353_single_write(fe, 0xE4, 0x00); -- cgit v1.2.3 From fafba302fb6794e7656f0781a6cb3ed66bcdfd31 Mon Sep 17 00:00:00 2001 From: Chris Pascoe Date: Thu, 10 Aug 2006 16:22:21 +1000 Subject: Reset USB part of DViCO Dual Digital during PCI driver attach From: Chris Pascoe If the FX2 does not reset properly during reboot, it can present an invalid USB device ID and fail to attach. Prevent this situation from occuring by resetting the USB part of the card when the PCI part probes. Also fix the GPIO configurations so that analog capture will not inadvertantly reset the USB part. Signed-off-by: Chris Pascoe --- linux/drivers/media/video/cx88/cx88-cards.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index d53908e69..5696a2bde 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1042,11 +1042,11 @@ struct cx88_board cx88_boards[] = { .input = {{ .type = CX88_VMUX_COMPOSITE1, .vmux = 1, - .gpio0 = 0x000027df, + .gpio0 = 0x000067df, },{ .type = CX88_VMUX_SVIDEO, .vmux = 2, - .gpio0 = 0x000027df, + .gpio0 = 0x000067df, }}, .dvb = 1, }, @@ -1792,9 +1792,15 @@ void cx88_card_setup(struct cx88_core *core) cx_write(MO_GP0_IO, 0x000007f8); cx_write(MO_GP1_IO, 0x00000001); break; + case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: + /* GPIO0:6 is hooked to FX2 reset pin */ + cx_set(MO_GP0_IO, 0x00004040); + cx_clear(MO_GP0_IO, 0x00000040); + msleep(1000); + cx_set(MO_GP0_IO, 0x00004040); + /* FALLTHROUGH */ case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: - case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID: /* GPIO0:0 is hooked to mt352 reset pin */ cx_set(MO_GP0_IO, 0x00000101); -- cgit v1.2.3 From 8bb0eee333f7221148ebd3b7fbfe4113e65393a4 Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Sat, 12 Aug 2006 13:09:44 +0100 Subject: Fix KNC1 DVBC support From: Andrew de Quincey This actually needs the same configuration as the other DVBC cards; simply no one had managed to test before to find out. Signed-off-by: Andrew de Quincey --- linux/drivers/media/dvb/ttpci/budget-av.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c index 6f1c41fb2..764c7ad95 100644 --- a/linux/drivers/media/dvb/ttpci/budget-av.c +++ b/linux/drivers/media/dvb/ttpci/budget-av.c @@ -1141,15 +1141,6 @@ static void frontend_init(struct budget_av *budget_av) break; case SUBID_DVBC_KNC1: - budget_av->reinitialise_demod = 1; - fe = dvb_attach(tda10021_attach, &philips_cu1216_config, - &budget_av->budget.i2c_adap, - read_pwm(budget_av)); - if (fe) { - fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params; - } - break; - case SUBID_DVBC_KNC1_PLUS: case SUBID_DVBC_CINERGY1200: budget_av->reinitialise_demod = 1; -- cgit v1.2.3 From 8bec8b2fc0ebc5341133bdf0f012ecf28355f29d Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Sat, 12 Aug 2006 13:13:35 +0100 Subject: add support for knc one dvb-s plus with 1894:0011 From: Christoph Pfister Apparently there are two types of knc1 dvb-s plus cards with different tuners (as for the knc1 dvb-s ones). This patch adds support for those cards with subsystem id 1894:0011. Signed-off-by: Christoph Pfister Successfully tested by: Benjamin Weber Signed-off-by: Andrew de Quincey --- linux/drivers/media/dvb/ttpci/budget-av.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c index 764c7ad95..16ff8ae80 100644 --- a/linux/drivers/media/dvb/ttpci/budget-av.c +++ b/linux/drivers/media/dvb/ttpci/budget-av.c @@ -1096,6 +1096,7 @@ static void frontend_init(struct budget_av *budget_av) switch (saa->pci->subsystem_device) { case SUBID_DVBS_KNC1: + case SUBID_DVBS_KNC1_PLUS: case SUBID_DVBS_EASYWATCH_1: if (saa->pci->subsystem_vendor == 0x1894) { fe = dvb_attach(stv0299_attach, &cinergy_1200s_1894_0010_config, @@ -1123,7 +1124,6 @@ static void frontend_init(struct budget_av *budget_av) } break; - case SUBID_DVBS_KNC1_PLUS: case SUBID_DVBS_TYPHOON: fe = dvb_attach(stv0299_attach, &typhoon_config, &budget_av->budget.i2c_adap); @@ -1392,6 +1392,7 @@ static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(knc1s, 0x1131, 0x0010), MAKE_EXTENSION_PCI(knc1s, 0x1894, 0x0010), MAKE_EXTENSION_PCI(knc1sp, 0x1131, 0x0011), + MAKE_EXTENSION_PCI(knc1sp, 0x1894, 0x0011), MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0014), MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0016), MAKE_EXTENSION_PCI(satewpls, 0x1894, 0x001e), -- cgit v1.2.3 From 4bb99da8a70bb980c10c82bde8e798dda6e879d2 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 12 Aug 2006 21:59:19 -0300 Subject: Offset parameter permission were 0x666, instead of 0x664 From: Mauro Carvalho Chehab Although not dangerous, it may allow a normal user with access to a machine to untune a TV channel. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tuner-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index 88ab4f63b..25a1034c1 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -18,7 +18,7 @@ static int offset = 0; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) MODULE_PARM(offset, "i"); #else -module_param(offset, int, 0666); +module_param(offset, int, 0664); #endif MODULE_PARM_DESC(offset,"Allows to specify an offset for tuner"); -- cgit v1.2.3 From 327b3eeac63ecf26ab99824b7a86b8881c49ffa7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 12 Aug 2006 22:01:27 -0300 Subject: CONFIG_PM=n slim: drivers/media/video/* From: Alexey Dobriyan Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/bt8xx/bttv-driver.c | 4 ++++ linux/drivers/media/video/cx88/cx88-blackbird.c | 2 ++ linux/drivers/media/video/cx88/cx88-dvb.c | 2 ++ linux/drivers/media/video/cx88/cx88-video.c | 7 ++++++- 4 files changed, 14 insertions(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index f927e5658..f2924c532 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -4235,6 +4235,7 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev) return; } +#ifdef CONFIG_PM static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct bttv *btv = pci_get_drvdata(pci_dev); @@ -4327,6 +4328,7 @@ static int bttv_resume(struct pci_dev *pci_dev) spin_unlock_irqrestore(&btv->s_lock,flags); return 0; } +#endif static struct pci_device_id bttv_pci_tbl[] = { {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT848, @@ -4347,8 +4349,10 @@ static struct pci_driver bttv_pci_driver = { .id_table = bttv_pci_tbl, .probe = bttv_probe, .remove = __devexit_p(bttv_remove), +#ifdef CONFIG_PM .suspend = bttv_suspend, .resume = bttv_resume, +#endif }; static int bttv_init_module(void) diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index 5888eb2dd..5a6686c43 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -1213,8 +1213,10 @@ static struct pci_driver blackbird_pci_driver = { .id_table = cx8802_pci_tbl, .probe = blackbird_probe, .remove = __devexit_p(blackbird_remove), +#ifdef CONFIG_PM .suspend = cx8802_suspend_common, .resume = cx8802_resume_common, +#endif }; static int blackbird_init(void) diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 07914f558..b2376b20f 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -871,8 +871,10 @@ static struct pci_driver dvb_pci_driver = { .id_table = cx8802_pci_tbl, .probe = dvb_probe, .remove = __devexit_p(dvb_remove), +#ifdef CONFIG_PM .suspend = cx8802_suspend_common, .resume = cx8802_resume_common, +#endif }; static int dvb_init(void) diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 1aef0005e..836f0e7a5 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -520,6 +520,7 @@ static int start_video_dma(struct cx8800_dev *dev, return 0; } +#ifdef CONFIG_PM static int stop_video_dma(struct cx8800_dev *dev) { struct cx88_core *core = dev->core; @@ -535,6 +536,7 @@ static int stop_video_dma(struct cx8800_dev *dev) cx_clear(MO_VID_INTMSK, 0x0f0011); return 0; } +#endif static int restart_video_queue(struct cx8800_dev *dev, struct cx88_dmaqueue *q) @@ -2322,6 +2324,7 @@ static void __devexit cx8800_finidev(struct pci_dev *pci_dev) kfree(dev); } +#ifdef CONFIG_PM static int cx8800_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct cx8800_dev *dev = pci_get_drvdata(pci_dev); @@ -2409,6 +2412,7 @@ static int cx8800_resume(struct pci_dev *pci_dev) return 0; } +#endif /* ----------------------------------------------------------- */ @@ -2429,9 +2433,10 @@ static struct pci_driver cx8800_pci_driver = { .id_table = cx8800_pci_tbl, .probe = cx8800_initdev, .remove = __devexit_p(cx8800_finidev), - +#ifdef CONFIG_PM .suspend = cx8800_suspend, .resume = cx8800_resume, +#endif }; static int cx8800_init(void) -- cgit v1.2.3