diff --git a/[refs] b/[refs] index 3a61bc1e8b7c..a9c70a7beaf7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81d3dbde76eedcd3ede8a73eb72790d67fa254a9 +refs/heads/master: e96224ae974844d3f4e84f927ca4b17f1a2079a3 diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index 79d63c99f092..ce75e07aaa2a 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -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 */ @@ -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");