aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/core.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index f8c4ef0aa352..52fcc2f62b9f 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -126,25 +126,26 @@ struct snd_monitor_file {
126 struct snd_monitor_file *next; 126 struct snd_monitor_file *next;
127}; 127};
128 128
129struct snd_shutdown_f_ops; /* define it later */ 129struct snd_shutdown_f_ops; /* define it later in init.c */
130 130
131/* main structure for soundcard */ 131/* main structure for soundcard */
132 132
133struct _snd_card { 133struct _snd_card {
134 int number; /* number of soundcard (index to snd_cards) */ 134 int number; /* number of soundcard (index to
135 snd_cards) */
135 136
136 char id[16]; /* id string of this card */ 137 char id[16]; /* id string of this card */
137 char driver[16]; /* driver name */ 138 char driver[16]; /* driver name */
138 char shortname[32]; /* short name of this soundcard */ 139 char shortname[32]; /* short name of this soundcard */
139 char longname[80]; /* name of this soundcard */ 140 char longname[80]; /* name of this soundcard */
140 char mixername[80]; /* mixer name */ 141 char mixername[80]; /* mixer name */
141 char components[80]; /* card components delimited with space */ 142 char components[80]; /* card components delimited with
142 143 space */
143 struct module *module; /* top-level module */ 144 struct module *module; /* top-level module */
144 145
145 void *private_data; /* private data for soundcard */ 146 void *private_data; /* private data for soundcard */
146 void (*private_free) (snd_card_t *card); /* callback for freeing of private data */ 147 void (*private_free) (snd_card_t *card); /* callback for freeing of
147 148 private data */
148 struct list_head devices; /* devices */ 149 struct list_head devices; /* devices */
149 150
150 unsigned int last_numid; /* last used numeric ID */ 151 unsigned int last_numid; /* last used numeric ID */
@@ -160,7 +161,8 @@ struct _snd_card {
160 struct proc_dir_entry *proc_root_link; /* number link to real id */ 161 struct proc_dir_entry *proc_root_link; /* number link to real id */
161 162
162 struct snd_monitor_file *files; /* all files associated to this card */ 163 struct snd_monitor_file *files; /* all files associated to this card */
163 struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown state */ 164 struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown
165 state */
164 spinlock_t files_lock; /* lock the files for this card */ 166 spinlock_t files_lock; /* lock the files for this card */
165 int shutdown; /* this card is going down */ 167 int shutdown; /* this card is going down */
166 wait_queue_head_t shutdown_sleep; 168 wait_queue_head_t shutdown_sleep;
@@ -196,8 +198,6 @@ static inline void snd_power_unlock(snd_card_t *card)
196 up(&card->power_lock); 198 up(&card->power_lock);
197} 199}
198 200
199int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file);
200
201static inline unsigned int snd_power_get_state(snd_card_t *card) 201static inline unsigned int snd_power_get_state(snd_card_t *card)
202{ 202{
203 return card->power_state; 203 return card->power_state;
@@ -208,6 +208,10 @@ static inline void snd_power_change_state(snd_card_t *card, unsigned int state)
208 card->power_state = state; 208 card->power_state = state;
209 wake_up(&card->power_sleep); 209 wake_up(&card->power_sleep);
210} 210}
211
212/* init.c */
213int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file);
214
211int snd_card_set_pm_callback(snd_card_t *card, 215int snd_card_set_pm_callback(snd_card_t *card,
212 int (*suspend)(snd_card_t *, pm_message_t), 216 int (*suspend)(snd_card_t *, pm_message_t),
213 int (*resume)(snd_card_t *), 217 int (*resume)(snd_card_t *),
@@ -238,15 +242,14 @@ static inline int snd_power_wait(snd_card_t *card, unsigned int state, struct fi
238 242
239#endif /* CONFIG_PM */ 243#endif /* CONFIG_PM */
240 244
241/* device.c */
242
243struct _snd_minor { 245struct _snd_minor {
244 struct list_head list; /* list of all minors per card */ 246 struct list_head list; /* list of all minors per card */
245 int number; /* minor number */ 247 int number; /* minor number */
246 int device; /* device number */ 248 int device; /* device number */
247 const char *comment; /* for /proc/asound/devices */ 249 const char *comment; /* for /proc/asound/devices */
248 struct file_operations *f_ops; /* file operations */ 250 struct file_operations *f_ops; /* file operations */
249 char name[0]; /* device name (keep at the end of structure) */ 251 char name[0]; /* device name (keep at the end of
252 structure) */
250}; 253};
251 254
252typedef struct _snd_minor snd_minor_t; 255typedef struct _snd_minor snd_minor_t;
@@ -411,7 +414,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
411 printk(fmt ,##args) 414 printk(fmt ,##args)
412#endif 415#endif
413/** 416/**
414 * snd_assert - run-time assersion macro 417 * snd_assert - run-time assertion macro
415 * @expr: expression 418 * @expr: expression
416 * @args...: the action 419 * @args...: the action
417 * 420 *
@@ -427,7 +430,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
427 }\ 430 }\
428} while (0) 431} while (0)
429/** 432/**
430 * snd_runtime_check - run-time assersion macro 433 * snd_runtime_check - run-time assertion macro
431 * @expr: expression 434 * @expr: expression
432 * @args...: the action 435 * @args...: the action
433 * 436 *