summaryrefslogtreecommitdiff
path: root/sound/arm/pxa2xx-ac97.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 17:19:25 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:28:46 +0100
commit792a6c51875c9d3b4a7b9af553b7fd18e8d84684 (patch)
tree8d4887d2be87c9734fbee4436bcddcfe4a946e7d /sound/arm/pxa2xx-ac97.c
parent5e12bea0833e47117c31f13b528e31dc8112de57 (diff)
downloadlwn-792a6c51875c9d3b4a7b9af553b7fd18e8d84684.tar.gz
lwn-792a6c51875c9d3b4a7b9af553b7fd18e8d84684.zip
[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/pxa2xx-ac97.c')
-rw-r--r--sound/arm/pxa2xx-ac97.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index d9efc37393ee..dda64beb202b 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -247,30 +247,28 @@ static struct pxa2xx_pcm_client pxa2xx_ac97_pcm_client = {
static int pxa2xx_ac97_do_suspend(struct snd_card *card, pm_message_t state)
{
- if (card->power_state != SNDRV_CTL_POWER_D3cold) {
- pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
- snd_pcm_suspend_all(pxa2xx_ac97_pcm);
- snd_ac97_suspend(pxa2xx_ac97_ac97);
- snd_power_change_state(card, SNDRV_CTL_POWER_D3cold);
- if (platform_ops && platform_ops->suspend)
- platform_ops->suspend(platform_ops->priv);
- GCR |= GCR_ACLINK_OFF;
- pxa_set_cken(CKEN2_AC97, 0);
- }
+ pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
+
+ snd_power_change_state(card, SNDRV_CTL_POWER_D3cold);
+ snd_pcm_suspend_all(pxa2xx_ac97_pcm);
+ snd_ac97_suspend(pxa2xx_ac97_ac97);
+ if (platform_ops && platform_ops->suspend)
+ platform_ops->suspend(platform_ops->priv);
+ GCR |= GCR_ACLINK_OFF;
+ pxa_set_cken(CKEN2_AC97, 0);
return 0;
}
static int pxa2xx_ac97_do_resume(struct snd_card *card)
{
- if (card->power_state != SNDRV_CTL_POWER_D0) {
- pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
- pxa_set_cken(CKEN2_AC97, 1);
- if (platform_ops && platform_ops->resume)
- platform_ops->resume(platform_ops->priv);
- snd_ac97_resume(pxa2xx_ac97_ac97);
- snd_power_change_state(card, SNDRV_CTL_POWER_D0);
- }
+ pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
+
+ pxa_set_cken(CKEN2_AC97, 1);
+ if (platform_ops && platform_ops->resume)
+ platform_ops->resume(platform_ops->priv);
+ snd_ac97_resume(pxa2xx_ac97_ac97);
+ snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
@@ -349,8 +347,6 @@ static int pxa2xx_ac97_probe(struct platform_device *dev)
snprintf(card->longname, sizeof(card->longname),
"%s (%s)", dev->dev.driver->name, card->mixername);
- snd_card_set_pm_callback(card, pxa2xx_ac97_do_suspend,
- pxa2xx_ac97_do_resume, NULL);
ret = snd_card_register(card);
if (ret == 0) {
platform_set_drvdata(dev, card);