summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-13 15:09:14 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:09:39 -0300
commitb4916f8ca1da71bb97fb6dcf1e8da3f9c64cf80e (patch)
treec71e97aa170b066fedefd2d13326041181346b54 /drivers/media/video/em28xx/em28xx-video.c
parentdbecb44c11d9517d604240b53581951ac4e3b5e6 (diff)
downloadblackbird-op-linux-b4916f8ca1da71bb97fb6dcf1e8da3f9c64cf80e.tar.gz
blackbird-op-linux-b4916f8ca1da71bb97fb6dcf1e8da3f9c64cf80e.zip
V4L/DVB (7564): em28xx: Some fixes to display logic
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 10928dccaecc..d5728c2cd360 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -365,32 +365,33 @@ static inline int em28xx_isoc_copy(struct urb *urb)
/* FIXME: incomplete buffer checks where removed to make
logic simpler. Impacts of those changes should be evaluated
*/
+ if (p[0] == 0x33 && p[1] == 0x95 && p[2] == 0x00) {
+ em28xx_isocdbg("VBI HEADER!!!\n");
+ /* FIXME: Should add vbi copy */
+ continue;
+ }
if (p[0] == 0x22 && p[1] == 0x5a) {
em28xx_isocdbg("Video frame %d, length=%i, %s\n", p[2],
len, (p[2] & 1)? "odd" : "even");
if (p[2] & 1)
buf->top_field = 0;
- else {
- if (buf->receiving) {
- buffer_filled(dev, dma_q, buf);
- rc = get_next_buf(dma_q, &buf);
- if (rc <= 0)
- return rc;
- outp = videobuf_to_vmalloc(&buf->vb);
- }
-
+ else
buf->top_field = 1;
+
+// if (dev->isoc_ctl.last_field && !buf->top_field) {
+ if (dev->isoc_ctl.last_field != buf->top_field) {
+ buffer_filled(dev, dma_q, buf);
+ rc = get_next_buf(dma_q, &buf);
+ if (rc <= 0)
+ return rc;
+ outp = videobuf_to_vmalloc(&buf->vb);
}
- buf->receiving = 1;
+ dev->isoc_ctl.last_field = buf->top_field;
+
dma_q->pos = 0;
- } else if (p[0] == 0x33 && p[1] == 0x95 && p[2] == 0x00) {
- em28xx_isocdbg("VBI HEADER!!!\n");
}
-
em28xx_copy_video(dev, dma_q, buf, p, outp, len);
-
- /* FIXME: Should add vbi copy */
}
return rc;
}
OpenPOWER on IntegriCloud