diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index a4b72cd2eea0..0677d41239a9 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -367,6 +367,7 @@ int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value) | |||
367 | ac97->regs[reg] = value; | 367 | ac97->regs[reg] = value; |
368 | ac97->bus->ops->write(ac97, reg, value); | 368 | ac97->bus->ops->write(ac97, reg, value); |
369 | } | 369 | } |
370 | set_bit(reg, ac97->reg_accessed); | ||
370 | up(&ac97->reg_mutex); | 371 | up(&ac97->reg_mutex); |
371 | return change; | 372 | return change; |
372 | } | 373 | } |
@@ -410,6 +411,7 @@ int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg, | |||
410 | ac97->regs[reg] = new; | 411 | ac97->regs[reg] = new; |
411 | ac97->bus->ops->write(ac97, reg, new); | 412 | ac97->bus->ops->write(ac97, reg, new); |
412 | } | 413 | } |
414 | set_bit(reg, ac97->reg_accessed); | ||
413 | return change; | 415 | return change; |
414 | } | 416 | } |
415 | 417 | ||
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index cc16f95f9cef..c3c3b68b4540 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,8 @@ 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)); | ||
2376 | pci_disable_device(chip->pci); | 2379 | pci_disable_device(chip->pci); |
2377 | return 0; | 2380 | return 0; |
2378 | } | 2381 | } |
@@ -2386,6 +2389,16 @@ static int intel8x0_resume(snd_card_t *card) | |||
2386 | pci_set_master(chip->pci); | 2389 | pci_set_master(chip->pci); |
2387 | snd_intel8x0_chip_init(chip, 0); | 2390 | snd_intel8x0_chip_init(chip, 0); |
2388 | 2391 | ||
2392 | /* re-initialize mixer stuff */ | ||
2393 | if (chip->device_type == DEVICE_INTEL_ICH4) { | ||
2394 | /* enable separate SDINs for ICH4 */ | ||
2395 | iputbyte(chip, ICHREG(SDM), chip->sdm_saved); | ||
2396 | /* use slot 10/11 for SPDIF */ | ||
2397 | iputdword(chip, ICHREG(GLOB_CNT), | ||
2398 | (igetdword(chip, ICHREG(GLOB_CNT)) & ~ICH_PCM_SPDIF_MASK) | | ||
2399 | ICH_PCM_SPDIF_1011); | ||
2400 | } | ||
2401 | |||
2389 | /* refill nocache */ | 2402 | /* refill nocache */ |
2390 | if (chip->fix_nocache) | 2403 | if (chip->fix_nocache) |
2391 | fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 1); | 2404 | fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 1); |