summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-10-03 14:28:45 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-10-03 14:28:45 +0200
commitb919f302ebe29af34e422ccc0a1af08542bd5df4 (patch)
treec999ccef604e98fd4e8a599d3f7556dc6863143a
parent9b00af9d7ad2c53c0df02fbba1c4cdc4465e4081 (diff)
downloadmediapointer-dvb-s2-b919f302ebe29af34e422ccc0a1af08542bd5df4.tar.gz
mediapointer-dvb-s2-b919f302ebe29af34e422ccc0a1af08542bd5df4.tar.bz2
gspca: Frame counter in ALi m5602.
From: Erik Andren <erik.andren@gmail.com> Priority: normal Signed-off-by: Erik Andren <erik.andren@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-rw-r--r--linux/drivers/media/video/gspca/m5602/m5602_core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_core.c b/linux/drivers/media/video/gspca/m5602/m5602_core.c
index 80fd4e73a..5d5666d4b 100644
--- a/linux/drivers/media/video/gspca/m5602/m5602_core.c
+++ b/linux/drivers/media/video/gspca/m5602/m5602_core.c
@@ -146,6 +146,7 @@ int m5602_probe_sensor(struct sd *sd)
return 0;
}
+
/* More sensor probe function goes here */
info("Failed to find a sensor");
sd->sensor = NULL;
@@ -202,12 +203,13 @@ void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
/* Complete the last frame (if any) */
frame = gspca_frame_add(gspca_dev, LAST_PACKET,
frame, data, 0);
+ sd->frame_count++;
/* Create a new frame */
gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, len);
- PDEBUG(DBG_V4L2, "Starting new frame. First urb contained %d",
- len);
+ PDEBUG(DBG_V4L2, "Starting new frame %d",
+ sd->frame_count);
} else {
int cur_frame_len = frame->data_end - frame->data;
@@ -217,8 +219,8 @@ void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
len -= 4;
if (cur_frame_len + len <= frame->v4l2_buf.length) {
- PDEBUG(DBG_DATA, "Continuing frame copying %d bytes",
- len);
+ PDEBUG(DBG_DATA, "Continuing frame %d copying %d bytes",
+ sd->frame_count, len);
gspca_frame_add(gspca_dev, INTER_PACKET, frame,
data, len);