diff options
author | Erik Andren <erik.andren@gmail.com> | 2008-10-03 08:28:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:13 -0400 |
commit | 1b3345996c056a979cfabf96c0815b4843d9bbfc (patch) | |
tree | 0170cee2d568af0d6cf787d4f1841db1a8cebd02 /drivers/media/video | |
parent | e293e599524f74532b0add53ddf80f10ff854598 (diff) |
V4L/DVB (9094): gspca: Frame counter in ALi m5602.
Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/video/gspca/m5602/m5602_core.c index ac105ef4aa6a..58ebffdcaae5 100644 --- a/drivers/media/video/gspca/m5602/m5602_core.c +++ b/drivers/media/video/gspca/m5602/m5602_core.c | |||
@@ -146,6 +146,7 @@ int m5602_probe_sensor(struct sd *sd) | |||
146 | return 0; | 146 | return 0; |
147 | } | 147 | } |
148 | 148 | ||
149 | |||
149 | /* More sensor probe function goes here */ | 150 | /* More sensor probe function goes here */ |
150 | info("Failed to find a sensor"); | 151 | info("Failed to find a sensor"); |
151 | sd->sensor = NULL; | 152 | sd->sensor = NULL; |
@@ -202,12 +203,13 @@ void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame, | |||
202 | /* Complete the last frame (if any) */ | 203 | /* Complete the last frame (if any) */ |
203 | frame = gspca_frame_add(gspca_dev, LAST_PACKET, | 204 | frame = gspca_frame_add(gspca_dev, LAST_PACKET, |
204 | frame, data, 0); | 205 | frame, data, 0); |
206 | sd->frame_count++; | ||
205 | 207 | ||
206 | /* Create a new frame */ | 208 | /* Create a new frame */ |
207 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, len); | 209 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, len); |
208 | 210 | ||
209 | PDEBUG(DBG_V4L2, "Starting new frame. First urb contained %d", | 211 | PDEBUG(DBG_V4L2, "Starting new frame %d", |
210 | len); | 212 | sd->frame_count); |
211 | 213 | ||
212 | } else { | 214 | } else { |
213 | int cur_frame_len = frame->data_end - frame->data; | 215 | 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, | |||
217 | len -= 4; | 219 | len -= 4; |
218 | 220 | ||
219 | if (cur_frame_len + len <= frame->v4l2_buf.length) { | 221 | if (cur_frame_len + len <= frame->v4l2_buf.length) { |
220 | PDEBUG(DBG_DATA, "Continuing frame copying %d bytes", | 222 | PDEBUG(DBG_DATA, "Continuing frame %d copying %d bytes", |
221 | len); | 223 | sd->frame_count, len); |
222 | 224 | ||
223 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, | 225 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, |
224 | data, len); | 226 | data, len); |