aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 17:15:58 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:28:42 +0100
commite4f163d96080dda40fd02df725f3672d035e4c5a (patch)
treec97fc3575683cdbd9ea1d25bb92e0519501d2642 /sound/pcmcia/pdaudiocf/pdaudiocf_core.c
parent[ALSA] Remove SND_GENERIC_DRIVER from isa/Kconfig (diff)
downloadlinux-dev-e4f163d96080dda40fd02df725f3672d035e4c5a.tar.xz
linux-dev-e4f163d96080dda40fd02df725f3672d035e4c5a.zip
[ALSA] pdaudiocf - Fix PM support
Modules: PDAudioCF driver Fix the PM support on pdaudiocf driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
index 4f898238e0aa..bd0d70ff3019 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
@@ -255,11 +255,11 @@ void snd_pdacf_powerdown(struct snd_pdacf *chip)
#ifdef CONFIG_PM
-int snd_pdacf_suspend(struct snd_card *card, pm_message_t state)
+int snd_pdacf_suspend(struct snd_pdacf *chip, pm_message_t state)
{
- struct snd_pdacf *chip = card->pm_private_data;
u16 val;
+ snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
snd_pcm_suspend_all(chip->pcm);
/* disable interrupts, but use direct write to preserve old register value in chip->regmap */
val = inw(chip->port + PDAUDIOCF_REG_IER);
@@ -275,9 +275,8 @@ static inline int check_signal(struct snd_pdacf *chip)
return (chip->ak4117->rcs0 & AK4117_UNLCK) == 0;
}
-int snd_pdacf_resume(struct snd_card *card)
+int snd_pdacf_resume(struct snd_pdacf *chip)
{
- struct snd_pdacf *chip = card->pm_private_data;
int timeout = 40;
pdacf_reinit(chip, 1);
@@ -286,6 +285,7 @@ int snd_pdacf_resume(struct snd_card *card)
(snd_ak4117_external_rate(chip->ak4117) <= 0 || !check_signal(chip)))
mdelay(1);
chip->chip_status &= ~PDAUDIOCF_STAT_IS_SUSPENDED;
+ snd_power_change_state(chip->card, SNDRV_CTL_POWER_D0);
return 0;
}
#endif