From: Jean-Francois Moine <moinejf@free.fr>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: video4linux-list@redhat.com
Subject: Re: [PATCH] Add support for OmniVision OV534 based USB cameras.
Date: Thu, 13 Nov 2008 19:30:59 +0100 [thread overview]
Message-ID: <1226601059.1705.12.camel@localhost> (raw)
In-Reply-To: <20081113180421.09c5ca05.ospite@studenti.unina.it>
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
On Thu, 2008-11-13 at 18:04 +0100, Antonio Ospite wrote:
> So (cam->bulk_nurbs == 0) would mean that the subdriver takes care of
> usb tranfers, right? That would also imply that bulk_irq() is not set
> for these drivers and sd_pkt_scan() is never called which looks fair to
> me.
[snip]
Yes. In the finepix subdriver, the 'complete' function of the URB is
changed to a local function which does the packet analysis and restarts
the next transfer after a delay.
I attached the patch of the main driver.
Cheers.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
[-- Attachment #2: gspca_bulk.patch --]
[-- Type: text/x-patch, Size: 1964 bytes --]
diff -r 417024f56f55 linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c Tue Nov 11 12:42:56 2008 +0100
+++ b/linux/drivers/media/video/gspca/gspca.c Thu Nov 13 19:14:42 2008 +0100
@@ -213,6 +213,7 @@
{
struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
struct gspca_frame *frame;
+ int st;
PDEBUG(D_PACK, "bulk irq");
if (!gspca_dev->streaming)
@@ -235,6 +236,13 @@
frame,
urb->transfer_buffer,
urb->actual_length);
+ }
+
+ /* resubmit the URB */
+ if (gspca_dev->cam.bulk_nurbs != 0) {
+ st = usb_submit_urb(urb, GFP_ATOMIC);
+ if (st < 0)
+ PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st);
}
}
@@ -533,11 +541,14 @@
nurbs = DEF_NURBS;
} else { /* bulk */
npkt = 0;
- bsize = gspca_dev->cam. bulk_size;
+ bsize = gspca_dev->cam.bulk_size;
if (bsize == 0)
bsize = psize;
PDEBUG(D_STREAM, "bulk bsize:%d", bsize);
- nurbs = 1;
+ if (gspca_dev->cam.bulk_nurbs != 0)
+ nurbs = gspca_dev->cam.bulk_nurbs;
+ else
+ nurbs = 1;
}
gspca_dev->nurbs = nurbs;
@@ -625,8 +636,8 @@
gspca_dev->streaming = 1;
atomic_set(&gspca_dev->nevent, 0);
- /* bulk transfers are started by the subdriver */
- if (gspca_dev->alt == 0)
+ /* some bulk transfers are started by the subdriver */
+ if (gspca_dev->alt == 0 && gspca_dev->cam.bulk_nurbs == 0)
break;
/* submit the URBs */
diff -r 417024f56f55 linux/drivers/media/video/gspca/gspca.h
--- a/linux/drivers/media/video/gspca/gspca.h Tue Nov 11 12:42:56 2008 +0100
+++ b/linux/drivers/media/video/gspca/gspca.h Thu Nov 13 19:14:42 2008 +0100
@@ -58,6 +58,10 @@
int bulk_size; /* buffer size when image transfer by bulk */
struct v4l2_pix_format *cam_mode; /* size nmodes */
char nmodes;
+ __u8 bulk_nurbs; /* number of URBs in bulk mode
+ * - cannot be > MAX_NURBS
+ * - when 0 and bulk_size != 0 means
+ * 1 URB and submit done by subdriver */
__u8 epaddr;
};
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-11-13 18:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-16 5:00 [PATCH] Add support for OmniVision OV534 based USB cameras majortrips
2008-08-16 6:58 ` Hans de Goede
2008-08-16 7:46 ` Mark Ferrell
2008-08-16 8:03 ` Hans de Goede
2008-08-16 11:47 ` Mauro Carvalho Chehab
2008-08-17 7:03 ` Jean-Francois Moine
2008-08-16 11:36 ` Mauro Carvalho Chehab
2008-08-16 12:13 ` Mark Ferrell
2008-11-05 22:31 ` Mauro Carvalho Chehab
2008-11-11 17:42 ` Antonio Ospite
2008-11-11 18:15 ` Antonio Ospite
2008-11-11 20:01 ` Hans de Goede
2008-11-12 18:17 ` Antonio Ospite
2008-11-13 11:33 ` Jean-Francois Moine
2008-11-13 17:04 ` Antonio Ospite
2008-11-13 18:30 ` Jean-Francois Moine [this message]
2008-11-13 22:35 ` Antonio Ospite
2008-11-14 10:55 ` Jean-Francois Moine
2008-11-14 14:04 ` Antonio Ospite
-- strict thread matches above, loose matches on Subject: below --
2008-08-17 19:48 Theou Jean-Baptiste
2008-08-17 19:58 ` Theou Jean-Baptiste
2008-08-17 20:13 ` Theou Jean-Baptiste
2008-08-18 0:34 ` Mark Ferrell
2008-08-18 12:08 ` Theou Jean-Baptiste
2008-08-18 16:24 ` Mark Ferrell
2008-08-18 16:53 ` Theou Jean-Baptiste
2008-08-20 10:35 ` Theou Jean-Baptiste
2008-08-22 11:18 ` Mark Ferrell
2008-08-18 0:29 ` Mark Ferrell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1226601059.1705.12.camel@localhost \
--to=moinejf@free.fr \
--cc=ospite@studenti.unina.it \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox