summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18/cx18-ioctl.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-01-30 22:33:02 -0500
committerAndy Walls <awalls@radix.net>2009-01-30 22:33:02 -0500
commitadbc75d3cf3691d649c8dac1f32ee21f332f0f4c (patch)
tree0ed8a7c6105d4009a02f848b8c587f542af14554 /linux/drivers/media/video/cx18/cx18-ioctl.c
parentc397fe6b033be4e7829a44325cb06a0852d5a6bd (diff)
downloadmediapointer-dvb-s2-adbc75d3cf3691d649c8dac1f32ee21f332f0f4c.tar.gz
mediapointer-dvb-s2-adbc75d3cf3691d649c8dac1f32ee21f332f0f4c.tar.bz2
cx18: Clean-up and enable sliced VBI handling
From: Andy Walls <awalls@radix.net> Removed legacy ivtv state variables, added comments, and cleaned up sliced VBI related code. Enabled sliced VBI. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video/cx18/cx18-ioctl.c')
-rw-r--r--linux/drivers/media/video/cx18/cx18-ioctl.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-ioctl.c b/linux/drivers/media/video/cx18/cx18-ioctl.c
index 4a49b0819..645c41937 100644
--- a/linux/drivers/media/video/cx18/cx18-ioctl.c
+++ b/linux/drivers/media/video/cx18/cx18-ioctl.c
@@ -102,7 +102,6 @@ void cx18_expand_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal)
}
}
-#if 0
static int check_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal)
{
int f, l;
@@ -116,7 +115,6 @@ static int check_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal)
}
return set != 0;
}
-#endif
u16 cx18_get_service_set(struct v4l2_sliced_vbi_format *fmt)
{
@@ -165,7 +163,7 @@ static int cx18_g_fmt_vbi_cap(struct file *file, void *fh,
vbifmt->sampling_rate = 27000000;
vbifmt->offset = 248;
- vbifmt->samples_per_line = cx->vbi.raw_decoder_line_size - 4;
+ vbifmt->samples_per_line = vbi_active_samples - 4;
vbifmt->sample_format = V4L2_PIX_FMT_GREY;
vbifmt->start[0] = cx->vbi.start[0];
vbifmt->start[1] = cx->vbi.start[1];
@@ -179,8 +177,6 @@ static int cx18_g_fmt_vbi_cap(struct file *file, void *fh,
static int cx18_g_fmt_sliced_vbi_cap(struct file *file, void *fh,
struct v4l2_format *fmt)
{
-#if 0
- /* Supported by the cx23418 but not yet implemented. */
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced;
@@ -192,9 +188,6 @@ static int cx18_g_fmt_sliced_vbi_cap(struct file *file, void *fh,
cx18_av_cmd(cx, VIDIOC_G_FMT, fmt);
vbifmt->service_set = cx18_get_service_set(vbifmt);
return 0;
-#else
- return -EINVAL;
-#endif
}
static int cx18_try_fmt_vid_cap(struct file *file, void *fh,
@@ -224,8 +217,6 @@ static int cx18_try_fmt_vbi_cap(struct file *file, void *fh,
static int cx18_try_fmt_sliced_vbi_cap(struct file *file, void *fh,
struct v4l2_format *fmt)
{
-#if 0
- /* Supported by the cx23418 but not yet implemented. */
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced;
@@ -238,9 +229,6 @@ static int cx18_try_fmt_sliced_vbi_cap(struct file *file, void *fh,
check_service_set(vbifmt, cx->is_50hz);
vbifmt->service_set = cx18_get_service_set(vbifmt);
return 0;
-#else
- return -EINVAL;
-#endif
}
static int cx18_s_fmt_vid_cap(struct file *file, void *fh,
@@ -296,8 +284,6 @@ static int cx18_s_fmt_vbi_cap(struct file *file, void *fh,
static int cx18_s_fmt_sliced_vbi_cap(struct file *file, void *fh,
struct v4l2_format *fmt)
{
-#if 0
- /* Supported by the cx23418 but not yet implemented. */
struct cx18_open_id *id = fh;
struct cx18 *cx = id->cx;
int ret;
@@ -320,9 +306,6 @@ static int cx18_s_fmt_sliced_vbi_cap(struct file *file, void *fh,
cx18_av_cmd(cx, VIDIOC_S_FMT, fmt);
memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in));
return 0;
-#else
- return -EINVAL;
-#endif
}
static int cx18_g_chip_ident(struct file *file, void *fh,
@@ -620,7 +603,6 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std)
cx->vbi.count = cx->is_50hz ? 18 : 12;
cx->vbi.start[0] = cx->is_50hz ? 6 : 10;
cx->vbi.start[1] = cx->is_50hz ? 318 : 273;
- cx->vbi.sliced_decoder_line_size = cx->is_60hz ? 272 : 284;
CX18_DEBUG_INFO("Switching standard to %llx.\n",
(unsigned long long) cx->std);
@@ -671,8 +653,6 @@ static int cx18_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
static int cx18_g_sliced_vbi_cap(struct file *file, void *fh,
struct v4l2_sliced_vbi_cap *cap)
{
-#if 0
- /* Supported by the cx23418 but not yet implemented. */
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
int set = cx->is_50hz ? V4L2_SLICED_VBI_625 : V4L2_SLICED_VBI_525;
int f, l;
@@ -686,7 +666,6 @@ static int cx18_g_sliced_vbi_cap(struct file *file, void *fh,
}
return 0;
}
-#endif
return -EINVAL;
}