summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-12-04 08:36:14 +0100
committerJean-Francois Moine <moinejf@free.fr>2008-12-04 08:36:14 +0100
commit813bf1a92a9d665e013b0c0a52450d68af7ae80c (patch)
tree0f80af381e6b4e64793afa331e651233c37f9214 /linux/drivers/media/video/gspca
parenta31709b99b19630a583553b1b0dd95f862579258 (diff)
downloadmediapointer-dvb-s2-813bf1a92a9d665e013b0c0a52450d68af7ae80c.tar.gz
mediapointer-dvb-s2-813bf1a92a9d665e013b0c0a52450d68af7ae80c.tar.bz2
gspca - ov534: Fix frame size so we don't miss the last pixel.
From: Jim Paris <jim@jtan.com> The frame size is too small, so we lose the last YUYV pixel. Fix the setup and remove the last_pixel hack. Priority: normal Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r--linux/drivers/media/video/gspca/ov534.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/linux/drivers/media/video/gspca/ov534.c b/linux/drivers/media/video/gspca/ov534.c
index f0b096612..79bb6241d 100644
--- a/linux/drivers/media/video/gspca/ov534.c
+++ b/linux/drivers/media/video/gspca/ov534.c
@@ -197,9 +197,9 @@ static const __u8 ov534_reg_initdata[][2] = {
{ 0x1d, 0x40 },
{ 0x1d, 0x02 },
{ 0x1d, 0x00 },
- { 0x1d, 0x02 },
- { 0x1d, 0x57 },
- { 0x1d, 0xff },
+ { 0x1d, 0x02 }, /* frame size 0x025800 * 4 = 614400 */
+ { 0x1d, 0x58 }, /* frame size */
+ { 0x1d, 0x00 }, /* frame size */
{ 0x8d, 0x1c },
{ 0x8e, 0x80 },
@@ -409,30 +409,15 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
__u8 *data, int len)
{
- /*
- * The current camera setup doesn't stream the last pixel, so we set it
- * to a dummy value
- */
- __u8 last[4] = { 0, 0, 0, 0 };
int framesize = frame->v4l2_buf.length;
- PDEBUG(D_PACK, "");
- PDEBUG(D_PACK, "** packet len = %d, framesize = %d", len, framesize);
- PDEBUG(D_PACK, "** frame->data_end - frame->data + len = %d",
- frame->data_end - frame->data + len);
-
-#if 0
- /* Can this check mask some tranfer errors? */
- if (len < gspca_dev->cam.bulk_size) {
-#else
- if (frame->data_end - frame->data + len == framesize - 4) {
-#endif
- PDEBUG(D_PACK, " end of frame!");
- gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
- frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, last, 4);
- gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, 0);
+ if (len == framesize) {
+ frame = gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
+ data, len);
+ frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0);
} else
- gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
+ PDEBUG(D_PACK, "packet len = %d, framesize = %d", len,
+ framesize);
}
/* sub-driver description */