sound/core/seq/oss/seq_oss_device.h
Source file repositories/reference/linux-study-clean/sound/core/seq/oss/seq_oss_device.h
File Facts
- System
- Linux kernel
- Corpus path
sound/core/seq/oss/seq_oss_device.h- Extension
.h- Size
- 3825 bytes
- Lines
- 155
- Domain
- Driver Families
- Bucket
- sound/core
- 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/time.hlinux/wait.hlinux/slab.hlinux/sched/signal.hsound/core.hsound/seq_oss.hsound/rawmidi.hsound/seq_kernel.hsound/info.h../seq_clientmgr.h
Detected Declarations
struct seq_oss_chinfostruct seq_oss_synthinfostruct seq_oss_devinfofunction snd_seq_oss_dispatchfunction snd_seq_oss_controlfunction snd_seq_oss_fill_addr
Annotated Snippet
struct seq_oss_chinfo {
int note, vel;
};
/*
* synthesizer information
*/
struct seq_oss_synthinfo {
struct snd_seq_oss_arg arg;
struct seq_oss_chinfo *ch;
int nr_voices;
int opened;
int is_midi;
int midi_mapped;
};
/*
* sequencer client information
*/
struct seq_oss_devinfo {
int index; /* application index */
int cseq; /* sequencer client number */
int port; /* sequencer port number */
int queue; /* sequencer queue number */
struct snd_seq_addr addr; /* address of this device */
int seq_mode; /* sequencer mode */
int file_mode; /* file access */
/* midi device table */
int max_mididev;
/* synth device table */
int max_synthdev;
struct seq_oss_synthinfo synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
int synth_opened;
/* output queue */
struct seq_oss_writeq *writeq;
/* midi input queue */
struct seq_oss_readq *readq;
/* timer */
struct seq_oss_timer *timer;
};
/*
* function prototypes
*/
/* create/delete OSS sequencer client */
int snd_seq_oss_create_client(void);
int snd_seq_oss_delete_client(void);
/* device file interface */
int snd_seq_oss_open(struct file *file, int level);
void snd_seq_oss_release(struct seq_oss_devinfo *dp);
int snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long arg);
int snd_seq_oss_read(struct seq_oss_devinfo *dev, char __user *buf, int count);
int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt);
__poll_t snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait);
void snd_seq_oss_reset(struct seq_oss_devinfo *dp);
/* proc interface */
void snd_seq_oss_system_info_read(struct snd_info_buffer *buf);
void snd_seq_oss_midi_info_read(struct snd_info_buffer *buf);
void snd_seq_oss_synth_info_read(struct snd_info_buffer *buf);
void snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf);
/* file mode macros */
#define is_read_mode(mode) ((mode) & SNDRV_SEQ_OSS_FILE_READ)
#define is_write_mode(mode) ((mode) & SNDRV_SEQ_OSS_FILE_WRITE)
#define is_nonblock_mode(mode) ((mode) & SNDRV_SEQ_OSS_FILE_NONBLOCK)
/* dispatch event */
static inline int
snd_seq_oss_dispatch(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int atomic, int hop)
{
return snd_seq_kernel_client_dispatch(dp->cseq, ev, atomic, hop);
}
/* ioctl for writeq */
static inline int
Annotation
- Immediate include surface: `linux/time.h`, `linux/wait.h`, `linux/slab.h`, `linux/sched/signal.h`, `sound/core.h`, `sound/seq_oss.h`, `sound/rawmidi.h`, `sound/seq_kernel.h`.
- Detected declarations: `struct seq_oss_chinfo`, `struct seq_oss_synthinfo`, `struct seq_oss_devinfo`, `function snd_seq_oss_dispatch`, `function snd_seq_oss_control`, `function snd_seq_oss_fill_addr`.
- Atlas domain: Driver Families / sound/core.
- 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.