enum {
SNDRV_PCM_CLASS_GENERIC = 0, /* standard mono or stereo device */
SNDRV_PCM_CLASS_MULTI, /* multichannel device */
SNDRV_PCM_CLASS_MODEM, /* software modem class */
SNDRV_PCM_CLASS_DIGITIZER, /* digitizer class */ /* Don't forget to change the following: */
SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER,
};
enum {
SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */
SNDRV_PCM_SUBCLASS_MULTI_MIX, /* multichannel subdevices are mixed together */ /* Don't forget to change the following: */
SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX,
};
struct snd_pcm_sw_params { int tstamp_mode; /* timestamp mode */ unsignedint period_step; unsignedint sleep_min; /* min ticks to sleep */
snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */
snd_pcm_uframes_t xfer_align; /* obsolete: xfer size need to be a multiple */
snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */ /* * The following two thresholds alleviate playback buffer underruns; when * hw_avail drops below the threshold, the respective action is triggered:
*/
snd_pcm_uframes_t stop_threshold; /* - stop playback */
snd_pcm_uframes_t silence_threshold; /* - pre-fill buffer with silence */
snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >= boundary,
* fill played area with silence immediately */
snd_pcm_uframes_t boundary; /* pointers wrap point */ unsignedint proto; /* protocol version */ unsignedint tstamp_type; /* timestamp type (req. proto >= 2.0.12) */ unsignedchar reserved[56]; /* reserved for future */
};
struct snd_pcm_channel_info { unsignedint channel;
__kernel_off_t offset; /* mmap offset */ unsignedint first; /* offset to first sample in bits */ unsignedint step; /* samples distance in bits */
};
enum { /* * first definition for backwards compatibility only, * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else
*/
SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
/* timestamp definitions */
SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock counter, reset on startup */
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock counter, not reset on startup */
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */
SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
};
#ifndef __KERNEL__ /* explicit padding avoids incompatibility between i386 and x86-64 */ typedefstruct { unsignedchar pad[sizeof(time_t) - sizeof(int)]; } __time_pad;
struct snd_pcm_status {
snd_pcm_state_t state; /* stream state */
__time_pad pad1; /* align to timespec */ struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */ struct timespec tstamp; /* reference timestamp */
snd_pcm_uframes_t appl_ptr; /* appl ptr */
snd_pcm_uframes_t hw_ptr; /* hw ptr */
snd_pcm_sframes_t delay; /* current delay in frames */
snd_pcm_uframes_t avail; /* number of frames available */
snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */
snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */
snd_pcm_state_t suspended_state; /* suspended stream state */
__u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspace */ struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */ struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */
__u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */ unsignedchar reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */
}; #endif
/* * For mmap operations, we need the 64-bit layout, both for compat mode, * and for y2038 compatibility. For 64-bit applications, the two definitions * are identical, so we keep the traditional version.
*/ #ifdef __SND_STRUCT_TIME64 #define __snd_pcm_mmap_status64 snd_pcm_mmap_status #define __snd_pcm_mmap_control64 snd_pcm_mmap_control #define __snd_pcm_sync_ptr64 snd_pcm_sync_ptr #ifdef __KERNEL__ #define __snd_timespec64 __kernel_timespec #else #define __snd_timespec64 timespec #endif struct __snd_timespec {
__s32 tv_sec;
__s32 tv_nsec;
}; #else #define __snd_pcm_mmap_status snd_pcm_mmap_status #define __snd_pcm_mmap_control snd_pcm_mmap_control #define __snd_pcm_sync_ptr snd_pcm_sync_ptr #define __snd_timespec timespec struct __snd_timespec64 {
__s64 tv_sec;
__s64 tv_nsec;
};
#endif
struct __snd_pcm_mmap_status {
snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ int pad1; /* Needed for 64 bit alignment */
snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ struct __snd_timespec tstamp; /* Timestamp */
snd_pcm_state_t suspended_state; /* RO: suspended stream state */ struct __snd_timespec audio_tstamp; /* from sample counter or wall clock */
};
struct __snd_pcm_mmap_control {
snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */
snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */
};
#define SNDRV_PCM_SYNC_PTR_HWSYNC (1<<0) /* execute hwsync */ #define SNDRV_PCM_SYNC_PTR_APPL (1<<1) /* get appl_ptr from driver (r/w op) */ #define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1<<2) /* get avail_min from driver */
/* channel positions */ enum {
SNDRV_CHMAP_UNKNOWN = 0,
SNDRV_CHMAP_NA, /* N/A, silent */
SNDRV_CHMAP_MONO, /* mono stream */ /* this follows the alsa-lib mixer channel value + 3 */
SNDRV_CHMAP_FL, /* front left */
SNDRV_CHMAP_FR, /* front right */
SNDRV_CHMAP_RL, /* rear left */
SNDRV_CHMAP_RR, /* rear right */
SNDRV_CHMAP_FC, /* front center */
SNDRV_CHMAP_LFE, /* LFE */
SNDRV_CHMAP_SL, /* side left */
SNDRV_CHMAP_SR, /* side right */
SNDRV_CHMAP_RC, /* rear center */ /* new definitions */
SNDRV_CHMAP_FLC, /* front left center */
SNDRV_CHMAP_FRC, /* front right center */
SNDRV_CHMAP_RLC, /* rear left center */
SNDRV_CHMAP_RRC, /* rear right center */
SNDRV_CHMAP_FLW, /* front left wide */
SNDRV_CHMAP_FRW, /* front right wide */
SNDRV_CHMAP_FLH, /* front left high */
SNDRV_CHMAP_FCH, /* front center high */
SNDRV_CHMAP_FRH, /* front right high */
SNDRV_CHMAP_TC, /* top center */
SNDRV_CHMAP_TFL, /* top front left */
SNDRV_CHMAP_TFR, /* top front right */
SNDRV_CHMAP_TFC, /* top front center */
SNDRV_CHMAP_TRL, /* top rear left */
SNDRV_CHMAP_TRR, /* top rear right */
SNDRV_CHMAP_TRC, /* top rear center */ /* new definitions for UAC2 */
SNDRV_CHMAP_TFLC, /* top front left center */
SNDRV_CHMAP_TFRC, /* top front right center */
SNDRV_CHMAP_TSL, /* top side left */
SNDRV_CHMAP_TSR, /* top side right */
SNDRV_CHMAP_LLFE, /* left LFE */
SNDRV_CHMAP_RLFE, /* right LFE */
SNDRV_CHMAP_BC, /* bottom center */
SNDRV_CHMAP_BLC, /* bottom left center */
SNDRV_CHMAP_BRC, /* bottom right center */
SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC,
};
struct snd_rawmidi_framing_tstamp { /* For now, frame_type is always 0. Midi 2.0 is expected to add new * types here. Applications are expected to skip unknown frame types.
*/
__u8 frame_type;
__u8 length; /* number of valid bytes in data field */
__u8 reserved[2];
__u32 tv_nsec; /* nanoseconds */
__u64 tv_sec; /* seconds */
__u8 data[SNDRV_RAWMIDI_FRAMING_DATA_LENGTH];
} __packed;
struct snd_rawmidi_params { int stream;
size_t buffer_size; /* queue size in bytes */
size_t avail_min; /* minimum avail bytes for wakeup */ unsignedint no_active_sensing: 1; /* do not send active sensing byte in close() */ unsignedint mode; /* For input data only, frame incoming data */ unsignedchar reserved[12]; /* reserved for future use */
};
#ifndef __KERNEL__ struct snd_rawmidi_status { int stream;
__time_pad pad1; struct timespec tstamp; /* Timestamp */
size_t avail; /* available bytes */
size_t xruns; /* count of overruns since last status (in bytes) */ unsignedchar reserved[16]; /* reserved for future use */
}; #endif
/* UMP EP info flags */ #define SNDRV_UMP_EP_INFO_STATIC_BLOCKS 0x01
/* UMP groups and blocks */ #define SNDRV_UMP_MAX_GROUPS 16 #define SNDRV_UMP_MAX_BLOCKS 32
/* UMP Block information */ struct snd_ump_block_info { int card; /* card number */ int device; /* device number */ unsignedchar block_id; /* block ID (R/W) */ unsignedchar direction; /* UMP direction */ unsignedchar active; /* Activeness */ unsignedchar first_group; /* first group ID */ unsignedchar num_groups; /* number of groups */ unsignedchar midi_ci_version; /* MIDI-CI support version */ unsignedchar sysex8_streams; /* max number of sysex8 streams */ unsignedchar ui_hint; /* user interface hint */ unsignedint flags; /* various info flags */ unsignedchar name[128]; /* block name string */ unsignedchar reserved[32];
} __packed;
/* info flags */ #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */
struct snd_timer_id { int dev_class; int dev_sclass; int card; int device; int subdevice;
};
struct snd_timer_ginfo { struct snd_timer_id tid; /* requested timer ID */ unsignedint flags; /* timer flags - SNDRV_TIMER_FLG_* */ int card; /* card number */ unsignedchar id[64]; /* timer identification */ unsignedchar name[80]; /* timer name */ unsignedlong reserved0; /* reserved for future use */ unsignedlong resolution; /* average period resolution in ns */ unsignedlong resolution_min; /* minimal period resolution in ns */ unsignedlong resolution_max; /* maximal period resolution in ns */ unsignedint clients; /* active timer clients */ unsignedchar reserved[32];
};
struct snd_timer_gparams { struct snd_timer_id tid; /* requested timer ID */ unsignedlong period_num; /* requested precise period duration (in seconds) - numerator */ unsignedlong period_den; /* requested precise period duration (in seconds) - denominator */ unsignedchar reserved[32];
};
struct snd_timer_gstatus { struct snd_timer_id tid; /* requested timer ID */ unsignedlong resolution; /* current period resolution in ns */ unsignedlong resolution_num; /* precise current period resolution (in seconds) - numerator */ unsignedlong resolution_den; /* precise current period resolution (in seconds) - denominator */ unsignedchar reserved[32];
};
struct snd_timer_select { struct snd_timer_id id; /* bind to timer ID */ unsignedchar reserved[32]; /* reserved */
};
struct snd_timer_info { unsignedint flags; /* timer flags - SNDRV_TIMER_FLG_* */ int card; /* card number */ unsignedchar id[64]; /* timer identificator */ unsignedchar name[80]; /* timer name */ unsignedlong reserved0; /* reserved for future use */ unsignedlong resolution; /* average period resolution in ns */ unsignedchar reserved[64]; /* reserved */
};
#define SNDRV_TIMER_PSFLG_AUTO (1<<0) /* auto start, otherwise one-shot */ #define SNDRV_TIMER_PSFLG_EXCLUSIVE (1<<1) /* exclusive use, precise start/stop/pause/continue */ #define SNDRV_TIMER_PSFLG_EARLY_EVENT (1<<2) /* write early event to the poll queue */
#ifndef __KERNEL__ struct snd_timer_status { struct timespec tstamp; /* Timestamp - last update */ unsignedint resolution; /* current period resolution in ns */ unsignedint lost; /* counter of master tick lost */ unsignedint overrun; /* count of read queue overruns */ unsignedint queue; /* used queue size */ unsignedchar reserved[64]; /* reserved */
}; #endif
/* * This structure describes the userspace-driven timer. Such timers are purely virtual, * and can only be triggered from software (for instance, by userspace application).
*/ struct snd_timer_uinfo { /* To pretend being a normal timer, we need to know the resolution in ns. */
__u64 resolution; int fd; unsignedint id; unsignedchar reserved[16];
};
struct snd_ctl_card_info { int card; /* card number */ int pad; /* reserved for future (was type) */ unsignedchar id[16]; /* ID of card (user selectable) */ unsignedchar driver[16]; /* Driver name */ unsignedchar name[32]; /* Short name of soundcard */ unsignedchar longname[80]; /* name + info text about soundcard */ unsignedchar reserved_[16]; /* reserved for future (was ID of mixer) */ unsignedchar mixername[80]; /* visual mixer identification */ unsignedchar components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */
};
#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0) #define SNDRV_CTL_ELEM_ACCESS_WRITE (1<<1) #define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE) #define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2) /* control value may be changed without a notification */ /* (1 << 3) is unused. */ #define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1<<4) /* TLV read is possible */ #define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1<<5) /* TLV write is possible */ #define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) #define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1<<6) /* TLV command is possible */ #define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */ #define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */ #define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */ #define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* kernel use a TLV callback */ #define SNDRV_CTL_ELEM_ACCESS_USER (1<<29) /* user space element */ /* bits 30 and 31 are obsoleted (for indirect access) */
/* for further details see the ACPI and PCI power management specification */ #define SNDRV_CTL_POWER_D0 0x0000 /* full On */ #define SNDRV_CTL_POWER_D1 0x0100 /* partial On */ #define SNDRV_CTL_POWER_D2 0x0200 /* partial On */ #define SNDRV_CTL_POWER_D3 0x0300 /* Off */ #define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */ #define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */
#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44
struct snd_ctl_elem_id { unsignedint numid; /* numeric identifier, zero = invalid */
snd_ctl_elem_iface_t iface; /* interface identifier */ unsignedint device; /* device/client number */ unsignedint subdevice; /* subdevice (substream) number */ unsignedchar name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* ASCII name of item */ unsignedint index; /* index of item */
};
struct snd_ctl_elem_list { unsignedint offset; /* W: first element ID to get */ unsignedint space; /* W: count of element IDs to get */ unsignedint used; /* R: count of element IDs set */ unsignedint count; /* R: count of all elements */ struct snd_ctl_elem_id __user *pids; /* R: IDs */ unsignedchar reserved[50];
};
struct snd_ctl_elem_info { struct snd_ctl_elem_id id; /* W: element ID */
snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ unsignedint access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ unsignedint count; /* count of values */
__kernel_pid_t owner; /* owner's PID of this control */ union { struct { long min; /* R: minimum value */ long max; /* R: maximum value */ long step; /* R: step (0 variable) */
} integer; struct { longlong min; /* R: minimum value */ longlong max; /* R: maximum value */ longlong step; /* R: step (0 variable) */
} integer64; struct { unsignedint items; /* R: number of items */ unsignedint item; /* W: item number */ char name[64]; /* R: value name */
__u64 names_ptr; /* W: names list (ELEM_ADD only) */ unsignedint names_length;
} enumerated; unsignedchar reserved[128];
} value; unsignedchar reserved[64];
};
struct snd_ctl_elem_value { struct snd_ctl_elem_id id; /* W: element ID */ unsignedint indirect: 1; /* W: indirect access - obsoleted */ union { union { long value[128]; long *value_ptr; /* obsoleted */
} integer; union { longlong value[64]; longlong *value_ptr; /* obsoleted */
} integer64; union { unsignedint item[128]; unsignedint *item_ptr; /* obsoleted */
} enumerated; union { unsignedchar data[512]; unsignedchar *data_ptr; /* obsoleted */
} bytes; struct snd_aes_iec958 iec958;
} value; /* RO */ unsignedchar reserved[128];
};
struct snd_ctl_tlv { unsignedint numid; /* control element numeric identification */ unsignedint length; /* in bytes aligned to 4 */ unsignedint tlv[]; /* first TLV */
};
#define SNDRV_CTL_EVENT_MASK_VALUE (1<<0) /* element value was changed */ #define SNDRV_CTL_EVENT_MASK_INFO (1<<1) /* element info was changed */ #define SNDRV_CTL_EVENT_MASK_ADD (1<<2) /* element was added */ #define SNDRV_CTL_EVENT_MASK_TLV (1<<3) /* element TLV tree was changed */ #define SNDRV_CTL_EVENT_MASK_REMOVE (~0U) /* element was removed */
struct snd_ctl_event { int type; /* event type - SNDRV_CTL_EVENT_* */ union { struct { unsignedint mask; struct snd_ctl_elem_id id;
} elem; unsignedchar data8[60];
} data;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.