diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/oss/dmasound/dmasound_awacs.c | 14 | ||||
-rw-r--r-- | sound/ppc/awacs.c | 8 | ||||
-rw-r--r-- | sound/ppc/daca.c | 6 | ||||
-rw-r--r-- | sound/ppc/pmac.c | 11 | ||||
-rw-r--r-- | sound/ppc/pmac.h | 2 | ||||
-rw-r--r-- | sound/ppc/tumbler.c | 4 |
6 files changed, 23 insertions, 22 deletions
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index 33108661e671..2704e1598add 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c | |||
@@ -255,7 +255,7 @@ static int awacs_burgundy_read_mvolume(unsigned address); | |||
255 | 255 | ||
256 | static volatile struct dbdma_cmd *emergency_dbdma_cmd; | 256 | static volatile struct dbdma_cmd *emergency_dbdma_cmd; |
257 | 257 | ||
258 | #ifdef CONFIG_PMAC_PBOOK | 258 | #ifdef CONFIG_PM |
259 | /* | 259 | /* |
260 | * Stuff for restoring after a sleep. | 260 | * Stuff for restoring after a sleep. |
261 | */ | 261 | */ |
@@ -263,7 +263,7 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when); | |||
263 | struct pmu_sleep_notifier awacs_sleep_notifier = { | 263 | struct pmu_sleep_notifier awacs_sleep_notifier = { |
264 | awacs_sleep_notify, SLEEP_LEVEL_SOUND, | 264 | awacs_sleep_notify, SLEEP_LEVEL_SOUND, |
265 | }; | 265 | }; |
266 | #endif /* CONFIG_PMAC_PBOOK */ | 266 | #endif /* CONFIG_PM */ |
267 | 267 | ||
268 | /* for (soft) sample rate translations */ | 268 | /* for (soft) sample rate translations */ |
269 | int expand_bal; /* Balance factor for expanding (not volume!) */ | 269 | int expand_bal; /* Balance factor for expanding (not volume!) */ |
@@ -675,7 +675,7 @@ static void PMacIrqCleanup(void) | |||
675 | kfree(awacs_rx_cmd_space); | 675 | kfree(awacs_rx_cmd_space); |
676 | kfree(beep_dbdma_cmd_space); | 676 | kfree(beep_dbdma_cmd_space); |
677 | kfree(beep_buf); | 677 | kfree(beep_buf); |
678 | #ifdef CONFIG_PMAC_PBOOK | 678 | #ifdef CONFIG_PM |
679 | pmu_unregister_sleep_notifier(&awacs_sleep_notifier); | 679 | pmu_unregister_sleep_notifier(&awacs_sleep_notifier); |
680 | #endif | 680 | #endif |
681 | } | 681 | } |
@@ -1415,7 +1415,7 @@ load_awacs(void) | |||
1415 | } | 1415 | } |
1416 | } | 1416 | } |
1417 | 1417 | ||
1418 | #ifdef CONFIG_PMAC_PBOOK | 1418 | #ifdef CONFIG_PM |
1419 | /* | 1419 | /* |
1420 | * Save state when going to sleep, restore it afterwards. | 1420 | * Save state when going to sleep, restore it afterwards. |
1421 | */ | 1421 | */ |
@@ -1551,7 +1551,7 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) | |||
1551 | } | 1551 | } |
1552 | return PBOOK_SLEEP_OK; | 1552 | return PBOOK_SLEEP_OK; |
1553 | } | 1553 | } |
1554 | #endif /* CONFIG_PMAC_PBOOK */ | 1554 | #endif /* CONFIG_PM */ |
1555 | 1555 | ||
1556 | 1556 | ||
1557 | /* All the burgundy functions: */ | 1557 | /* All the burgundy functions: */ |
@@ -3053,9 +3053,9 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev); | |||
3053 | if ((res=setup_beep())) | 3053 | if ((res=setup_beep())) |
3054 | return res ; | 3054 | return res ; |
3055 | 3055 | ||
3056 | #ifdef CONFIG_PMAC_PBOOK | 3056 | #ifdef CONFIG_PM |
3057 | pmu_register_sleep_notifier(&awacs_sleep_notifier); | 3057 | pmu_register_sleep_notifier(&awacs_sleep_notifier); |
3058 | #endif /* CONFIG_PMAC_PBOOK */ | 3058 | #endif /* CONFIG_PM */ |
3059 | 3059 | ||
3060 | /* Powerbooks have odd ways of enabling inputs such as | 3060 | /* Powerbooks have odd ways of enabling inputs such as |
3061 | an expansion-bay CD or sound from an internal modem | 3061 | an expansion-bay CD or sound from an internal modem |
diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c index e052bd071e5b..061e52d3d771 100644 --- a/sound/ppc/awacs.c +++ b/sound/ppc/awacs.c | |||
@@ -90,7 +90,7 @@ snd_pmac_awacs_write_noreg(pmac_t *chip, int reg, int val) | |||
90 | snd_pmac_awacs_write(chip, val | (reg << 12)); | 90 | snd_pmac_awacs_write(chip, val | (reg << 12)); |
91 | } | 91 | } |
92 | 92 | ||
93 | #ifdef CONFIG_PMAC_PBOOK | 93 | #ifdef CONFIG_PM |
94 | /* Recalibrate chip */ | 94 | /* Recalibrate chip */ |
95 | static void screamer_recalibrate(pmac_t *chip) | 95 | static void screamer_recalibrate(pmac_t *chip) |
96 | { | 96 | { |
@@ -642,7 +642,7 @@ static void awacs_restore_all_regs(pmac_t *chip) | |||
642 | } | 642 | } |
643 | } | 643 | } |
644 | 644 | ||
645 | #ifdef CONFIG_PMAC_PBOOK | 645 | #ifdef CONFIG_PM |
646 | static void snd_pmac_awacs_suspend(pmac_t *chip) | 646 | static void snd_pmac_awacs_suspend(pmac_t *chip) |
647 | { | 647 | { |
648 | snd_pmac_awacs_write_noreg(chip, 1, (chip->awacs_reg[1] | 648 | snd_pmac_awacs_write_noreg(chip, 1, (chip->awacs_reg[1] |
@@ -676,7 +676,7 @@ static void snd_pmac_awacs_resume(pmac_t *chip) | |||
676 | } | 676 | } |
677 | #endif | 677 | #endif |
678 | } | 678 | } |
679 | #endif /* CONFIG_PMAC_PBOOK */ | 679 | #endif /* CONFIG_PM */ |
680 | 680 | ||
681 | #ifdef PMAC_SUPPORT_AUTOMUTE | 681 | #ifdef PMAC_SUPPORT_AUTOMUTE |
682 | /* | 682 | /* |
@@ -883,7 +883,7 @@ snd_pmac_awacs_init(pmac_t *chip) | |||
883 | * set lowlevel callbacks | 883 | * set lowlevel callbacks |
884 | */ | 884 | */ |
885 | chip->set_format = snd_pmac_awacs_set_format; | 885 | chip->set_format = snd_pmac_awacs_set_format; |
886 | #ifdef CONFIG_PMAC_PBOOK | 886 | #ifdef CONFIG_PM |
887 | chip->suspend = snd_pmac_awacs_suspend; | 887 | chip->suspend = snd_pmac_awacs_suspend; |
888 | chip->resume = snd_pmac_awacs_resume; | 888 | chip->resume = snd_pmac_awacs_resume; |
889 | #endif | 889 | #endif |
diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c index f24a91693616..a737f298e77d 100644 --- a/sound/ppc/daca.c +++ b/sound/ppc/daca.c | |||
@@ -218,7 +218,7 @@ static snd_kcontrol_new_t daca_mixers[] = { | |||
218 | }; | 218 | }; |
219 | 219 | ||
220 | 220 | ||
221 | #ifdef CONFIG_PMAC_PBOOK | 221 | #ifdef CONFIG_PM |
222 | static void daca_resume(pmac_t *chip) | 222 | static void daca_resume(pmac_t *chip) |
223 | { | 223 | { |
224 | pmac_daca_t *mix = chip->mixer_data; | 224 | pmac_daca_t *mix = chip->mixer_data; |
@@ -227,7 +227,7 @@ static void daca_resume(pmac_t *chip) | |||
227 | mix->amp_on ? 0x05 : 0x04); | 227 | mix->amp_on ? 0x05 : 0x04); |
228 | daca_set_volume(mix); | 228 | daca_set_volume(mix); |
229 | } | 229 | } |
230 | #endif /* CONFIG_PMAC_PBOOK */ | 230 | #endif /* CONFIG_PM */ |
231 | 231 | ||
232 | 232 | ||
233 | static void daca_cleanup(pmac_t *chip) | 233 | static void daca_cleanup(pmac_t *chip) |
@@ -275,7 +275,7 @@ int __init snd_pmac_daca_init(pmac_t *chip) | |||
275 | return err; | 275 | return err; |
276 | } | 276 | } |
277 | 277 | ||
278 | #ifdef CONFIG_PMAC_PBOOK | 278 | #ifdef CONFIG_PM |
279 | chip->resume = daca_resume; | 279 | chip->resume = daca_resume; |
280 | #endif | 280 | #endif |
281 | 281 | ||
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 080ef3928465..75b8b7423036 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <asm/pci-bridge.h> | 36 | #include <asm/pci-bridge.h> |
37 | 37 | ||
38 | 38 | ||
39 | #if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK) | 39 | #ifdef CONFIG_PM |
40 | static int snd_pmac_register_sleep_notifier(pmac_t *chip); | 40 | static int snd_pmac_register_sleep_notifier(pmac_t *chip); |
41 | static int snd_pmac_unregister_sleep_notifier(pmac_t *chip); | 41 | static int snd_pmac_unregister_sleep_notifier(pmac_t *chip); |
42 | static int snd_pmac_suspend(snd_card_t *card, pm_message_t state); | 42 | static int snd_pmac_suspend(snd_card_t *card, pm_message_t state); |
@@ -782,7 +782,7 @@ static int snd_pmac_free(pmac_t *chip) | |||
782 | } | 782 | } |
783 | 783 | ||
784 | snd_pmac_sound_feature(chip, 0); | 784 | snd_pmac_sound_feature(chip, 0); |
785 | #if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK) | 785 | #ifdef CONFIG_PM |
786 | snd_pmac_unregister_sleep_notifier(chip); | 786 | snd_pmac_unregister_sleep_notifier(chip); |
787 | #endif | 787 | #endif |
788 | 788 | ||
@@ -1292,7 +1292,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return) | |||
1292 | /* Reset dbdma channels */ | 1292 | /* Reset dbdma channels */ |
1293 | snd_pmac_dbdma_reset(chip); | 1293 | snd_pmac_dbdma_reset(chip); |
1294 | 1294 | ||
1295 | #if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK) | 1295 | #ifdef CONFIG_PM |
1296 | /* add sleep notifier */ | 1296 | /* add sleep notifier */ |
1297 | if (! snd_pmac_register_sleep_notifier(chip)) | 1297 | if (! snd_pmac_register_sleep_notifier(chip)) |
1298 | snd_card_set_pm_callback(chip->card, snd_pmac_suspend, snd_pmac_resume, chip); | 1298 | snd_card_set_pm_callback(chip->card, snd_pmac_suspend, snd_pmac_resume, chip); |
@@ -1316,7 +1316,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return) | |||
1316 | * sleep notify for powerbook | 1316 | * sleep notify for powerbook |
1317 | */ | 1317 | */ |
1318 | 1318 | ||
1319 | #if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK) | 1319 | #ifdef CONFIG_PM |
1320 | 1320 | ||
1321 | /* | 1321 | /* |
1322 | * Save state when going to sleep, restore it afterwards. | 1322 | * Save state when going to sleep, restore it afterwards. |
@@ -1414,4 +1414,5 @@ static int snd_pmac_unregister_sleep_notifier(pmac_t *chip) | |||
1414 | return 0; | 1414 | return 0; |
1415 | } | 1415 | } |
1416 | 1416 | ||
1417 | #endif /* CONFIG_PM && CONFIG_PMAC_PBOOK */ | 1417 | #endif /* CONFIG_PM */ |
1418 | |||
diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h index 0a84c05f714b..582db5220119 100644 --- a/sound/ppc/pmac.h +++ b/sound/ppc/pmac.h | |||
@@ -167,7 +167,7 @@ struct snd_pmac { | |||
167 | void (*set_format)(pmac_t *chip); | 167 | void (*set_format)(pmac_t *chip); |
168 | void (*update_automute)(pmac_t *chip, int do_notify); | 168 | void (*update_automute)(pmac_t *chip, int do_notify); |
169 | int (*detect_headphone)(pmac_t *chip); | 169 | int (*detect_headphone)(pmac_t *chip); |
170 | #ifdef CONFIG_PMAC_PBOOK | 170 | #ifdef CONFIG_PM |
171 | void (*suspend)(pmac_t *chip); | 171 | void (*suspend)(pmac_t *chip); |
172 | void (*resume)(pmac_t *chip); | 172 | void (*resume)(pmac_t *chip); |
173 | #endif | 173 | #endif |
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 9332237cb6a4..36c5d5d45bb1 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c | |||
@@ -1128,7 +1128,7 @@ static void tumbler_reset_audio(pmac_t *chip) | |||
1128 | } | 1128 | } |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | #ifdef CONFIG_PMAC_PBOOK | 1131 | #ifdef CONFIG_PM |
1132 | /* suspend mixer */ | 1132 | /* suspend mixer */ |
1133 | static void tumbler_suspend(pmac_t *chip) | 1133 | static void tumbler_suspend(pmac_t *chip) |
1134 | { | 1134 | { |
@@ -1370,7 +1370,7 @@ int __init snd_pmac_tumbler_init(pmac_t *chip) | |||
1370 | if ((err = snd_ctl_add(chip->card, chip->drc_sw_ctl)) < 0) | 1370 | if ((err = snd_ctl_add(chip->card, chip->drc_sw_ctl)) < 0) |
1371 | return err; | 1371 | return err; |
1372 | 1372 | ||
1373 | #ifdef CONFIG_PMAC_PBOOK | 1373 | #ifdef CONFIG_PM |
1374 | chip->suspend = tumbler_suspend; | 1374 | chip->suspend = tumbler_suspend; |
1375 | chip->resume = tumbler_resume; | 1375 | chip->resume = tumbler_resume; |
1376 | #endif | 1376 | #endif |