diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-10-30 08:21:49 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-10-30 08:21:49 -0400 |
commit | 23c4a8812a17f0af2b573a63fc991baa7d3570ed (patch) | |
tree | b02ccb19c9e84c69e3aff6b2672df8299aaf9ff8 | |
parent | 6a5f96ce72b9e1a4bf06422df53fa819947d2293 (diff) |
ALSA: hda - Switch to polling mode before disabling MSI
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>
-rw-r--r-- | sound/pci/hda/hda_intel.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index d0effa3563e2..a0eface6e99a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -677,6 +677,14 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
677 | } | 677 | } |
678 | } | 678 | } |
679 | 679 | ||
680 | if (!chip->polling_mode) { | ||
681 | snd_printk(KERN_WARNING SFX "azx_get_response timeout, " | ||
682 | "switching to polling mode: last cmd=0x%08x\n", | ||
683 | chip->last_cmd[addr]); | ||
684 | chip->polling_mode = 1; | ||
685 | goto again; | ||
686 | } | ||
687 | |||
680 | if (chip->msi) { | 688 | if (chip->msi) { |
681 | snd_printk(KERN_WARNING SFX "No response from codec, " | 689 | snd_printk(KERN_WARNING SFX "No response from codec, " |
682 | "disabling MSI: last cmd=0x%08x\n", | 690 | "disabling MSI: last cmd=0x%08x\n", |
@@ -692,14 +700,6 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
692 | goto again; | 700 | goto again; |
693 | } | 701 | } |
694 | 702 | ||
695 | if (!chip->polling_mode) { | ||
696 | snd_printk(KERN_WARNING SFX "azx_get_response timeout, " | ||
697 | "switching to polling mode: last cmd=0x%08x\n", | ||
698 | chip->last_cmd[addr]); | ||
699 | chip->polling_mode = 1; | ||
700 | goto again; | ||
701 | } | ||
702 | |||
703 | if (chip->probing) { | 703 | if (chip->probing) { |
704 | /* If this critical timeout happens during the codec probing | 704 | /* If this critical timeout happens during the codec probing |
705 | * phase, this is likely an access to a non-existing codec | 705 | * phase, this is likely an access to a non-existing codec |