aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-03-14 08:57:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:45 -0400
commit32cd527f59f8aa8549067a2c5f989b736f7da79a (patch)
tree2552bd0efffc5bd21011e1f139c1b7a5c9a27390 /drivers/media/video/ivtv
parentb26d6e21788864039bfb24840a668f2cb0848930 (diff)
V4L/DVB: v4l: move vbi-specific video ops to a new vbi ops struct
Only a relatively small number of video receivers and transmitters actually support VBI. So start moving the vbi specific ops to an ops struct of their own. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv')
-rw-r--r--drivers/media/video/ivtv/ivtv-vbi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c
index d73af45dede6..e1c347e5ebd8 100644
--- a/drivers/media/video/ivtv/ivtv-vbi.c
+++ b/drivers/media/video/ivtv/ivtv-vbi.c
@@ -38,7 +38,7 @@ static void ivtv_set_vps(struct ivtv *itv, int enabled)
38 data.data[9] = itv->vbi.vps_payload.data[2]; 38 data.data[9] = itv->vbi.vps_payload.data[2];
39 data.data[10] = itv->vbi.vps_payload.data[3]; 39 data.data[10] = itv->vbi.vps_payload.data[3];
40 data.data[11] = itv->vbi.vps_payload.data[4]; 40 data.data[11] = itv->vbi.vps_payload.data[4];
41 ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); 41 ivtv_call_hw(itv, IVTV_HW_SAA7127, vbi, s_vbi_data, &data);
42} 42}
43 43
44static void ivtv_set_cc(struct ivtv *itv, int mode, const struct vbi_cc *cc) 44static void ivtv_set_cc(struct ivtv *itv, int mode, const struct vbi_cc *cc)
@@ -52,12 +52,12 @@ static void ivtv_set_cc(struct ivtv *itv, int mode, const struct vbi_cc *cc)
52 data.line = (mode & 1) ? 21 : 0; 52 data.line = (mode & 1) ? 21 : 0;
53 data.data[0] = cc->odd[0]; 53 data.data[0] = cc->odd[0];
54 data.data[1] = cc->odd[1]; 54 data.data[1] = cc->odd[1];
55 ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); 55 ivtv_call_hw(itv, IVTV_HW_SAA7127, vbi, s_vbi_data, &data);
56 data.field = 1; 56 data.field = 1;
57 data.line = (mode & 2) ? 21 : 0; 57 data.line = (mode & 2) ? 21 : 0;
58 data.data[0] = cc->even[0]; 58 data.data[0] = cc->even[0];
59 data.data[1] = cc->even[1]; 59 data.data[1] = cc->even[1];
60 ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); 60 ivtv_call_hw(itv, IVTV_HW_SAA7127, vbi, s_vbi_data, &data);
61} 61}
62 62
63static void ivtv_set_wss(struct ivtv *itv, int enabled, int mode) 63static void ivtv_set_wss(struct ivtv *itv, int enabled, int mode)
@@ -80,7 +80,7 @@ static void ivtv_set_wss(struct ivtv *itv, int enabled, int mode)
80 data.line = enabled ? 23 : 0; 80 data.line = enabled ? 23 : 0;
81 data.data[0] = mode & 0xff; 81 data.data[0] = mode & 0xff;
82 data.data[1] = (mode >> 8) & 0xff; 82 data.data[1] = (mode >> 8) & 0xff;
83 ivtv_call_hw(itv, IVTV_HW_SAA7127, video, s_vbi_data, &data); 83 ivtv_call_hw(itv, IVTV_HW_SAA7127, vbi, s_vbi_data, &data);
84} 84}
85 85
86static int odd_parity(u8 c) 86static int odd_parity(u8 c)
@@ -316,7 +316,7 @@ static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8
316 continue; 316 continue;
317 } 317 }
318 vbi.p = p + 4; 318 vbi.p = p + 4;
319 v4l2_subdev_call(itv->sd_video, video, decode_vbi_line, &vbi); 319 v4l2_subdev_call(itv->sd_video, vbi, decode_vbi_line, &vbi);
320 if (vbi.type && !(lines & (1 << vbi.line))) { 320 if (vbi.type && !(lines & (1 << vbi.line))) {
321 lines |= 1 << vbi.line; 321 lines |= 1 << vbi.line;
322 itv->vbi.sliced_data[line].id = vbi.type; 322 itv->vbi.sliced_data[line].id = vbi.type;
@@ -440,7 +440,7 @@ void ivtv_vbi_work_handler(struct ivtv *itv)
440 data.id = V4L2_SLICED_WSS_625; 440 data.id = V4L2_SLICED_WSS_625;
441 data.field = 0; 441 data.field = 0;
442 442
443 if (v4l2_subdev_call(itv->sd_video, video, g_vbi_data, &data) == 0) { 443 if (v4l2_subdev_call(itv->sd_video, vbi, g_vbi_data, &data) == 0) {
444 ivtv_set_wss(itv, 1, data.data[0] & 0xf); 444 ivtv_set_wss(itv, 1, data.data[0] & 0xf);
445 vi->wss_missing_cnt = 0; 445 vi->wss_missing_cnt = 0;
446 } else if (vi->wss_missing_cnt == 4) { 446 } else if (vi->wss_missing_cnt == 4) {
@@ -454,13 +454,13 @@ void ivtv_vbi_work_handler(struct ivtv *itv)
454 454
455 data.id = V4L2_SLICED_CAPTION_525; 455 data.id = V4L2_SLICED_CAPTION_525;
456 data.field = 0; 456 data.field = 0;
457 if (v4l2_subdev_call(itv->sd_video, video, g_vbi_data, &data) == 0) { 457 if (v4l2_subdev_call(itv->sd_video, vbi, g_vbi_data, &data) == 0) {
458 mode |= 1; 458 mode |= 1;
459 cc.odd[0] = data.data[0]; 459 cc.odd[0] = data.data[0];
460 cc.odd[1] = data.data[1]; 460 cc.odd[1] = data.data[1];
461 } 461 }
462 data.field = 1; 462 data.field = 1;
463 if (v4l2_subdev_call(itv->sd_video, video, g_vbi_data, &data) == 0) { 463 if (v4l2_subdev_call(itv->sd_video, vbi, g_vbi_data, &data) == 0) {
464 mode |= 2; 464 mode |= 2;
465 cc.even[0] = data.data[0]; 465 cc.even[0] = data.data[0];
466 cc.even[1] = data.data[1]; 466 cc.even[1] = data.data[1];