Commit 47aaca96 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab

V4L/DVB (13866): gspca - main: Add the cam flag 'no_urb_create'.

This flag permits subdrivers to create specific transfer URBs.
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent db870875
...@@ -607,12 +607,15 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) ...@@ -607,12 +607,15 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
goto out; goto out;
} }
for (;;) { for (;;) {
PDEBUG(D_STREAM, "init transfer alt %d", gspca_dev->alt); if (!gspca_dev->cam.no_urb_create) {
PDEBUG(D_STREAM, "init transfer alt %d",
gspca_dev->alt);
ret = create_urbs(gspca_dev, ep); ret = create_urbs(gspca_dev, ep);
if (ret < 0) { if (ret < 0) {
destroy_urbs(gspca_dev); destroy_urbs(gspca_dev);
goto out; goto out;
} }
}
/* clear the bulk endpoint */ /* clear the bulk endpoint */
if (gspca_dev->cam.bulk) if (gspca_dev->cam.bulk)
......
...@@ -54,20 +54,21 @@ struct framerates { ...@@ -54,20 +54,21 @@ struct framerates {
/* device information - set at probe time */ /* device information - set at probe time */
struct cam { struct cam {
int bulk_size; /* buffer size when image transfer by bulk */
const struct v4l2_pix_format *cam_mode; /* size nmodes */ const struct v4l2_pix_format *cam_mode; /* size nmodes */
char nmodes;
const struct framerates *mode_framerates; /* must have size nmode, const struct framerates *mode_framerates; /* must have size nmode,
* just like cam_mode */ * just like cam_mode */
__u8 bulk_nurbs; /* number of URBs in bulk mode u32 bulk_size; /* buffer size when image transfer by bulk */
u32 input_flags; /* value for ENUM_INPUT status flags */
u8 nmodes; /* size of cam_mode */
u8 no_urb_create; /* don't create transfer URBs */
u8 bulk_nurbs; /* number of URBs in bulk mode
* - cannot be > MAX_NURBS * - cannot be > MAX_NURBS
* - when 0 and bulk_size != 0 means * - when 0 and bulk_size != 0 means
* 1 URB and submit done by subdriver */ * 1 URB and submit done by subdriver */
u8 bulk; /* image transfer by 0:isoc / 1:bulk */ u8 bulk; /* image transfer by 0:isoc / 1:bulk */
u8 npkt; /* number of packets in an ISOC message u8 npkt; /* number of packets in an ISOC message
* 0 is the default value: 32 packets */ * 0 is the default value: 32 packets */
u32 input_flags; /* value for ENUM_INPUT status flags */ u8 reverse_alts; /* Alt settings are in high to low order */
char reverse_alts; /* Alt settings are in high to low order */
}; };
struct gspca_dev; struct gspca_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment