aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index cd5545b2d60b..86db7fb96efd 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -310,12 +310,12 @@ static struct saa7134_tvnorm tvnorms[] = {
310 310
311 .h_start = 0, 311 .h_start = 0,
312 .h_stop = 719, 312 .h_stop = 719,
313 .video_v_start = 23, 313 .video_v_start = 23,
314 .video_v_stop = 262, 314 .video_v_stop = 262,
315 .vbi_v_start_0 = 10, 315 .vbi_v_start_0 = 10,
316 .vbi_v_stop_0 = 21, 316 .vbi_v_stop_0 = 21,
317 .vbi_v_start_1 = 273, 317 .vbi_v_start_1 = 273,
318 .src_timing = 7, 318 .src_timing = 7,
319 319
320 .sync_control = 0x18, 320 .sync_control = 0x18,
321 .luma_control = 0x40, 321 .luma_control = 0x40,
@@ -659,7 +659,7 @@ static void set_size(struct saa7134_dev *dev, int task,
659 prescale = 1; 659 prescale = 1;
660 xscale = 1024 * dev->crop_current.width / prescale / width; 660 xscale = 1024 * dev->crop_current.width / prescale / width;
661 yscale = 512 * div * dev->crop_current.height / height; 661 yscale = 512 * div * dev->crop_current.height / height;
662 dprintk("prescale=%d xscale=%d yscale=%d\n",prescale,xscale,yscale); 662 dprintk("prescale=%d xscale=%d yscale=%d\n",prescale,xscale,yscale);
663 set_h_prescale(dev,task,prescale); 663 set_h_prescale(dev,task,prescale);
664 saa_writeb(SAA7134_H_SCALE_INC1(task), xscale & 0xff); 664 saa_writeb(SAA7134_H_SCALE_INC1(task), xscale & 0xff);
665 saa_writeb(SAA7134_H_SCALE_INC2(task), xscale >> 8); 665 saa_writeb(SAA7134_H_SCALE_INC2(task), xscale >> 8);
@@ -789,20 +789,20 @@ static int verify_preview(struct saa7134_dev *dev, struct v4l2_window *win)
789 maxh = dev->crop_current.height; 789 maxh = dev->crop_current.height;
790 790
791 if (V4L2_FIELD_ANY == field) { 791 if (V4L2_FIELD_ANY == field) {
792 field = (win->w.height > maxh/2) 792 field = (win->w.height > maxh/2)
793 ? V4L2_FIELD_INTERLACED 793 ? V4L2_FIELD_INTERLACED
794 : V4L2_FIELD_TOP; 794 : V4L2_FIELD_TOP;
795 } 795 }
796 switch (field) { 796 switch (field) {
797 case V4L2_FIELD_TOP: 797 case V4L2_FIELD_TOP:
798 case V4L2_FIELD_BOTTOM: 798 case V4L2_FIELD_BOTTOM:
799 maxh = maxh / 2; 799 maxh = maxh / 2;
800 break; 800 break;
801 case V4L2_FIELD_INTERLACED: 801 case V4L2_FIELD_INTERLACED:
802 break; 802 break;
803 default: 803 default:
804 return -EINVAL; 804 return -EINVAL;
805 } 805 }
806 806
807 win->field = field; 807 win->field = field;
808 if (win->w.width > maxw) 808 if (win->w.width > maxw)
@@ -1343,13 +1343,13 @@ video_poll(struct file *file, struct poll_table_struct *wait)
1343 if (res_locked(fh->dev,RESOURCE_VIDEO)) { 1343 if (res_locked(fh->dev,RESOURCE_VIDEO)) {
1344 up(&fh->cap.lock); 1344 up(&fh->cap.lock);
1345 return POLLERR; 1345 return POLLERR;
1346 } 1346 }
1347 if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) { 1347 if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) {
1348 up(&fh->cap.lock); 1348 up(&fh->cap.lock);
1349 return POLLERR; 1349 return POLLERR;
1350 } 1350 }
1351 fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf); 1351 fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf);
1352 fh->cap.read_off = 0; 1352 fh->cap.read_off = 0;
1353 } 1353 }
1354 up(&fh->cap.lock); 1354 up(&fh->cap.lock);
1355 buf = fh->cap.read_buf; 1355 buf = fh->cap.read_buf;
@@ -1706,7 +1706,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
1706 unsigned int tuner_type = dev->tuner_type; 1706 unsigned int tuner_type = dev->tuner_type;
1707 1707
1708 memset(cap,0,sizeof(*cap)); 1708 memset(cap,0,sizeof(*cap));
1709 strcpy(cap->driver, "saa7134"); 1709 strcpy(cap->driver, "saa7134");
1710 strlcpy(cap->card, saa7134_boards[dev->board].name, 1710 strlcpy(cap->card, saa7134_boards[dev->board].name,
1711 sizeof(cap->card)); 1711 sizeof(cap->card));
1712 sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci)); 1712 sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
@@ -1934,26 +1934,26 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
1934 } 1934 }
1935 case VIDIOC_S_AUDIO: 1935 case VIDIOC_S_AUDIO:
1936 return 0; 1936 return 0;
1937 case VIDIOC_G_PARM: 1937 case VIDIOC_G_PARM:
1938 { 1938 {
1939 struct v4l2_captureparm *parm = arg; 1939 struct v4l2_captureparm *parm = arg;
1940 memset(parm,0,sizeof(*parm)); 1940 memset(parm,0,sizeof(*parm));
1941 return 0; 1941 return 0;
1942 } 1942 }
1943 1943
1944 case VIDIOC_G_PRIORITY: 1944 case VIDIOC_G_PRIORITY:
1945 { 1945 {
1946 enum v4l2_priority *p = arg; 1946 enum v4l2_priority *p = arg;
1947 1947
1948 *p = v4l2_prio_max(&dev->prio); 1948 *p = v4l2_prio_max(&dev->prio);
1949 return 0; 1949 return 0;
1950 } 1950 }
1951 case VIDIOC_S_PRIORITY: 1951 case VIDIOC_S_PRIORITY:
1952 { 1952 {
1953 enum v4l2_priority *prio = arg; 1953 enum v4l2_priority *prio = arg;
1954 1954
1955 return v4l2_prio_change(&dev->prio, &fh->prio, *prio); 1955 return v4l2_prio_change(&dev->prio, &fh->prio, *prio);
1956 } 1956 }
1957 1957
1958 /* --- preview ioctls ---------------------------------------- */ 1958 /* --- preview ioctls ---------------------------------------- */
1959 case VIDIOC_ENUM_FMT: 1959 case VIDIOC_ENUM_FMT:
@@ -2102,7 +2102,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
2102 { 2102 {
2103 int res = saa7134_resource(fh); 2103 int res = saa7134_resource(fh);
2104 2104
2105 if (!res_get(dev,fh,res)) 2105 if (!res_get(dev,fh,res))
2106 return -EBUSY; 2106 return -EBUSY;
2107 return videobuf_streamon(saa7134_queue(fh)); 2107 return videobuf_streamon(saa7134_queue(fh));
2108 } 2108 }
@@ -2144,7 +2144,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
2144 struct v4l2_capability *cap = arg; 2144 struct v4l2_capability *cap = arg;
2145 2145
2146 memset(cap,0,sizeof(*cap)); 2146 memset(cap,0,sizeof(*cap));
2147 strcpy(cap->driver, "saa7134"); 2147 strcpy(cap->driver, "saa7134");
2148 strlcpy(cap->card, saa7134_boards[dev->board].name, 2148 strlcpy(cap->card, saa7134_boards[dev->board].name,
2149 sizeof(cap->card)); 2149 sizeof(cap->card));
2150 sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci)); 2150 sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
@@ -2275,7 +2275,7 @@ struct video_device saa7134_video_template =
2275{ 2275{
2276 .name = "saa7134-video", 2276 .name = "saa7134-video",
2277 .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY| 2277 .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
2278 VID_TYPE_CLIPPING|VID_TYPE_SCALES, 2278 VID_TYPE_CLIPPING|VID_TYPE_SCALES,
2279 .hardware = 0, 2279 .hardware = 0,
2280 .fops = &video_fops, 2280 .fops = &video_fops,
2281 .minor = -1, 2281 .minor = -1,
@@ -2322,7 +2322,7 @@ int saa7134_video_init1(struct saa7134_dev *dev)
2322 dev->tda9887_conf |= TDA9887_AUTOMUTE; 2322 dev->tda9887_conf |= TDA9887_AUTOMUTE;
2323 dev->automute = 0; 2323 dev->automute = 0;
2324 2324
2325 INIT_LIST_HEAD(&dev->video_q.queue); 2325 INIT_LIST_HEAD(&dev->video_q.queue);
2326 init_timer(&dev->video_q.timeout); 2326 init_timer(&dev->video_q.timeout);
2327 dev->video_q.timeout.function = saa7134_buffer_timeout; 2327 dev->video_q.timeout.function = saa7134_buffer_timeout;
2328 dev->video_q.timeout.data = (unsigned long)(&dev->video_q); 2328 dev->video_q.timeout.data = (unsigned long)(&dev->video_q);