Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174062
b: refs/heads/master
c: fc099f0
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 458f286 commit 2ce6fa0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8337fc3053f4189fb64d60495ed89df5befa2a6b
refs/heads/master: fc099f0e0e52a349a3fe92bfb8d3fb6ec5378174
13 changes: 12 additions & 1 deletion trunk/drivers/media/video/em28xx/em28xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ MODULE_PARM_DESC(reg_debug, "enable debug messages [URB reg]");
printk(KERN_INFO "%s %s :"fmt, \
dev->name, __func__ , ##arg); } while (0)

static int alt = EM28XX_PINOUT;
static int alt;
module_param(alt, int, 0644);
MODULE_PARM_DESC(alt, "alternate setting to use for video endpoint");

Expand Down Expand Up @@ -778,6 +778,16 @@ int em28xx_set_alternate(struct em28xx *dev)
int i;
unsigned int min_pkt_size = dev->width * 2 + 4;

/*
* alt = 0 is used only for control messages, so, only values
* greater than 0 can be used for streaming.
*/
if (alt && alt < dev->num_alt) {
em28xx_coredbg("alternate forced to %d\n", dev->alt);
dev->alt = alt;
goto set_alt;
}

/* When image size is bigger than a certain value,
the frame size should be increased, otherwise, only
green screen will be received.
Expand All @@ -798,6 +808,7 @@ int em28xx_set_alternate(struct em28xx *dev)
dev->alt = i;
}

set_alt:
if (dev->alt != prev_alt) {
em28xx_coredbg("minimum isoc packet size: %u (alt=%d)\n",
min_pkt_size, dev->alt);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@
*/
#define EM28XX_NUM_PACKETS 40

/* default alternate; 0 means choose the best */
#define EM28XX_PINOUT 0

#define EM28XX_INTERLACED_DEFAULT 1

/*
Expand Down

0 comments on commit 2ce6fa0

Please sign in to comment.