Skip to content

Commit

Permalink
ALSA: hda - Switch to polling mode before disabling MSI
Browse files Browse the repository at this point in the history
When any codec communication error happens, try to switch to the polling
mode first before turning off MSI.  MSI gets more stable nowadays, thus
we should keep it on as much as possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Oct 30, 2009
1 parent 6a5f96c commit 23c4a88
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,14 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
}
}

if (!chip->polling_mode) {
snd_printk(KERN_WARNING SFX "azx_get_response timeout, "
"switching to polling mode: last cmd=0x%08x\n",
chip->last_cmd[addr]);
chip->polling_mode = 1;
goto again;
}

if (chip->msi) {
snd_printk(KERN_WARNING SFX "No response from codec, "
"disabling MSI: last cmd=0x%08x\n",
Expand All @@ -692,14 +700,6 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
goto again;
}

if (!chip->polling_mode) {
snd_printk(KERN_WARNING SFX "azx_get_response timeout, "
"switching to polling mode: last cmd=0x%08x\n",
chip->last_cmd[addr]);
chip->polling_mode = 1;
goto again;
}

if (chip->probing) {
/* If this critical timeout happens during the codec probing
* phase, this is likely an access to a non-existing codec
Expand Down

0 comments on commit 23c4a88

Please sign in to comment.