]> err.no Git - linux-2.6/commitdiff
[ALSA] ice1724.c: toggle "chip reset" and "eeprom based setup" sequence
authorKarsten Wiese <fzu@wemgehoertderstaat.de>
Tue, 22 Apr 2008 10:52:15 +0000 (12:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:39 +0000 (12:00 +0200)
Let "chip reset" become first. Increasement of the "chip reset" related timeout
leads to correctly read eeprom's contents here.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/ice1724.c

index ceac870562639e0146733a1912c5f779b189ae2e..6b15e1cbfe4f5e3f8498f798ab95b571ad10b734 100644 (file)
@@ -2045,12 +2045,16 @@ static int __devinit snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
 
 
 
-static int __devinit snd_vt1724_chip_init(struct snd_ice1712 *ice)
+static void __devinit snd_vt1724_chip_reset(struct snd_ice1712 *ice)
 {
        outb(VT1724_RESET , ICEREG1724(ice, CONTROL));
-       udelay(200);
+       msleep(10);
        outb(0, ICEREG1724(ice, CONTROL));
-       udelay(200);
+       msleep(10);
+}
+
+static int __devinit snd_vt1724_chip_init(struct snd_ice1712 *ice)
+{
        outb(ice->eeprom.data[ICE_EEP2_SYSCONF], ICEREG1724(ice, SYS_CFG));
        outb(ice->eeprom.data[ICE_EEP2_ACLINK], ICEREG1724(ice, AC97_CFG));
        outb(ice->eeprom.data[ICE_EEP2_I2S], ICEREG1724(ice, I2S_FEATURES));
@@ -2223,6 +2227,7 @@ static int __devinit snd_vt1724_create(struct snd_card *card,
 
        ice->irq = pci->irq;
 
+       snd_vt1724_chip_reset(ice);
        if (snd_vt1724_read_eeprom(ice, modelname) < 0) {
                snd_vt1724_free(ice);
                return -EIO;