summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-09-06 14:27:46 +0200
committerJaroslav Kysela <perex@suse.cz>2006-09-23 10:46:32 +0200
commit9d19f48cfe2570562c2c6226780a7ca627b0f1f1 (patch)
treedffe11da7daa0b27225c08badee58628923d961b /include/sound
parenta7da6ce564a80952d9c0b210deca5a8cd3474a31 (diff)
downloadblackbird-op-linux-9d19f48cfe2570562c2c6226780a7ca627b0f1f1.tar.gz
blackbird-op-linux-9d19f48cfe2570562c2c6226780a7ca627b0f1f1.zip
[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.h4
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 @@
#include <linux/mutex.h> /* struct mutex */
#include <linux/rwsem.h> /* struct rw_semaphore */
#include <linux/pm.h> /* pm_message_t */
+#include <linux/device.h>
/* forward declarations */
#ifdef CONFIG_PCI
@@ -186,6 +187,7 @@ struct snd_minor {
int device; /* device number */
const struct file_operations *f_ops; /* file operations */
void *private_data; /* private data for f_ops->open */
+ struct class_device *class_dev; /* class device for sysfs */
};
/* sound.c */
@@ -200,6 +202,8 @@ int snd_register_device(int type, struct snd_card *card, int dev,
const char *name);
int snd_unregister_device(int type, struct snd_card *card, int dev);
void *snd_lookup_minor_data(unsigned int minor, int type);
+int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev,
+ const struct class_device_attribute *attr);
#ifdef CONFIG_SND_OSSEMUL
int snd_register_oss_device(int type, struct snd_card *card, int dev,
OpenPOWER on IntegriCloud