diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-31 06:38:04 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-31 06:38:04 -0400 |
commit | 5fbf24659b75356e2142e1f1b88f67b34cbc3e75 (patch) | |
tree | 0e470e4cc89b72e3d74939f8c39396a6a0bebb3a /drivers/media/video/saa7134 | |
parent | d89961e2dc87b6e30b8e3f60bd2af5cd92cf4643 (diff) | |
parent | 6e86841d05f371b5b9b86ce76c02aaee83352298 (diff) |
Merge branch 'linus' into x86/xen
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r-- | drivers/media/video/saa7134/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 16 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-empress.c | 54 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 98 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 7 |
6 files changed, 102 insertions, 78 deletions
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index 83f076abce35..7021bbf5897b 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig | |||
@@ -27,9 +27,7 @@ config VIDEO_SAA7134_ALSA | |||
27 | config VIDEO_SAA7134_DVB | 27 | config VIDEO_SAA7134_DVB |
28 | tristate "DVB/ATSC Support for saa7134 based TV cards" | 28 | tristate "DVB/ATSC Support for saa7134 based TV cards" |
29 | depends on VIDEO_SAA7134 && DVB_CORE | 29 | depends on VIDEO_SAA7134 && DVB_CORE |
30 | depends on HOTPLUG # due to FW_LOADER | ||
31 | select VIDEOBUF_DVB | 30 | select VIDEOBUF_DVB |
32 | select FW_LOADER | ||
33 | select DVB_PLL if !DVB_FE_CUSTOMISE | 31 | select DVB_PLL if !DVB_FE_CUSTOMISE |
34 | select DVB_MT352 if !DVB_FE_CUSTOMISE | 32 | select DVB_MT352 if !DVB_FE_CUSTOMISE |
35 | select DVB_TDA1004X if !DVB_FE_CUSTOMISE | 33 | select DVB_TDA1004X if !DVB_FE_CUSTOMISE |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 6893f998d292..98364d171def 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -5853,9 +5853,6 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
5853 | unsigned char buf; | 5853 | unsigned char buf; |
5854 | int board; | 5854 | int board; |
5855 | 5855 | ||
5856 | dev->tuner_type = saa7134_boards[dev->board].tuner_type; | ||
5857 | dev->tuner_addr = saa7134_boards[dev->board].tuner_addr; | ||
5858 | |||
5859 | switch (dev->board) { | 5856 | switch (dev->board) { |
5860 | case SAA7134_BOARD_BMK_MPEX_NOTUNER: | 5857 | case SAA7134_BOARD_BMK_MPEX_NOTUNER: |
5861 | case SAA7134_BOARD_BMK_MPEX_TUNER: | 5858 | case SAA7134_BOARD_BMK_MPEX_TUNER: |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index cfee84ee7a88..75d618415f4f 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -798,7 +798,7 @@ static struct video_device *vdev_init(struct saa7134_dev *dev, | |||
798 | return NULL; | 798 | return NULL; |
799 | *vfd = *template; | 799 | *vfd = *template; |
800 | vfd->minor = -1; | 800 | vfd->minor = -1; |
801 | vfd->dev = &dev->pci->dev; | 801 | vfd->parent = &dev->pci->dev; |
802 | vfd->release = video_device_release; | 802 | vfd->release = video_device_release; |
803 | vfd->debug = video_debug; | 803 | vfd->debug = video_debug; |
804 | snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", | 804 | snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", |
@@ -945,11 +945,12 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
945 | dev->board = SAA7134_BOARD_UNKNOWN; | 945 | dev->board = SAA7134_BOARD_UNKNOWN; |
946 | } | 946 | } |
947 | dev->autodetected = card[dev->nr] != dev->board; | 947 | dev->autodetected = card[dev->nr] != dev->board; |
948 | dev->tuner_type = saa7134_boards[dev->board].tuner_type; | 948 | dev->tuner_type = saa7134_boards[dev->board].tuner_type; |
949 | dev->tuner_addr = saa7134_boards[dev->board].tuner_addr; | ||
949 | dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf; | 950 | dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf; |
950 | if (UNSET != tuner[dev->nr]) | 951 | if (UNSET != tuner[dev->nr]) |
951 | dev->tuner_type = tuner[dev->nr]; | 952 | dev->tuner_type = tuner[dev->nr]; |
952 | printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n", | 953 | printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n", |
953 | dev->name,pci_dev->subsystem_vendor, | 954 | dev->name,pci_dev->subsystem_vendor, |
954 | pci_dev->subsystem_device,saa7134_boards[dev->board].name, | 955 | pci_dev->subsystem_device,saa7134_boards[dev->board].name, |
955 | dev->board, dev->autodetected ? | 956 | dev->board, dev->autodetected ? |
@@ -1007,11 +1008,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
1007 | v4l2_prio_init(&dev->prio); | 1008 | v4l2_prio_init(&dev->prio); |
1008 | 1009 | ||
1009 | /* register v4l devices */ | 1010 | /* register v4l devices */ |
1010 | if (saa7134_no_overlay <= 0) { | 1011 | if (saa7134_no_overlay > 0) |
1011 | saa7134_video_template.type |= VID_TYPE_OVERLAY; | 1012 | printk(KERN_INFO "%s: Overlay support disabled.\n", dev->name); |
1012 | } else { | 1013 | |
1013 | printk("%s: Overlay support disabled.\n",dev->name); | ||
1014 | } | ||
1015 | dev->video_dev = vdev_init(dev,&saa7134_video_template,"video"); | 1014 | dev->video_dev = vdev_init(dev,&saa7134_video_template,"video"); |
1016 | err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER, | 1015 | err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER, |
1017 | video_nr[dev->nr]); | 1016 | video_nr[dev->nr]); |
@@ -1024,7 +1023,6 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
1024 | dev->name,dev->video_dev->minor & 0x1f); | 1023 | dev->name,dev->video_dev->minor & 0x1f); |
1025 | 1024 | ||
1026 | dev->vbi_dev = vdev_init(dev, &saa7134_video_template, "vbi"); | 1025 | dev->vbi_dev = vdev_init(dev, &saa7134_video_template, "vbi"); |
1027 | dev->vbi_dev->type = VID_TYPE_TUNER | VID_TYPE_TELETEXT; | ||
1028 | 1026 | ||
1029 | err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI, | 1027 | err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI, |
1030 | vbi_nr[dev->nr]); | 1028 | vbi_nr[dev->nr]); |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 2a5ab957542d..c0c5d7509c25 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -89,14 +89,14 @@ static int ts_open(struct inode *inode, struct file *file) | |||
89 | err = -EBUSY; | 89 | err = -EBUSY; |
90 | if (!mutex_trylock(&dev->empress_tsq.vb_lock)) | 90 | if (!mutex_trylock(&dev->empress_tsq.vb_lock)) |
91 | goto done; | 91 | goto done; |
92 | if (dev->empress_users) | 92 | if (atomic_read(&dev->empress_users)) |
93 | goto done_up; | 93 | goto done_up; |
94 | 94 | ||
95 | /* Unmute audio */ | 95 | /* Unmute audio */ |
96 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, | 96 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, |
97 | saa_readb(SAA7134_AUDIO_MUTE_CTRL) & ~(1 << 6)); | 97 | saa_readb(SAA7134_AUDIO_MUTE_CTRL) & ~(1 << 6)); |
98 | 98 | ||
99 | dev->empress_users++; | 99 | atomic_inc(&dev->empress_users); |
100 | file->private_data = dev; | 100 | file->private_data = dev; |
101 | err = 0; | 101 | err = 0; |
102 | 102 | ||
@@ -110,8 +110,6 @@ static int ts_release(struct inode *inode, struct file *file) | |||
110 | { | 110 | { |
111 | struct saa7134_dev *dev = file->private_data; | 111 | struct saa7134_dev *dev = file->private_data; |
112 | 112 | ||
113 | mutex_lock(&dev->empress_tsq.vb_lock); | ||
114 | |||
115 | videobuf_stop(&dev->empress_tsq); | 113 | videobuf_stop(&dev->empress_tsq); |
116 | videobuf_mmap_free(&dev->empress_tsq); | 114 | videobuf_mmap_free(&dev->empress_tsq); |
117 | 115 | ||
@@ -122,9 +120,7 @@ static int ts_release(struct inode *inode, struct file *file) | |||
122 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, | 120 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, |
123 | saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6)); | 121 | saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6)); |
124 | 122 | ||
125 | dev->empress_users--; | 123 | atomic_dec(&dev->empress_users); |
126 | |||
127 | mutex_unlock(&dev->empress_tsq.vb_lock); | ||
128 | 124 | ||
129 | return 0; | 125 | return 0; |
130 | } | 126 | } |
@@ -333,6 +329,22 @@ static int empress_g_ext_ctrls(struct file *file, void *priv, | |||
333 | return saa7134_i2c_call_saa6752(dev, VIDIOC_G_EXT_CTRLS, ctrls); | 329 | return saa7134_i2c_call_saa6752(dev, VIDIOC_G_EXT_CTRLS, ctrls); |
334 | } | 330 | } |
335 | 331 | ||
332 | static int empress_g_ctrl(struct file *file, void *priv, | ||
333 | struct v4l2_control *c) | ||
334 | { | ||
335 | struct saa7134_dev *dev = file->private_data; | ||
336 | |||
337 | return saa7134_g_ctrl_internal(dev, NULL, c); | ||
338 | } | ||
339 | |||
340 | static int empress_s_ctrl(struct file *file, void *priv, | ||
341 | struct v4l2_control *c) | ||
342 | { | ||
343 | struct saa7134_dev *dev = file->private_data; | ||
344 | |||
345 | return saa7134_s_ctrl_internal(dev, NULL, c); | ||
346 | } | ||
347 | |||
336 | static int empress_queryctrl(struct file *file, void *priv, | 348 | static int empress_queryctrl(struct file *file, void *priv, |
337 | struct v4l2_queryctrl *c) | 349 | struct v4l2_queryctrl *c) |
338 | { | 350 | { |
@@ -400,16 +412,7 @@ static const struct file_operations ts_fops = | |||
400 | .llseek = no_llseek, | 412 | .llseek = no_llseek, |
401 | }; | 413 | }; |
402 | 414 | ||
403 | /* ----------------------------------------------------------- */ | 415 | static const struct v4l2_ioctl_ops ts_ioctl_ops = { |
404 | |||
405 | static struct video_device saa7134_empress_template = | ||
406 | { | ||
407 | .name = "saa7134-empress", | ||
408 | .type = 0 /* FIXME */, | ||
409 | .type2 = 0 /* FIXME */, | ||
410 | .fops = &ts_fops, | ||
411 | .minor = -1, | ||
412 | |||
413 | .vidioc_querycap = empress_querycap, | 416 | .vidioc_querycap = empress_querycap, |
414 | .vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap, | 417 | .vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap, |
415 | .vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap, | 418 | .vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap, |
@@ -428,8 +431,17 @@ static struct video_device saa7134_empress_template = | |||
428 | 431 | ||
429 | .vidioc_queryctrl = empress_queryctrl, | 432 | .vidioc_queryctrl = empress_queryctrl, |
430 | .vidioc_querymenu = empress_querymenu, | 433 | .vidioc_querymenu = empress_querymenu, |
431 | .vidioc_g_ctrl = saa7134_g_ctrl, | 434 | .vidioc_g_ctrl = empress_g_ctrl, |
432 | .vidioc_s_ctrl = saa7134_s_ctrl, | 435 | .vidioc_s_ctrl = empress_s_ctrl, |
436 | }; | ||
437 | |||
438 | /* ----------------------------------------------------------- */ | ||
439 | |||
440 | static struct video_device saa7134_empress_template = { | ||
441 | .name = "saa7134-empress", | ||
442 | .fops = &ts_fops, | ||
443 | .minor = -1, | ||
444 | .ioctl_ops = &ts_ioctl_ops, | ||
433 | 445 | ||
434 | .tvnorms = SAA7134_NORMS, | 446 | .tvnorms = SAA7134_NORMS, |
435 | .current_norm = V4L2_STD_PAL, | 447 | .current_norm = V4L2_STD_PAL, |
@@ -445,7 +457,7 @@ static void empress_signal_update(struct work_struct *work) | |||
445 | ts_reset_encoder(dev); | 457 | ts_reset_encoder(dev); |
446 | } else { | 458 | } else { |
447 | dprintk("video signal acquired\n"); | 459 | dprintk("video signal acquired\n"); |
448 | if (dev->empress_users) | 460 | if (atomic_read(&dev->empress_users)) |
449 | ts_init_encoder(dev); | 461 | ts_init_encoder(dev); |
450 | } | 462 | } |
451 | } | 463 | } |
@@ -465,7 +477,7 @@ static int empress_init(struct saa7134_dev *dev) | |||
465 | if (NULL == dev->empress_dev) | 477 | if (NULL == dev->empress_dev) |
466 | return -ENOMEM; | 478 | return -ENOMEM; |
467 | *(dev->empress_dev) = saa7134_empress_template; | 479 | *(dev->empress_dev) = saa7134_empress_template; |
468 | dev->empress_dev->dev = &dev->pci->dev; | 480 | dev->empress_dev->parent = &dev->pci->dev; |
469 | dev->empress_dev->release = video_device_release; | 481 | dev->empress_dev->release = video_device_release; |
470 | snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name), | 482 | snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name), |
471 | "%s empress (%s)", dev->name, | 483 | "%s empress (%s)", dev->name, |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 1a5137550e7a..68c268981861 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1112,10 +1112,8 @@ static struct videobuf_queue_ops video_qops = { | |||
1112 | 1112 | ||
1113 | /* ------------------------------------------------------------------ */ | 1113 | /* ------------------------------------------------------------------ */ |
1114 | 1114 | ||
1115 | int saa7134_g_ctrl(struct file *file, void *priv, struct v4l2_control *c) | 1115 | int saa7134_g_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c) |
1116 | { | 1116 | { |
1117 | struct saa7134_fh *fh = priv; | ||
1118 | struct saa7134_dev *dev = fh->dev; | ||
1119 | const struct v4l2_queryctrl* ctrl; | 1117 | const struct v4l2_queryctrl* ctrl; |
1120 | 1118 | ||
1121 | ctrl = ctrl_by_id(c->id); | 1119 | ctrl = ctrl_by_id(c->id); |
@@ -1160,20 +1158,31 @@ int saa7134_g_ctrl(struct file *file, void *priv, struct v4l2_control *c) | |||
1160 | } | 1158 | } |
1161 | return 0; | 1159 | return 0; |
1162 | } | 1160 | } |
1163 | EXPORT_SYMBOL_GPL(saa7134_g_ctrl); | 1161 | EXPORT_SYMBOL_GPL(saa7134_g_ctrl_internal); |
1162 | |||
1163 | static int saa7134_g_ctrl(struct file *file, void *priv, struct v4l2_control *c) | ||
1164 | { | ||
1165 | struct saa7134_fh *fh = priv; | ||
1166 | |||
1167 | return saa7134_g_ctrl_internal(fh->dev, fh, c); | ||
1168 | } | ||
1164 | 1169 | ||
1165 | int saa7134_s_ctrl(struct file *file, void *f, struct v4l2_control *c) | 1170 | int saa7134_s_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c) |
1166 | { | 1171 | { |
1167 | const struct v4l2_queryctrl* ctrl; | 1172 | const struct v4l2_queryctrl* ctrl; |
1168 | struct saa7134_fh *fh = f; | ||
1169 | struct saa7134_dev *dev = fh->dev; | ||
1170 | unsigned long flags; | 1173 | unsigned long flags; |
1171 | int restart_overlay = 0; | 1174 | int restart_overlay = 0; |
1172 | int err = -EINVAL; | 1175 | int err; |
1173 | 1176 | ||
1174 | err = v4l2_prio_check(&dev->prio, &fh->prio); | 1177 | /* When called from the empress code fh == NULL. |
1175 | if (0 != err) | 1178 | That needs to be fixed somehow, but for now this is |
1176 | return err; | 1179 | good enough. */ |
1180 | if (fh) { | ||
1181 | err = v4l2_prio_check(&dev->prio, &fh->prio); | ||
1182 | if (0 != err) | ||
1183 | return err; | ||
1184 | } | ||
1185 | err = -EINVAL; | ||
1177 | 1186 | ||
1178 | mutex_lock(&dev->lock); | 1187 | mutex_lock(&dev->lock); |
1179 | 1188 | ||
@@ -1274,7 +1283,14 @@ error: | |||
1274 | mutex_unlock(&dev->lock); | 1283 | mutex_unlock(&dev->lock); |
1275 | return err; | 1284 | return err; |
1276 | } | 1285 | } |
1277 | EXPORT_SYMBOL_GPL(saa7134_s_ctrl); | 1286 | EXPORT_SYMBOL_GPL(saa7134_s_ctrl_internal); |
1287 | |||
1288 | static int saa7134_s_ctrl(struct file *file, void *f, struct v4l2_control *c) | ||
1289 | { | ||
1290 | struct saa7134_fh *fh = f; | ||
1291 | |||
1292 | return saa7134_s_ctrl_internal(fh->dev, fh, c); | ||
1293 | } | ||
1278 | 1294 | ||
1279 | /* ------------------------------------------------------------------ */ | 1295 | /* ------------------------------------------------------------------ */ |
1280 | 1296 | ||
@@ -2353,26 +2369,7 @@ static const struct file_operations video_fops = | |||
2353 | .llseek = no_llseek, | 2369 | .llseek = no_llseek, |
2354 | }; | 2370 | }; |
2355 | 2371 | ||
2356 | static const struct file_operations radio_fops = | 2372 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
2357 | { | ||
2358 | .owner = THIS_MODULE, | ||
2359 | .open = video_open, | ||
2360 | .release = video_release, | ||
2361 | .ioctl = video_ioctl2, | ||
2362 | .compat_ioctl = v4l_compat_ioctl32, | ||
2363 | .llseek = no_llseek, | ||
2364 | }; | ||
2365 | |||
2366 | /* ----------------------------------------------------------- */ | ||
2367 | /* exported stuff */ | ||
2368 | |||
2369 | struct video_device saa7134_video_template = | ||
2370 | { | ||
2371 | .name = "saa7134-video", | ||
2372 | .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER | | ||
2373 | VID_TYPE_CLIPPING|VID_TYPE_SCALES, | ||
2374 | .fops = &video_fops, | ||
2375 | .minor = -1, | ||
2376 | .vidioc_querycap = saa7134_querycap, | 2373 | .vidioc_querycap = saa7134_querycap, |
2377 | .vidioc_enum_fmt_vid_cap = saa7134_enum_fmt_vid_cap, | 2374 | .vidioc_enum_fmt_vid_cap = saa7134_enum_fmt_vid_cap, |
2378 | .vidioc_g_fmt_vid_cap = saa7134_g_fmt_vid_cap, | 2375 | .vidioc_g_fmt_vid_cap = saa7134_g_fmt_vid_cap, |
@@ -2421,16 +2418,18 @@ struct video_device saa7134_video_template = | |||
2421 | .vidioc_g_register = vidioc_g_register, | 2418 | .vidioc_g_register = vidioc_g_register, |
2422 | .vidioc_s_register = vidioc_s_register, | 2419 | .vidioc_s_register = vidioc_s_register, |
2423 | #endif | 2420 | #endif |
2424 | .tvnorms = SAA7134_NORMS, | ||
2425 | .current_norm = V4L2_STD_PAL, | ||
2426 | }; | 2421 | }; |
2427 | 2422 | ||
2428 | struct video_device saa7134_radio_template = | 2423 | static const struct file_operations radio_fops = { |
2429 | { | 2424 | .owner = THIS_MODULE, |
2430 | .name = "saa7134-radio", | 2425 | .open = video_open, |
2431 | .type = VID_TYPE_TUNER, | 2426 | .release = video_release, |
2432 | .fops = &radio_fops, | 2427 | .ioctl = video_ioctl2, |
2433 | .minor = -1, | 2428 | .compat_ioctl = v4l_compat_ioctl32, |
2429 | .llseek = no_llseek, | ||
2430 | }; | ||
2431 | |||
2432 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { | ||
2434 | .vidioc_querycap = radio_querycap, | 2433 | .vidioc_querycap = radio_querycap, |
2435 | .vidioc_g_tuner = radio_g_tuner, | 2434 | .vidioc_g_tuner = radio_g_tuner, |
2436 | .vidioc_enum_input = radio_enum_input, | 2435 | .vidioc_enum_input = radio_enum_input, |
@@ -2447,6 +2446,25 @@ struct video_device saa7134_radio_template = | |||
2447 | .vidioc_s_frequency = saa7134_s_frequency, | 2446 | .vidioc_s_frequency = saa7134_s_frequency, |
2448 | }; | 2447 | }; |
2449 | 2448 | ||
2449 | /* ----------------------------------------------------------- */ | ||
2450 | /* exported stuff */ | ||
2451 | |||
2452 | struct video_device saa7134_video_template = { | ||
2453 | .name = "saa7134-video", | ||
2454 | .fops = &video_fops, | ||
2455 | .ioctl_ops = &video_ioctl_ops, | ||
2456 | .minor = -1, | ||
2457 | .tvnorms = SAA7134_NORMS, | ||
2458 | .current_norm = V4L2_STD_PAL, | ||
2459 | }; | ||
2460 | |||
2461 | struct video_device saa7134_radio_template = { | ||
2462 | .name = "saa7134-radio", | ||
2463 | .fops = &radio_fops, | ||
2464 | .ioctl_ops = &radio_ioctl_ops, | ||
2465 | .minor = -1, | ||
2466 | }; | ||
2467 | |||
2450 | int saa7134_video_init1(struct saa7134_dev *dev) | 2468 | int saa7134_video_init1(struct saa7134_dev *dev) |
2451 | { | 2469 | { |
2452 | /* sanitycheck insmod options */ | 2470 | /* sanitycheck insmod options */ |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index 6927cbea8624..a0884f639f65 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | 35 | ||
36 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
37 | #include <media/v4l2-ioctl.h> | ||
37 | #include <media/tuner.h> | 38 | #include <media/tuner.h> |
38 | #include <media/ir-common.h> | 39 | #include <media/ir-common.h> |
39 | #include <media/ir-kbd-i2c.h> | 40 | #include <media/ir-kbd-i2c.h> |
@@ -560,7 +561,7 @@ struct saa7134_dev { | |||
560 | /* SAA7134_MPEG_EMPRESS only */ | 561 | /* SAA7134_MPEG_EMPRESS only */ |
561 | struct video_device *empress_dev; | 562 | struct video_device *empress_dev; |
562 | struct videobuf_queue empress_tsq; | 563 | struct videobuf_queue empress_tsq; |
563 | unsigned int empress_users; | 564 | atomic_t empress_users; |
564 | struct work_struct empress_workqueue; | 565 | struct work_struct empress_workqueue; |
565 | int empress_started; | 566 | int empress_started; |
566 | 567 | ||
@@ -662,8 +663,8 @@ extern unsigned int video_debug; | |||
662 | extern struct video_device saa7134_video_template; | 663 | extern struct video_device saa7134_video_template; |
663 | extern struct video_device saa7134_radio_template; | 664 | extern struct video_device saa7134_radio_template; |
664 | 665 | ||
665 | int saa7134_g_ctrl(struct file *file, void *priv, struct v4l2_control *c); | 666 | int saa7134_s_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c); |
666 | int saa7134_s_ctrl(struct file *file, void *f, struct v4l2_control *c); | 667 | int saa7134_g_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, struct v4l2_control *c); |
667 | int saa7134_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *c); | 668 | int saa7134_queryctrl(struct file *file, void *priv, struct v4l2_queryctrl *c); |
668 | 669 | ||
669 | int saa7134_videoport_init(struct saa7134_dev *dev); | 670 | int saa7134_videoport_init(struct saa7134_dev *dev); |