This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree:
Subject: [media] gspca_main: Allow switching from read to mmap / userptr mode Author: Hans de Goede <[email protected]> Date: Fri Dec 31 07:41:54 2010 -0300 Some applications (xawtv, qv4l2) mix read and mmap calls. Allow switching from read mode back to mmap mode (by doing a reqbufs). Signed-off-by: Hans de Goede <[email protected]> Acked-by: Jean-Francois Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/video/gspca/gspca.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media_tree.git?a=commitdiff;h=e3cc6e6f5cf03cd57f70e5fc4d7f351b962a7c71 diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 244fb76..4ab906b 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -1497,6 +1497,7 @@ static int vidioc_reqbufs(struct file *file, void *priv, return -ERESTARTSYS; if (gspca_dev->memory != GSPCA_MEMORY_NO + && gspca_dev->memory != GSPCA_MEMORY_READ && gspca_dev->memory != rb->memory) { ret = -EBUSY; goto out; @@ -1525,6 +1526,9 @@ static int vidioc_reqbufs(struct file *file, void *priv, gspca_stream_off(gspca_dev); mutex_unlock(&gspca_dev->usb_lock); } + /* Don't restart the stream when switching from read to mmap mode */ + if (gspca_dev->memory == GSPCA_MEMORY_READ) + streaming = 0; /* free the previous allocated buffers, if any */ if (gspca_dev->nframes != 0) _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
