Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248131
b: refs/heads/master
c: fe4af1b
h: refs/heads/master
i:
  248129: cbda70c
  248127: 1d4fb3b
v: v3
  • Loading branch information
Takashi Iwai committed May 3, 2011
1 parent 6a33950 commit b8ee770
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 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: 2db3002029d6c8fbd8ad4ab21f501475cd8c96f9
refs/heads/master: fe4af1b55ed76e3051bbd8abce7d6b3c504272a5
12 changes: 11 additions & 1 deletion trunk/sound/pci/lola/lola.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,14 @@ static int rirb_get_response(struct lola *chip, unsigned int *val,
{
unsigned long timeout;

again:
timeout = jiffies + msecs_to_jiffies(1000);
for (;;) {
if (chip->polling_mode) {
spin_lock_irq(&chip->reg_lock);
lola_update_rirb(chip);
spin_unlock_irq(&chip->reg_lock);
}
if (!chip->rirb.cmds) {
*val = chip->res;
if (extval)
Expand All @@ -175,9 +181,13 @@ static int rirb_get_response(struct lola *chip, unsigned int *val,
break;
udelay(20);
cond_resched();
lola_update_rirb(chip);
}
printk(KERN_WARNING SFX "RIRB response error\n");
if (!chip->polling_mode) {
printk(KERN_WARNING SFX "switching to polling mode\n");
chip->polling_mode = 1;
goto again;
}
return -EIO;
}

Expand Down
5 changes: 3 additions & 2 deletions trunk/sound/pci/lola/lola.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,9 @@ struct lola {
unsigned int sample_rate_max;

/* flags */
unsigned int initialized :1;
unsigned int cold_reset :1;
unsigned int initialized:1;
unsigned int cold_reset:1;
unsigned int polling_mode:1;

/* for debugging */
unsigned int debug_res;
Expand Down

0 comments on commit b8ee770

Please sign in to comment.