]> err.no Git - linux-2.6/blobdiff - sound/pci/intel8x0.c
[ALSA] hda-codec - Add entry for Epox EP-5LDA+ GLi
[linux-2.6] / sound / pci / intel8x0.c
index da024ffe96c25200640b2c13be33660b128ba254..ebbf2cf4ca0f464a2915a35b99eee2076e82d097 100644 (file)
@@ -2351,7 +2351,7 @@ static int snd_intel8x0_ali_chip_init(struct intel8x0 *chip, int probing)
 
 static int snd_intel8x0_chip_init(struct intel8x0 *chip, int probing)
 {
-       unsigned int i;
+       unsigned int i, timeout;
        int err;
        
        if (chip->device_type != DEVICE_ALI) {
@@ -2369,6 +2369,15 @@ static int snd_intel8x0_chip_init(struct intel8x0 *chip, int probing)
        /* reset channels */
        for (i = 0; i < chip->bdbars_count; i++)
                iputbyte(chip, ICH_REG_OFF_CR + chip->ichd[i].reg_offset, ICH_RESETREGS);
+       for (i = 0; i < chip->bdbars_count; i++) {
+               timeout = 100000;
+               while (--timeout != 0) {
+                       if ((igetbyte(chip, ICH_REG_OFF_CR + chip->ichd[i].reg_offset) & ICH_RESETREGS) == 0)
+                               break;
+                }
+                if (timeout == 0)
+                        printk(KERN_ERR "intel8x0: reset of registers failed?\n");
+        }
        /* initialize Buffer Descriptor Lists */
        for (i = 0; i < chip->bdbars_count; i++)
                iputdword(chip, ICH_REG_OFF_BDBAR + chip->ichd[i].reg_offset,