Lines Matching +full:min +full:- +full:sample +full:- +full:time +full:- +full:ns
1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
3 * Advanced Linux Sound Architecture - ALSA - Driver
4 * Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
5 * Abramo Bagnara <abramo@alsa-project.org>
21 #include <time.h>
54 * CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort *
60 unsigned char db2_sf_ss; /* sample frequency and size */
63 unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */
68 * Section for driver hardware dependent interface - /dev/snd/hw? *
91 SNDRV_HWDEP_IFACE_HDA, /* HD-audio */
118 unsigned int version; /* R: driver-specific version */
119 unsigned char id[32]; /* R: driver-specific ID string */
131 unsigned long driver_data; /* W: driver-specific data */
141 * Digital Audio (PCM) interface - /dev/snd/pcm?? *
193 * available bit count in most significant bit. It's for the case of so-called 'left-justified' or
194 * `right-padding` sample which has less width than 32 bit.
200 …V_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0…
201 …V_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0…
202 …PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0…
203 …PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0…
204 #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18) /* IEC-958 subframe, Li…
205 #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19) /* IEC-958 subframe, Bi…
230 #define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */
232 #define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */
233 #define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */
234 #define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16…
235 #define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32…
236 #define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16…
237 #define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32…
292 …_HAS_WALL_CLOCK 0x01000000 /* (Deprecated)has audio wall clock for audio/system time sync */
293 #define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, …
294 …INK_ABSOLUTE_ATIME 0x02000000 /* report absolute hardware link audio time, not reset on start…
295 #define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time …
296 … SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */
299 #define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */
300 #define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */
362 #define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8 /* Bits per sample */
395 unsigned int min, max; member
410 struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
413 struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
435 unsigned int sleep_min; /* min ticks to sleep */
436 snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */
438 snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */
443 snd_pcm_uframes_t stop_threshold; /* - stop playback */
444 snd_pcm_uframes_t silence_threshold; /* - pre-fill buffer with silence */
445 snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >= boundary,
456 unsigned int first; /* offset to first sample in bits */
463 * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else
468 SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */
469 …SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock coun…
470 …SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock cou…
471 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */
472 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */
477 /* explicit padding avoids incompatibility between i386 and x86-64 */
478 typedef struct { unsigned char pad[sizeof(time_t) - sizeof(int)]; } __time_pad;
483 struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
492 …__u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspac…
493 struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */
495 __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */
496 unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */
501 * For mmap operations, we need the 64-bit layout, both for compat mode,
502 * and for y2038 compatibility. For 64-bit applications, the two definitions
531 snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */
533 snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */
536 struct __snd_timespec audio_tstamp; /* from sample counter or wall clock */
540 snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */
541 snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */
561 typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
567 typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
571 snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */
574 snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */
579 struct __snd_timespec64 audio_tstamp; /* sample counter or wall clock */
584 snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */
589 snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */
630 /* this follows the alsa-lib mixer channel value + 3 */
715 * Raw MIDI section - /dev/snd/midi??
829 /* UMP block user-interface hint */
848 unsigned char midi_ci_version; /* MIDI-CI support version */
868 * Timer section - /dev/snd/timer
874 SNDRV_TIMER_CLASS_NONE = -1,
910 unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */
915 unsigned long resolution; /* average period resolution in ns */
916 unsigned long resolution_min; /* minimal period resolution in ns */
917 unsigned long resolution_max; /* maximal period resolution in ns */
924 unsigned long period_num; /* requested precise period duration (in seconds) - numerator */
925 unsigned long period_den; /* requested precise period duration (in seconds) - denominator */
931 unsigned long resolution; /* current period resolution in ns */
932 unsigned long resolution_num; /* precise current period resolution (in seconds) - numerator */
933 unsigned long resolution_den; /* precise current period resolution (in seconds) - denominator */
943 unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */
948 unsigned long resolution; /* average period resolution in ns */
952 #define SNDRV_TIMER_PSFLG_AUTO (1<<0) /* auto start, otherwise one-shot */
957 unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */
959 unsigned int queue_size; /* total size of queue (32-1024) */
967 struct timespec tstamp; /* Timestamp - last update */
968 unsigned int resolution; /* current period resolution in ns */
1007 SNDRV_TIMER_EVENT_RESOLUTION = 0, /* val = resolution in ns */
1009 SNDRV_TIMER_EVENT_START, /* val = resolution in ns */
1011 SNDRV_TIMER_EVENT_CONTINUE, /* val = resolution in ns */
1015 SNDRV_TIMER_EVENT_RESUME, /* val = resolution in ns */
1037 * Section for driver control interface - /dev/snd/control? *
1062 #define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6) /* 64-bit integer type */
1121 snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */
1122 unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */
1127 long min; /* R: minimum value */ member
1132 long long min; /* R: minimum value */ member
1150 unsigned int indirect: 1; /* W: indirect access - obsoleted */
1224 int type; /* event type - SNDRV_CTL_EVENT_* */