diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-06-27 05:07:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:06 -0400 |
commit | f7b80e6919df812b4bed99a927325312a904111b (patch) | |
tree | 6828bb6bfeea81a8345b148dbca8b2fdcadec7eb /drivers/media/video/ivtv/ivtv-driver.c | |
parent | 2fd781448acd6cbc3ca9d2f48b0e16f67a77bf51 (diff) |
V4L/DVB: ivtv: convert to the new control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 53ea31aab155..e421d15b0f5c 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include "ivtv-cards.h" | 53 | #include "ivtv-cards.h" |
54 | #include "ivtv-vbi.h" | 54 | #include "ivtv-vbi.h" |
55 | #include "ivtv-routing.h" | 55 | #include "ivtv-routing.h" |
56 | #include "ivtv-controls.h" | ||
56 | #include "ivtv-gpio.h" | 57 | #include "ivtv-gpio.h" |
57 | 58 | ||
58 | #include <media/tveeprom.h> | 59 | #include <media/tveeprom.h> |
@@ -734,9 +735,8 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv) | |||
734 | itv->open_id = 1; | 735 | itv->open_id = 1; |
735 | 736 | ||
736 | /* Initial settings */ | 737 | /* Initial settings */ |
737 | cx2341x_fill_defaults(&itv->params); | 738 | itv->cxhdl.port = CX2341X_PORT_MEMORY; |
738 | itv->params.port = CX2341X_PORT_MEMORY; | 739 | itv->cxhdl.capabilities = CX2341X_CAP_HAS_SLICED_VBI; |
739 | itv->params.capabilities = CX2341X_CAP_HAS_SLICED_VBI; | ||
740 | init_waitqueue_head(&itv->eos_waitq); | 740 | init_waitqueue_head(&itv->eos_waitq); |
741 | init_waitqueue_head(&itv->event_waitq); | 741 | init_waitqueue_head(&itv->event_waitq); |
742 | init_waitqueue_head(&itv->vsync_waitq); | 742 | init_waitqueue_head(&itv->vsync_waitq); |
@@ -1006,6 +1006,13 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, | |||
1006 | retval = -ENOMEM; | 1006 | retval = -ENOMEM; |
1007 | goto err; | 1007 | goto err; |
1008 | } | 1008 | } |
1009 | retval = cx2341x_handler_init(&itv->cxhdl, 50); | ||
1010 | if (retval) | ||
1011 | goto err; | ||
1012 | itv->v4l2_dev.ctrl_handler = &itv->cxhdl.hdl; | ||
1013 | itv->cxhdl.ops = &ivtv_cxhdl_ops; | ||
1014 | itv->cxhdl.priv = itv; | ||
1015 | itv->cxhdl.func = ivtv_api_func; | ||
1009 | 1016 | ||
1010 | IVTV_DEBUG_INFO("base addr: 0x%08x\n", itv->base_addr); | 1017 | IVTV_DEBUG_INFO("base addr: 0x%08x\n", itv->base_addr); |
1011 | 1018 | ||
@@ -1127,7 +1134,7 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, | |||
1127 | itv->yuv_info.v4l2_src_w = itv->yuv_info.osd_full_w; | 1134 | itv->yuv_info.v4l2_src_w = itv->yuv_info.osd_full_w; |
1128 | itv->yuv_info.v4l2_src_h = itv->yuv_info.osd_full_h; | 1135 | itv->yuv_info.v4l2_src_h = itv->yuv_info.osd_full_h; |
1129 | 1136 | ||
1130 | itv->params.video_gop_size = itv->is_60hz ? 15 : 12; | 1137 | cx2341x_handler_set_50hz(&itv->cxhdl, itv->is_50hz); |
1131 | 1138 | ||
1132 | itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_MPG] = 0x08000; | 1139 | itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_MPG] = 0x08000; |
1133 | itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_PCM] = 0x01200; | 1140 | itv->stream_buf_size[IVTV_ENC_STREAM_TYPE_PCM] = 0x01200; |
@@ -1322,6 +1329,8 @@ int ivtv_init_on_first_open(struct ivtv *itv) | |||
1322 | /* For cards with video out, this call needs interrupts enabled */ | 1329 | /* For cards with video out, this call needs interrupts enabled */ |
1323 | ivtv_s_std(NULL, &fh, &itv->tuner_std); | 1330 | ivtv_s_std(NULL, &fh, &itv->tuner_std); |
1324 | 1331 | ||
1332 | /* Setup initial controls */ | ||
1333 | cx2341x_handler_setup(&itv->cxhdl); | ||
1325 | return 0; | 1334 | return 0; |
1326 | } | 1335 | } |
1327 | 1336 | ||
@@ -1386,7 +1395,6 @@ static void ivtv_remove(struct pci_dev *pdev) | |||
1386 | printk(KERN_INFO "ivtv: Removed %s\n", itv->card_name); | 1395 | printk(KERN_INFO "ivtv: Removed %s\n", itv->card_name); |
1387 | 1396 | ||
1388 | v4l2_device_unregister(&itv->v4l2_dev); | 1397 | v4l2_device_unregister(&itv->v4l2_dev); |
1389 | v4l2_ctrl_handler_free(&itv->hdl_gpio); | ||
1390 | kfree(itv); | 1398 | kfree(itv); |
1391 | } | 1399 | } |
1392 | 1400 | ||