Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92463
b: refs/heads/master
c: 2c4a07b
h: refs/heads/master
i:
  92461: 6702086
  92459: 216b4c3
  92455: 7fc43f1
  92447: 138d3d2
v: v3
  • Loading branch information
Sascha Sommer authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 8848718 commit 63a706f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: 4a24ce3a17ee713056db0a24cf558bd595211302
refs/heads/master: 2c4a07b2da61bcd33f18195ff7f355c5bb285904
18 changes: 13 additions & 5 deletions trunk/drivers/media/video/em28xx/em28xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,19 +813,27 @@ int em28xx_set_alternate(struct em28xx *dev)
{
int errCode, prev_alt = dev->alt;
int i;
unsigned int min_pkt_size = dev->bytesperline+4;
unsigned int min_pkt_size = dev->bytesperline + 4;

/* When image size is bigger than a ceirtain value,
/* When image size is bigger than a certain value,
the frame size should be increased, otherwise, only
green screen will be received.
*/
if (dev->frame_size > 720*240*2)
min_pkt_size *= 2;

for (i = 0; i < dev->num_alt; i++)
if (dev->alt_max_pkt_size[i] >= min_pkt_size)
for (i = 0; i < dev->num_alt; i++) {
/* stop when the selected alt setting offers enough bandwidth */
if (dev->alt_max_pkt_size[i] >= min_pkt_size) {
dev->alt = i;
break;
dev->alt = i;
/* otherwise make sure that we end up with the maximum bandwidth
because the min_pkt_size equation might be wrong...
*/
} else if (dev->alt_max_pkt_size[i] >
dev->alt_max_pkt_size[dev->alt])
dev->alt = i;
}

if (dev->alt != prev_alt) {
em28xx_coredbg("minimum isoc packet size: %u (alt=%d)\n",
Expand Down

0 comments on commit 63a706f

Please sign in to comment.