aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2004-04-24 19:58:48 +0200
committerJaroslav Kysela <perex@suse.cz>2004-04-24 19:58:48 +0200
commit5313460f74cfde8804e33a1759ff0528e39799da (patch)
tree9890e30dbc387d52d64779e8c00665139ce9604a /sound
parent94c2b95f5b50e4d2fb7535d2479747259cce905b (diff)
downloadhistory-5313460f74cfde8804e33a1759ff0528e39799da.tar.gz
ALSA CVS update - Takashi Iwai <tiwai@suse.de>
CS4281 driver,ES1968 driver,Maestro3 driver,ALI5451 driver CS46xx driver,NM256 driver,Trident driver,YMFPCI driver - call snd_ac97_suspend() in the suspend callback. - suspend/resume secondary codecs, too.
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ali5451/ali5451.c8
-rw-r--r--sound/pci/cs4281.c5
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c7
-rw-r--r--sound/pci/es1968.c1
-rw-r--r--sound/pci/maestro3.c1
-rw-r--r--sound/pci/nm256/nm256.c1
-rw-r--r--sound/pci/trident/trident_main.c7
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c1
8 files changed, 29 insertions, 2 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index bc4db989f18f2e..670b106803f61c 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -1915,6 +1915,9 @@ static int ali_suspend(snd_card_t *card, unsigned int state)
if (! im)
return 0;
+ snd_pcm_suspend_all(chip->pcm);
+ snd_ac97_suspend(chip->ac97);
+
spin_lock_irq(&chip->reg_lock);
im->regs[ALI_MISCINT >> 2] = inl(ALI_REG(chip, ALI_MISCINT));
@@ -1969,14 +1972,15 @@ static int ali_resume(snd_card_t *card, unsigned int state)
outl(im->regs[i], ALI_REG(chip, i*4));
}
- snd_ac97_resume(chip->ac97);
-
// start HW channel
outl(im->regs[ALI_START >> 2], ALI_REG(chip, ALI_START));
// restore IRQ enable bits
outl(im->regs[ALI_MISCINT >> 2], ALI_REG(chip, ALI_MISCINT));
spin_unlock_irq(&chip->reg_lock);
+
+ snd_ac97_resume(chip->ac97);
+
return 0;
}
#endif /* CONFIG_PM */
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 623af1bc2a4f30..287b7d4e995c7b 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -2046,6 +2046,11 @@ static int cs4281_suspend(snd_card_t *card, unsigned int state)
snd_pcm_suspend_all(chip->pcm);
+ if (chip->ac97)
+ snd_ac97_suspend(chip->ac97);
+ if (chip->ac97_secondary)
+ snd_ac97_suspend(chip->ac97_secondary);
+
ulCLK = snd_cs4281_peekBA0(chip, BA0_CLKCR1);
ulCLK |= CLKCR1_CKRA;
snd_cs4281_pokeBA0(chip, BA0_CLKCR1, ulCLK);
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index e814f044352f36..29861bb0ec867e 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3792,6 +3792,11 @@ static int snd_cs46xx_suspend(snd_card_t *card, unsigned int state)
snd_pcm_suspend_all(chip->pcm);
// chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL);
// chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE);
+
+ snd_ac97_suspend(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
+ if (chip->ac97[CS46XX_SECONDARY_CODEC_INDEX])
+ snd_ac97_suspend(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
+
amp_saved = chip->amplifier;
/* turn off amp */
chip->amplifier_ctrl(chip, -chip->amplifier);
@@ -3827,6 +3832,8 @@ static int snd_cs46xx_resume(snd_card_t *card, unsigned int state)
#endif
snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
+ if (chip->ac97[CS46XX_SECONDARY_CODEC_INDEX])
+ snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
if (amp_saved)
chip->amplifier_ctrl(chip, 1); /* turn amp on */
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 76ab856412ba57..cff40777992925 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2424,6 +2424,7 @@ static int es1968_suspend(snd_card_t *card, unsigned int state)
return 0;
snd_pcm_suspend_all(chip->pcm);
+ snd_ac97_suspend(chip->ac97);
snd_es1968_bob_stop(chip);
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
return 0;
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 37a6fa76cdf01d..8c0bc769499aeb 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2420,6 +2420,7 @@ static int m3_suspend(snd_card_t *card, unsigned int state)
return 0;
snd_pcm_suspend_all(chip->pcm);
+ snd_ac97_suspend(chip->ac97);
big_mdelay(10); /* give the assp a chance to idle.. */
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index 4c03c5cbf5a59d..cd4c94cbc818c0 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -1289,6 +1289,7 @@ static int nm256_suspend(snd_card_t *card, unsigned int state)
nm256_t *chip = snd_magic_cast(nm256_t, card->pm_private_data, return -EINVAL);
snd_pcm_suspend_all(chip->pcm);
+ snd_ac97_suspend(chip->ac97);
chip->coeffs_current = 0;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
return 0;
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index 314ef00f678ac6..a72dee775ae4d1 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -3958,6 +3958,11 @@ static int snd_trident_suspend(snd_card_t *card, unsigned int state)
snd_pcm_suspend_all(trident->foldback);
if (trident->spdif)
snd_pcm_suspend_all(trident->spdif);
+
+ snd_ac97_suspend(trident->ac97);
+ if (trident->ac97_sec)
+ snd_ac97_suspend(trident->ac97_sec);
+
switch (trident->device) {
case TRIDENT_DEVICE_ID_DX:
case TRIDENT_DEVICE_ID_NX:
@@ -3992,6 +3997,8 @@ static int snd_trident_resume(snd_card_t *card, unsigned int state)
}
snd_ac97_resume(trident->ac97);
+ if (trident->ac97_sec)
+ snd_ac97_resume(trident->ac97_sec);
/* restore some registers */
outl(trident->musicvol_wavevol, TRID_REG(trident, T4D_MUSICVOL_WAVEVOL));
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 8aac3af751d1b4..9d0aa262415184 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2166,6 +2166,7 @@ static int snd_ymfpci_suspend(snd_card_t *card, unsigned int state)
snd_pcm_suspend_all(chip->pcm2);
snd_pcm_suspend_all(chip->pcm_spdif);
snd_pcm_suspend_all(chip->pcm_4ch);
+ snd_ac97_suspend(chip->ac97);
for (i = 0; i < YDSXGR_NUM_SAVED_REGS; i++)
chip->saved_regs[i] = snd_ymfpci_readl(chip, saved_regs_index[i]);
chip->saved_ydsxgr_mode = snd_ymfpci_readl(chip, YDSXGR_MODE);