24 #include <linux/list.h>
25 #include <linux/module.h>
26 #include <linux/kernel.h>
33 static unsigned int vbi_debug;
37 static unsigned int vbibufs = 4;
41 #define dprintk(fmt, arg...) if (vbi_debug) \
42 printk(KERN_DEBUG "%s/vbi: " fmt, dev->name , ## arg)
46 #define VBI_LINE_COUNT 16
47 #define VBI_LINE_LENGTH 2048
48 #define VBI_SCALE 0x200
86 dprintk(
"buffer_activate [%p]\n",buf);
124 unsigned int lines, llength,
size;
131 size = lines * llength * 2;
132 if (0 != buf->
vb.baddr && buf->
vb.bsize < size)
135 if (buf->
vb.size != size)
141 buf->
vb.width = llength;
142 buf->
vb.height = lines;
173 lines = dev->
tvnorm->vbi_v_stop_0 - dev->
tvnorm->vbi_v_start_0 +1;
175 *size = lines * llength * 2;
199 .buf_setup = buffer_setup,
200 .buf_prepare = buffer_prepare,
201 .buf_queue = buffer_queue,
202 .buf_release = buffer_release,
209 INIT_LIST_HEAD(&dev->
vbi_q.queue);
230 spin_lock(&dev->
slock);
231 if (dev->
vbi_q.curr) {
234 if ((status & 0x10) == 0x00) {
235 dev->
vbi_q.curr->top_seen = 1;
238 if (!dev->
vbi_q.curr->top_seen)
247 spin_unlock(&dev->
slock);