aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2010-04-09 05:07:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:56 -0400
commit832d0a9130c18b9ee4b671c46763b972eb2a2568 (patch)
treee5d64a213f2774ed32d79d1c6dc22380076dbe2f
parent18bf99aa0cb80b4fa3974a511fd033c2967b04c8 (diff)
V4L/DVB: gspca - main: Restart streaming after reqbuf
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/gspca.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 4fb031cfb64f..9c9d7ea7e626 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1503,7 +1503,7 @@ static int vidioc_reqbufs(struct file *file, void *priv,
1503 struct v4l2_requestbuffers *rb) 1503 struct v4l2_requestbuffers *rb)
1504{ 1504{
1505 struct gspca_dev *gspca_dev = priv; 1505 struct gspca_dev *gspca_dev = priv;
1506 int i, ret = 0; 1506 int i, ret = 0, streaming;
1507 1507
1508 switch (rb->memory) { 1508 switch (rb->memory) {
1509 case GSPCA_MEMORY_READ: /* (internal call) */ 1509 case GSPCA_MEMORY_READ: /* (internal call) */
@@ -1538,7 +1538,8 @@ static int vidioc_reqbufs(struct file *file, void *priv,
1538 } 1538 }
1539 1539
1540 /* stop streaming */ 1540 /* stop streaming */
1541 if (gspca_dev->streaming) { 1541 streaming = gspca_dev->streaming;
1542 if (streaming) {
1542 mutex_lock(&gspca_dev->usb_lock); 1543 mutex_lock(&gspca_dev->usb_lock);
1543 gspca_dev->usb_err = 0; 1544 gspca_dev->usb_err = 0;
1544 gspca_stream_off(gspca_dev); 1545 gspca_stream_off(gspca_dev);
@@ -1557,6 +1558,8 @@ static int vidioc_reqbufs(struct file *file, void *priv,
1557 if (ret == 0) { 1558 if (ret == 0) {
1558 rb->count = gspca_dev->nframes; 1559 rb->count = gspca_dev->nframes;
1559 gspca_dev->capt_file = file; 1560 gspca_dev->capt_file = file;
1561 if (streaming)
1562 ret = gspca_init_transfer(gspca_dev);
1560 } 1563 }
1561out: 1564out:
1562 mutex_unlock(&gspca_dev->queue_lock); 1565 mutex_unlock(&gspca_dev->queue_lock);