Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5325
b: refs/heads/master
c: 52b7238
h: refs/heads/master
i:
  5323: ba453cf
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jul 28, 2005
1 parent b0c7bc5 commit 6d8346c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2eff7ec81eb586076974cb0918dffc5f4ad763d5
refs/heads/master: 52b723888c1a55d34551f9b0b9d9296e0e3e8d3c
2 changes: 2 additions & 0 deletions trunk/sound/pci/ac97/ac97_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value)
ac97->regs[reg] = value;
ac97->bus->ops->write(ac97, reg, value);
}
set_bit(reg, ac97->reg_accessed);
up(&ac97->reg_mutex);
return change;
}
Expand Down Expand Up @@ -410,6 +411,7 @@ int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg,
ac97->regs[reg] = new;
ac97->bus->ops->write(ac97, reg, new);
}
set_bit(reg, ac97->reg_accessed);
return change;
}

Expand Down
13 changes: 13 additions & 0 deletions trunk/sound/pci/intel8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ struct _snd_intel8x0 {
unsigned xbox: 1; /* workaround for Xbox AC'97 detection */

int spdif_idx; /* SPDIF BAR index; *_SPBAR or -1 if use PCMOUT */
unsigned int sdm_saved; /* SDM reg value */

ac97_bus_t *ac97_bus;
ac97_t *ac97[3];
Expand Down Expand Up @@ -2373,6 +2374,8 @@ static int intel8x0_suspend(snd_card_t *card, pm_message_t state)
for (i = 0; i < 3; i++)
if (chip->ac97[i])
snd_ac97_suspend(chip->ac97[i]);
if (chip->device_type == DEVICE_INTEL_ICH4)
chip->sdm_saved = igetbyte(chip, ICHREG(SDM));
pci_disable_device(chip->pci);
return 0;
}
Expand All @@ -2386,6 +2389,16 @@ static int intel8x0_resume(snd_card_t *card)
pci_set_master(chip->pci);
snd_intel8x0_chip_init(chip, 0);

/* re-initialize mixer stuff */
if (chip->device_type == DEVICE_INTEL_ICH4) {
/* enable separate SDINs for ICH4 */
iputbyte(chip, ICHREG(SDM), chip->sdm_saved);
/* use slot 10/11 for SPDIF */
iputdword(chip, ICHREG(GLOB_CNT),
(igetdword(chip, ICHREG(GLOB_CNT)) & ~ICH_PCM_SPDIF_MASK) |
ICH_PCM_SPDIF_1011);
}

/* refill nocache */
if (chip->fix_nocache)
fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 1);
Expand Down

0 comments on commit 6d8346c

Please sign in to comment.