include/sound/info.h
Source file repositories/reference/linux-study-clean/include/sound/info.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/info.h- Extension
.h- Size
- 7941 bytes
- Lines
- 233
- Domain
- Driver Families
- Bucket
- include/sound
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/poll.hlinux/seq_file.hsound/core.h
Detected Declarations
struct snd_info_bufferstruct snd_info_entrystruct snd_info_entry_textstruct snd_info_entry_opsstruct snd_info_entryfunction snd_card_info_read_ossfunction snd_card_proc_newfunction snd_info_set_text_opsfunction snd_iprintffunction snd_info_initfunction snd_info_donefunction snd_info_get_linefunction snd_info_free_entryfunction snd_info_card_createfunction snd_info_card_registerfunction snd_info_card_freefunction snd_info_card_disconnectfunction snd_card_proc_newfunction snd_info_set_text_opsfunction snd_info_check_reserved_wordsfunction snd_card_register
Annotated Snippet
struct snd_info_buffer {
char *buffer; /* pointer to begin of buffer */
unsigned int curr; /* current position in buffer */
unsigned int size; /* current size */
unsigned int len; /* total length of buffer */
int stop; /* stop flag */
int error; /* error code */
};
#define SNDRV_INFO_CONTENT_TEXT 0
#define SNDRV_INFO_CONTENT_DATA 1
struct snd_info_entry;
struct snd_info_entry_text {
void (*read)(struct snd_info_entry *entry,
struct snd_info_buffer *buffer);
void (*write)(struct snd_info_entry *entry,
struct snd_info_buffer *buffer);
};
struct snd_info_entry_ops {
int (*open)(struct snd_info_entry *entry,
unsigned short mode, void **file_private_data);
int (*release)(struct snd_info_entry *entry,
unsigned short mode, void *file_private_data);
ssize_t (*read)(struct snd_info_entry *entry, void *file_private_data,
struct file *file, char __user *buf,
size_t count, loff_t pos);
ssize_t (*write)(struct snd_info_entry *entry, void *file_private_data,
struct file *file, const char __user *buf,
size_t count, loff_t pos);
loff_t (*llseek)(struct snd_info_entry *entry,
void *file_private_data, struct file *file,
loff_t offset, int orig);
__poll_t (*poll)(struct snd_info_entry *entry,
void *file_private_data, struct file *file,
poll_table *wait);
int (*ioctl)(struct snd_info_entry *entry, void *file_private_data,
struct file *file, unsigned int cmd, unsigned long arg);
int (*mmap)(struct snd_info_entry *entry, void *file_private_data,
struct inode *inode, struct file *file,
struct vm_area_struct *vma);
};
struct snd_info_entry {
const char *name;
umode_t mode;
long size;
unsigned short content;
union {
struct snd_info_entry_text text;
const struct snd_info_entry_ops *ops;
} c;
struct snd_info_entry *parent;
struct module *module;
void *private_data;
void (*private_free)(struct snd_info_entry *entry);
struct proc_dir_entry *p;
struct mutex access;
struct list_head children;
struct list_head list;
};
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
int snd_info_minor_register(void);
#else
#define snd_info_minor_register() 0
#endif
#ifdef CONFIG_SND_PROC_FS
extern struct snd_info_entry *snd_seq_root;
#ifdef CONFIG_SND_OSSEMUL
extern struct snd_info_entry *snd_oss_root;
void snd_card_info_read_oss(struct snd_info_buffer *buffer);
#else
#define snd_oss_root NULL
static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
#endif
/**
* snd_iprintf - printf on the procfs buffer
* @buf: the procfs buffer
* @fmt: the printf format
*
* Outputs the string on the procfs buffer just like printf().
*
* Return: zero for success, or a negative error code.
Annotation
- Immediate include surface: `linux/poll.h`, `linux/seq_file.h`, `sound/core.h`.
- Detected declarations: `struct snd_info_buffer`, `struct snd_info_entry`, `struct snd_info_entry_text`, `struct snd_info_entry_ops`, `struct snd_info_entry`, `function snd_card_info_read_oss`, `function snd_card_proc_new`, `function snd_info_set_text_ops`, `function snd_iprintf`, `function snd_info_init`.
- Atlas domain: Driver Families / include/sound.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.