diff options
| -rw-r--r-- | include/sound/info.h | 108 |
1 files changed, 57 insertions, 51 deletions
diff --git a/include/sound/info.h b/include/sound/info.h index 46f702a76e4f..7c2ee1a21b00 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
| @@ -40,30 +40,34 @@ struct snd_info_buffer { | |||
| 40 | struct snd_info_entry; | 40 | struct snd_info_entry; |
| 41 | 41 | ||
| 42 | struct snd_info_entry_text { | 42 | struct snd_info_entry_text { |
| 43 | void (*read) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); | 43 | void (*read)(struct snd_info_entry *entry, |
| 44 | void (*write) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); | 44 | struct snd_info_buffer *buffer); |
| 45 | void (*write)(struct snd_info_entry *entry, | ||
| 46 | struct snd_info_buffer *buffer); | ||
| 45 | }; | 47 | }; |
| 46 | 48 | ||
| 47 | struct snd_info_entry_ops { | 49 | struct snd_info_entry_ops { |
| 48 | int (*open) (struct snd_info_entry *entry, | 50 | int (*open)(struct snd_info_entry *entry, |
| 49 | unsigned short mode, void **file_private_data); | 51 | unsigned short mode, void **file_private_data); |
| 50 | int (*release) (struct snd_info_entry * entry, | 52 | int (*release)(struct snd_info_entry *entry, |
| 51 | unsigned short mode, void *file_private_data); | 53 | unsigned short mode, void *file_private_data); |
| 52 | long (*read) (struct snd_info_entry *entry, void *file_private_data, | 54 | long (*read)(struct snd_info_entry *entry, void *file_private_data, |
| 53 | struct file * file, char __user *buf, | 55 | struct file *file, char __user *buf, |
| 56 | unsigned long count, unsigned long pos); | ||
| 57 | long (*write)(struct snd_info_entry *entry, void *file_private_data, | ||
| 58 | struct file *file, const char __user *buf, | ||
| 54 | unsigned long count, unsigned long pos); | 59 | unsigned long count, unsigned long pos); |
| 55 | long (*write) (struct snd_info_entry *entry, void *file_private_data, | 60 | long long (*llseek)(struct snd_info_entry *entry, |
| 56 | struct file * file, const char __user *buf, | 61 | void *file_private_data, struct file *file, |
| 57 | unsigned long count, unsigned long pos); | 62 | long long offset, int orig); |
| 58 | long long (*llseek) (struct snd_info_entry *entry, void *file_private_data, | 63 | unsigned int(*poll)(struct snd_info_entry *entry, |
| 59 | struct file * file, long long offset, int orig); | 64 | void *file_private_data, struct file *file, |
| 60 | unsigned int (*poll) (struct snd_info_entry *entry, void *file_private_data, | 65 | poll_table *wait); |
| 61 | struct file * file, poll_table * wait); | 66 | int (*ioctl)(struct snd_info_entry *entry, void *file_private_data, |
| 62 | int (*ioctl) (struct snd_info_entry *entry, void *file_private_data, | 67 | struct file *file, unsigned int cmd, unsigned long arg); |
| 63 | struct file * file, unsigned int cmd, unsigned long arg); | 68 | int (*mmap)(struct snd_info_entry *entry, void *file_private_data, |
| 64 | int (*mmap) (struct snd_info_entry *entry, void *file_private_data, | 69 | struct inode *inode, struct file *file, |
| 65 | struct inode * inode, struct file * file, | 70 | struct vm_area_struct *vma); |
| 66 | struct vm_area_struct * vma); | ||
| 67 | }; | 71 | }; |
| 68 | 72 | ||
| 69 | struct snd_info_entry { | 73 | struct snd_info_entry { |
| @@ -106,35 +110,37 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer); | |||
| 106 | static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} | 110 | static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} |
| 107 | #endif | 111 | #endif |
| 108 | 112 | ||
| 109 | int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) __attribute__ ((format (printf, 2, 3))); | 113 | int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) \ |
| 114 | __attribute__ ((format (printf, 2, 3))); | ||
| 110 | int snd_info_init(void); | 115 | int snd_info_init(void); |
| 111 | int snd_info_done(void); | 116 | int snd_info_done(void); |
| 112 | 117 | ||
| 113 | int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len); | 118 | int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len); |
| 114 | char *snd_info_get_str(char *dest, char *src, int len); | 119 | char *snd_info_get_str(char *dest, char *src, int len); |
| 115 | struct snd_info_entry *snd_info_create_module_entry(struct module * module, | 120 | struct snd_info_entry *snd_info_create_module_entry(struct module *module, |
| 116 | const char *name, | 121 | const char *name, |
| 117 | struct snd_info_entry * parent); | 122 | struct snd_info_entry *parent); |
| 118 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, | 123 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, |
| 119 | const char *name, | 124 | const char *name, |
| 120 | struct snd_info_entry * parent); | 125 | struct snd_info_entry *parent); |
| 121 | void snd_info_free_entry(struct snd_info_entry * entry); | 126 | void snd_info_free_entry(struct snd_info_entry *entry); |
| 122 | int snd_info_store_text(struct snd_info_entry * entry); | 127 | int snd_info_store_text(struct snd_info_entry *entry); |
| 123 | int snd_info_restore_text(struct snd_info_entry * entry); | 128 | int snd_info_restore_text(struct snd_info_entry *entry); |
| 124 | 129 | ||
| 125 | int snd_info_card_create(struct snd_card * card); | 130 | int snd_info_card_create(struct snd_card *card); |
| 126 | int snd_info_card_register(struct snd_card * card); | 131 | int snd_info_card_register(struct snd_card *card); |
| 127 | int snd_info_card_free(struct snd_card * card); | 132 | int snd_info_card_free(struct snd_card *card); |
| 128 | void snd_info_card_disconnect(struct snd_card * card); | 133 | void snd_info_card_disconnect(struct snd_card *card); |
| 129 | void snd_info_card_id_change(struct snd_card * card); | 134 | void snd_info_card_id_change(struct snd_card *card); |
| 130 | int snd_info_register(struct snd_info_entry * entry); | 135 | int snd_info_register(struct snd_info_entry *entry); |
| 131 | 136 | ||
| 132 | /* for card drivers */ | 137 | /* for card drivers */ |
| 133 | int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp); | 138 | int snd_card_proc_new(struct snd_card *card, const char *name, |
| 139 | struct snd_info_entry **entryp); | ||
| 134 | 140 | ||
| 135 | static inline void snd_info_set_text_ops(struct snd_info_entry *entry, | 141 | static inline void snd_info_set_text_ops(struct snd_info_entry *entry, |
| 136 | void *private_data, | 142 | void *private_data, |
| 137 | void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) | 143 | void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) |
| 138 | { | 144 | { |
| 139 | entry->private_data = private_data; | 145 | entry->private_data = private_data; |
| 140 | entry->c.text.read = read; | 146 | entry->c.text.read = read; |
| @@ -147,22 +153,22 @@ int snd_info_check_reserved_words(const char *str); | |||
| 147 | #define snd_seq_root NULL | 153 | #define snd_seq_root NULL |
| 148 | #define snd_oss_root NULL | 154 | #define snd_oss_root NULL |
| 149 | 155 | ||
| 150 | static inline int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) { return 0; } | 156 | static inline int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) { return 0; } |
| 151 | static inline int snd_info_init(void) { return 0; } | 157 | static inline int snd_info_init(void) { return 0; } |
| 152 | static inline int snd_info_done(void) { return 0; } | 158 | static inline int snd_info_done(void) { return 0; } |
| 153 | 159 | ||
| 154 | static inline int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len) { return 0; } | 160 | static inline int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) { return 0; } |
| 155 | static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; } | 161 | static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; } |
| 156 | static inline struct snd_info_entry *snd_info_create_module_entry(struct module * module, const char *name, struct snd_info_entry * parent) { return NULL; } | 162 | static inline struct snd_info_entry *snd_info_create_module_entry(struct module *module, const char *name, struct snd_info_entry *parent) { return NULL; } |
| 157 | static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, const char *name, struct snd_info_entry * parent) { return NULL; } | 163 | static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, const char *name, struct snd_info_entry *parent) { return NULL; } |
| 158 | static inline void snd_info_free_entry(struct snd_info_entry * entry) { ; } | 164 | static inline void snd_info_free_entry(struct snd_info_entry *entry) { ; } |
| 159 | 165 | ||
| 160 | static inline int snd_info_card_create(struct snd_card * card) { return 0; } | 166 | static inline int snd_info_card_create(struct snd_card *card) { return 0; } |
| 161 | static inline int snd_info_card_register(struct snd_card * card) { return 0; } | 167 | static inline int snd_info_card_register(struct snd_card *card) { return 0; } |
| 162 | static inline int snd_info_card_free(struct snd_card * card) { return 0; } | 168 | static inline int snd_info_card_free(struct snd_card *card) { return 0; } |
| 163 | static inline void snd_info_card_disconnect(struct snd_card * card) { } | 169 | static inline void snd_info_card_disconnect(struct snd_card *card) { } |
| 164 | static inline void snd_info_card_id_change(struct snd_card * card) { } | 170 | static inline void snd_info_card_id_change(struct snd_card *card) { } |
| 165 | static inline int snd_info_register(struct snd_info_entry * entry) { return 0; } | 171 | static inline int snd_info_register(struct snd_info_entry *entry) { return 0; } |
| 166 | 172 | ||
| 167 | static inline int snd_card_proc_new(struct snd_card *card, const char *name, | 173 | static inline int snd_card_proc_new(struct snd_card *card, const char *name, |
| 168 | struct snd_info_entry **entryp) { return -EINVAL; } | 174 | struct snd_info_entry **entryp) { return -EINVAL; } |
