Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #ifndef __SOUND_INFO_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define __SOUND_INFO_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *  Header file for info interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/poll.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/seq_file.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/android_kabi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <sound/core.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) /* buffer for information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) struct snd_info_buffer {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	char *buffer;		/* pointer to begin of buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	unsigned int curr;	/* current position in buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 	unsigned int size;	/* current size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	unsigned int len;	/* total length of buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	int stop;		/* stop flag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	int error;		/* error code */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #define SNDRV_INFO_CONTENT_TEXT		0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #define SNDRV_INFO_CONTENT_DATA		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) struct snd_info_entry;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) struct snd_info_entry_text {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	void (*read)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 		     struct snd_info_buffer *buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	void (*write)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 		      struct snd_info_buffer *buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) struct snd_info_entry_ops {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	int (*open)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 		    unsigned short mode, void **file_private_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	int (*release)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		       unsigned short mode, void *file_private_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	ssize_t (*read)(struct snd_info_entry *entry, void *file_private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 			struct file *file, char __user *buf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 			size_t count, loff_t pos);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	ssize_t (*write)(struct snd_info_entry *entry, void *file_private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 			 struct file *file, const char __user *buf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 			 size_t count, loff_t pos);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	loff_t (*llseek)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 			 void *file_private_data, struct file *file,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 			 loff_t offset, int orig);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	__poll_t (*poll)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 			     void *file_private_data, struct file *file,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 			     poll_table *wait);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	int (*ioctl)(struct snd_info_entry *entry, void *file_private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		     struct file *file, unsigned int cmd, unsigned long arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	int (*mmap)(struct snd_info_entry *entry, void *file_private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		    struct inode *inode, struct file *file,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		    struct vm_area_struct *vma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	ANDROID_KABI_RESERVE(1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) struct snd_info_entry {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	const char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	umode_t mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	long size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	unsigned short content;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		struct snd_info_entry_text text;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		const struct snd_info_entry_ops *ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	} c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	struct snd_info_entry *parent;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	struct module *module;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	void *private_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	void (*private_free)(struct snd_info_entry *entry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	struct proc_dir_entry *p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	struct mutex access;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	struct list_head children;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	ANDROID_KABI_RESERVE(1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) int snd_info_minor_register(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) #define snd_info_minor_register()	0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) #ifdef CONFIG_SND_PROC_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) extern struct snd_info_entry *snd_seq_root;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) #ifdef CONFIG_SND_OSSEMUL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) extern struct snd_info_entry *snd_oss_root;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) void snd_card_info_read_oss(struct snd_info_buffer *buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) #define snd_oss_root NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)  * snd_iprintf - printf on the procfs buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)  * @buf: the procfs buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)  * @fmt: the printf format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)  * Outputs the string on the procfs buffer just like printf().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)  * Return: zero for success, or a negative error code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) #define snd_iprintf(buf, fmt, args...) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	seq_printf((struct seq_file *)(buf)->buffer, fmt, ##args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) int snd_info_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) int snd_info_done(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) const char *snd_info_get_str(char *dest, const char *src, int len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) struct snd_info_entry *snd_info_create_module_entry(struct module *module,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 					       const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 					       struct snd_info_entry *parent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 					     const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 					     struct snd_info_entry *parent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) void snd_info_free_entry(struct snd_info_entry *entry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) int snd_info_store_text(struct snd_info_entry *entry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) int snd_info_restore_text(struct snd_info_entry *entry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) int snd_info_card_create(struct snd_card *card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) int snd_info_card_register(struct snd_card *card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) int snd_info_card_free(struct snd_card *card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) void snd_info_card_disconnect(struct snd_card *card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) void snd_info_card_id_change(struct snd_card *card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) int snd_info_register(struct snd_info_entry *entry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) /* for card drivers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) static inline int snd_card_proc_new(struct snd_card *card, const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 				    struct snd_info_entry **entryp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	*entryp = snd_info_create_card_entry(card, name, card->proc_root);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	return *entryp ? 0 : -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) static inline void snd_info_set_text_ops(struct snd_info_entry *entry, 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	void *private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	void (*read)(struct snd_info_entry *, struct snd_info_buffer *))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	entry->private_data = private_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	entry->c.text.read = read;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) int snd_card_rw_proc_new(struct snd_card *card, const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 			 void *private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 			 void (*read)(struct snd_info_entry *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 				      struct snd_info_buffer *),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 			 void (*write)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 				       struct snd_info_buffer *buffer));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) int snd_info_check_reserved_words(const char *str);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) #define snd_seq_root NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) #define snd_oss_root NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) static inline int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) static inline int snd_info_init(void) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) static inline int snd_info_done(void) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) static inline int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) static inline struct snd_info_entry *snd_info_create_module_entry(struct module *module, const char *name, struct snd_info_entry *parent) { return NULL; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 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; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) static inline void snd_info_free_entry(struct snd_info_entry *entry) { ; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) static inline int snd_info_card_create(struct snd_card *card) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) static inline int snd_info_card_register(struct snd_card *card) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) static inline int snd_info_card_free(struct snd_card *card) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) static inline void snd_info_card_disconnect(struct snd_card *card) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) static inline void snd_info_card_id_change(struct snd_card *card) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) static inline int snd_info_register(struct snd_info_entry *entry) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) static inline int snd_card_proc_new(struct snd_card *card, const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 				    struct snd_info_entry **entryp) { return -EINVAL; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) static inline void snd_info_set_text_ops(struct snd_info_entry *entry __attribute__((unused)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 					 void *private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 					 void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) static inline int snd_card_rw_proc_new(struct snd_card *card, const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 				       void *private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 				       void (*read)(struct snd_info_entry *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 						    struct snd_info_buffer *),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 				       void (*write)(struct snd_info_entry *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 						     struct snd_info_buffer *buffer))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) static inline int snd_info_check_reserved_words(const char *str) { return 1; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)  * snd_card_ro_proc_new - Create a read-only text proc file entry for the card
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)  * @card: the card instance
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)  * @name: the file name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)  * @private_data: the arbitrary private data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)  * @read: the read callback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)  * This proc file entry will be registered via snd_card_register() call, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)  * it will be removed automatically at the card removal, too.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) static inline int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) snd_card_ro_proc_new(struct snd_card *card, const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		     void *private_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 		     void (*read)(struct snd_info_entry *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 				  struct snd_info_buffer *))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	return snd_card_rw_proc_new(card, name, private_data, read, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)  * OSS info part
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) #define SNDRV_OSS_INFO_DEV_AUDIO	0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) #define SNDRV_OSS_INFO_DEV_SYNTH	1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) #define SNDRV_OSS_INFO_DEV_MIDI		2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) #define SNDRV_OSS_INFO_DEV_TIMERS	4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) #define SNDRV_OSS_INFO_DEV_MIXERS	5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) #define SNDRV_OSS_INFO_DEV_COUNT	6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) int snd_oss_info_register(int dev, int num, char *string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) #define snd_oss_info_unregister(dev, num) snd_oss_info_register(dev, num, NULL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) #endif /* CONFIG_SND_OSSEMUL && CONFIG_SND_PROC_FS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) #endif /* __SOUND_INFO_H */