diff options
Diffstat (limited to 'sound/pci/intel8x0.c')
-rw-r--r-- | sound/pci/intel8x0.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 6874263f1681..72dbaedcbdf5 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2251,6 +2251,16 @@ static int snd_intel8x0_ich_chip_init(struct intel8x0 *chip, int probing) | |||
2251 | /* ACLink on, 2 channels */ | 2251 | /* ACLink on, 2 channels */ |
2252 | cnt = igetdword(chip, ICHREG(GLOB_CNT)); | 2252 | cnt = igetdword(chip, ICHREG(GLOB_CNT)); |
2253 | cnt &= ~(ICH_ACLINK | ICH_PCM_246_MASK); | 2253 | cnt &= ~(ICH_ACLINK | ICH_PCM_246_MASK); |
2254 | #ifdef CONFIG_SND_AC97_POWER_SAVE | ||
2255 | /* do cold reset - the full ac97 powerdown may leave the controller | ||
2256 | * in a warm state but actually it cannot communicate with the codec. | ||
2257 | */ | ||
2258 | iputdword(chip, ICHREG(GLOB_CNT), cnt & ~ICH_AC97COLD); | ||
2259 | cnt = igetdword(chip, ICHREG(GLOB_CNT)); | ||
2260 | udelay(10); | ||
2261 | iputdword(chip, ICHREG(GLOB_CNT), cnt | ICH_AC97COLD); | ||
2262 | msleep(1); | ||
2263 | #else | ||
2254 | /* finish cold or do warm reset */ | 2264 | /* finish cold or do warm reset */ |
2255 | cnt |= (cnt & ICH_AC97COLD) == 0 ? ICH_AC97COLD : ICH_AC97WARM; | 2265 | cnt |= (cnt & ICH_AC97COLD) == 0 ? ICH_AC97COLD : ICH_AC97WARM; |
2256 | iputdword(chip, ICHREG(GLOB_CNT), cnt); | 2266 | iputdword(chip, ICHREG(GLOB_CNT), cnt); |
@@ -2265,6 +2275,7 @@ static int snd_intel8x0_ich_chip_init(struct intel8x0 *chip, int probing) | |||
2265 | return -EIO; | 2275 | return -EIO; |
2266 | 2276 | ||
2267 | __ok: | 2277 | __ok: |
2278 | #endif | ||
2268 | if (probing) { | 2279 | if (probing) { |
2269 | /* wait for any codec ready status. | 2280 | /* wait for any codec ready status. |
2270 | * Once it becomes ready it should remain ready | 2281 | * Once it becomes ready it should remain ready |
@@ -2485,7 +2496,7 @@ static int intel8x0_resume(struct pci_dev *pci) | |||
2485 | card->shortname, chip); | 2496 | card->shortname, chip); |
2486 | chip->irq = pci->irq; | 2497 | chip->irq = pci->irq; |
2487 | synchronize_irq(chip->irq); | 2498 | synchronize_irq(chip->irq); |
2488 | snd_intel8x0_chip_init(chip, 1); | 2499 | snd_intel8x0_chip_init(chip, 0); |
2489 | 2500 | ||
2490 | /* re-initialize mixer stuff */ | 2501 | /* re-initialize mixer stuff */ |
2491 | if (chip->device_type == DEVICE_INTEL_ICH4) { | 2502 | if (chip->device_type == DEVICE_INTEL_ICH4) { |
@@ -2615,6 +2626,7 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip) | |||
2615 | /* not 48000Hz, tuning the clock.. */ | 2626 | /* not 48000Hz, tuning the clock.. */ |
2616 | chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos; | 2627 | chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos; |
2617 | printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock); | 2628 | printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock); |
2629 | snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0); | ||
2618 | } | 2630 | } |
2619 | 2631 | ||
2620 | #ifdef CONFIG_PROC_FS | 2632 | #ifdef CONFIG_PROC_FS |