aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-blackbird.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-blackbird.c')
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index f2fcdb92ecce..6d6f5048d762 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -27,7 +27,6 @@
27 */ 27 */
28 28
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/moduleparam.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/fs.h> 31#include <linux/fs.h>
33#include <linux/delay.h> 32#include <linux/delay.h>
@@ -734,14 +733,14 @@ static int vidioc_querycap (struct file *file, void *priv,
734 struct cx88_core *core = dev->core; 733 struct cx88_core *core = dev->core;
735 734
736 strcpy(cap->driver, "cx88_blackbird"); 735 strcpy(cap->driver, "cx88_blackbird");
737 strlcpy(cap->card, cx88_boards[core->board].name,sizeof(cap->card)); 736 strlcpy(cap->card, core->board.name, sizeof(cap->card));
738 sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci)); 737 sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
739 cap->version = CX88_VERSION_CODE; 738 cap->version = CX88_VERSION_CODE;
740 cap->capabilities = 739 cap->capabilities =
741 V4L2_CAP_VIDEO_CAPTURE | 740 V4L2_CAP_VIDEO_CAPTURE |
742 V4L2_CAP_READWRITE | 741 V4L2_CAP_READWRITE |
743 V4L2_CAP_STREAMING; 742 V4L2_CAP_STREAMING;
744 if (UNSET != core->tuner_type) 743 if (UNSET != core->board.tuner_type)
745 cap->capabilities |= V4L2_CAP_TUNER; 744 cap->capabilities |= V4L2_CAP_TUNER;
746 return 0; 745 return 0;
747} 746}
@@ -877,7 +876,7 @@ static int vidioc_g_ext_ctrls (struct file *file, void *priv,
877 876
878 if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG) 877 if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG)
879 return -EINVAL; 878 return -EINVAL;
880 return cx2341x_ext_ctrls(&dev->params, f, VIDIOC_G_EXT_CTRLS); 879 return cx2341x_ext_ctrls(&dev->params, 0, f, VIDIOC_G_EXT_CTRLS);
881} 880}
882 881
883static int vidioc_s_ext_ctrls (struct file *file, void *priv, 882static int vidioc_s_ext_ctrls (struct file *file, void *priv,
@@ -890,7 +889,7 @@ static int vidioc_s_ext_ctrls (struct file *file, void *priv,
890 if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG) 889 if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG)
891 return -EINVAL; 890 return -EINVAL;
892 p = dev->params; 891 p = dev->params;
893 err = cx2341x_ext_ctrls(&p, f, VIDIOC_S_EXT_CTRLS); 892 err = cx2341x_ext_ctrls(&p, 0, f, VIDIOC_S_EXT_CTRLS);
894 if (!err) { 893 if (!err) {
895 err = cx2341x_update(dev, blackbird_mbox_func, &dev->params, &p); 894 err = cx2341x_update(dev, blackbird_mbox_func, &dev->params, &p);
896 dev->params = p; 895 dev->params = p;
@@ -908,7 +907,7 @@ static int vidioc_try_ext_ctrls (struct file *file, void *priv,
908 if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG) 907 if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG)
909 return -EINVAL; 908 return -EINVAL;
910 p = dev->params; 909 p = dev->params;
911 err = cx2341x_ext_ctrls(&p, f, VIDIOC_TRY_EXT_CTRLS); 910 err = cx2341x_ext_ctrls(&p, 0, f, VIDIOC_TRY_EXT_CTRLS);
912 911
913 return err; 912 return err;
914} 913}
@@ -990,7 +989,7 @@ static int vidioc_g_frequency (struct file *file, void *priv,
990 struct cx8802_fh *fh = priv; 989 struct cx8802_fh *fh = priv;
991 struct cx88_core *core = fh->dev->core; 990 struct cx88_core *core = fh->dev->core;
992 991
993 if (unlikely(UNSET == core->tuner_type)) 992 if (unlikely(UNSET == core->board.tuner_type))
994 return -EINVAL; 993 return -EINVAL;
995 994
996 f->type = V4L2_TUNER_ANALOG_TV; 995 f->type = V4L2_TUNER_ANALOG_TV;
@@ -1028,7 +1027,7 @@ static int vidioc_g_tuner (struct file *file, void *priv,
1028 struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core; 1027 struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core;
1029 u32 reg; 1028 u32 reg;
1030 1029
1031 if (unlikely(UNSET == core->tuner_type)) 1030 if (unlikely(UNSET == core->board.tuner_type))
1032 return -EINVAL; 1031 return -EINVAL;
1033 if (0 != t->index) 1032 if (0 != t->index)
1034 return -EINVAL; 1033 return -EINVAL;
@@ -1049,7 +1048,7 @@ static int vidioc_s_tuner (struct file *file, void *priv,
1049{ 1048{
1050 struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core; 1049 struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core;
1051 1050
1052 if (UNSET == core->tuner_type) 1051 if (UNSET == core->board.tuner_type)
1053 return -EINVAL; 1052 return -EINVAL;
1054 if (0 != t->index) 1053 if (0 != t->index)
1055 return -EINVAL; 1054 return -EINVAL;
@@ -1078,7 +1077,7 @@ static int mpeg_open(struct inode *inode, struct file *file)
1078 struct cx8802_driver *drv = NULL; 1077 struct cx8802_driver *drv = NULL;
1079 int err; 1078 int err;
1080 1079
1081 dev = cx8802_get_device(inode); 1080 dev = cx8802_get_device(inode);
1082 1081
1083 dprintk( 1, "%s\n", __FUNCTION__); 1082 dprintk( 1, "%s\n", __FUNCTION__);
1084 1083
@@ -1112,7 +1111,7 @@ static int mpeg_open(struct inode *inode, struct file *file)
1112 file->private_data = fh; 1111 file->private_data = fh;
1113 fh->dev = dev; 1112 fh->dev = dev;
1114 1113
1115 videobuf_queue_init(&fh->mpegq, &blackbird_qops, 1114 videobuf_queue_pci_init(&fh->mpegq, &blackbird_qops,
1116 dev->pci, &dev->slock, 1115 dev->pci, &dev->slock,
1117 V4L2_BUF_TYPE_VIDEO_CAPTURE, 1116 V4L2_BUF_TYPE_VIDEO_CAPTURE,
1118 V4L2_FIELD_INTERLACED, 1117 V4L2_FIELD_INTERLACED,
@@ -1235,7 +1234,7 @@ static struct video_device cx8802_mpeg_template =
1235 .vidioc_s_tuner = vidioc_s_tuner, 1234 .vidioc_s_tuner = vidioc_s_tuner,
1236 .vidioc_s_std = vidioc_s_std, 1235 .vidioc_s_std = vidioc_s_std,
1237 .tvnorms = CX88_NORMS, 1236 .tvnorms = CX88_NORMS,
1238 .current_norm = V4L2_STD_NTSC_M, 1237 .current_norm = V4L2_STD_NTSC_M,
1239}; 1238};
1240 1239
1241/* ------------------------------------------------------------------ */ 1240/* ------------------------------------------------------------------ */
@@ -1246,7 +1245,7 @@ static int cx8802_blackbird_advise_acquire(struct cx8802_driver *drv)
1246 struct cx88_core *core = drv->core; 1245 struct cx88_core *core = drv->core;
1247 int err = 0; 1246 int err = 0;
1248 1247
1249 switch (core->board) { 1248 switch (core->boardnr) {
1250 case CX88_BOARD_HAUPPAUGE_HVR1300: 1249 case CX88_BOARD_HAUPPAUGE_HVR1300:
1251 /* By default, core setup will leave the cx22702 out of reset, on the bus. 1250 /* By default, core setup will leave the cx22702 out of reset, on the bus.
1252 * We left the hardware on power up with the cx22702 active. 1251 * We left the hardware on power up with the cx22702 active.
@@ -1268,7 +1267,7 @@ static int cx8802_blackbird_advise_release(struct cx8802_driver *drv)
1268 struct cx88_core *core = drv->core; 1267 struct cx88_core *core = drv->core;
1269 int err = 0; 1268 int err = 0;
1270 1269
1271 switch (core->board) { 1270 switch (core->boardnr) {
1272 case CX88_BOARD_HAUPPAUGE_HVR1300: 1271 case CX88_BOARD_HAUPPAUGE_HVR1300:
1273 /* Exit leaving the cx23416 on the bus */ 1272 /* Exit leaving the cx23416 on the bus */
1274 break; 1273 break;
@@ -1316,13 +1315,13 @@ static int cx8802_blackbird_probe(struct cx8802_driver *drv)
1316 1315
1317 dprintk( 1, "%s\n", __FUNCTION__); 1316 dprintk( 1, "%s\n", __FUNCTION__);
1318 dprintk( 1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n", 1317 dprintk( 1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n",
1319 core->board, 1318 core->boardnr,
1320 core->name, 1319 core->name,
1321 core->pci_bus, 1320 core->pci_bus,
1322 core->pci_slot); 1321 core->pci_slot);
1323 1322
1324 err = -ENODEV; 1323 err = -ENODEV;
1325 if (!(cx88_boards[core->board].mpeg & CX88_MPEG_BLACKBIRD)) 1324 if (!(core->board.mpeg & CX88_MPEG_BLACKBIRD))
1326 goto fail_core; 1325 goto fail_core;
1327 1326
1328 dev->width = 720; 1327 dev->width = 720;