aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/intel8x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/intel8x0.c')
-rw-r--r--sound/pci/intel8x0.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 28ac005c21b5..d7af3e474432 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -424,6 +424,7 @@ struct _snd_intel8x0 {
424 unsigned xbox: 1; /* workaround for Xbox AC'97 detection */ 424 unsigned xbox: 1; /* workaround for Xbox AC'97 detection */
425 425
426 int spdif_idx; /* SPDIF BAR index; *_SPBAR or -1 if use PCMOUT */ 426 int spdif_idx; /* SPDIF BAR index; *_SPBAR or -1 if use PCMOUT */
427 unsigned int sdm_saved; /* SDM reg value */
427 428
428 ac97_bus_t *ac97_bus; 429 ac97_bus_t *ac97_bus;
429 ac97_t *ac97[3]; 430 ac97_t *ac97[3];
@@ -2373,6 +2374,9 @@ static int intel8x0_suspend(snd_card_t *card, pm_message_t state)
2373 for (i = 0; i < 3; i++) 2374 for (i = 0; i < 3; i++)
2374 if (chip->ac97[i]) 2375 if (chip->ac97[i])
2375 snd_ac97_suspend(chip->ac97[i]); 2376 snd_ac97_suspend(chip->ac97[i]);
2377 if (chip->device_type == DEVICE_INTEL_ICH4)
2378 chip->sdm_saved = igetbyte(chip, ICHREG(SDM));
2379
2376 if (chip->irq >= 0) 2380 if (chip->irq >= 0)
2377 free_irq(chip->irq, (void *)chip); 2381 free_irq(chip->irq, (void *)chip);
2378 pci_disable_device(chip->pci); 2382 pci_disable_device(chip->pci);
@@ -2390,6 +2394,16 @@ static int intel8x0_resume(snd_card_t *card)
2390 synchronize_irq(chip->irq); 2394 synchronize_irq(chip->irq);
2391 snd_intel8x0_chip_init(chip, 1); 2395 snd_intel8x0_chip_init(chip, 1);
2392 2396
2397 /* re-initialize mixer stuff */
2398 if (chip->device_type == DEVICE_INTEL_ICH4) {
2399 /* enable separate SDINs for ICH4 */
2400 iputbyte(chip, ICHREG(SDM), chip->sdm_saved);
2401 /* use slot 10/11 for SPDIF */
2402 iputdword(chip, ICHREG(GLOB_CNT),
2403 (igetdword(chip, ICHREG(GLOB_CNT)) & ~ICH_PCM_SPDIF_MASK) |
2404 ICH_PCM_SPDIF_1011);
2405 }
2406
2393 /* refill nocache */ 2407 /* refill nocache */
2394 if (chip->fix_nocache) 2408 if (chip->fix_nocache)
2395 fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 1); 2409 fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 1);
@@ -2455,8 +2469,7 @@ static void __devinit intel8x0_measure_ac97_clock(intel8x0_t *chip)
2455 } 2469 }
2456 do_gettimeofday(&start_time); 2470 do_gettimeofday(&start_time);
2457 spin_unlock_irq(&chip->reg_lock); 2471 spin_unlock_irq(&chip->reg_lock);
2458 set_current_state(TASK_UNINTERRUPTIBLE); 2472 msleep(50);
2459 schedule_timeout(HZ / 20);
2460 spin_lock_irq(&chip->reg_lock); 2473 spin_lock_irq(&chip->reg_lock);
2461 /* check the position */ 2474 /* check the position */
2462 pos = ichdev->fragsize1; 2475 pos = ichdev->fragsize1;