diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 12:09:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 12:09:14 -0300 |
commit | 081541c29a9db0da6d859a340de9dc5b7e7c77fc (patch) | |
tree | 0c30ce2181fc7ed5d2e61cf1293ed220f45f0a31 /linux/drivers | |
parent | c46748191d2f1175c2211b5ed20332935d06c9a8 (diff) | |
download | mediapointer-dvb-s2-081541c29a9db0da6d859a340de9dc5b7e7c77fc.tar.gz mediapointer-dvb-s2-081541c29a9db0da6d859a340de9dc5b7e7c77fc.tar.bz2 |
em28xx: Some fixes to display logic
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 31 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 3 |
2 files changed, 19 insertions, 15 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index 0d8b359d1..2b1649be3 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -389,32 +389,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; } diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 0280a6847..0597fd74b 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -117,6 +117,9 @@ struct em28xx_usb_isoc_ctl { /* Stores already requested buffers */ struct em28xx_buffer *buf; + /* Store last filled frame */ + int last_field; + /* Stores the number of received fields */ int nfields; }; |