include/uapi/linux/virtio_snd.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/virtio_snd.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/virtio_snd.h- Extension
.h- Size
- 13193 bytes
- Lines
- 489
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/virtio_types.h
Detected Declarations
struct virtio_snd_configstruct virtio_snd_hdrstruct virtio_snd_eventstruct virtio_snd_query_infostruct virtio_snd_infostruct virtio_snd_jack_hdrstruct virtio_snd_jack_infostruct virtio_snd_jack_remapstruct virtio_snd_pcm_hdrstruct virtio_snd_pcm_infostruct virtio_snd_pcm_set_paramsstruct virtio_snd_pcm_xferstruct virtio_snd_pcm_statusstruct virtio_snd_chmap_hdrstruct virtio_snd_chmap_infostruct virtio_snd_ctl_hdrstruct virtio_snd_ctl_infostruct virtio_snd_ctl_enum_itemstruct virtio_snd_ctl_iec958struct virtio_snd_ctl_valuestruct virtio_snd_ctl_event
Annotated Snippet
struct virtio_snd_config {
/* # of available physical jacks */
__le32 jacks;
/* # of available PCM streams */
__le32 streams;
/* # of available channel maps */
__le32 chmaps;
/* # of available control elements (if VIRTIO_SND_F_CTLS) */
__le32 controls;
};
enum {
/* device virtqueue indexes */
VIRTIO_SND_VQ_CONTROL = 0,
VIRTIO_SND_VQ_EVENT,
VIRTIO_SND_VQ_TX,
VIRTIO_SND_VQ_RX,
/* # of device virtqueues */
VIRTIO_SND_VQ_MAX
};
/*******************************************************************************
* COMMON DEFINITIONS
*/
/* supported dataflow directions */
enum {
VIRTIO_SND_D_OUTPUT = 0,
VIRTIO_SND_D_INPUT
};
enum {
/* jack control request types */
VIRTIO_SND_R_JACK_INFO = 1,
VIRTIO_SND_R_JACK_REMAP,
/* PCM control request types */
VIRTIO_SND_R_PCM_INFO = 0x0100,
VIRTIO_SND_R_PCM_SET_PARAMS,
VIRTIO_SND_R_PCM_PREPARE,
VIRTIO_SND_R_PCM_RELEASE,
VIRTIO_SND_R_PCM_START,
VIRTIO_SND_R_PCM_STOP,
/* channel map control request types */
VIRTIO_SND_R_CHMAP_INFO = 0x0200,
/* control element request types */
VIRTIO_SND_R_CTL_INFO = 0x0300,
VIRTIO_SND_R_CTL_ENUM_ITEMS,
VIRTIO_SND_R_CTL_READ,
VIRTIO_SND_R_CTL_WRITE,
VIRTIO_SND_R_CTL_TLV_READ,
VIRTIO_SND_R_CTL_TLV_WRITE,
VIRTIO_SND_R_CTL_TLV_COMMAND,
/* jack event types */
VIRTIO_SND_EVT_JACK_CONNECTED = 0x1000,
VIRTIO_SND_EVT_JACK_DISCONNECTED,
/* PCM event types */
VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED = 0x1100,
VIRTIO_SND_EVT_PCM_XRUN,
/* control element event types */
VIRTIO_SND_EVT_CTL_NOTIFY = 0x1200,
/* common status codes */
VIRTIO_SND_S_OK = 0x8000,
VIRTIO_SND_S_BAD_MSG,
VIRTIO_SND_S_NOT_SUPP,
VIRTIO_SND_S_IO_ERR
};
/* common header */
struct virtio_snd_hdr {
__le32 code;
};
/* event notification */
struct virtio_snd_event {
/* VIRTIO_SND_EVT_XXX */
struct virtio_snd_hdr hdr;
/* optional event data */
__le32 data;
};
/* common control request to query an item information */
struct virtio_snd_query_info {
/* VIRTIO_SND_R_XXX_INFO */
Annotation
- Immediate include surface: `linux/virtio_types.h`.
- Detected declarations: `struct virtio_snd_config`, `struct virtio_snd_hdr`, `struct virtio_snd_event`, `struct virtio_snd_query_info`, `struct virtio_snd_info`, `struct virtio_snd_jack_hdr`, `struct virtio_snd_jack_info`, `struct virtio_snd_jack_remap`, `struct virtio_snd_pcm_hdr`, `struct virtio_snd_pcm_info`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.