View | Details | Raw Unified | Return to bug 5763 | Differences between
and this patch

Collapse All | Expand All

(-)a/sound/pci/ali5451/ali5451.c (-2 / +9 lines)
Lines 2039-2044 static int ali_suspend(struct pci_dev *p Link Here
2039
	return 0;
2039
	return 0;
2040
}
2040
}
2041
2041
2042
static int snd_ali_chip_init(struct snd_ali *codec, int resume);
2043
2042
static int ali_resume(struct pci_dev *pci)
2044
static int ali_resume(struct pci_dev *pci)
2043
{
2045
{
2044
	struct snd_card *card = pci_get_drvdata(pci);
2046
	struct snd_card *card = pci_get_drvdata(pci);
Lines 2052-2057 static int ali_resume(struct pci_dev *pc Link Here
2052
2054
2053
	pci_restore_state(pci);
2055
	pci_restore_state(pci);
2054
	pci_enable_device(pci);
2056
	pci_enable_device(pci);
2057
2058
	snd_ali_chip_init(chip, 1);
2055
2059
2056
	spin_lock_irq(&chip->reg_lock);
2060
	spin_lock_irq(&chip->reg_lock);
2057
	
2061
	
Lines 2102-2108 static int snd_ali_free(struct snd_ali * Link Here
2102
	return 0;
2106
	return 0;
2103
}
2107
}
2104
2108
2105
static int snd_ali_chip_init(struct snd_ali *codec)
2109
static int snd_ali_chip_init(struct snd_ali *codec, int resume)
2106
{
2110
{
2107
	unsigned int legacy;
2111
	unsigned int legacy;
2108
	unsigned char temp;
2112
	unsigned char temp;
Lines 2137-2142 static int snd_ali_chip_init(struct snd_ Link Here
2137
	outl(0xffffffff, ALI_REG(codec, ALI_AINT));
2141
	outl(0xffffffff, ALI_REG(codec, ALI_AINT));
2138
	outl(0x00000000, ALI_REG(codec, ALI_VOLUME));
2142
	outl(0x00000000, ALI_REG(codec, ALI_VOLUME));
2139
	outb(0x10, 	 ALI_REG(codec, ALI_MPUR2));
2143
	outb(0x10, 	 ALI_REG(codec, ALI_MPUR2));
2144
2145
	if (resume)
2146
		return 0;
2140
2147
2141
	codec->ac97_ext_id = snd_ali_codec_peek(codec, 0, AC97_EXTENDED_ID);
2148
	codec->ac97_ext_id = snd_ali_codec_peek(codec, 0, AC97_EXTENDED_ID);
2142
	codec->ac97_ext_status = snd_ali_codec_peek(codec, 0, AC97_EXTENDED_STATUS);
2149
	codec->ac97_ext_status = snd_ali_codec_peek(codec, 0, AC97_EXTENDED_STATUS);
Lines 2309-2315 static int __devinit snd_ali_create(stru Link Here
2309
		codec->synth.voices[i].number = i;
2316
		codec->synth.voices[i].number = i;
2310
	}
2317
	}
2311
2318
2312
	if ((err = snd_ali_chip_init(codec)) < 0) {
2319
	if ((err = snd_ali_chip_init(codec, 0)) < 0) {
2313
		snd_printk(KERN_ERR "ali create: chip init error.\n");
2320
		snd_printk(KERN_ERR "ali create: chip init error.\n");
2314
		return err;
2321
		return err;
2315
	}
2322
	}

Return to bug 5763