linux/include/uapi/sound/asound.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 *  Advanced Linux Sound Architecture - ALSA - Driver
 *  Copyright (c) 1994-2003 by Jaroslav Kysela <[email protected]>,
 *                             Abramo Bagnara <[email protected]>
 */

#ifndef _UAPI__SOUND_ASOUND_H
#define _UAPI__SOUND_ASOUND_H

#if defined(__KERNEL__) || defined(__linux__)
#include <linux/types.h>
#include <asm/byteorder.h>
#else
#include <endian.h>
#include <sys/ioctl.h>
#endif

#ifndef __KERNEL__
#include <stdlib.h>
#include <time.h>
#endif

/*
 *  protocol version
 */

#define SNDRV_PROTOCOL_VERSION(major, minor, subminor)
#define SNDRV_PROTOCOL_MAJOR(version)
#define SNDRV_PROTOCOL_MINOR(version)
#define SNDRV_PROTOCOL_MICRO(version)
#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion)

/****************************************************************************
 *                                                                          *
 *        Digital audio interface					    *
 *                                                                          *
 ****************************************************************************/

#define AES_IEC958_STATUS_SIZE

struct snd_aes_iec958 {};

/****************************************************************************
 *                                                                          *
 *        CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort		    *
 *                                                                          *
 ****************************************************************************/

struct snd_cea_861_aud_if {};

/****************************************************************************
 *                                                                          *
 *      Section for driver hardware dependent interface - /dev/snd/hw?      *
 *                                                                          *
 ****************************************************************************/

#define SNDRV_HWDEP_VERSION

enum {};

struct snd_hwdep_info {};

/* generic DSP loader */
struct snd_hwdep_dsp_status {};

struct snd_hwdep_dsp_image {};

#define SNDRV_HWDEP_IOCTL_PVERSION
#define SNDRV_HWDEP_IOCTL_INFO
#define SNDRV_HWDEP_IOCTL_DSP_STATUS
#define SNDRV_HWDEP_IOCTL_DSP_LOAD

/*****************************************************************************
 *                                                                           *
 *             Digital Audio (PCM) interface - /dev/snd/pcm??                *
 *                                                                           *
 *****************************************************************************/

#define SNDRV_PCM_VERSION

snd_pcm_uframes_t;
snd_pcm_sframes_t;

enum {};

enum {};

enum {};

snd_pcm_access_t;
#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED
#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED
#define SNDRV_PCM_ACCESS_MMAP_COMPLEX
#define SNDRV_PCM_ACCESS_RW_INTERLEAVED
#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
#define SNDRV_PCM_ACCESS_LAST

snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_S8
#define SNDRV_PCM_FORMAT_U8
#define SNDRV_PCM_FORMAT_S16_LE
#define SNDRV_PCM_FORMAT_S16_BE
#define SNDRV_PCM_FORMAT_U16_LE
#define SNDRV_PCM_FORMAT_U16_BE
#define SNDRV_PCM_FORMAT_S24_LE
#define SNDRV_PCM_FORMAT_S24_BE
#define SNDRV_PCM_FORMAT_U24_LE
#define SNDRV_PCM_FORMAT_U24_BE
/*
 * For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the
 * available bit count in most significant bit. It's for the case of so-called 'left-justified' or
 * `right-padding` sample which has less width than 32 bit.
 */
#define SNDRV_PCM_FORMAT_S32_LE
#define SNDRV_PCM_FORMAT_S32_BE
#define SNDRV_PCM_FORMAT_U32_LE
#define SNDRV_PCM_FORMAT_U32_BE
#define SNDRV_PCM_FORMAT_FLOAT_LE
#define SNDRV_PCM_FORMAT_FLOAT_BE
#define SNDRV_PCM_FORMAT_FLOAT64_LE
#define SNDRV_PCM_FORMAT_FLOAT64_BE
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
#define SNDRV_PCM_FORMAT_MU_LAW
#define SNDRV_PCM_FORMAT_A_LAW
#define SNDRV_PCM_FORMAT_IMA_ADPCM
#define SNDRV_PCM_FORMAT_MPEG
#define SNDRV_PCM_FORMAT_GSM
#define SNDRV_PCM_FORMAT_S20_LE
#define SNDRV_PCM_FORMAT_S20_BE
#define SNDRV_PCM_FORMAT_U20_LE
#define SNDRV_PCM_FORMAT_U20_BE
/* gap in the numbering for a future standard linear format */
#define SNDRV_PCM_FORMAT_SPECIAL
#define SNDRV_PCM_FORMAT_S24_3LE
#define SNDRV_PCM_FORMAT_S24_3BE
#define SNDRV_PCM_FORMAT_U24_3LE
#define SNDRV_PCM_FORMAT_U24_3BE
#define SNDRV_PCM_FORMAT_S20_3LE
#define SNDRV_PCM_FORMAT_S20_3BE
#define SNDRV_PCM_FORMAT_U20_3LE
#define SNDRV_PCM_FORMAT_U20_3BE
#define SNDRV_PCM_FORMAT_S18_3LE
#define SNDRV_PCM_FORMAT_S18_3BE
#define SNDRV_PCM_FORMAT_U18_3LE
#define SNDRV_PCM_FORMAT_U18_3BE
#define SNDRV_PCM_FORMAT_G723_24
#define SNDRV_PCM_FORMAT_G723_24_1B
#define SNDRV_PCM_FORMAT_G723_40
#define SNDRV_PCM_FORMAT_G723_40_1B
#define SNDRV_PCM_FORMAT_DSD_U8
#define SNDRV_PCM_FORMAT_DSD_U16_LE
#define SNDRV_PCM_FORMAT_DSD_U32_LE
#define SNDRV_PCM_FORMAT_DSD_U16_BE
#define SNDRV_PCM_FORMAT_DSD_U32_BE
#define SNDRV_PCM_FORMAT_LAST
#define SNDRV_PCM_FORMAT_FIRST

#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FORMAT_S16
#define SNDRV_PCM_FORMAT_U16
#define SNDRV_PCM_FORMAT_S24
#define SNDRV_PCM_FORMAT_U24
#define SNDRV_PCM_FORMAT_S32
#define SNDRV_PCM_FORMAT_U32
#define SNDRV_PCM_FORMAT_FLOAT
#define SNDRV_PCM_FORMAT_FLOAT64
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME
#define SNDRV_PCM_FORMAT_S20
#define SNDRV_PCM_FORMAT_U20
#endif
#ifdef SNDRV_BIG_ENDIAN
#define SNDRV_PCM_FORMAT_S16
#define SNDRV_PCM_FORMAT_U16
#define SNDRV_PCM_FORMAT_S24
#define SNDRV_PCM_FORMAT_U24
#define SNDRV_PCM_FORMAT_S32
#define SNDRV_PCM_FORMAT_U32
#define SNDRV_PCM_FORMAT_FLOAT
#define SNDRV_PCM_FORMAT_FLOAT64
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME
#define SNDRV_PCM_FORMAT_S20
#define SNDRV_PCM_FORMAT_U20
#endif

snd_pcm_subformat_t;
#define SNDRV_PCM_SUBFORMAT_STD
#define SNDRV_PCM_SUBFORMAT_MSBITS_MAX
#define SNDRV_PCM_SUBFORMAT_MSBITS_20
#define SNDRV_PCM_SUBFORMAT_MSBITS_24
#define SNDRV_PCM_SUBFORMAT_LAST

#define SNDRV_PCM_INFO_MMAP
#define SNDRV_PCM_INFO_MMAP_VALID
#define SNDRV_PCM_INFO_DOUBLE
#define SNDRV_PCM_INFO_BATCH
#define SNDRV_PCM_INFO_SYNC_APPLPTR
#define SNDRV_PCM_INFO_PERFECT_DRAIN
#define SNDRV_PCM_INFO_INTERLEAVED
#define SNDRV_PCM_INFO_NONINTERLEAVED
#define SNDRV_PCM_INFO_COMPLEX
#define SNDRV_PCM_INFO_BLOCK_TRANSFER
#define SNDRV_PCM_INFO_OVERRANGE
#define SNDRV_PCM_INFO_RESUME
#define SNDRV_PCM_INFO_PAUSE
#define SNDRV_PCM_INFO_HALF_DUPLEX
#define SNDRV_PCM_INFO_JOINT_DUPLEX
#define SNDRV_PCM_INFO_SYNC_START
#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP
#define SNDRV_PCM_INFO_HAS_WALL_CLOCK
#define SNDRV_PCM_INFO_HAS_LINK_ATIME
#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME
#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME
#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME
#define SNDRV_PCM_INFO_EXPLICIT_SYNC
#define SNDRV_PCM_INFO_NO_REWINDS
#define SNDRV_PCM_INFO_DRAIN_TRIGGER
#define SNDRV_PCM_INFO_FIFO_IN_FRAMES

#if (__BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)) || defined __KERNEL__
#define __SND_STRUCT_TIME64
#endif

snd_pcm_state_t;
#define SNDRV_PCM_STATE_OPEN
#define SNDRV_PCM_STATE_SETUP
#define SNDRV_PCM_STATE_PREPARED
#define SNDRV_PCM_STATE_RUNNING
#define SNDRV_PCM_STATE_XRUN
#define SNDRV_PCM_STATE_DRAINING
#define SNDRV_PCM_STATE_PAUSED
#define SNDRV_PCM_STATE_SUSPENDED
#define SNDRV_PCM_STATE_DISCONNECTED
#define SNDRV_PCM_STATE_LAST

enum {};

snd_pcm_sync_id __attribute__((deprecated));

struct snd_pcm_info {};

snd_pcm_hw_param_t;
#define SNDRV_PCM_HW_PARAM_ACCESS
#define SNDRV_PCM_HW_PARAM_FORMAT
#define SNDRV_PCM_HW_PARAM_SUBFORMAT
#define SNDRV_PCM_HW_PARAM_FIRST_MASK
#define SNDRV_PCM_HW_PARAM_LAST_MASK

#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS
#define SNDRV_PCM_HW_PARAM_FRAME_BITS
#define SNDRV_PCM_HW_PARAM_CHANNELS
#define SNDRV_PCM_HW_PARAM_RATE
#define SNDRV_PCM_HW_PARAM_PERIOD_TIME
#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE
#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES
#define SNDRV_PCM_HW_PARAM_PERIODS
#define SNDRV_PCM_HW_PARAM_BUFFER_TIME
#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE
#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES
#define SNDRV_PCM_HW_PARAM_TICK_TIME
#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL
#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL

#define SNDRV_PCM_HW_PARAMS_NORESAMPLE
#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER
#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP
#define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE

struct snd_interval {};

#define SNDRV_MASK_MAX

struct snd_mask {};

struct snd_pcm_hw_params {};

enum {};

struct snd_pcm_sw_params {};

struct snd_pcm_channel_info {};

enum {};

#ifndef __KERNEL__
/* explicit padding avoids incompatibility between i386 and x86-64 */
typedef struct { unsigned char 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 */
	unsigned char 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
#define __snd_pcm_mmap_control64
#define __snd_pcm_sync_ptr64
#ifdef __KERNEL__
#define __snd_timespec64
#else
#define __snd_timespec64
#endif
struct __snd_timespec {};
#else
#define __snd_pcm_mmap_status
#define __snd_pcm_mmap_control
#define __snd_pcm_sync_ptr
#define __snd_timespec
struct __snd_timespec64 {
	__s64 tv_sec;
	__s64 tv_nsec;
};

#endif

struct __snd_pcm_mmap_status {};

struct __snd_pcm_mmap_control {};

#define SNDRV_PCM_SYNC_PTR_HWSYNC
#define SNDRV_PCM_SYNC_PTR_APPL
#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN

struct __snd_pcm_sync_ptr {};

#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
typedef char __pad_after_uframe[0];
#endif

#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
__pad_before_uframe;
__pad_after_uframe;
#endif

struct __snd_pcm_mmap_status64 {};

struct __snd_pcm_mmap_control64 {};

struct __snd_pcm_sync_ptr64 {};

struct snd_xferi {};

struct snd_xfern {};

enum {};

/* channel positions */
enum {};

#define SNDRV_CHMAP_POSITION_MASK
#define SNDRV_CHMAP_PHASE_INVERSE
#define SNDRV_CHMAP_DRIVER_SPEC

#define SNDRV_PCM_IOCTL_PVERSION
#define SNDRV_PCM_IOCTL_INFO
#define SNDRV_PCM_IOCTL_TSTAMP
#define SNDRV_PCM_IOCTL_TTSTAMP
#define SNDRV_PCM_IOCTL_USER_PVERSION
#define SNDRV_PCM_IOCTL_HW_REFINE
#define SNDRV_PCM_IOCTL_HW_PARAMS
#define SNDRV_PCM_IOCTL_HW_FREE
#define SNDRV_PCM_IOCTL_SW_PARAMS
#define SNDRV_PCM_IOCTL_STATUS
#define SNDRV_PCM_IOCTL_DELAY
#define SNDRV_PCM_IOCTL_HWSYNC
#define __SNDRV_PCM_IOCTL_SYNC_PTR
#define __SNDRV_PCM_IOCTL_SYNC_PTR64
#define SNDRV_PCM_IOCTL_SYNC_PTR
#define SNDRV_PCM_IOCTL_STATUS_EXT
#define SNDRV_PCM_IOCTL_CHANNEL_INFO
#define SNDRV_PCM_IOCTL_PREPARE
#define SNDRV_PCM_IOCTL_RESET
#define SNDRV_PCM_IOCTL_START
#define SNDRV_PCM_IOCTL_DROP
#define SNDRV_PCM_IOCTL_DRAIN
#define SNDRV_PCM_IOCTL_PAUSE
#define SNDRV_PCM_IOCTL_REWIND
#define SNDRV_PCM_IOCTL_RESUME
#define SNDRV_PCM_IOCTL_XRUN
#define SNDRV_PCM_IOCTL_FORWARD
#define SNDRV_PCM_IOCTL_WRITEI_FRAMES
#define SNDRV_PCM_IOCTL_READI_FRAMES
#define SNDRV_PCM_IOCTL_WRITEN_FRAMES
#define SNDRV_PCM_IOCTL_READN_FRAMES
#define SNDRV_PCM_IOCTL_LINK
#define SNDRV_PCM_IOCTL_UNLINK

/*****************************************************************************
 *                                                                           *
 *                            MIDI v1.0 interface                            *
 *                                                                           *
 *****************************************************************************/

/*
 *  Raw MIDI section - /dev/snd/midi??
 */

#define SNDRV_RAWMIDI_VERSION

enum {};

#define SNDRV_RAWMIDI_INFO_OUTPUT
#define SNDRV_RAWMIDI_INFO_INPUT
#define SNDRV_RAWMIDI_INFO_DUPLEX
#define SNDRV_RAWMIDI_INFO_UMP

struct snd_rawmidi_info {};

#define SNDRV_RAWMIDI_MODE_FRAMING_MASK
#define SNDRV_RAWMIDI_MODE_FRAMING_SHIFT
#define SNDRV_RAWMIDI_MODE_FRAMING_NONE
#define SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP
#define SNDRV_RAWMIDI_MODE_CLOCK_MASK
#define SNDRV_RAWMIDI_MODE_CLOCK_SHIFT
#define SNDRV_RAWMIDI_MODE_CLOCK_NONE
#define SNDRV_RAWMIDI_MODE_CLOCK_REALTIME
#define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC
#define SNDRV_RAWMIDI_MODE_CLOCK_MONOTONIC_RAW

#define SNDRV_RAWMIDI_FRAMING_DATA_LENGTH

struct snd_rawmidi_framing_tstamp {} __packed;

struct snd_rawmidi_params {};

#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) */
	unsigned char reserved[16];	/* reserved for future use */
};
#endif

/* UMP EP info flags */
#define SNDRV_UMP_EP_INFO_STATIC_BLOCKS

/* UMP EP Protocol / JRTS capability bits */
#define SNDRV_UMP_EP_INFO_PROTO_MIDI_MASK
#define SNDRV_UMP_EP_INFO_PROTO_MIDI1
#define SNDRV_UMP_EP_INFO_PROTO_MIDI2
#define SNDRV_UMP_EP_INFO_PROTO_JRTS_MASK
#define SNDRV_UMP_EP_INFO_PROTO_JRTS_TX
#define SNDRV_UMP_EP_INFO_PROTO_JRTS_RX

/* UMP Endpoint information */
struct snd_ump_endpoint_info {} __packed;

/* UMP direction */
#define SNDRV_UMP_DIR_INPUT
#define SNDRV_UMP_DIR_OUTPUT
#define SNDRV_UMP_DIR_BIDIRECTION

/* UMP block info flags */
#define SNDRV_UMP_BLOCK_IS_MIDI1
#define SNDRV_UMP_BLOCK_IS_LOWSPEED

/* UMP block user-interface hint */
#define SNDRV_UMP_BLOCK_UI_HINT_UNKNOWN
#define SNDRV_UMP_BLOCK_UI_HINT_RECEIVER
#define SNDRV_UMP_BLOCK_UI_HINT_SENDER
#define SNDRV_UMP_BLOCK_UI_HINT_BOTH

/* UMP groups and blocks */
#define SNDRV_UMP_MAX_GROUPS
#define SNDRV_UMP_MAX_BLOCKS

/* UMP Block information */
struct snd_ump_block_info {} __packed;

#define SNDRV_RAWMIDI_IOCTL_PVERSION
#define SNDRV_RAWMIDI_IOCTL_INFO
#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION
#define SNDRV_RAWMIDI_IOCTL_PARAMS
#define SNDRV_RAWMIDI_IOCTL_STATUS
#define SNDRV_RAWMIDI_IOCTL_DROP
#define SNDRV_RAWMIDI_IOCTL_DRAIN
/* Additional ioctls for UMP rawmidi devices */
#define SNDRV_UMP_IOCTL_ENDPOINT_INFO
#define SNDRV_UMP_IOCTL_BLOCK_INFO

/*
 *  Timer section - /dev/snd/timer
 */

#define SNDRV_TIMER_VERSION

enum {};

/* slave timer classes */
enum {};

/* global timers (device member) */
#define SNDRV_TIMER_GLOBAL_SYSTEM
#define SNDRV_TIMER_GLOBAL_RTC
#define SNDRV_TIMER_GLOBAL_HPET
#define SNDRV_TIMER_GLOBAL_HRTIMER
#define SNDRV_TIMER_GLOBAL_UDRIVEN

/* info flags */
#define SNDRV_TIMER_FLG_SLAVE

struct snd_timer_id {};

struct snd_timer_ginfo {};

struct snd_timer_gparams {};

struct snd_timer_gstatus {};

struct snd_timer_select {};

struct snd_timer_info {};

#define SNDRV_TIMER_PSFLG_AUTO
#define SNDRV_TIMER_PSFLG_EXCLUSIVE
#define SNDRV_TIMER_PSFLG_EARLY_EVENT

struct snd_timer_params {};

#ifndef __KERNEL__
struct snd_timer_status {
	struct timespec tstamp;		/* Timestamp - last update */
	unsigned int resolution;	/* current period resolution in ns */
	unsigned int lost;		/* counter of master tick lost */
	unsigned int overrun;		/* count of read queue overruns */
	unsigned int queue;		/* used queue size */
	unsigned char 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 {};

#define SNDRV_TIMER_IOCTL_PVERSION
#define SNDRV_TIMER_IOCTL_NEXT_DEVICE
#define SNDRV_TIMER_IOCTL_TREAD_OLD
#define SNDRV_TIMER_IOCTL_GINFO
#define SNDRV_TIMER_IOCTL_GPARAMS
#define SNDRV_TIMER_IOCTL_GSTATUS
#define SNDRV_TIMER_IOCTL_SELECT
#define SNDRV_TIMER_IOCTL_INFO
#define SNDRV_TIMER_IOCTL_PARAMS
#define SNDRV_TIMER_IOCTL_STATUS
/* The following four ioctls are changed since 1.0.9 due to confliction */
#define SNDRV_TIMER_IOCTL_START
#define SNDRV_TIMER_IOCTL_STOP
#define SNDRV_TIMER_IOCTL_CONTINUE
#define SNDRV_TIMER_IOCTL_PAUSE
#define SNDRV_TIMER_IOCTL_TREAD64
#define SNDRV_TIMER_IOCTL_CREATE
#define SNDRV_TIMER_IOCTL_TRIGGER

#if __BITS_PER_LONG == 64
#define SNDRV_TIMER_IOCTL_TREAD
#else
#define SNDRV_TIMER_IOCTL_TREAD
#endif

struct snd_timer_read {};

enum {};

#ifndef __KERNEL__
struct snd_timer_tread {
	int event;
	__time_pad pad1;
	struct timespec tstamp;
	unsigned int val;
	__time_pad pad2;
};
#endif

/****************************************************************************
 *                                                                          *
 *        Section for driver control interface - /dev/snd/control?          *
 *                                                                          *
 ****************************************************************************/

#define SNDRV_CTL_VERSION

struct snd_ctl_card_info {};

snd_ctl_elem_type_t;
#define SNDRV_CTL_ELEM_TYPE_NONE
#define SNDRV_CTL_ELEM_TYPE_BOOLEAN
#define SNDRV_CTL_ELEM_TYPE_INTEGER
#define SNDRV_CTL_ELEM_TYPE_ENUMERATED
#define SNDRV_CTL_ELEM_TYPE_BYTES
#define SNDRV_CTL_ELEM_TYPE_IEC958
#define SNDRV_CTL_ELEM_TYPE_INTEGER64
#define SNDRV_CTL_ELEM_TYPE_LAST

snd_ctl_elem_iface_t;
#define SNDRV_CTL_ELEM_IFACE_CARD
#define SNDRV_CTL_ELEM_IFACE_HWDEP
#define SNDRV_CTL_ELEM_IFACE_MIXER
#define SNDRV_CTL_ELEM_IFACE_PCM
#define SNDRV_CTL_ELEM_IFACE_RAWMIDI
#define SNDRV_CTL_ELEM_IFACE_TIMER
#define SNDRV_CTL_ELEM_IFACE_SEQUENCER
#define SNDRV_CTL_ELEM_IFACE_LAST

#define SNDRV_CTL_ELEM_ACCESS_READ
#define SNDRV_CTL_ELEM_ACCESS_WRITE
#define SNDRV_CTL_ELEM_ACCESS_READWRITE
#define SNDRV_CTL_ELEM_ACCESS_VOLATILE
/* (1 << 3) is unused. */
#define SNDRV_CTL_ELEM_ACCESS_TLV_READ
#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE
#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND
#define SNDRV_CTL_ELEM_ACCESS_INACTIVE
#define SNDRV_CTL_ELEM_ACCESS_LOCK
#define SNDRV_CTL_ELEM_ACCESS_OWNER
#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK
#define SNDRV_CTL_ELEM_ACCESS_USER
/* 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
#define SNDRV_CTL_POWER_D1
#define SNDRV_CTL_POWER_D2
#define SNDRV_CTL_POWER_D3
#define SNDRV_CTL_POWER_D3hot
#define SNDRV_CTL_POWER_D3cold

#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN

struct snd_ctl_elem_id {};

struct snd_ctl_elem_list {};

struct snd_ctl_elem_info {};

struct snd_ctl_elem_value {};

struct snd_ctl_tlv {};

#define SNDRV_CTL_IOCTL_PVERSION
#define SNDRV_CTL_IOCTL_CARD_INFO
#define SNDRV_CTL_IOCTL_ELEM_LIST
#define SNDRV_CTL_IOCTL_ELEM_INFO
#define SNDRV_CTL_IOCTL_ELEM_READ
#define SNDRV_CTL_IOCTL_ELEM_WRITE
#define SNDRV_CTL_IOCTL_ELEM_LOCK
#define SNDRV_CTL_IOCTL_ELEM_UNLOCK
#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS
#define SNDRV_CTL_IOCTL_ELEM_ADD
#define SNDRV_CTL_IOCTL_ELEM_REPLACE
#define SNDRV_CTL_IOCTL_ELEM_REMOVE
#define SNDRV_CTL_IOCTL_TLV_READ
#define SNDRV_CTL_IOCTL_TLV_WRITE
#define SNDRV_CTL_IOCTL_TLV_COMMAND
#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE
#define SNDRV_CTL_IOCTL_HWDEP_INFO
#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE
#define SNDRV_CTL_IOCTL_PCM_INFO
#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE
#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE
#define SNDRV_CTL_IOCTL_RAWMIDI_INFO
#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE
#define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE
#define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO
#define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO
#define SNDRV_CTL_IOCTL_POWER
#define SNDRV_CTL_IOCTL_POWER_STATE

/*
 *  Read interface.
 */

enum sndrv_ctl_event_type {};

#define SNDRV_CTL_EVENT_MASK_VALUE
#define SNDRV_CTL_EVENT_MASK_INFO
#define SNDRV_CTL_EVENT_MASK_ADD
#define SNDRV_CTL_EVENT_MASK_TLV
#define SNDRV_CTL_EVENT_MASK_REMOVE

struct snd_ctl_event {};

/*
 *  Control names
 */

#define SNDRV_CTL_NAME_NONE
#define SNDRV_CTL_NAME_PLAYBACK
#define SNDRV_CTL_NAME_CAPTURE

#define SNDRV_CTL_NAME_IEC958_NONE
#define SNDRV_CTL_NAME_IEC958_SWITCH
#define SNDRV_CTL_NAME_IEC958_VOLUME
#define SNDRV_CTL_NAME_IEC958_DEFAULT
#define SNDRV_CTL_NAME_IEC958_MASK
#define SNDRV_CTL_NAME_IEC958_CON_MASK
#define SNDRV_CTL_NAME_IEC958_PRO_MASK
#define SNDRV_CTL_NAME_IEC958_PCM_STREAM
#define SNDRV_CTL_NAME_IEC958(expl,direction,what)

#endif /* _UAPI__SOUND_ASOUND_H */