aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-vbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-vbi.c')
-rw-r--r--drivers/media/video/cx88/cx88-vbi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/video/cx88/cx88-vbi.c
index aa2a69770098..86c1cf8334bc 100644
--- a/drivers/media/video/cx88/cx88-vbi.c
+++ b/drivers/media/video/cx88/cx88-vbi.c
@@ -21,9 +21,11 @@ MODULE_PARM_DESC(vbi_debug,"enable debug messages [vbi]");
21 21
22/* ------------------------------------------------------------------ */ 22/* ------------------------------------------------------------------ */
23 23
24void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f) 24int cx8800_vbi_fmt (struct file *file, void *priv,
25 struct v4l2_format *f)
25{ 26{
26 memset(&f->fmt.vbi,0,sizeof(f->fmt.vbi)); 27 struct cx8800_fh *fh = priv;
28 struct cx8800_dev *dev = fh->dev;
27 29
28 f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH; 30 f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH;
29 f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY; 31 f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
@@ -31,18 +33,19 @@ void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f)
31 f->fmt.vbi.count[0] = VBI_LINE_COUNT; 33 f->fmt.vbi.count[0] = VBI_LINE_COUNT;
32 f->fmt.vbi.count[1] = VBI_LINE_COUNT; 34 f->fmt.vbi.count[1] = VBI_LINE_COUNT;
33 35
34 if (dev->core->tvnorm->id & V4L2_STD_525_60) { 36 if (dev->core->tvnorm & V4L2_STD_525_60) {
35 /* ntsc */ 37 /* ntsc */
36 f->fmt.vbi.sampling_rate = 28636363; 38 f->fmt.vbi.sampling_rate = 28636363;
37 f->fmt.vbi.start[0] = 10; 39 f->fmt.vbi.start[0] = 10;
38 f->fmt.vbi.start[1] = 273; 40 f->fmt.vbi.start[1] = 273;
39 41
40 } else if (dev->core->tvnorm->id & V4L2_STD_625_50) { 42 } else if (dev->core->tvnorm & V4L2_STD_625_50) {
41 /* pal */ 43 /* pal */
42 f->fmt.vbi.sampling_rate = 35468950; 44 f->fmt.vbi.sampling_rate = 35468950;
43 f->fmt.vbi.start[0] = 7 -1; 45 f->fmt.vbi.start[0] = 7 -1;
44 f->fmt.vbi.start[1] = 319 -1; 46 f->fmt.vbi.start[1] = 319 -1;
45 } 47 }
48 return 0;
46} 49}
47 50
48static int cx8800_start_vbi_dma(struct cx8800_dev *dev, 51static int cx8800_start_vbi_dma(struct cx8800_dev *dev,