diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-11-29 17:38:23 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:44 -0500 |
commit | 67ec09fdf5e05d4670b617256c696348b5df080b (patch) | |
tree | fdf5f16f9b20280f83ce10e435d557bcb371934f /drivers/media/video/ivtv/ivtv-vbi.c | |
parent | ca085fb900265b525e3f9fb95fb6d7fd27a302ea (diff) |
V4L/DVB (9835): ivtv/ivtvfb: convert to v4l2_device/v4l2_subdev.
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-vbi.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-vbi.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c index 4a37a7d2e69d..5c5d1c462fef 100644 --- a/drivers/media/video/ivtv/ivtv-vbi.c +++ b/drivers/media/video/ivtv/ivtv-vbi.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "ivtv-i2c.h" | 21 | #include "ivtv-i2c.h" |
22 | #include "ivtv-ioctl.h" | 22 | #include "ivtv-ioctl.h" |
23 | #include "ivtv-queue.h" | 23 | #include "ivtv-queue.h" |
24 | #include "ivtv-cards.h" | ||
24 | #include "ivtv-vbi.h" | 25 | #include "ivtv-vbi.h" |
25 | 26 | ||
26 | static void ivtv_set_vps(struct ivtv *itv, int enabled) | 27 | static void ivtv_set_vps(struct ivtv *itv, int enabled) |
@@ -37,7 +38,7 @@ static void ivtv_set_vps(struct ivtv *itv, int enabled) | |||
37 | data.data[9] = itv->vbi.vps_payload.data[2]; | 38 | data.data[9] = itv->vbi.vps_payload.data[2]; |
38 | data.data[10] = itv->vbi.vps_payload.data[3]; | 39 | data.data[10] = itv->vbi.vps_payload.data[3]; |
39 | data.data[11] = itv->vbi.vps_payload.data[4]; | 40 | data.data[11] = itv->vbi.vps_payload.data[4]; |
40 | ivtv_saa7127(itv, VIDIOC_INT_S_VBI_DATA, &data); | 41 | ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); |
41 | } | 42 | } |
42 | 43 | ||
43 | static void ivtv_set_cc(struct ivtv *itv, int mode, const struct vbi_cc *cc) | 44 | static void ivtv_set_cc(struct ivtv *itv, int mode, const struct vbi_cc *cc) |
@@ -51,12 +52,12 @@ static void ivtv_set_cc(struct ivtv *itv, int mode, const struct vbi_cc *cc) | |||
51 | data.line = (mode & 1) ? 21 : 0; | 52 | data.line = (mode & 1) ? 21 : 0; |
52 | data.data[0] = cc->odd[0]; | 53 | data.data[0] = cc->odd[0]; |
53 | data.data[1] = cc->odd[1]; | 54 | data.data[1] = cc->odd[1]; |
54 | ivtv_saa7127(itv, VIDIOC_INT_S_VBI_DATA, &data); | 55 | ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); |
55 | data.field = 1; | 56 | data.field = 1; |
56 | data.line = (mode & 2) ? 21 : 0; | 57 | data.line = (mode & 2) ? 21 : 0; |
57 | data.data[0] = cc->even[0]; | 58 | data.data[0] = cc->even[0]; |
58 | data.data[1] = cc->even[1]; | 59 | data.data[1] = cc->even[1]; |
59 | ivtv_saa7127(itv, VIDIOC_INT_S_VBI_DATA, &data); | 60 | ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); |
60 | } | 61 | } |
61 | 62 | ||
62 | static void ivtv_set_wss(struct ivtv *itv, int enabled, int mode) | 63 | static void ivtv_set_wss(struct ivtv *itv, int enabled, int mode) |
@@ -79,7 +80,7 @@ static void ivtv_set_wss(struct ivtv *itv, int enabled, int mode) | |||
79 | data.line = enabled ? 23 : 0; | 80 | data.line = enabled ? 23 : 0; |
80 | data.data[0] = mode & 0xff; | 81 | data.data[0] = mode & 0xff; |
81 | data.data[1] = (mode >> 8) & 0xff; | 82 | data.data[1] = (mode >> 8) & 0xff; |
82 | ivtv_saa7127(itv, VIDIOC_INT_S_VBI_DATA, &data); | 83 | ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); |
83 | } | 84 | } |
84 | 85 | ||
85 | static int odd_parity(u8 c) | 86 | static int odd_parity(u8 c) |
@@ -313,7 +314,7 @@ static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8 | |||
313 | continue; | 314 | continue; |
314 | } | 315 | } |
315 | vbi.p = p + 4; | 316 | vbi.p = p + 4; |
316 | itv->video_dec_func(itv, VIDIOC_INT_DECODE_VBI_LINE, &vbi); | 317 | v4l2_subdev_call(itv->sd_video, video, decode_vbi_line, &vbi); |
317 | if (vbi.type && !(lines & (1 << vbi.line))) { | 318 | if (vbi.type && !(lines & (1 << vbi.line))) { |
318 | lines |= 1 << vbi.line; | 319 | lines |= 1 << vbi.line; |
319 | itv->vbi.sliced_data[line].id = vbi.type; | 320 | itv->vbi.sliced_data[line].id = vbi.type; |
@@ -437,7 +438,7 @@ void ivtv_vbi_work_handler(struct ivtv *itv) | |||
437 | data.id = V4L2_SLICED_WSS_625; | 438 | data.id = V4L2_SLICED_WSS_625; |
438 | data.field = 0; | 439 | data.field = 0; |
439 | 440 | ||
440 | if (itv->video_dec_func(itv, VIDIOC_INT_G_VBI_DATA, &data) == 0) { | 441 | if (v4l2_subdev_call(itv->sd_video, video, g_vbi_data, &data) == 0) { |
441 | ivtv_set_wss(itv, 1, data.data[0] & 0xf); | 442 | ivtv_set_wss(itv, 1, data.data[0] & 0xf); |
442 | vi->wss_missing_cnt = 0; | 443 | vi->wss_missing_cnt = 0; |
443 | } else if (vi->wss_missing_cnt == 4) { | 444 | } else if (vi->wss_missing_cnt == 4) { |
@@ -451,13 +452,13 @@ void ivtv_vbi_work_handler(struct ivtv *itv) | |||
451 | 452 | ||
452 | data.id = V4L2_SLICED_CAPTION_525; | 453 | data.id = V4L2_SLICED_CAPTION_525; |
453 | data.field = 0; | 454 | data.field = 0; |
454 | if (itv->video_dec_func(itv, VIDIOC_INT_G_VBI_DATA, &data) == 0) { | 455 | if (v4l2_subdev_call(itv->sd_video, video, g_vbi_data, &data) == 0) { |
455 | mode |= 1; | 456 | mode |= 1; |
456 | cc.odd[0] = data.data[0]; | 457 | cc.odd[0] = data.data[0]; |
457 | cc.odd[1] = data.data[1]; | 458 | cc.odd[1] = data.data[1]; |
458 | } | 459 | } |
459 | data.field = 1; | 460 | data.field = 1; |
460 | if (itv->video_dec_func(itv, VIDIOC_INT_G_VBI_DATA, &data) == 0) { | 461 | if (v4l2_subdev_call(itv->sd_video, video, g_vbi_data, &data) == 0) { |
461 | mode |= 2; | 462 | mode |= 2; |
462 | cc.even[0] = data.data[0]; | 463 | cc.even[0] = data.data[0]; |
463 | cc.even[1] = data.data[1]; | 464 | cc.even[1] = data.data[1]; |