diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 17:19:25 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 12:28:46 +0100 |
commit | 792a6c51875c9d3b4a7b9af553b7fd18e8d84684 (patch) | |
tree | 8d4887d2be87c9734fbee4436bcddcfe4a946e7d /sound/arm/aaci.c | |
parent | 5e12bea0833e47117c31f13b528e31dc8112de57 (diff) |
[ALSA] Fix PM support
Modules: ARM AACI PL041 driver,ARM PXA2XX driver
Fix PM support of aaci and pxa2xx drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/arm/aaci.c')
-rw-r--r-- | sound/arm/aaci.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 691f6dd81c3..5e9a81ab990 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -635,19 +635,14 @@ static struct snd_pcm_ops aaci_playback_ops = { static int aaci_do_suspend(struct snd_card *card, unsigned int state) { struct aaci *aaci = card->private_data; - if (aaci->card->power_state != SNDRV_CTL_POWER_D3cold) { - snd_pcm_suspend_all(aaci->pcm); - snd_power_change_state(aaci->card, SNDRV_CTL_POWER_D3cold); - } + snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); + snd_pcm_suspend_all(aaci->pcm); return 0; } static int aaci_do_resume(struct snd_card *card, unsigned int state) { - struct aaci *aaci = card->private_data; - if (aaci->card->power_state != SNDRV_CTL_POWER_D0) { - snd_power_change_state(aaci->card, SNDRV_CTL_POWER_D0); - } + snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } @@ -780,7 +775,6 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev) return ERR_PTR(-ENOMEM); card->private_free = aaci_free_card; - snd_card_set_pm_callback(card, aaci_do_suspend, aaci_do_resume, NULL); strlcpy(card->driver, DRIVER_NAME, sizeof(card->driver)); strlcpy(card->shortname, "ARM AC'97 Interface", sizeof(card->shortname)); |