blob: e79a402fa6cd576897f042c44b75a5e0985fe386 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
3 bttv - Bt848 frame grabber driver
4 vbi interface
5
6 (c) 2002 Gerd Knorr <kraxel@bytesex.org>
7
Michael Schimeke5bd0262007-01-18 16:17:39 -03008 Copyright (C) 2005, 2006 Michael H. Schimek <mschimek@gmx.at>
9 Sponsored by OPQ Systems AB
10
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24*/
25
26#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#include <linux/errno.h>
28#include <linux/fs.h>
29#include <linux/kernel.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <linux/interrupt.h>
31#include <linux/kdev_t.h>
Hans Verkuil35ea11f2008-07-20 08:12:02 -030032#include <media/v4l2-ioctl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070033#include <asm/io.h>
34#include "bttvp.h"
35
Trent Piephoddecbe12006-07-26 17:08:29 -030036/* Offset from line sync pulse leading edge (0H) to start of VBI capture,
37 in fCLKx2 pixels. According to the datasheet, VBI capture starts
38 VBI_HDELAY fCLKx1 pixels from the tailing edgeof /HRESET, and /HRESET
39 is 64 fCLKx1 pixels wide. VBI_HDELAY is set to 0, so this should be
40 (64 + 0) * 2 = 128 fCLKx2 pixels. But it's not! The datasheet is
41 Just Plain Wrong. The real value appears to be different for
42 different revisions of the bt8x8 chips, and to be affected by the
43 horizontal scaling factor. Experimentally, the value is measured
44 to be about 244. */
45#define VBI_OFFSET 244
Michael H. Schimek67f15702006-01-09 15:25:27 -020046
Michael Schimeke5bd0262007-01-18 16:17:39 -030047/* 2048 for compatibility with earlier driver versions. The driver
48 really stores 1024 + tvnorm->vbipack * 4 samples per line in the
49 buffer. Note tvnorm->vbipack is <= 0xFF (limit of VBIPACK_LO + HI
50 is 0x1FF DWORDs) and VBI read()s store a frame counter in the last
51 four bytes of the VBI image. */
52#define VBI_BPL 2048
53
54/* Compatibility. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070055#define VBI_DEFLINES 16
Linus Torvalds1da177e2005-04-16 15:20:36 -070056
57static unsigned int vbibufs = 4;
Douglas Schilling Landgrafff699e62008-04-22 14:41:48 -030058static unsigned int vbi_debug;
Linus Torvalds1da177e2005-04-16 15:20:36 -070059
60module_param(vbibufs, int, 0444);
61module_param(vbi_debug, int, 0644);
62MODULE_PARM_DESC(vbibufs,"number of vbi buffers, range 2-32, default 4");
63MODULE_PARM_DESC(vbi_debug,"vbi code debug messages, default is 0 (no)");
64
65#ifdef dprintk
66# undef dprintk
67#endif
68#define dprintk(fmt, arg...) if (vbi_debug) \
69 printk(KERN_DEBUG "bttv%d/vbi: " fmt, btv->c.nr , ## arg)
70
Michael Schimeke5bd0262007-01-18 16:17:39 -030071#define IMAGE_SIZE(fmt) \
72 (((fmt)->count[0] + (fmt)->count[1]) * (fmt)->samples_per_line)
73
Linus Torvalds1da177e2005-04-16 15:20:36 -070074/* ----------------------------------------------------------------------- */
75/* vbi risc code + mm */
76
Linus Torvalds1da177e2005-04-16 15:20:36 -070077static int vbi_buffer_setup(struct videobuf_queue *q,
78 unsigned int *count, unsigned int *size)
79{
80 struct bttv_fh *fh = q->priv_data;
81 struct bttv *btv = fh->btv;
82
83 if (0 == *count)
84 *count = vbibufs;
Michael Schimeke5bd0262007-01-18 16:17:39 -030085
86 *size = IMAGE_SIZE(&fh->vbi_fmt.fmt);
87
88 dprintk("setup: samples=%u start=%d,%d count=%u,%u\n",
89 fh->vbi_fmt.fmt.samples_per_line,
90 fh->vbi_fmt.fmt.start[0],
91 fh->vbi_fmt.fmt.start[1],
92 fh->vbi_fmt.fmt.count[0],
93 fh->vbi_fmt.fmt.count[1]);
94
Linus Torvalds1da177e2005-04-16 15:20:36 -070095 return 0;
96}
97
98static int vbi_buffer_prepare(struct videobuf_queue *q,
99 struct videobuf_buffer *vb,
100 enum v4l2_field field)
101{
102 struct bttv_fh *fh = q->priv_data;
103 struct bttv *btv = fh->btv;
104 struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb);
Michael Schimeke5bd0262007-01-18 16:17:39 -0300105 const struct bttv_tvnorm *tvnorm;
106 unsigned int skip_lines0, skip_lines1, min_vdelay;
107 int redo_dma_risc;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 int rc;
109
Michael Schimeke5bd0262007-01-18 16:17:39 -0300110 buf->vb.size = IMAGE_SIZE(&fh->vbi_fmt.fmt);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size)
112 return -EINVAL;
113
Michael Schimeke5bd0262007-01-18 16:17:39 -0300114 tvnorm = fh->vbi_fmt.tvnorm;
115
116 /* There's no VBI_VDELAY register, RISC must skip the lines
117 we don't want. With default parameters we skip zero lines
118 as earlier driver versions did. The driver permits video
119 standard changes while capturing, so we use vbi_fmt.tvnorm
120 instead of btv->tvnorm to skip zero lines after video
121 standard changes as well. */
122
123 skip_lines0 = 0;
124 skip_lines1 = 0;
125
126 if (fh->vbi_fmt.fmt.count[0] > 0)
127 skip_lines0 = max(0, (fh->vbi_fmt.fmt.start[0]
128 - tvnorm->vbistart[0]));
129 if (fh->vbi_fmt.fmt.count[1] > 0)
130 skip_lines1 = max(0, (fh->vbi_fmt.fmt.start[1]
131 - tvnorm->vbistart[1]));
132
133 redo_dma_risc = 0;
134
135 if (buf->vbi_skip[0] != skip_lines0 ||
136 buf->vbi_skip[1] != skip_lines1 ||
137 buf->vbi_count[0] != fh->vbi_fmt.fmt.count[0] ||
138 buf->vbi_count[1] != fh->vbi_fmt.fmt.count[1]) {
139 buf->vbi_skip[0] = skip_lines0;
140 buf->vbi_skip[1] = skip_lines1;
141 buf->vbi_count[0] = fh->vbi_fmt.fmt.count[0];
142 buf->vbi_count[1] = fh->vbi_fmt.fmt.count[1];
143 redo_dma_risc = 1;
144 }
145
Brandon Philips0fc06862007-11-06 20:02:36 -0300146 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
Michael Schimeke5bd0262007-01-18 16:17:39 -0300147 redo_dma_risc = 1;
Mauro Carvalho Chehabc7b0ac02006-03-10 12:29:15 -0300148 if (0 != (rc = videobuf_iolock(q, &buf->vb, NULL)))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149 goto fail;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 }
Michael Schimeke5bd0262007-01-18 16:17:39 -0300151
152 if (redo_dma_risc) {
153 unsigned int bpl, padding, offset;
Mauro Carvalho Chehabc1accaa2007-08-23 16:37:49 -0300154 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
Michael Schimeke5bd0262007-01-18 16:17:39 -0300155
156 bpl = 2044; /* max. vbipack */
157 padding = VBI_BPL - bpl;
158
159 if (fh->vbi_fmt.fmt.count[0] > 0) {
160 rc = bttv_risc_packed(btv, &buf->top,
Mauro Carvalho Chehabc1accaa2007-08-23 16:37:49 -0300161 dma->sglist,
Michael Schimeke5bd0262007-01-18 16:17:39 -0300162 /* offset */ 0, bpl,
163 padding, skip_lines0,
164 fh->vbi_fmt.fmt.count[0]);
165 if (0 != rc)
166 goto fail;
167 }
168
169 if (fh->vbi_fmt.fmt.count[1] > 0) {
170 offset = fh->vbi_fmt.fmt.count[0] * VBI_BPL;
171
172 rc = bttv_risc_packed(btv, &buf->bottom,
Mauro Carvalho Chehabc1accaa2007-08-23 16:37:49 -0300173 dma->sglist,
Michael Schimeke5bd0262007-01-18 16:17:39 -0300174 offset, bpl,
175 padding, skip_lines1,
176 fh->vbi_fmt.fmt.count[1]);
177 if (0 != rc)
178 goto fail;
179 }
180 }
181
182 /* VBI capturing ends at VDELAY, start of video capturing,
183 no matter where the RISC program ends. VDELAY minimum is 2,
184 bounds.top is the corresponding first field line number
185 times two. VDELAY counts half field lines. */
186 min_vdelay = MIN_VDELAY;
187 if (fh->vbi_fmt.end >= tvnorm->cropcap.bounds.top)
188 min_vdelay += fh->vbi_fmt.end - tvnorm->cropcap.bounds.top;
189
190 /* For bttv_buffer_activate_vbi(). */
191 buf->geo.vdelay = min_vdelay;
192
Brandon Philips0fc06862007-11-06 20:02:36 -0300193 buf->vb.state = VIDEOBUF_PREPARED;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194 buf->vb.field = field;
195 dprintk("buf prepare %p: top=%p bottom=%p field=%s\n",
196 vb, &buf->top, &buf->bottom,
197 v4l2_field_names[buf->vb.field]);
198 return 0;
199
200 fail:
Mauro Carvalho Chehabc7b0ac02006-03-10 12:29:15 -0300201 bttv_dma_free(q,btv,buf);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202 return rc;
203}
204
205static void
206vbi_buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
207{
208 struct bttv_fh *fh = q->priv_data;
209 struct bttv *btv = fh->btv;
210 struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb);
211
212 dprintk("queue %p\n",vb);
Brandon Philips0fc06862007-11-06 20:02:36 -0300213 buf->vb.state = VIDEOBUF_QUEUED;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214 list_add_tail(&buf->vb.queue,&btv->vcapture);
215 if (NULL == btv->cvbi) {
216 fh->btv->loop_irq |= 4;
217 bttv_set_dma(btv,0x0c);
218 }
219}
220
221static void vbi_buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
222{
223 struct bttv_fh *fh = q->priv_data;
224 struct bttv *btv = fh->btv;
225 struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb);
226
227 dprintk("free %p\n",vb);
Michael Schimekfeaba7a2007-01-26 08:30:05 -0300228 bttv_dma_free(q,fh->btv,buf);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229}
230
231struct videobuf_queue_ops bttv_vbi_qops = {
232 .buf_setup = vbi_buffer_setup,
233 .buf_prepare = vbi_buffer_prepare,
234 .buf_queue = vbi_buffer_queue,
235 .buf_release = vbi_buffer_release,
236};
237
238/* ----------------------------------------------------------------------- */
239
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300240static int try_fmt(struct v4l2_vbi_format *f, const struct bttv_tvnorm *tvnorm,
241 __s32 crop_start)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700242{
Michael Schimeke5bd0262007-01-18 16:17:39 -0300243 __s32 min_start, max_start, max_end, f2_offset;
244 unsigned int i;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700245
Michael Schimeke5bd0262007-01-18 16:17:39 -0300246 /* For compatibility with earlier driver versions we must pretend
247 the VBI and video capture window may overlap. In reality RISC
248 magic aborts VBI capturing at the first line of video capturing,
249 leaving the rest of the buffer unchanged, usually all zero.
250 VBI capturing must always start before video capturing. >> 1
251 because cropping counts field lines times two. */
252 min_start = tvnorm->vbistart[0];
253 max_start = (crop_start >> 1) - 1;
254 max_end = (tvnorm->cropcap.bounds.top
255 + tvnorm->cropcap.bounds.height) >> 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256
Michael Schimeke5bd0262007-01-18 16:17:39 -0300257 if (min_start > max_start)
258 return -EBUSY;
259
260 BUG_ON(max_start >= max_end);
261
262 f->sampling_rate = tvnorm->Fsc;
263 f->samples_per_line = VBI_BPL;
264 f->sample_format = V4L2_PIX_FMT_GREY;
265 f->offset = VBI_OFFSET;
266
267 f2_offset = tvnorm->vbistart[1] - tvnorm->vbistart[0];
268
269 for (i = 0; i < 2; ++i) {
270 if (0 == f->count[i]) {
271 /* No data from this field. We leave f->start[i]
272 alone because VIDIOCSVBIFMT is w/o and EINVALs
273 when a driver does not support exactly the
274 requested parameters. */
275 } else {
276 s64 start, count;
277
278 start = clamp(f->start[i], min_start, max_start);
279 /* s64 to prevent overflow. */
280 count = (s64) f->start[i] + f->count[i] - start;
281 f->start[i] = start;
282 f->count[i] = clamp(count, (s64) 1,
283 max_end - start);
284 }
285
286 min_start += f2_offset;
287 max_start += f2_offset;
288 max_end += f2_offset;
289 }
290
291 if (0 == (f->count[0] | f->count[1])) {
292 /* As in earlier driver versions. */
293 f->start[0] = tvnorm->vbistart[0];
294 f->start[1] = tvnorm->vbistart[1];
295 f->count[0] = 1;
296 f->count[1] = 1;
297 }
298
299 f->flags = 0;
300
301 f->reserved[0] = 0;
302 f->reserved[1] = 0;
303
304 return 0;
305}
306
Hans Verkuil78b526a2008-05-28 12:16:41 -0300307int bttv_try_fmt_vbi_cap(struct file *file, void *f, struct v4l2_format *frt)
Michael Schimeke5bd0262007-01-18 16:17:39 -0300308{
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300309 struct bttv_fh *fh = f;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300310 struct bttv *btv = fh->btv;
311 const struct bttv_tvnorm *tvnorm;
312 __s32 crop_start;
313
314 mutex_lock(&btv->lock);
315
316 tvnorm = &bttv_tvnorms[btv->tvnorm];
317 crop_start = btv->crop_start;
318
319 mutex_unlock(&btv->lock);
320
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300321 return try_fmt(&frt->fmt.vbi, tvnorm, crop_start);
Michael Schimeke5bd0262007-01-18 16:17:39 -0300322}
323
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300324
Hans Verkuil78b526a2008-05-28 12:16:41 -0300325int bttv_s_fmt_vbi_cap(struct file *file, void *f, struct v4l2_format *frt)
Michael Schimeke5bd0262007-01-18 16:17:39 -0300326{
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300327 struct bttv_fh *fh = f;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300328 struct bttv *btv = fh->btv;
329 const struct bttv_tvnorm *tvnorm;
330 __s32 start1, end;
331 int rc;
332
333 mutex_lock(&btv->lock);
334
335 rc = -EBUSY;
336 if (fh->resources & RESOURCE_VBI)
337 goto fail;
338
339 tvnorm = &bttv_tvnorms[btv->tvnorm];
340
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300341 rc = try_fmt(&frt->fmt.vbi, tvnorm, btv->crop_start);
Michael Schimeke5bd0262007-01-18 16:17:39 -0300342 if (0 != rc)
343 goto fail;
344
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300345 start1 = frt->fmt.vbi.start[1] - tvnorm->vbistart[1] +
346 tvnorm->vbistart[0];
Michael Schimeke5bd0262007-01-18 16:17:39 -0300347
348 /* First possible line of video capturing. Should be
349 max(f->start[0] + f->count[0], start1 + f->count[1]) * 2
350 when capturing both fields. But for compatibility we must
351 pretend the VBI and video capture window may overlap,
352 so end = start + 1, the lowest possible value, times two
353 because vbi_fmt.end counts field lines times two. */
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300354 end = max(frt->fmt.vbi.start[0], start1) * 2 + 2;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300355
Mauro Carvalho Chehab64f94772008-01-31 13:57:53 -0300356 mutex_lock(&fh->vbi.vb_lock);
Michael Schimeke5bd0262007-01-18 16:17:39 -0300357
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300358 fh->vbi_fmt.fmt = frt->fmt.vbi;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300359 fh->vbi_fmt.tvnorm = tvnorm;
360 fh->vbi_fmt.end = end;
361
Mauro Carvalho Chehab64f94772008-01-31 13:57:53 -0300362 mutex_unlock(&fh->vbi.vb_lock);
Michael Schimeke5bd0262007-01-18 16:17:39 -0300363
364 rc = 0;
365
366 fail:
367 mutex_unlock(&btv->lock);
368
369 return rc;
370}
371
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300372
Hans Verkuil78b526a2008-05-28 12:16:41 -0300373int bttv_g_fmt_vbi_cap(struct file *file, void *f, struct v4l2_format *frt)
Michael Schimeke5bd0262007-01-18 16:17:39 -0300374{
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300375 struct bttv_fh *fh = f;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300376 const struct bttv_tvnorm *tvnorm;
377
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300378 frt->fmt.vbi = fh->vbi_fmt.fmt;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300379
380 tvnorm = &bttv_tvnorms[fh->btv->tvnorm];
381
382 if (tvnorm != fh->vbi_fmt.tvnorm) {
383 __s32 max_end;
384 unsigned int i;
385
386 /* As in vbi_buffer_prepare() this imitates the
387 behaviour of earlier driver versions after video
388 standard changes, with default parameters anyway. */
389
390 max_end = (tvnorm->cropcap.bounds.top
391 + tvnorm->cropcap.bounds.height) >> 1;
392
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300393 frt->fmt.vbi.sampling_rate = tvnorm->Fsc;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300394
395 for (i = 0; i < 2; ++i) {
396 __s32 new_start;
397
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300398 new_start = frt->fmt.vbi.start[i]
Michael Schimeke5bd0262007-01-18 16:17:39 -0300399 + tvnorm->vbistart[i]
400 - fh->vbi_fmt.tvnorm->vbistart[i];
401
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300402 frt->fmt.vbi.start[i] = min(new_start, max_end - 1);
403 frt->fmt.vbi.count[i] =
404 min((__s32) frt->fmt.vbi.count[i],
405 max_end - frt->fmt.vbi.start[i]);
Michael Schimeke5bd0262007-01-18 16:17:39 -0300406
407 max_end += tvnorm->vbistart[1]
408 - tvnorm->vbistart[0];
409 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700410 }
Douglas Schilling Landgraf402aa762007-12-27 22:20:58 -0300411 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700412}
413
Trent Piepho4ef2ccc2009-01-28 21:32:58 -0300414void bttv_vbi_fmt_reset(struct bttv_vbi_fmt *f, unsigned int norm)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700415{
416 const struct bttv_tvnorm *tvnorm;
Michael Schimeke5bd0262007-01-18 16:17:39 -0300417 unsigned int real_samples_per_line;
418 unsigned int real_count;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700419
Michael Schimeke5bd0262007-01-18 16:17:39 -0300420 tvnorm = &bttv_tvnorms[norm];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700421
Michael Schimeke5bd0262007-01-18 16:17:39 -0300422 f->fmt.sampling_rate = tvnorm->Fsc;
423 f->fmt.samples_per_line = VBI_BPL;
424 f->fmt.sample_format = V4L2_PIX_FMT_GREY;
425 f->fmt.offset = VBI_OFFSET;
426 f->fmt.start[0] = tvnorm->vbistart[0];
427 f->fmt.start[1] = tvnorm->vbistart[1];
428 f->fmt.count[0] = VBI_DEFLINES;
429 f->fmt.count[1] = VBI_DEFLINES;
430 f->fmt.flags = 0;
431 f->fmt.reserved[0] = 0;
432 f->fmt.reserved[1] = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433
Michael Schimeke5bd0262007-01-18 16:17:39 -0300434 /* For compatibility the buffer size must be 2 * VBI_DEFLINES *
435 VBI_BPL regardless of the current video standard. */
436 real_samples_per_line = 1024 + tvnorm->vbipack * 4;
437 real_count = ((tvnorm->cropcap.defrect.top >> 1)
438 - tvnorm->vbistart[0]);
Michael H. Schimek67f15702006-01-09 15:25:27 -0200439
Michael Schimeke5bd0262007-01-18 16:17:39 -0300440 BUG_ON(real_samples_per_line > VBI_BPL);
441 BUG_ON(real_count > VBI_DEFLINES);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700442
Michael Schimeke5bd0262007-01-18 16:17:39 -0300443 f->tvnorm = tvnorm;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444
Michael Schimeke5bd0262007-01-18 16:17:39 -0300445 /* See bttv_vbi_fmt_set(). */
446 f->end = tvnorm->vbistart[0] * 2 + 2;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700447}
448
449/* ----------------------------------------------------------------------- */
450/*
451 * Local variables:
452 * c-basic-offset: 8
453 * End:
454 */