diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-09-06 08:27:46 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:46:32 -0400 |
commit | 9d19f48cfe2570562c2c6226780a7ca627b0f1f1 (patch) | |
tree | dffe11da7daa0b27225c08badee58628923d961b /include/sound | |
parent | a7da6ce564a80952d9c0b210deca5a8cd3474a31 (diff) |
[ALSA] Add pcm_class attribute to PCM sysfs entry
This patch adds a new attribute, pcm_class, to each PCM sysfs entry.
It's useful to detect what kind of PCM stream is, for example, HAL
can check whether it's a modem or not.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index 1359c532b68e..b056ea925ecf 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mutex.h> /* struct mutex */ | 26 | #include <linux/mutex.h> /* struct mutex */ |
27 | #include <linux/rwsem.h> /* struct rw_semaphore */ | 27 | #include <linux/rwsem.h> /* struct rw_semaphore */ |
28 | #include <linux/pm.h> /* pm_message_t */ | 28 | #include <linux/pm.h> /* pm_message_t */ |
29 | #include <linux/device.h> | ||
29 | 30 | ||
30 | /* forward declarations */ | 31 | /* forward declarations */ |
31 | #ifdef CONFIG_PCI | 32 | #ifdef CONFIG_PCI |
@@ -186,6 +187,7 @@ struct snd_minor { | |||
186 | int device; /* device number */ | 187 | int device; /* device number */ |
187 | const struct file_operations *f_ops; /* file operations */ | 188 | const struct file_operations *f_ops; /* file operations */ |
188 | void *private_data; /* private data for f_ops->open */ | 189 | void *private_data; /* private data for f_ops->open */ |
190 | struct class_device *class_dev; /* class device for sysfs */ | ||
189 | }; | 191 | }; |
190 | 192 | ||
191 | /* sound.c */ | 193 | /* sound.c */ |
@@ -200,6 +202,8 @@ int snd_register_device(int type, struct snd_card *card, int dev, | |||
200 | const char *name); | 202 | const char *name); |
201 | int snd_unregister_device(int type, struct snd_card *card, int dev); | 203 | int snd_unregister_device(int type, struct snd_card *card, int dev); |
202 | void *snd_lookup_minor_data(unsigned int minor, int type); | 204 | void *snd_lookup_minor_data(unsigned int minor, int type); |
205 | int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev, | ||
206 | const struct class_device_attribute *attr); | ||
203 | 207 | ||
204 | #ifdef CONFIG_SND_OSSEMUL | 208 | #ifdef CONFIG_SND_OSSEMUL |
205 | int snd_register_oss_device(int type, struct snd_card *card, int dev, | 209 | int snd_register_oss_device(int type, struct snd_card *card, int dev, |