Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96653
b: refs/heads/master
c: 71a35fe
h: refs/heads/master
i:
  96651: c8ff878
v: v3
  • Loading branch information
Robert Schedel authored and Mauro Carvalho Chehab committed May 14, 2008
1 parent 494fbf7 commit 19c2374
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 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: fa146c6dceffa68fa12f8d0b797ab9753fa1c792
refs/heads/master: 71a35fe2a345eb3704e1f1b4da65451d3e2b8c2e
28 changes: 16 additions & 12 deletions trunk/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,35 +910,39 @@ static void dvb_ca_en50221_thread_update_delay(struct dvb_ca_private *ca)
int curdelay = 100000000;
int slot;

/* Beware of too high polling frequency, because one polling
* call might take several hundred milliseconds until timeout!
*/
for (slot = 0; slot < ca->slot_count; slot++) {
switch (ca->slot_info[slot].slot_state) {
default:
case DVB_CA_SLOTSTATE_NONE:
delay = HZ * 60; /* 60s */
if (!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE))
delay = HZ * 5; /* 5s */
break;
case DVB_CA_SLOTSTATE_INVALID:
delay = HZ * 60;
if (!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE)) {
delay = HZ / 10;
}
delay = HZ * 60; /* 60s */
if (!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE))
delay = HZ / 10; /* 100ms */
break;

case DVB_CA_SLOTSTATE_UNINITIALISED:
case DVB_CA_SLOTSTATE_WAITREADY:
case DVB_CA_SLOTSTATE_VALIDATE:
case DVB_CA_SLOTSTATE_WAITFR:
case DVB_CA_SLOTSTATE_LINKINIT:
delay = HZ / 10;
delay = HZ / 10; /* 100ms */
break;

case DVB_CA_SLOTSTATE_RUNNING:
delay = HZ * 60;
if (!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE)) {
delay = HZ / 10;
}
delay = HZ * 60; /* 60s */
if (!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE))
delay = HZ / 10; /* 100ms */
if (ca->open) {
if ((!ca->slot_info[slot].da_irq_supported) ||
(!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_DA))) {
delay = HZ / 10;
}
(!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_DA)))
delay = HZ / 10; /* 100ms */
}
break;
}
Expand Down

0 comments on commit 19c2374

Please sign in to comment.