diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 11:00:17 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:28:13 -0500 |
commit | 7bb35e20e8a00cf9e3f4e9df0457eee9f312a637 (patch) | |
tree | e5483c0460f2dd82318c3774d897b24ea3ea5d2b /sound | |
parent | 686688458e5814ac0aca44fc2033218a848fd2d0 (diff) |
[ALSA] cs4231 - Fix PM support
Modules: CS4231 driver
Fix PM support.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/isa/cs423x/cs4231_lib.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c index ab9075f51237..ced22fd73497 100644 --- a/sound/isa/cs423x/cs4231_lib.c +++ b/sound/isa/cs423x/cs4231_lib.c | |||
@@ -1294,8 +1294,7 @@ static void snd_cs4231_suspend(struct snd_cs4231 *chip) | |||
1294 | int reg; | 1294 | int reg; |
1295 | unsigned long flags; | 1295 | unsigned long flags; |
1296 | 1296 | ||
1297 | if (chip->pcm) | 1297 | snd_pcm_suspend_all(chip->pcm); |
1298 | snd_pcm_suspend_all(chip->pcm); | ||
1299 | spin_lock_irqsave(&chip->reg_lock, flags); | 1298 | spin_lock_irqsave(&chip->reg_lock, flags); |
1300 | for (reg = 0; reg < 32; reg++) | 1299 | for (reg = 0; reg < 32; reg++) |
1301 | chip->image[reg] = snd_cs4231_in(chip, reg); | 1300 | chip->image[reg] = snd_cs4231_in(chip, reg); |
@@ -1343,22 +1342,6 @@ static void snd_cs4231_resume(struct snd_cs4231 *chip) | |||
1343 | snd_cs4231_busy_wait(chip); | 1342 | snd_cs4231_busy_wait(chip); |
1344 | #endif | 1343 | #endif |
1345 | } | 1344 | } |
1346 | |||
1347 | static int snd_cs4231_pm_suspend(struct snd_card *card, pm_message_t state) | ||
1348 | { | ||
1349 | struct snd_cs4231 *chip = card->pm_private_data; | ||
1350 | if (chip->suspend) | ||
1351 | chip->suspend(chip); | ||
1352 | return 0; | ||
1353 | } | ||
1354 | |||
1355 | static int snd_cs4231_pm_resume(struct snd_card *card) | ||
1356 | { | ||
1357 | struct snd_cs4231 *chip = card->pm_private_data; | ||
1358 | if (chip->resume) | ||
1359 | chip->resume(chip); | ||
1360 | return 0; | ||
1361 | } | ||
1362 | #endif /* CONFIG_PM */ | 1345 | #endif /* CONFIG_PM */ |
1363 | 1346 | ||
1364 | static int snd_cs4231_free(struct snd_cs4231 *chip) | 1347 | static int snd_cs4231_free(struct snd_cs4231 *chip) |
@@ -1516,7 +1499,6 @@ int snd_cs4231_create(struct snd_card *card, | |||
1516 | /* Power Management */ | 1499 | /* Power Management */ |
1517 | chip->suspend = snd_cs4231_suspend; | 1500 | chip->suspend = snd_cs4231_suspend; |
1518 | chip->resume = snd_cs4231_resume; | 1501 | chip->resume = snd_cs4231_resume; |
1519 | snd_card_set_isa_pm_callback(card, snd_cs4231_pm_suspend, snd_cs4231_pm_resume, chip); | ||
1520 | #endif | 1502 | #endif |
1521 | 1503 | ||
1522 | *rchip = chip; | 1504 | *rchip = chip; |