aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:55:49 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:20:19 -0500
commita381a7a66486f11606eccb8866e29848f995278f (patch)
tree4fcc2f971a1f0d509939181b91096a600454b0d6 /include/sound
parentfd66e0d0591dd12eb0bea1e9f3aa194bb93cebbd (diff)
[ALSA] Decentralize PM control
Modules: ALSA Core,Control Midlevel,/oss/Makefile Remove the centralized PM control in the sound core. Each driver is responsible to get callbacks from bus/driver now. SND_GENERIC_DRIVER is removed together with this action. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/core.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index f867433e65f8..f00b9c9b567f 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -134,14 +134,8 @@ struct snd_card {
134 wait_queue_head_t shutdown_sleep; 134 wait_queue_head_t shutdown_sleep;
135 struct work_struct free_workq; /* for free in workqueue */ 135 struct work_struct free_workq; /* for free in workqueue */
136 struct device *dev; 136 struct device *dev;
137#ifdef CONFIG_SND_GENERIC_DRIVER
138 struct snd_generic_device *generic_dev;
139#endif
140 137
141#ifdef CONFIG_PM 138#ifdef CONFIG_PM
142 int (*pm_suspend)(struct snd_card *card, pm_message_t state);
143 int (*pm_resume)(struct snd_card *card);
144 void *pm_private_data;
145 unsigned int power_state; /* power state */ 139 unsigned int power_state; /* power state */
146 struct semaphore power_lock; /* power lock */ 140 struct semaphore power_lock; /* power lock */
147 wait_queue_head_t power_sleep; 141 wait_queue_head_t power_sleep;
@@ -178,22 +172,6 @@ static inline void snd_power_change_state(struct snd_card *card, unsigned int st
178/* init.c */ 172/* init.c */
179int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file); 173int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file);
180 174
181int snd_card_set_pm_callback(struct snd_card *card,
182 int (*suspend)(struct snd_card *, pm_message_t),
183 int (*resume)(struct snd_card *),
184 void *private_data);
185int snd_card_set_generic_pm_callback(struct snd_card *card,
186 int (*suspend)(struct snd_card *, pm_message_t),
187 int (*resume)(struct snd_card *),
188 void *private_data);
189#define snd_card_set_isa_pm_callback(card,suspend,resume,data) \
190 snd_card_set_generic_pm_callback(card, suspend, resume, data)
191struct pci_dev;
192int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state);
193int snd_card_pci_resume(struct pci_dev *dev);
194#define SND_PCI_PM_CALLBACKS \
195 .suspend = snd_card_pci_suspend, .resume = snd_card_pci_resume
196
197#else /* ! CONFIG_PM */ 175#else /* ! CONFIG_PM */
198 176
199#define snd_power_lock(card) do { (void)(card); } while (0) 177#define snd_power_lock(card) do { (void)(card); } while (0)
@@ -201,10 +179,6 @@ int snd_card_pci_resume(struct pci_dev *dev);
201static inline int snd_power_wait(struct snd_card *card, unsigned int state, struct file *file) { return 0; } 179static inline int snd_power_wait(struct snd_card *card, unsigned int state, struct file *file) { return 0; }
202#define snd_power_get_state(card) SNDRV_CTL_POWER_D0 180#define snd_power_get_state(card) SNDRV_CTL_POWER_D0
203#define snd_power_change_state(card, state) do { (void)(card); } while (0) 181#define snd_power_change_state(card, state) do { (void)(card); } while (0)
204#define snd_card_set_pm_callback(card,suspend,resume,data)
205#define snd_card_set_generic_pm_callback(card,suspend,resume,data)
206#define snd_card_set_isa_pm_callback(card,suspend,resume,data)
207#define SND_PCI_PM_CALLBACKS
208 182
209#endif /* CONFIG_PM */ 183#endif /* CONFIG_PM */
210 184
@@ -280,8 +254,6 @@ int snd_card_file_remove(struct snd_card *card, struct file *file);
280#ifndef snd_card_set_dev 254#ifndef snd_card_set_dev
281#define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) 255#define snd_card_set_dev(card,devptr) ((card)->dev = (devptr))
282#endif 256#endif
283/* register a generic device (for ISA, etc) */
284int snd_card_set_generic_dev(struct snd_card *card);
285 257
286/* device.c */ 258/* device.c */
287 259