Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34889
b: refs/heads/master
c: e96224a
h: refs/heads/master
i:
  34887: b6633c6
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Sep 23, 2006
1 parent f7367fd commit 045259c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 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: 81d3dbde76eedcd3ede8a73eb72790d67fa254a9
refs/heads/master: e96224ae974844d3f4e84f927ca4b17f1a2079a3
18 changes: 17 additions & 1 deletion trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ struct azx {
int position_fix;
unsigned int initialized: 1;
unsigned int single_cmd: 1;
unsigned int polling_mode: 1;
};

/* driver types */
Expand Down Expand Up @@ -518,8 +519,23 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec)
struct azx *chip = codec->bus->private_data;
int timeout = 50;

while (chip->rirb.cmds) {
for (;;) {
if (chip->polling_mode) {
spin_lock_irq(&chip->reg_lock);
azx_update_rirb(chip);
spin_unlock_irq(&chip->reg_lock);
}
if (! chip->rirb.cmds)
break;
if (! --timeout) {
if (! chip->polling_mode) {
snd_printk(KERN_WARNING "hda_intel: "
"azx_get_response timeout, "
"switching to polling mode...\n");
chip->polling_mode = 1;
timeout = 50;
continue;
}
snd_printk(KERN_ERR
"hda_intel: azx_get_response timeout, "
"switching to single_cmd mode...\n");
Expand Down

0 comments on commit 045259c

Please sign in to comment.