Global Namespace

Overview

// typedefs

typedef struct _snd_config snd_config_t;
typedef struct _snd_config_iterator* snd_config_iterator_t;
typedef struct _snd_config_update snd_config_update_t;
typedef struct _snd_ctl_card_info snd_ctl_card_info_t;
typedef struct _snd_ctl_elem_id snd_ctl_elem_id_t;
typedef struct _snd_ctl_elem_list snd_ctl_elem_list_t;
typedef struct _snd_ctl_elem_info snd_ctl_elem_info_t;
typedef struct _snd_ctl_elem_value snd_ctl_elem_value_t;
typedef struct _snd_ctl_event snd_ctl_event_t;
typedef struct _snd_ctl snd_ctl_t;
typedef struct _snd_sctl snd_sctl_t;
typedef struct _snd_hctl_elem snd_hctl_elem_t;
typedef struct _snd_hctl snd_hctl_t;

typedef int (*snd_hctl_compare_t)(
    const snd_hctl_elem_t *e1,
    const snd_hctl_elem_t *e2
    );

typedef int (*snd_hctl_callback_t)(
    snd_hctl_t *hctl,
    unsigned int mask,
    snd_hctl_elem_t *elem
    );

typedef int (*snd_hctl_elem_callback_t)(
    snd_hctl_elem_t *elem,
    unsigned int mask
    );

typedef unsigned long snd_ctl_ext_key_t;
typedef snd_ctl_ext snd_ctl_ext_t;
typedef snd_ctl_ext_callback snd_ctl_ext_callback_t;

typedef int() snd_ctl_ext_tlv_rw_t(
    snd_ctl_ext_t *ext,
    snd_ctl_ext_key_t key,
    int op_flag,
    unsigned int numid,
    unsigned int *tlv,
    unsigned int tlv_size
    );

typedef void (*snd_lib_error_handler_t)(
    const char *file,
    int line,
    const char *function,
    int err,
    const char *fmt,
    ...
    );

typedef void (*snd_local_error_handler_t)(
    const char *file,
    int line,
    const char *func,
    int err,
    const char *fmt,
    va_list arg
    );

typedef struct _snd_async_handler snd_async_handler_t;
typedef void (*snd_async_callback_t)(snd_async_handler_t *handler);
typedef struct timeval snd_timestamp_t;
typedef struct timespec snd_htimestamp_t;
typedef struct _snd_hwdep_info snd_hwdep_info_t;
typedef struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t;
typedef struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t;
typedef struct _snd_hwdep snd_hwdep_t;
typedef struct _snd_input snd_input_t;
typedef struct _snd_mixer snd_mixer_t;
typedef struct _snd_mixer_class snd_mixer_class_t;
typedef struct _snd_mixer_elem snd_mixer_elem_t;

typedef int (*snd_mixer_callback_t)(
    snd_mixer_t *ctl,
    unsigned int mask,
    snd_mixer_elem_t *elem
    );

typedef int (*snd_mixer_elem_callback_t)(
    snd_mixer_elem_t *elem,
    unsigned int mask
    );

typedef int (*snd_mixer_compare_t)(
    const snd_mixer_elem_t *e1,
    const snd_mixer_elem_t *e2
    );

typedef int (*snd_mixer_event_t)(
    snd_mixer_class_t *class_,
    unsigned int mask,
    snd_hctl_elem_t *helem,
    snd_mixer_elem_t *melem
    );

typedef struct _snd_mixer_selem_id snd_mixer_selem_id_t;
typedef struct _snd_output snd_output_t;
typedef struct _snd_pcm_info snd_pcm_info_t;
typedef struct _snd_pcm_hw_params snd_pcm_hw_params_t;
typedef struct _snd_pcm_sw_params snd_pcm_sw_params_t;
typedef struct _snd_pcm_status snd_pcm_status_t;
typedef struct _snd_pcm_access_mask snd_pcm_access_mask_t;
typedef struct _snd_pcm_format_mask snd_pcm_format_mask_t;
typedef struct _snd_pcm_subformat_mask snd_pcm_subformat_mask_t;
typedef unsigned long snd_pcm_uframes_t;
typedef long snd_pcm_sframes_t;
typedef struct _snd_pcm snd_pcm_t;
typedef enum _snd_pcm_type snd_pcm_type_t;
typedef struct _snd_pcm_scope snd_pcm_scope_t;
typedef struct _snd_pcm_hook snd_pcm_hook_t;
typedef int (*snd_pcm_hook_func_t)(snd_pcm_hook_t *hook);
typedef snd_pcm_extplug snd_pcm_extplug_t;
typedef snd_pcm_extplug_callback snd_pcm_extplug_callback_t;
typedef snd_pcm_ioplug snd_pcm_ioplug_t;
typedef snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
typedef struct _snd_rawmidi_info snd_rawmidi_info_t;
typedef struct _snd_rawmidi_params snd_rawmidi_params_t;
typedef struct _snd_rawmidi_status snd_rawmidi_status_t;
typedef struct _snd_rawmidi snd_rawmidi_t;
typedef struct _snd_seq snd_seq_t;
typedef struct _snd_seq_system_info snd_seq_system_info_t;
typedef struct _snd_seq_client_info snd_seq_client_info_t;
typedef struct _snd_seq_client_pool snd_seq_client_pool_t;
typedef struct _snd_seq_port_info snd_seq_port_info_t;
typedef struct _snd_seq_port_subscribe snd_seq_port_subscribe_t;
typedef struct _snd_seq_query_subscribe snd_seq_query_subscribe_t;
typedef struct _snd_seq_queue_info snd_seq_queue_info_t;
typedef struct _snd_seq_queue_status snd_seq_queue_status_t;
typedef struct _snd_seq_queue_tempo snd_seq_queue_tempo_t;
typedef struct _snd_seq_queue_timer snd_seq_queue_timer_t;
typedef struct _snd_seq_remove_events snd_seq_remove_events_t;
typedef unsigned char snd_seq_event_type_t;
typedef unsigned int snd_seq_tick_time_t;
typedef snd_seq_ev_ext snd_seq_ev_ext_t;
typedef struct snd_midi_event snd_midi_event_t;
typedef struct _snd_timer_id snd_timer_id_t;
typedef struct _snd_timer_ginfo snd_timer_ginfo_t;
typedef struct _snd_timer_gparams snd_timer_gparams_t;
typedef struct _snd_timer_gstatus snd_timer_gstatus_t;
typedef struct _snd_timer_info snd_timer_info_t;
typedef struct _snd_timer_params snd_timer_params_t;
typedef struct _snd_timer_status snd_timer_status_t;
typedef struct _snd_timer_query snd_timer_query_t;
typedef struct _snd_timer snd_timer_t;
typedef struct snd_tplg snd_tplg_t;
typedef struct snd_use_case_mgr snd_use_case_mgr_t;

// enums

enum {
    SND_SEQ_EVFLG_RESULT,
    SND_SEQ_EVFLG_NOTE,
    SND_SEQ_EVFLG_CONTROL,
    SND_SEQ_EVFLG_QUEUE,
    SND_SEQ_EVFLG_SYSTEM,
    SND_SEQ_EVFLG_MESSAGE,
    SND_SEQ_EVFLG_CONNECTION,
    SND_SEQ_EVFLG_SAMPLE,
    SND_SEQ_EVFLG_USERS,
    SND_SEQ_EVFLG_INSTR,
    SND_SEQ_EVFLG_QUOTE,
    SND_SEQ_EVFLG_NONE,
    SND_SEQ_EVFLG_RAW,
    SND_SEQ_EVFLG_FIXED,
    SND_SEQ_EVFLG_VARIABLE,
    SND_SEQ_EVFLG_VARUSR,
};

enum {
    SND_SEQ_EVFLG_NOTE_ONEARG,
    SND_SEQ_EVFLG_NOTE_TWOARG,
};

enum {
    CHMAP_CTL_QUERY,
    CHMAP_CTL_GET,
    CHMAP_CTL_SET,
};

enum {
    SNDRV_TIMER_IOCTL_START_OLD    = _IO('T', 0x20),
    SNDRV_TIMER_IOCTL_STOP_OLD     = _IO('T', 0x21),
    SNDRV_TIMER_IOCTL_CONTINUE_OLD = _IO('T', 0x22),
    SNDRV_TIMER_IOCTL_PAUSE_OLD    = _IO('T', 0x23),
};

enum {
    SND_SEQ_EVFLG_QUEUE_NOARG,
    SND_SEQ_EVFLG_QUEUE_TICK,
    SND_SEQ_EVFLG_QUEUE_TIME,
    SND_SEQ_EVFLG_QUEUE_VALUE,
};

enum {
    SND_PCM_EXTPLUG_HW_FORMAT,
    SND_PCM_EXTPLUG_HW_CHANNELS,
    SND_PCM_EXTPLUG_HW_PARAMS,
};

enum {
    SND_PCM_IOPLUG_HW_ACCESS       = 0,
    SND_PCM_IOPLUG_HW_FORMAT,
    SND_PCM_IOPLUG_HW_CHANNELS,
    SND_PCM_IOPLUG_HW_RATE,
    SND_PCM_IOPLUG_HW_PERIOD_BYTES,
    SND_PCM_IOPLUG_HW_BUFFER_BYTES,
    SND_PCM_IOPLUG_HW_PERIODS,
    SND_PCM_IOPLUG_HW_PARAMS,
};

enum _snd_pcm_type;
enum snd_config_type_t;
enum snd_ctl_elem_iface_t;
enum snd_ctl_elem_type_t;
enum snd_ctl_event_type_t;
enum snd_ctl_ext_access_t;
enum snd_ctl_type_t;
enum snd_hwdep_iface_t;
enum snd_hwdep_type_t;
enum snd_input_type_t;
enum snd_mixer_elem_type_t;
enum snd_mixer_selem_channel_id_t;
enum snd_mixer_selem_regopt_abstract;
enum snd_output_type_t;
enum snd_pcm_access_t;
enum snd_pcm_chmap_position;
enum snd_pcm_chmap_type;
enum snd_pcm_class_t;
enum snd_pcm_format_t;
enum snd_pcm_hook_type_t;
enum snd_pcm_start_t;
enum snd_pcm_state_t;
enum snd_pcm_stream_t;
enum snd_pcm_subclass_t;
enum snd_pcm_subformat_t;
enum snd_pcm_tstamp_t;
enum snd_pcm_tstamp_type_t;
enum snd_pcm_xrun_t;
enum snd_rawmidi_stream_t;
enum snd_rawmidi_type_t;
enum snd_seq_client_type_t;
enum snd_seq_event_type;
enum snd_seq_query_subs_type_t;
enum snd_seq_queue_timer_type_t;
enum snd_seq_type_t;
enum snd_spcm_duplex_type_t;
enum snd_spcm_latency_t;
enum snd_spcm_xrun_type_t;
enum snd_timer_class_t;
enum snd_timer_event_t;
enum snd_timer_slave_class_t;
enum snd_timer_type_t;
enum snd_tplg_type;

// structs

struct ctl_access_elem;
struct snd_aes_iec958_t;
struct snd_ctl_ext;
struct snd_ctl_ext_callback;
struct snd_devname;
struct snd_mixer_selem_regopt;
struct snd_pcm_audio_tstamp_config_t;
struct snd_pcm_audio_tstamp_report_t;
struct snd_pcm_channel_area_t;
struct snd_pcm_chmap_query_t;
struct snd_pcm_chmap_t;
struct snd_pcm_extplug;
struct snd_pcm_extplug_callback;
struct snd_pcm_ioplug;
struct snd_pcm_ioplug_callback;
struct snd_pcm_scope_ops_t;
struct snd_seq_addr_t;
struct snd_seq_connect_t;
struct snd_seq_ev_ctrl_t;
struct snd_seq_ev_ext;
struct snd_seq_ev_note_t;
struct snd_seq_ev_queue_control_t;
struct snd_seq_ev_raw32_t;
struct snd_seq_ev_raw8_t;
struct snd_seq_event_t;
struct snd_seq_queue_skew_t;
struct snd_seq_real_time_t;
struct snd_seq_result_t;
struct snd_timer_read_t;
struct snd_timer_tread_t;
struct snd_tplg_bytes_template;
struct snd_tplg_channel_elem;
struct snd_tplg_channel_map_template;
struct snd_tplg_channel_template;
struct snd_tplg_ctl_template;
struct snd_tplg_dai_template;
struct snd_tplg_enum_template;
struct snd_tplg_graph_elem;
struct snd_tplg_graph_template;
struct snd_tplg_hw_config_template;
struct snd_tplg_io_ops_template;
struct snd_tplg_link_template;
struct snd_tplg_mixer_template;
struct snd_tplg_obj_template;
struct snd_tplg_obj_template_t;
struct snd_tplg_pcm_template;
struct snd_tplg_pdata_template;
struct snd_tplg_stream_caps_template;
struct snd_tplg_stream_template;
struct snd_tplg_tlv_dbscale_template;
struct snd_tplg_tlv_template;
struct snd_tplg_widget_template;

// unions

union snd_pcm_sync_id_t;
union snd_seq_timestamp_t;

// global variables

snd_config_t* snd_config;
snd_lib_error_handler_t snd_lib_error;
const unsigned int snd_seq_event_types[];
unsigned int len;
void* ptr;
static struct sigaction previous_action;
static const int snd_async_signo = SIGIO;
static snd_config_update_t* snd_config_global_update = NULL;
static const char*const build_in_ctls[] = {  "hw", "shm", NULL };
static const snd_ctl_ops_t snd_ctl_ext_ops;
static const snd_ctl_ops_t snd_ctl_hw_ops = {    .close = snd_ctl_hw_close,  .nonblock = snd_ctl_hw_nonblock,    .async = snd_ctl_hw_async,  .subscribe_events = snd_ctl_hw_subscribe_events,    .card_info = snd_ctl_hw_card_info,  .element_list = snd_ctl_hw_elem_list,   .element_info = snd_ctl_hw_elem_info,   .element_add = snd_ctl_hw_elem_add,     .element_replace = snd_ctl_hw_elem_replace,     .element_remove = snd_ctl_hw_elem_remove,   .element_read = snd_ctl_hw_elem_read,   .element_write = snd_ctl_hw_elem_write,     .element_lock = snd_ctl_hw_elem_lock,   .element_unlock = snd_ctl_hw_elem_unlock,   .element_tlv = snd_ctl_hw_elem_tlv,     .hwdep_next_device = snd_ctl_hw_hwdep_next_device,  .hwdep_info = snd_ctl_hw_hwdep_info,    .pcm_next_device = snd_ctl_hw_pcm_next_device,  .pcm_info = snd_ctl_hw_pcm_info,    .pcm_prefer_subdevice = snd_ctl_hw_pcm_prefer_subdevice,    .rawmidi_next_device = snd_ctl_hw_rawmidi_next_device,  .rawmidi_info = snd_ctl_hw_rawmidi_info,    .rawmidi_prefer_subdevice = snd_ctl_hw_rawmidi_prefer_subdevice,    .set_power_state = snd_ctl_hw_set_power_state,  .get_power_state = snd_ctl_hw_get_power_state,  .read = snd_ctl_hw_read, };
static const snd_ctl_ops_t snd_ctl_shm_ops = {  .close = snd_ctl_shm_close,     .nonblock = snd_ctl_shm_nonblock,   .async = snd_ctl_shm_async,     .subscribe_events = snd_ctl_shm_subscribe_events,   .card_info = snd_ctl_shm_card_info,     .element_list = snd_ctl_shm_elem_list,  .element_info = snd_ctl_shm_elem_info,  .element_read = snd_ctl_shm_elem_read,  .element_write = snd_ctl_shm_elem_write,    .element_lock = snd_ctl_shm_elem_lock,  .element_unlock = snd_ctl_shm_elem_unlock,  .hwdep_next_device = snd_ctl_shm_hwdep_next_device,     .hwdep_info = snd_ctl_shm_hwdep_info,   .pcm_next_device = snd_ctl_shm_pcm_next_device,     .pcm_info = snd_ctl_shm_pcm_info,   .pcm_prefer_subdevice = snd_ctl_shm_pcm_prefer_subdevice,   .rawmidi_next_device = snd_ctl_shm_rawmidi_next_device,     .rawmidi_info = snd_ctl_shm_rawmidi_info,   .rawmidi_prefer_subdevice = snd_ctl_shm_rawmidi_prefer_subdevice,   .set_power_state = snd_ctl_shm_set_power_state,     .get_power_state = snd_ctl_shm_get_power_state,     .read = snd_ctl_shm_read, };
& _snd_module_control_shm;
& _snd_module_control_ext;
static snd_hctl_t* compare_hctl;
static const char* snd_error_codes[] = {  "Sound protocol is not compatible" };
static TLS_PFX snd_local_error_handler_t local_error = NULL;
snd_lib_error_handler_t snd_err_msg = snd_err_msg_default;
static const snd_hwdep_ops_t snd_hwdep_hw_ops = {  .close = snd_hwdep_hw_close,    .nonblock = snd_hwdep_hw_nonblock,  .info = snd_hwdep_hw_info,  .ioctl = snd_hwdep_hw_ioctl,    .write = snd_hwdep_hw_write,    .read = snd_hwdep_hw_read, };
static struct sm_elem_ops simple_none_ops = {   .is     = is_ops,   .get_range  = get_range_ops,    .get_dB_range   = get_dB_range_ops,     .set_range  = set_range_ops,    .ask_vol_dB = ask_vol_dB_ops,   .ask_dB_vol = ask_dB_vol_ops,   .get_volume = get_volume_ops,   .get_dB     = get_dB_ops,   .set_volume = set_volume_ops,   .set_dB     = set_dB_ops,   .get_switch = get_switch_ops,   .set_switch = set_switch_ops,   .enum_item_name = enum_item_name_ops,   .get_enum_item  = get_enum_item_ops,    .set_enum_item  = set_enum_item_ops };
static const char*const build_in_pcms[] = {     "adpcm", "alaw", "copy", "dmix", "file", "hooks", "hw", "ladspa", "lfloat",     "linear", "meter", "mulaw", "multi", "null", "empty", "plug", "rate", "route", "share",     "shm", "dsnoop", "dshare", "asym", "iec958", "softvol", "mmap_emul",    NULL };
static const char* chmap_long_names[SND_CHMAP_LAST+1];
static const char IndexAdjust[8] = { -1, -1, -1, -1, 2, 4, 6, 8 };
static const short StepSize[89] = {   7, 8, 9, 10, 11, 12, 13, 14, 16, 17,    19, 21, 23, 25, 28, 31, 34, 37, 41, 45,     50, 55, 60, 66, 73, 80, 88, 97, 107, 118,   130, 143, 157, 173, 190, 209, 230, 253, 279, 307,   337, 371, 408, 449, 494, 544, 598, 658, 724, 796,   876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,   2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,     5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,     15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 };
static const snd_pcm_ops_t snd_pcm_adpcm_ops = {  .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_adpcm_hw_refine,   .hw_params = snd_pcm_adpcm_hw_params,   .hw_free = snd_pcm_adpcm_hw_free,   .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_adpcm_dump,     .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_ops_t snd_pcm_alaw_ops = {    .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_alaw_hw_refine,    .hw_params = snd_pcm_alaw_hw_params,    .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_alaw_dump,  .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_ops_t snd_pcm_copy_ops = {    .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_copy_hw_refine,    .hw_params = snd_pcm_copy_hw_params,    .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_copy_dump,  .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_ops_t snd_pcm_dmix_ops = {    .close = snd_pcm_dmix_close,    .info = snd_pcm_direct_info,    .hw_refine = snd_pcm_direct_hw_refine,  .hw_params = snd_pcm_direct_hw_params,  .hw_free = snd_pcm_direct_hw_free,  .sw_params = snd_pcm_direct_sw_params,  .channel_info = snd_pcm_direct_channel_info,    .dump = snd_pcm_dmix_dump,  .nonblock = snd_pcm_direct_nonblock,    .async = snd_pcm_direct_async,  .mmap = snd_pcm_direct_mmap,    .munmap = snd_pcm_direct_munmap,    .query_chmaps = snd_pcm_direct_query_chmaps,    .get_chmap = snd_pcm_direct_get_chmap,  .set_chmap = snd_pcm_direct_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_dmix_fast_ops = {  .status = snd_pcm_dmix_status,  .state = snd_pcm_dmix_state,    .hwsync = snd_pcm_dmix_hwsync,  .delay = snd_pcm_dmix_delay,    .prepare = snd_pcm_direct_prepare,  .reset = snd_pcm_dmix_reset,    .start = snd_pcm_dmix_start,    .drop = snd_pcm_dmix_drop,  .drain = snd_pcm_dmix_drain,    .pause = snd_pcm_dmix_pause,    .rewindable = snd_pcm_dmix_rewindable,  .rewind = snd_pcm_dmix_rewind,  .forwardable = snd_pcm_dmix_forwardable,    .forward = snd_pcm_dmix_forward,    .resume = snd_pcm_direct_resume,    .link = NULL,   .link_slaves = NULL,    .unlink = NULL,     .writei = snd_pcm_mmap_writei,     .writen = snd_pcm_mmap_writen,     .readi = snd_pcm_dmix_readi,    .readn = snd_pcm_dmix_readn,    .avail_update = snd_pcm_dmix_avail_update,  .mmap_commit = snd_pcm_dmix_mmap_commit,    .htimestamp = snd_pcm_dmix_htimestamp,  .poll_descriptors = NULL,   .poll_descriptors_count = NULL,     .poll_revents = snd_pcm_dmix_poll_revents, };
static const snd_pcm_ops_t snd_pcm_dshare_ops = {    .close = snd_pcm_dshare_close,  .info = snd_pcm_direct_info,    .hw_refine = snd_pcm_direct_hw_refine,  .hw_params = snd_pcm_direct_hw_params,  .hw_free = snd_pcm_direct_hw_free,  .sw_params = snd_pcm_direct_sw_params,  .channel_info = snd_pcm_direct_channel_info,    .dump = snd_pcm_dshare_dump,    .nonblock = snd_pcm_direct_nonblock,    .async = snd_pcm_direct_async,  .mmap = snd_pcm_direct_mmap,    .munmap = snd_pcm_direct_munmap,    .get_chmap = snd_pcm_direct_get_chmap,  .set_chmap = snd_pcm_direct_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_dshare_fast_ops = {  .status = snd_pcm_dshare_status,    .state = snd_pcm_dshare_state,  .hwsync = snd_pcm_dshare_hwsync,    .delay = snd_pcm_dshare_delay,  .prepare = snd_pcm_direct_prepare,  .reset = snd_pcm_dshare_reset,  .start = snd_pcm_dshare_start,  .drop = snd_pcm_dshare_drop,    .drain = snd_pcm_dshare_drain,  .pause = snd_pcm_dshare_pause,  .rewindable = snd_pcm_dshare_rewindable,    .rewind = snd_pcm_dshare_rewind,    .forwardable = snd_pcm_dshare_forwardable,  .forward = snd_pcm_dshare_forward,  .resume = snd_pcm_direct_resume,    .link = NULL,   .link_slaves = NULL,    .unlink = NULL,     .writei = snd_pcm_mmap_writei,     .writen = snd_pcm_mmap_writen,     .readi = snd_pcm_dshare_readi,  .readn = snd_pcm_dshare_readn,  .avail_update = snd_pcm_dshare_avail_update,    .mmap_commit = snd_pcm_dshare_mmap_commit,  .htimestamp = snd_pcm_dshare_htimestamp,    .poll_descriptors = NULL,   .poll_descriptors_count = NULL,     .poll_revents = snd_pcm_direct_poll_revents, };
static const snd_pcm_ops_t snd_pcm_dsnoop_ops = {    .close = snd_pcm_dsnoop_close,  .info = snd_pcm_direct_info,    .hw_refine = snd_pcm_direct_hw_refine,  .hw_params = snd_pcm_direct_hw_params,  .hw_free = snd_pcm_direct_hw_free,  .sw_params = snd_pcm_direct_sw_params,  .channel_info = snd_pcm_direct_channel_info,    .dump = snd_pcm_dsnoop_dump,    .nonblock = snd_pcm_direct_nonblock,    .async = snd_pcm_direct_async,  .mmap = snd_pcm_direct_mmap,    .munmap = snd_pcm_direct_munmap,    .query_chmaps = snd_pcm_direct_query_chmaps,    .get_chmap = snd_pcm_direct_get_chmap,  .set_chmap = snd_pcm_direct_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_dsnoop_fast_ops = {  .status = snd_pcm_dsnoop_status,    .state = snd_pcm_dsnoop_state,  .hwsync = snd_pcm_dsnoop_hwsync,    .delay = snd_pcm_dsnoop_delay,  .prepare = snd_pcm_direct_prepare,  .reset = snd_pcm_dsnoop_reset,  .start = snd_pcm_dsnoop_start,  .drop = snd_pcm_dsnoop_drop,    .drain = snd_pcm_dsnoop_drain,  .pause = snd_pcm_dsnoop_pause,  .rewindable = snd_pcm_dsnoop_rewindable,    .rewind = snd_pcm_dsnoop_rewind,    .forwardable = snd_pcm_dsnoop_forwardable,  .forward = snd_pcm_dsnoop_forward,  .resume = snd_pcm_direct_resume,    .link = NULL,   .link_slaves = NULL,    .unlink = NULL,     .writei = snd_pcm_dsnoop_writei,    .writen = snd_pcm_dsnoop_writen,    .readi = snd_pcm_mmap_readi,   .readn = snd_pcm_mmap_readn,   .avail_update = snd_pcm_dsnoop_avail_update,    .mmap_commit = snd_pcm_dsnoop_mmap_commit,  .htimestamp = snd_pcm_dsnoop_htimestamp,    .poll_descriptors = NULL,   .poll_descriptors_count = NULL,     .poll_revents = snd_pcm_direct_poll_revents, };
static const snd_pcm_ops_t snd_pcm_file_ops = {    .close = snd_pcm_file_close,    .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_generic_hw_refine,     .hw_params = snd_pcm_file_hw_params,    .hw_free = snd_pcm_file_hw_free,    .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_file_dump,  .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_file_fast_ops = {  .status = snd_pcm_generic_status,   .state = snd_pcm_generic_state,     .hwsync = snd_pcm_generic_hwsync,   .delay = snd_pcm_generic_delay,     .prepare = snd_pcm_generic_prepare,     .reset = snd_pcm_file_reset,    .start = snd_pcm_generic_start,     .drop = snd_pcm_file_drop,  .drain = snd_pcm_file_drain,    .pause = snd_pcm_generic_pause,     .rewindable = snd_pcm_file_rewindable,  .rewind = snd_pcm_file_rewind,  .forwardable = snd_pcm_file_forwardable,    .forward = snd_pcm_file_forward,    .resume = snd_pcm_generic_resume,   .link = snd_pcm_generic_link,   .link_slaves = snd_pcm_generic_link_slaves,     .unlink = snd_pcm_generic_unlink,   .writei = snd_pcm_file_writei,  .writen = snd_pcm_file_writen,  .readi = snd_pcm_file_readi,    .readn = snd_pcm_file_readn,    .avail_update = snd_pcm_generic_avail_update,   .mmap_commit = snd_pcm_file_mmap_commit,    .poll_descriptors_count = snd_pcm_generic_poll_descriptors_count,   .poll_descriptors = snd_pcm_generic_poll_descriptors,   .poll_revents = snd_pcm_generic_poll_revents,   .htimestamp = snd_pcm_generic_real_htimestamp, };
static const snd_pcm_ops_t snd_pcm_hooks_ops = {  .close = snd_pcm_hooks_close,   .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_generic_hw_refine,     .hw_params = snd_pcm_hooks_hw_params,   .hw_free = snd_pcm_hooks_hw_free,   .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_hooks_dump,     .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_hooks_fast_ops;
static const snd_pcm_ops_t snd_pcm_hw_ops = {    .close = snd_pcm_hw_close,  .info = snd_pcm_hw_info,    .hw_refine = snd_pcm_hw_hw_refine,  .hw_params = snd_pcm_hw_hw_params,  .hw_free = snd_pcm_hw_hw_free,  .sw_params = snd_pcm_hw_sw_params,  .channel_info = snd_pcm_hw_channel_info,    .dump = snd_pcm_hw_dump,    .nonblock = snd_pcm_hw_nonblock,    .async = snd_pcm_hw_async,  .mmap = snd_pcm_hw_mmap,    .munmap = snd_pcm_hw_munmap,    .query_chmaps = snd_pcm_hw_query_chmaps,    .get_chmap = snd_pcm_hw_get_chmap,  .set_chmap = snd_pcm_hw_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_hw_fast_ops = {  .status = snd_pcm_hw_status,    .state = snd_pcm_hw_state,  .hwsync = snd_pcm_hw_hwsync,    .delay = snd_pcm_hw_delay,  .prepare = snd_pcm_hw_prepare,  .reset = snd_pcm_hw_reset,  .start = snd_pcm_hw_start,  .drop = snd_pcm_hw_drop,    .drain = snd_pcm_hw_drain,  .pause = snd_pcm_hw_pause,  .rewindable = snd_pcm_hw_rewindable,    .rewind = snd_pcm_hw_rewind,    .forwardable = snd_pcm_hw_forwardable,  .forward = snd_pcm_hw_forward,  .resume = snd_pcm_hw_resume,    .link = snd_pcm_hw_link,    .link_slaves = snd_pcm_hw_link_slaves,  .unlink = snd_pcm_hw_unlink,    .writei = snd_pcm_hw_writei,    .writen = snd_pcm_hw_writen,    .readi = snd_pcm_hw_readi,  .readn = snd_pcm_hw_readn,  .avail_update = snd_pcm_hw_avail_update,    .mmap_commit = snd_pcm_hw_mmap_commit,  .htimestamp = snd_pcm_hw_htimestamp,    .poll_descriptors = NULL,   .poll_descriptors_count = NULL,     .poll_revents = NULL, };
static const snd_pcm_fast_ops_t snd_pcm_hw_fast_ops_timer = {    .status = snd_pcm_hw_status,    .state = snd_pcm_hw_state,  .hwsync = snd_pcm_hw_hwsync,    .delay = snd_pcm_hw_delay,  .prepare = snd_pcm_hw_prepare,  .reset = snd_pcm_hw_reset,  .start = snd_pcm_hw_start,  .drop = snd_pcm_hw_drop,    .drain = snd_pcm_hw_drain,  .pause = snd_pcm_hw_pause,  .rewindable = snd_pcm_hw_rewindable,    .rewind = snd_pcm_hw_rewind,    .forwardable = snd_pcm_hw_forwardable,  .forward = snd_pcm_hw_forward,  .resume = snd_pcm_hw_resume,    .link = snd_pcm_hw_link,    .link_slaves = snd_pcm_hw_link_slaves,  .unlink = snd_pcm_hw_unlink,    .writei = snd_pcm_hw_writei,    .writen = snd_pcm_hw_writen,    .readi = snd_pcm_hw_readi,  .readn = snd_pcm_hw_readn,  .avail_update = snd_pcm_hw_avail_update,    .mmap_commit = snd_pcm_hw_mmap_commit,  .htimestamp = snd_pcm_hw_htimestamp,    .poll_descriptors = snd_pcm_hw_poll_descriptors,    .poll_descriptors_count = snd_pcm_hw_poll_descriptors_count,    .poll_revents = snd_pcm_hw_poll_revents, };
static const snd_pcm_ops_t snd_pcm_iec958_ops = {    .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_iec958_hw_refine,  .hw_params = snd_pcm_iec958_hw_params,  .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_iec958_dump,    .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_ops_t snd_pcm_ladspa_ops = {    .close = snd_pcm_ladspa_close,  .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_ladspa_hw_refine,  .hw_params = snd_pcm_ladspa_hw_params,  .hw_free = snd_pcm_ladspa_hw_free,  .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_ladspa_dump,    .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_ops_t snd_pcm_lfloat_ops = {    .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_lfloat_hw_refine,  .hw_params = snd_pcm_lfloat_hw_params,  .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_lfloat_dump,    .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_ops_t snd_pcm_linear_ops = {    .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_linear_hw_refine,  .hw_params = snd_pcm_linear_hw_params,  .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_linear_dump,    .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const int linear_formats[4][2][2] = {   { { SNDRV_PCM_FORMAT_S8, SNDRV_PCM_FORMAT_S8 },       { SNDRV_PCM_FORMAT_U8, SNDRV_PCM_FORMAT_U8 } },   { { SNDRV_PCM_FORMAT_S16_LE, SNDRV_PCM_FORMAT_S16_BE },       { SNDRV_PCM_FORMAT_U16_LE, SNDRV_PCM_FORMAT_U16_BE } },   { { SNDRV_PCM_FORMAT_S24_LE, SNDRV_PCM_FORMAT_S24_BE },       { SNDRV_PCM_FORMAT_U24_LE, SNDRV_PCM_FORMAT_U24_BE } },   { { SNDRV_PCM_FORMAT_S32_LE, SNDRV_PCM_FORMAT_S32_BE },       { SNDRV_PCM_FORMAT_U32_LE, SNDRV_PCM_FORMAT_U32_BE } } };
static const int linear24_formats[3][2][2] = {     { { SNDRV_PCM_FORMAT_S24_3LE, SNDRV_PCM_FORMAT_S24_3BE },     { SNDRV_PCM_FORMAT_U24_3LE, SNDRV_PCM_FORMAT_U24_3BE } },     { { SNDRV_PCM_FORMAT_S20_3LE, SNDRV_PCM_FORMAT_S20_3BE },     { SNDRV_PCM_FORMAT_U20_3LE, SNDRV_PCM_FORMAT_U20_3BE } },     { { SNDRV_PCM_FORMAT_S18_3LE, SNDRV_PCM_FORMAT_S18_3BE },     { SNDRV_PCM_FORMAT_U18_3LE, SNDRV_PCM_FORMAT_U18_3BE } }, };
static const snd_pcm_ops_t snd_pcm_mmap_emul_ops = {     .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_mmap_emul_hw_refine,   .hw_params = snd_pcm_mmap_emul_hw_params,   .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_mmap_emul_sw_params,   .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_mmap_emul_dump,     .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_mmap_emul_fast_ops;
static const snd_pcm_ops_t snd_pcm_mulaw_ops = {  .close = snd_pcm_generic_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_mulaw_hw_refine,   .hw_params = snd_pcm_mulaw_hw_params,   .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_mulaw_dump,     .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_ops_t snd_pcm_multi_ops = {  .close = snd_pcm_multi_close,   .info = snd_pcm_multi_info,     .hw_refine = snd_pcm_multi_hw_refine,   .hw_params = snd_pcm_multi_hw_params,   .hw_free = snd_pcm_multi_hw_free,   .sw_params = snd_pcm_multi_sw_params,   .channel_info = snd_pcm_multi_channel_info,     .dump = snd_pcm_multi_dump,     .nonblock = snd_pcm_multi_nonblock,     .async = snd_pcm_multi_async,   .mmap = snd_pcm_multi_mmap,     .munmap = snd_pcm_multi_munmap,     .query_chmaps = snd_pcm_multi_query_chmaps,     .get_chmap = snd_pcm_multi_get_chmap,   .set_chmap = snd_pcm_multi_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_multi_fast_ops;
static const snd_pcm_ops_t snd_pcm_null_ops = {    .close = snd_pcm_null_close,    .info = snd_pcm_null_info,  .hw_refine = snd_pcm_null_hw_refine,    .hw_params = snd_pcm_null_hw_params,    .hw_free = snd_pcm_null_hw_free,    .sw_params = snd_pcm_null_sw_params,    .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_null_dump,  .nonblock = snd_pcm_null_nonblock,  .async = snd_pcm_null_async,    .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_null_query_chmaps,  .get_chmap = snd_pcm_null_get_chmap,    .set_chmap = NULL, };
static const snd_pcm_fast_ops_t snd_pcm_null_fast_ops = {  .status = snd_pcm_null_status,  .state = snd_pcm_null_state,    .hwsync = snd_pcm_null_hwsync,  .delay = snd_pcm_null_delay,    .prepare = snd_pcm_null_prepare,    .reset = snd_pcm_null_reset,    .start = snd_pcm_null_start,    .drop = snd_pcm_null_drop,  .drain = snd_pcm_null_drain,    .pause = snd_pcm_null_pause,    .rewindable = snd_pcm_null_rewindable,  .rewind = snd_pcm_null_rewind,  .forwardable = snd_pcm_null_forwardable,    .forward = snd_pcm_null_forward,    .resume = snd_pcm_null_resume,  .writei = snd_pcm_null_writei,  .writen = snd_pcm_null_writen,  .readi = snd_pcm_null_readi,    .readn = snd_pcm_null_readn,    .avail_update = snd_pcm_null_avail_update,  .mmap_commit = snd_pcm_null_mmap_commit,    .htimestamp = snd_pcm_generic_real_htimestamp, };
static const snd_pcm_format_t linear_preferred_formats[];
static const char linear_format_widths[32] = {     0, 0, 0, 0, 0, 0, 0, 1,     0, 0, 0, 0, 0, 0, 0, 1,     0, 1, 0, 1, 0, 0, 0, 1,     0, 0, 0, 0, 0, 0, 0, 1, };
static const snd_pcm_ops_t snd_pcm_plug_ops = {    .close = snd_pcm_plug_close,    .info = snd_pcm_plug_info,  .hw_refine = snd_pcm_plug_hw_refine,    .hw_params = snd_pcm_plug_hw_params,    .hw_free = snd_pcm_plug_hw_free,    .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_plug_dump,  .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_pcm_fast_ops_t snd_pcm_rate_fast_ops = {  .status = snd_pcm_rate_status,  .state = snd_pcm_rate_state,    .hwsync = snd_pcm_rate_hwsync,  .delay = snd_pcm_rate_delay,    .prepare = snd_pcm_rate_prepare,    .reset = snd_pcm_rate_reset,    .start = snd_pcm_rate_start,    .drop = snd_pcm_generic_drop,   .drain = snd_pcm_rate_drain,    .pause = snd_pcm_generic_pause,     .rewindable = snd_pcm_rate_rewindable,  .rewind = snd_pcm_rate_rewind,  .forwardable = snd_pcm_rate_forwardable,    .forward = snd_pcm_rate_forward,    .resume = snd_pcm_generic_resume,   .writei = snd_pcm_mmap_writei,     .writen = snd_pcm_mmap_writen,     .readi = snd_pcm_mmap_readi,   .readn = snd_pcm_mmap_readn,   .avail_update = snd_pcm_rate_avail_update,  .mmap_commit = snd_pcm_rate_mmap_commit,    .htimestamp = snd_pcm_rate_htimestamp,  .poll_descriptors_count = snd_pcm_generic_poll_descriptors_count,   .poll_descriptors = snd_pcm_generic_poll_descriptors,   .poll_revents = snd_pcm_rate_poll_revents,  .may_wait_for_avail_min = snd_pcm_generic_may_wait_for_avail_min, };
static const snd_pcm_ops_t snd_pcm_rate_ops = {    .close = snd_pcm_rate_close,    .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_rate_hw_refine,    .hw_params = snd_pcm_rate_hw_params,    .hw_free = snd_pcm_rate_hw_free,    .sw_params = snd_pcm_rate_sw_params,    .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_rate_dump,  .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const char*const default_rate_plugins[] = {     "speexrate", "linear", NULL };
static const snd_pcm_ops_t snd_pcm_route_ops = {  .close = snd_pcm_route_close,   .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_route_hw_refine,   .hw_params = snd_pcm_route_hw_params,   .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_route_dump,     .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_route_query_chmaps,     .get_chmap = snd_pcm_route_get_chmap,   .set_chmap = NULL,  };
static const snd_pcm_ops_t snd_pcm_share_ops = {  .close = snd_pcm_share_close,   .info = snd_pcm_share_info,     .hw_refine = snd_pcm_share_hw_refine,   .hw_params = snd_pcm_share_hw_params,   .hw_free = snd_pcm_share_hw_free,   .sw_params = snd_pcm_share_sw_params,   .channel_info = snd_pcm_share_channel_info,     .dump = snd_pcm_share_dump,     .nonblock = snd_pcm_share_nonblock,     .async = snd_pcm_share_async,   .mmap = snd_pcm_share_mmap,     .munmap = snd_pcm_share_munmap, };
static const snd_pcm_fast_ops_t snd_pcm_share_fast_ops = {    .status = snd_pcm_share_status,     .state = snd_pcm_share_state,   .hwsync = snd_pcm_share_hwsync,     .delay = snd_pcm_share_delay,   .prepare = snd_pcm_share_prepare,   .reset = snd_pcm_share_reset,   .start = snd_pcm_share_start,   .drop = snd_pcm_share_drop,     .drain = snd_pcm_share_drain,   .pause = snd_pcm_share_pause,   .writei = snd_pcm_mmap_writei,     .writen = snd_pcm_mmap_writen,     .readi = snd_pcm_mmap_readi,   .readn = snd_pcm_mmap_readn,   .rewindable = snd_pcm_share_rewindable,     .rewind = snd_pcm_share_rewind,     .forwardable = snd_pcm_share_forwardable,   .forward = snd_pcm_share_forward,   .resume = snd_pcm_share_resume,     .avail_update = snd_pcm_share_avail_update,     .htimestamp = snd_pcm_share_htimestamp,     .mmap_commit = snd_pcm_share_mmap_commit, };
static const snd_pcm_ops_t snd_pcm_shm_ops = {  .close = snd_pcm_shm_close,     .info = snd_pcm_shm_info,   .hw_refine = snd_pcm_shm_hw_refine,     .hw_params = snd_pcm_shm_hw_params,     .hw_free = snd_pcm_shm_hw_free,     .sw_params = snd_pcm_shm_sw_params,     .channel_info = snd_pcm_shm_channel_info,   .dump = snd_pcm_shm_dump,   .nonblock = snd_pcm_shm_nonblock,   .async = snd_pcm_shm_async,     .mmap = snd_pcm_shm_mmap,   .munmap = snd_pcm_shm_munmap, };
static const snd_pcm_fast_ops_t snd_pcm_shm_fast_ops = {    .status = snd_pcm_shm_status,   .state = snd_pcm_shm_state,     .hwsync = snd_pcm_shm_hwsync,   .delay = snd_pcm_shm_delay,     .prepare = snd_pcm_shm_prepare,     .reset = snd_pcm_shm_reset,     .start = snd_pcm_shm_start,     .drop = snd_pcm_shm_drop,   .drain = snd_pcm_shm_drain,     .pause = snd_pcm_shm_pause,     .rewindable = snd_pcm_shm_rewindable,   .rewind = snd_pcm_shm_rewind,   .forwardable = snd_pcm_shm_forwardable,     .forward = snd_pcm_shm_forward,     .resume = snd_pcm_shm_resume,   .writei = snd_pcm_mmap_writei,     .writen = snd_pcm_mmap_writen,     .readi = snd_pcm_mmap_readi,   .readn = snd_pcm_mmap_readn,   .avail_update = snd_pcm_shm_avail_update,   .mmap_commit = snd_pcm_shm_mmap_commit,     .htimestamp = snd_pcm_shm_htimestamp, };
static const snd_pcm_ops_t snd_pcm_softvol_ops = {  .close = snd_pcm_softvol_close,     .info = snd_pcm_generic_info,   .hw_refine = snd_pcm_softvol_hw_refine,     .hw_params = snd_pcm_softvol_hw_params,     .hw_free = snd_pcm_generic_hw_free,     .sw_params = snd_pcm_generic_sw_params,     .channel_info = snd_pcm_generic_channel_info,   .dump = snd_pcm_softvol_dump,   .nonblock = snd_pcm_generic_nonblock,   .async = snd_pcm_generic_async,     .mmap = snd_pcm_generic_mmap,   .munmap = snd_pcm_generic_munmap,   .query_chmaps = snd_pcm_generic_query_chmaps,   .get_chmap = snd_pcm_generic_get_chmap,     .set_chmap = snd_pcm_generic_set_chmap, };
static const snd_rawmidi_ops_t snd_rawmidi_hw_ops = {    .close = snd_rawmidi_hw_close,  .nonblock = snd_rawmidi_hw_nonblock,    .info = snd_rawmidi_hw_info,    .params = snd_rawmidi_hw_params,    .status = snd_rawmidi_hw_status,    .drop = snd_rawmidi_hw_drop,    .drain = snd_rawmidi_hw_drain,  .write = snd_rawmidi_hw_write,  .read = snd_rawmidi_hw_read, };
static const snd_rawmidi_ops_t snd_rawmidi_virtual_ops = {     .close = snd_rawmidi_virtual_close,     .nonblock = snd_rawmidi_virtual_nonblock,   .info = snd_rawmidi_virtual_info,   .params = snd_rawmidi_virtual_params,   .status = snd_rawmidi_virtual_status,   .drop = snd_rawmidi_virtual_drop,   .drain = snd_rawmidi_virtual_drain,     .write = snd_rawmidi_virtual_write,     .read = snd_rawmidi_virtual_read, };
static const snd_seq_ops_t snd_seq_hw_ops;
static const snd_timer_ops_t snd_timer_hw_ops = {  .close = snd_timer_hw_close,    .nonblock = snd_timer_hw_nonblock,  .async = snd_timer_hw_async,    .info = snd_timer_hw_info,  .params = snd_timer_hw_params,  .status = snd_timer_hw_status,  .rt_start = snd_timer_hw_start,     .rt_stop = snd_timer_hw_stop,   .rt_continue = snd_timer_hw_continue,   .read = snd_timer_hw_read, };
static const snd_timer_query_ops_t snd_timer_query_hw_ops = {   .close = snd_timer_query_hw_close,  .next_device = snd_timer_query_hw_next_device,  .info = snd_timer_query_hw_info,    .params = snd_timer_query_hw_params,    .status = snd_timer_query_hw_status };
static const struct map_elem channel_map[];
static const struct ctl_access_elem ctl_access[] = {   {"read", SNDRV_CTL_ELEM_ACCESS_READ},   {"write", SNDRV_CTL_ELEM_ACCESS_WRITE},     {"read_write", SNDRV_CTL_ELEM_ACCESS_READWRITE},    {"volatile", SNDRV_CTL_ELEM_ACCESS_VOLATILE},   {"timestamp", SNDRV_CTL_ELEM_ACCESS_TIMESTAMP},     {"tlv_read", SNDRV_CTL_ELEM_ACCESS_TLV_READ},   {"tlv_write", SNDRV_CTL_ELEM_ACCESS_TLV_WRITE},     {"tlv_read_write", SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE},    {"tlv_command", SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND},     {"inactive", SNDRV_CTL_ELEM_ACCESS_INACTIVE},   {"lock", SNDRV_CTL_ELEM_ACCESS_LOCK},   {"owner", SNDRV_CTL_ELEM_ACCESS_OWNER},     {"tlv_callback", SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK}, };
static const struct map_elem widget_map[] = {   {"input", SND_SOC_TPLG_DAPM_INPUT},     {"output", SND_SOC_TPLG_DAPM_OUTPUT},   {"mux", SND_SOC_TPLG_DAPM_MUX},     {"mixer", SND_SOC_TPLG_DAPM_MIXER},     {"pga", SND_SOC_TPLG_DAPM_PGA},     {"out_drv", SND_SOC_TPLG_DAPM_OUT_DRV},     {"adc", SND_SOC_TPLG_DAPM_ADC},     {"dac", SND_SOC_TPLG_DAPM_DAC},     {"switch", SND_SOC_TPLG_DAPM_SWITCH},   {"pre", SND_SOC_TPLG_DAPM_PRE},     {"post", SND_SOC_TPLG_DAPM_POST},   {"aif_in", SND_SOC_TPLG_DAPM_AIF_IN},   {"aif_out", SND_SOC_TPLG_DAPM_AIF_OUT},     {"dai_in", SND_SOC_TPLG_DAPM_DAI_IN},   {"dai_out", SND_SOC_TPLG_DAPM_DAI_OUT},     {"dai_link", SND_SOC_TPLG_DAPM_DAI_LINK}, };
static const struct map_elem widget_control_map[] = {   {"volsw", SND_SOC_TPLG_DAPM_CTL_VOLSW},     {"enum_double", SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE},     {"enum_virt", SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT},     {"enum_value", SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE}, };
static const struct map_elem control_map[] = {   {"volsw", SND_SOC_TPLG_CTL_VOLSW},  {"volsw_sx", SND_SOC_TPLG_CTL_VOLSW_SX},    {"volsw_xr_sx", SND_SOC_TPLG_CTL_VOLSW_XR_SX},  {"enum", SND_SOC_TPLG_CTL_ENUM},    {"bytes", SND_SOC_TPLG_CTL_BYTES},  {"enum_value", SND_SOC_TPLG_CTL_ENUM_VALUE},    {"range", SND_SOC_TPLG_CTL_RANGE},  {"strobe", SND_SOC_TPLG_CTL_STROBE}, };
static const char*const component_dir[] = {  "codecs",       "dsps",         NULL,        };

// global functions

int
snd_config_top(snd_config_t** config);

int
snd_config_load(
    snd_config_t* config,
    snd_input_t* in
);

int
snd_config_load_override(
    snd_config_t* config,
    snd_input_t* in
);

int
snd_config_save(
    snd_config_t* config,
    snd_output_t* out
);

int
snd_config_update(void);

int
snd_config_update_r(
    snd_config_t** top,
    snd_config_update_t** update,
    const char* path
);

int
snd_config_update_free(snd_config_update_t* update);

int
snd_config_update_free_global(void);

int
snd_config_update_ref(snd_config_t** top);

void
snd_config_ref(snd_config_t* top);

void
snd_config_unref(snd_config_t* top);

int
snd_config_search(
    snd_config_t* config,
    const char* key,
    snd_config_t** result
);

int
snd_config_searchv(
    snd_config_t* config,
    snd_config_t** result,
    ...
);

int
snd_config_search_definition(
    snd_config_t* config,
    const char* base,
    const char* key,
    snd_config_t** result
);

int
snd_config_expand(
    snd_config_t* config,
    snd_config_t* root,
    const char* args,
    snd_config_t* private_data,
    snd_config_t** result
);

int
snd_config_evaluate(
    snd_config_t* config,
    snd_config_t* root,
    snd_config_t* private_data,
    snd_config_t** result
);

int
snd_config_add(
    snd_config_t* config,
    snd_config_t* leaf
);

int
snd_config_delete(snd_config_t* config);

int
snd_config_delete_compound_members(const snd_config_t* config);

int
snd_config_copy(
    snd_config_t** dst,
    snd_config_t* src
);

int
snd_config_make(
    snd_config_t** config,
    const char* key,
    snd_config_type_t type
);

int
snd_config_make_integer(
    snd_config_t** config,
    const char* key
);

int
snd_config_make_integer64(
    snd_config_t** config,
    const char* key
);

int
snd_config_make_real(
    snd_config_t** config,
    const char* key
);

int
snd_config_make_string(
    snd_config_t** config,
    const char* key
);

int
snd_config_make_pointer(
    snd_config_t** config,
    const char* key
);

int
snd_config_make_compound(
    snd_config_t** config,
    const char* key,
    int join
);

int
snd_config_imake_integer(
    snd_config_t** config,
    const char* key,
    const long value
);

int
snd_config_imake_integer64(
    snd_config_t** config,
    const char* key,
    const long long value
);

int
snd_config_imake_real(
    snd_config_t** config,
    const char* key,
    const double value
);

int
snd_config_imake_string(
    snd_config_t** config,
    const char* key,
    const char* ascii
);

int
snd_config_imake_pointer(
    snd_config_t** config,
    const char* key,
    const void* ptr
);

snd_config_type_t
snd_config_get_type(const snd_config_t* config);

int
snd_config_set_id(
    snd_config_t* config,
    const char* id
);

int
snd_config_set_integer(
    snd_config_t* config,
    long value
);

int
snd_config_set_integer64(
    snd_config_t* config,
    long long value
);

int
snd_config_set_real(
    snd_config_t* config,
    double value
);

int
snd_config_set_string(
    snd_config_t* config,
    const char* value
);

int
snd_config_set_ascii(
    snd_config_t* config,
    const char* ascii
);

int
snd_config_set_pointer(
    snd_config_t* config,
    const void* ptr
);

int
snd_config_get_id(
    const snd_config_t* config,
    const char** value
);

int
snd_config_get_integer(
    const snd_config_t* config,
    long* value
);

int
snd_config_get_integer64(
    const snd_config_t* config,
    long long* value
);

int
snd_config_get_real(
    const snd_config_t* config,
    double* value
);

int
snd_config_get_ireal(
    const snd_config_t* config,
    double* value
);

int
snd_config_get_string(
    const snd_config_t* config,
    const char** value
);

int
snd_config_get_ascii(
    const snd_config_t* config,
    char** value
);

int
snd_config_get_pointer(
    const snd_config_t* config,
    const void** value
);

int
snd_config_test_id(
    const snd_config_t* config,
    const char* id
);

snd_config_iterator_t
snd_config_iterator_first(const snd_config_t* node);

snd_config_iterator_t
snd_config_iterator_next(const snd_config_iterator_t iterator);

snd_config_iterator_t
snd_config_iterator_end(const snd_config_t* node);

snd_config_t*
snd_config_iterator_entry(const snd_config_iterator_t iterator);

int
snd_config_get_bool_ascii(const char* ascii);

int
snd_config_get_bool(const snd_config_t* conf);

int
snd_config_get_ctl_iface_ascii(const char* ascii);

int
snd_config_get_ctl_iface(const snd_config_t* conf);

int
snd_names_list(
    const char* iface,
    snd_devname_t** list
);

void
snd_names_list_free(snd_devname_t* list);

int
snd_card_load(int card);

int
snd_card_next(int* card);

int
snd_card_get_index(const char* name);

int
snd_card_get_name(
    int card,
    char** name
);

int
snd_card_get_longname(
    int card,
    char** name
);

int
snd_device_name_hint(
    int card,
    const char* iface,
    void*** hints
);

int
snd_device_name_free_hint(void** hints);

char*
snd_device_name_get_hint(
    const void* hint,
    const char* id
);

int
snd_ctl_open(
    snd_ctl_t** ctl,
    const char* name,
    int mode
);

int
snd_ctl_open_lconf(
    snd_ctl_t** ctl,
    const char* name,
    int mode,
    snd_config_t* lconf
);

int
snd_ctl_open_fallback(
    snd_ctl_t** ctl,
    snd_config_t* root,
    const char* name,
    const char* orig_name,
    int mode
);

int
snd_ctl_close(snd_ctl_t* ctl);

int
snd_ctl_nonblock(
    snd_ctl_t* ctl,
    int nonblock
);

static
__inline__ int
snd_ctl_abort(snd_ctl_t* ctl);

int
snd_async_add_ctl_handler(
    snd_async_handler_t** handler,
    snd_ctl_t* ctl,
    snd_async_callback_t callback,
    void* private_data
);

snd_ctl_t*
snd_async_handler_get_ctl(snd_async_handler_t* handler);

int
snd_ctl_poll_descriptors_count(snd_ctl_t* ctl);

int
snd_ctl_poll_descriptors(
    snd_ctl_t* ctl,
    struct pollfd* pfds,
    unsigned int space
);

int
snd_ctl_poll_descriptors_revents(
    snd_ctl_t* ctl,
    struct pollfd* pfds,
    unsigned int nfds,
    unsigned short* revents
);

int
snd_ctl_subscribe_events(
    snd_ctl_t* ctl,
    int subscribe
);

int
snd_ctl_card_info(
    snd_ctl_t* ctl,
    snd_ctl_card_info_t* info
);

int
snd_ctl_elem_list(
    snd_ctl_t* ctl,
    snd_ctl_elem_list_t* list
);

int
snd_ctl_elem_info(
    snd_ctl_t* ctl,
    snd_ctl_elem_info_t* info
);

int
snd_ctl_elem_read(
    snd_ctl_t* ctl,
    snd_ctl_elem_value_t* data
);

int
snd_ctl_elem_write(
    snd_ctl_t* ctl,
    snd_ctl_elem_value_t* data
);

int
snd_ctl_elem_lock(
    snd_ctl_t* ctl,
    snd_ctl_elem_id_t* id
);

int
snd_ctl_elem_unlock(
    snd_ctl_t* ctl,
    snd_ctl_elem_id_t* id
);

int
snd_ctl_elem_tlv_read(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    unsigned int* tlv,
    unsigned int tlv_size
);

int
snd_ctl_elem_tlv_write(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    const unsigned int* tlv
);

int
snd_ctl_elem_tlv_command(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    const unsigned int* tlv
);

int
snd_ctl_set_power_state(
    snd_ctl_t* ctl,
    unsigned int state
);

int
snd_ctl_get_power_state(
    snd_ctl_t* ctl,
    unsigned int* state
);

int
snd_ctl_read(
    snd_ctl_t* ctl,
    snd_ctl_event_t* event
);

int
snd_ctl_wait(
    snd_ctl_t* ctl,
    int timeout
);

const char*
snd_ctl_name(snd_ctl_t* ctl);

snd_ctl_type_t
snd_ctl_type(snd_ctl_t* ctl);

const char*
snd_ctl_elem_type_name(snd_ctl_elem_type_t type);

const char*
snd_ctl_elem_iface_name(snd_ctl_elem_iface_t iface);

const char*
snd_ctl_event_type_name(snd_ctl_event_type_t type);

unsigned int
snd_ctl_event_elem_get_mask(const snd_ctl_event_t* obj);

unsigned int
snd_ctl_event_elem_get_numid(const snd_ctl_event_t* obj);

void
snd_ctl_event_elem_get_id(
    const snd_ctl_event_t* obj,
    snd_ctl_elem_id_t* ptr
);

snd_ctl_elem_iface_t
snd_ctl_event_elem_get_interface(const snd_ctl_event_t* obj);

unsigned int
snd_ctl_event_elem_get_device(const snd_ctl_event_t* obj);

unsigned int
snd_ctl_event_elem_get_subdevice(const snd_ctl_event_t* obj);

const char*
snd_ctl_event_elem_get_name(const snd_ctl_event_t* obj);

unsigned int
snd_ctl_event_elem_get_index(const snd_ctl_event_t* obj);

int
snd_ctl_elem_list_alloc_space(
    snd_ctl_elem_list_t* obj,
    unsigned int entries
);

void
snd_ctl_elem_list_free_space(snd_ctl_elem_list_t* obj);

char*
snd_ctl_ascii_elem_id_get(snd_ctl_elem_id_t* id);

int
snd_ctl_ascii_elem_id_parse(
    snd_ctl_elem_id_t* dst,
    const char* str
);

int
snd_ctl_ascii_value_parse(
    snd_ctl_t* handle,
    snd_ctl_elem_value_t* dst,
    snd_ctl_elem_info_t* info,
    const char* value
);

size_t
snd_ctl_elem_id_sizeof(void);

int
snd_ctl_elem_id_malloc(snd_ctl_elem_id_t** ptr);

void
snd_ctl_elem_id_free(snd_ctl_elem_id_t* obj);

void
snd_ctl_elem_id_clear(snd_ctl_elem_id_t* obj);

void
snd_ctl_elem_id_copy(
    snd_ctl_elem_id_t* dst,
    const snd_ctl_elem_id_t* src
);

unsigned int
snd_ctl_elem_id_get_numid(const snd_ctl_elem_id_t* obj);

snd_ctl_elem_iface_t
snd_ctl_elem_id_get_interface(const snd_ctl_elem_id_t* obj);

unsigned int
snd_ctl_elem_id_get_device(const snd_ctl_elem_id_t* obj);

unsigned int
snd_ctl_elem_id_get_subdevice(const snd_ctl_elem_id_t* obj);

const char*
snd_ctl_elem_id_get_name(const snd_ctl_elem_id_t* obj);

unsigned int
snd_ctl_elem_id_get_index(const snd_ctl_elem_id_t* obj);

void
snd_ctl_elem_id_set_numid(
    snd_ctl_elem_id_t* obj,
    unsigned int val
);

void
snd_ctl_elem_id_set_interface(
    snd_ctl_elem_id_t* obj,
    snd_ctl_elem_iface_t val
);

void
snd_ctl_elem_id_set_device(
    snd_ctl_elem_id_t* obj,
    unsigned int val
);

void
snd_ctl_elem_id_set_subdevice(
    snd_ctl_elem_id_t* obj,
    unsigned int val
);

void
snd_ctl_elem_id_set_name(
    snd_ctl_elem_id_t* obj,
    const char* val
);

void
snd_ctl_elem_id_set_index(
    snd_ctl_elem_id_t* obj,
    unsigned int val
);

size_t
snd_ctl_card_info_sizeof(void);

int
snd_ctl_card_info_malloc(snd_ctl_card_info_t** ptr);

void
snd_ctl_card_info_free(snd_ctl_card_info_t* obj);

void
snd_ctl_card_info_clear(snd_ctl_card_info_t* obj);

void
snd_ctl_card_info_copy(
    snd_ctl_card_info_t* dst,
    const snd_ctl_card_info_t* src
);

int
snd_ctl_card_info_get_card(const snd_ctl_card_info_t* obj);

const char*
snd_ctl_card_info_get_id(const snd_ctl_card_info_t* obj);

const char*
snd_ctl_card_info_get_driver(const snd_ctl_card_info_t* obj);

const char*
snd_ctl_card_info_get_name(const snd_ctl_card_info_t* obj);

const char*
snd_ctl_card_info_get_longname(const snd_ctl_card_info_t* obj);

const char*
snd_ctl_card_info_get_mixername(const snd_ctl_card_info_t* obj);

const char*
snd_ctl_card_info_get_components(const snd_ctl_card_info_t* obj);

size_t
snd_ctl_event_sizeof(void);

int
snd_ctl_event_malloc(snd_ctl_event_t** ptr);

void
snd_ctl_event_free(snd_ctl_event_t* obj);

void
snd_ctl_event_clear(snd_ctl_event_t* obj);

void
snd_ctl_event_copy(
    snd_ctl_event_t* dst,
    const snd_ctl_event_t* src
);

snd_ctl_event_type_t
snd_ctl_event_get_type(const snd_ctl_event_t* obj);

size_t
snd_ctl_elem_list_sizeof(void);

int
snd_ctl_elem_list_malloc(snd_ctl_elem_list_t** ptr);

void
snd_ctl_elem_list_free(snd_ctl_elem_list_t* obj);

void
snd_ctl_elem_list_clear(snd_ctl_elem_list_t* obj);

void
snd_ctl_elem_list_copy(
    snd_ctl_elem_list_t* dst,
    const snd_ctl_elem_list_t* src
);

void
snd_ctl_elem_list_set_offset(
    snd_ctl_elem_list_t* obj,
    unsigned int val
);

unsigned int
snd_ctl_elem_list_get_used(const snd_ctl_elem_list_t* obj);

unsigned int
snd_ctl_elem_list_get_count(const snd_ctl_elem_list_t* obj);

void
snd_ctl_elem_list_get_id(
    const snd_ctl_elem_list_t* obj,
    unsigned int idx,
    snd_ctl_elem_id_t* ptr
);

unsigned int
snd_ctl_elem_list_get_numid(
    const snd_ctl_elem_list_t* obj,
    unsigned int idx
);

snd_ctl_elem_iface_t
snd_ctl_elem_list_get_interface(
    const snd_ctl_elem_list_t* obj,
    unsigned int idx
);

unsigned int
snd_ctl_elem_list_get_device(
    const snd_ctl_elem_list_t* obj,
    unsigned int idx
);

unsigned int
snd_ctl_elem_list_get_subdevice(
    const snd_ctl_elem_list_t* obj,
    unsigned int idx
);

const char*
snd_ctl_elem_list_get_name(
    const snd_ctl_elem_list_t* obj,
    unsigned int idx
);

unsigned int
snd_ctl_elem_list_get_index(
    const snd_ctl_elem_list_t* obj,
    unsigned int idx
);

size_t
snd_ctl_elem_info_sizeof(void);

int
snd_ctl_elem_info_malloc(snd_ctl_elem_info_t** ptr);

void
snd_ctl_elem_info_free(snd_ctl_elem_info_t* obj);

void
snd_ctl_elem_info_clear(snd_ctl_elem_info_t* obj);

void
snd_ctl_elem_info_copy(
    snd_ctl_elem_info_t* dst,
    const snd_ctl_elem_info_t* src
);

snd_ctl_elem_type_t
snd_ctl_elem_info_get_type(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_readable(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_writable(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_volatile(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_inactive(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_locked(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_tlv_readable(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_tlv_writable(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_tlv_commandable(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_owner(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_is_user(const snd_ctl_elem_info_t* obj);

pid_t
snd_ctl_elem_info_get_owner(const snd_ctl_elem_info_t* obj);

unsigned int
snd_ctl_elem_info_get_count(const snd_ctl_elem_info_t* obj);

long
snd_ctl_elem_info_get_min(const snd_ctl_elem_info_t* obj);

long
snd_ctl_elem_info_get_max(const snd_ctl_elem_info_t* obj);

long
snd_ctl_elem_info_get_step(const snd_ctl_elem_info_t* obj);

long long
snd_ctl_elem_info_get_min64(const snd_ctl_elem_info_t* obj);

long long
snd_ctl_elem_info_get_max64(const snd_ctl_elem_info_t* obj);

long long
snd_ctl_elem_info_get_step64(const snd_ctl_elem_info_t* obj);

unsigned int
snd_ctl_elem_info_get_items(const snd_ctl_elem_info_t* obj);

void
snd_ctl_elem_info_set_item(
    snd_ctl_elem_info_t* obj,
    unsigned int val
);

const char*
snd_ctl_elem_info_get_item_name(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_get_dimensions(const snd_ctl_elem_info_t* obj);

int
snd_ctl_elem_info_get_dimension(
    const snd_ctl_elem_info_t* obj,
    unsigned int idx
);

int
snd_ctl_elem_info_set_dimension(
    snd_ctl_elem_info_t* info,
    const int dimension[4]
);

void
snd_ctl_elem_info_get_id(
    const snd_ctl_elem_info_t* obj,
    snd_ctl_elem_id_t* ptr
);

unsigned int
snd_ctl_elem_info_get_numid(const snd_ctl_elem_info_t* obj);

snd_ctl_elem_iface_t
snd_ctl_elem_info_get_interface(const snd_ctl_elem_info_t* obj);

unsigned int
snd_ctl_elem_info_get_device(const snd_ctl_elem_info_t* obj);

unsigned int
snd_ctl_elem_info_get_subdevice(const snd_ctl_elem_info_t* obj);

const char*
snd_ctl_elem_info_get_name(const snd_ctl_elem_info_t* obj);

unsigned int
snd_ctl_elem_info_get_index(const snd_ctl_elem_info_t* obj);

void
snd_ctl_elem_info_set_id(
    snd_ctl_elem_info_t* obj,
    const snd_ctl_elem_id_t* ptr
);

void
snd_ctl_elem_info_set_numid(
    snd_ctl_elem_info_t* obj,
    unsigned int val
);

void
snd_ctl_elem_info_set_interface(
    snd_ctl_elem_info_t* obj,
    snd_ctl_elem_iface_t val
);

void
snd_ctl_elem_info_set_device(
    snd_ctl_elem_info_t* obj,
    unsigned int val
);

void
snd_ctl_elem_info_set_subdevice(
    snd_ctl_elem_info_t* obj,
    unsigned int val
);

void
snd_ctl_elem_info_set_name(
    snd_ctl_elem_info_t* obj,
    const char* val
);

void
snd_ctl_elem_info_set_index(
    snd_ctl_elem_info_t* obj,
    unsigned int val
);

int
snd_ctl_add_integer_elem_set(
    snd_ctl_t* ctl,
    snd_ctl_elem_info_t* info,
    unsigned int element_count,
    unsigned int member_count,
    long min,
    long max,
    long step
);

int
snd_ctl_add_integer64_elem_set(
    snd_ctl_t* ctl,
    snd_ctl_elem_info_t* info,
    unsigned int element_count,
    unsigned int member_count,
    long long min,
    long long max,
    long long step
);

int
snd_ctl_add_boolean_elem_set(
    snd_ctl_t* ctl,
    snd_ctl_elem_info_t* info,
    unsigned int element_count,
    unsigned int member_count
);

int
snd_ctl_add_enumerated_elem_set(
    snd_ctl_t* ctl,
    snd_ctl_elem_info_t* info,
    unsigned int element_count,
    unsigned int member_count,
    unsigned int items,
    const char*const labels[]
);

int
snd_ctl_add_bytes_elem_set(
    snd_ctl_t* ctl,
    snd_ctl_elem_info_t* info,
    unsigned int element_count,
    unsigned int member_count
);

int
snd_ctl_elem_add_integer(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    unsigned int count,
    long imin,
    long imax,
    long istep
);

int
snd_ctl_elem_add_integer64(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    unsigned int count,
    long long imin,
    long long imax,
    long long istep
);

int
snd_ctl_elem_add_boolean(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    unsigned int count
);

int
snd_ctl_elem_add_enumerated(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    unsigned int count,
    unsigned int items,
    const char*const names[]
);

int
snd_ctl_elem_add_iec958(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id
);

int
snd_ctl_elem_remove(
    snd_ctl_t* ctl,
    snd_ctl_elem_id_t* id
);

size_t
snd_ctl_elem_value_sizeof(void);

int
snd_ctl_elem_value_malloc(snd_ctl_elem_value_t** ptr);

void
snd_ctl_elem_value_free(snd_ctl_elem_value_t* obj);

void
snd_ctl_elem_value_clear(snd_ctl_elem_value_t* obj);

void
snd_ctl_elem_value_copy(
    snd_ctl_elem_value_t* dst,
    const snd_ctl_elem_value_t* src
);

int
snd_ctl_elem_value_compare(
    snd_ctl_elem_value_t* left,
    const snd_ctl_elem_value_t* right
);

void
snd_ctl_elem_value_get_id(
    const snd_ctl_elem_value_t* obj,
    snd_ctl_elem_id_t* ptr
);

unsigned int
snd_ctl_elem_value_get_numid(const snd_ctl_elem_value_t* obj);

snd_ctl_elem_iface_t
snd_ctl_elem_value_get_interface(const snd_ctl_elem_value_t* obj);

unsigned int
snd_ctl_elem_value_get_device(const snd_ctl_elem_value_t* obj);

unsigned int
snd_ctl_elem_value_get_subdevice(const snd_ctl_elem_value_t* obj);

const char*
snd_ctl_elem_value_get_name(const snd_ctl_elem_value_t* obj);

unsigned int
snd_ctl_elem_value_get_index(const snd_ctl_elem_value_t* obj);

void
snd_ctl_elem_value_set_id(
    snd_ctl_elem_value_t* obj,
    const snd_ctl_elem_id_t* ptr
);

void
snd_ctl_elem_value_set_numid(
    snd_ctl_elem_value_t* obj,
    unsigned int val
);

void
snd_ctl_elem_value_set_interface(
    snd_ctl_elem_value_t* obj,
    snd_ctl_elem_iface_t val
);

void
snd_ctl_elem_value_set_device(
    snd_ctl_elem_value_t* obj,
    unsigned int val
);

void
snd_ctl_elem_value_set_subdevice(
    snd_ctl_elem_value_t* obj,
    unsigned int val
);

void
snd_ctl_elem_value_set_name(
    snd_ctl_elem_value_t* obj,
    const char* val
);

void
snd_ctl_elem_value_set_index(
    snd_ctl_elem_value_t* obj,
    unsigned int val
);

int
snd_ctl_elem_value_get_boolean(
    const snd_ctl_elem_value_t* obj,
    unsigned int idx
);

long
snd_ctl_elem_value_get_integer(
    const snd_ctl_elem_value_t* obj,
    unsigned int idx
);

long long
snd_ctl_elem_value_get_integer64(
    const snd_ctl_elem_value_t* obj,
    unsigned int idx
);

unsigned int
snd_ctl_elem_value_get_enumerated(
    const snd_ctl_elem_value_t* obj,
    unsigned int idx
);

unsigned char
snd_ctl_elem_value_get_byte(
    const snd_ctl_elem_value_t* obj,
    unsigned int idx
);

void
snd_ctl_elem_value_set_boolean(
    snd_ctl_elem_value_t* obj,
    unsigned int idx,
    long val
);

void
snd_ctl_elem_value_set_integer(
    snd_ctl_elem_value_t* obj,
    unsigned int idx,
    long val
);

void
snd_ctl_elem_value_set_integer64(
    snd_ctl_elem_value_t* obj,
    unsigned int idx,
    long long val
);

void
snd_ctl_elem_value_set_enumerated(
    snd_ctl_elem_value_t* obj,
    unsigned int idx,
    unsigned int val
);

void
snd_ctl_elem_value_set_byte(
    snd_ctl_elem_value_t* obj,
    unsigned int idx,
    unsigned char val
);

void
snd_ctl_elem_set_bytes(
    snd_ctl_elem_value_t* obj,
    void* data,
    size_t size
);

const void*
snd_ctl_elem_value_get_bytes(const snd_ctl_elem_value_t* obj);

void
snd_ctl_elem_value_get_iec958(
    const snd_ctl_elem_value_t* obj,
    snd_aes_iec958_t* ptr
);

void
snd_ctl_elem_value_set_iec958(
    snd_ctl_elem_value_t* obj,
    const snd_aes_iec958_t* ptr
);

int
snd_tlv_parse_dB_info(
    unsigned int* tlv,
    unsigned int tlv_size,
    unsigned int** db_tlvp
);

int
snd_tlv_get_dB_range(
    unsigned int* tlv,
    long rangemin,
    long rangemax,
    long* min,
    long* max
);

int
snd_tlv_convert_to_dB(
    unsigned int* tlv,
    long rangemin,
    long rangemax,
    long volume,
    long* db_gain
);

int
snd_tlv_convert_from_dB(
    unsigned int* tlv,
    long rangemin,
    long rangemax,
    long db_gain,
    long* value,
    int xdir
);

int
snd_ctl_get_dB_range(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    long* min,
    long* max
);

int
snd_ctl_convert_to_dB(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    long volume,
    long* db_gain
);

int
snd_ctl_convert_from_dB(
    snd_ctl_t* ctl,
    const snd_ctl_elem_id_t* id,
    long db_gain,
    long* value,
    int xdir
);

int
snd_hctl_compare_fast(
    const snd_hctl_elem_t* c1,
    const snd_hctl_elem_t* c2
);

int
snd_hctl_open(
    snd_hctl_t** hctl,
    const char* name,
    int mode
);

int
snd_hctl_open_ctl(
    snd_hctl_t** hctlp,
    snd_ctl_t* ctl
);

int
snd_hctl_close(snd_hctl_t* hctl);

int
snd_hctl_nonblock(
    snd_hctl_t* hctl,
    int nonblock
);

static
__inline__ int
snd_hctl_abort(snd_hctl_t* hctl);

int
snd_hctl_poll_descriptors_count(snd_hctl_t* hctl);

int
snd_hctl_poll_descriptors(
    snd_hctl_t* hctl,
    struct pollfd* pfds,
    unsigned int space
);

int
snd_hctl_poll_descriptors_revents(
    snd_hctl_t* ctl,
    struct pollfd* pfds,
    unsigned int nfds,
    unsigned short* revents
);

unsigned int
snd_hctl_get_count(snd_hctl_t* hctl);

int
snd_hctl_set_compare(
    snd_hctl_t* hctl,
    snd_hctl_compare_t hsort
);

snd_hctl_elem_t*
snd_hctl_first_elem(snd_hctl_t* hctl);

snd_hctl_elem_t*
snd_hctl_last_elem(snd_hctl_t* hctl);

snd_hctl_elem_t*
snd_hctl_find_elem(
    snd_hctl_t* hctl,
    const snd_ctl_elem_id_t* id
);

void
snd_hctl_set_callback(
    snd_hctl_t* hctl,
    snd_hctl_callback_t callback
);

void
snd_hctl_set_callback_private(
    snd_hctl_t* hctl,
    void* data
);

void*
snd_hctl_get_callback_private(snd_hctl_t* hctl);

int
snd_hctl_load(snd_hctl_t* hctl);

int
snd_hctl_free(snd_hctl_t* hctl);

int
snd_hctl_handle_events(snd_hctl_t* hctl);

const char*
snd_hctl_name(snd_hctl_t* hctl);

int
snd_hctl_wait(
    snd_hctl_t* hctl,
    int timeout
);

snd_ctl_t*
snd_hctl_ctl(snd_hctl_t* hctl);

snd_hctl_elem_t*
snd_hctl_elem_next(snd_hctl_elem_t* elem);

snd_hctl_elem_t*
snd_hctl_elem_prev(snd_hctl_elem_t* elem);

int
snd_hctl_elem_info(
    snd_hctl_elem_t* elem,
    snd_ctl_elem_info_t* info
);

int
snd_hctl_elem_read(
    snd_hctl_elem_t* elem,
    snd_ctl_elem_value_t* value
);

int
snd_hctl_elem_write(
    snd_hctl_elem_t* elem,
    snd_ctl_elem_value_t* value
);

int
snd_hctl_elem_tlv_read(
    snd_hctl_elem_t* elem,
    unsigned int* tlv,
    unsigned int tlv_size
);

int
snd_hctl_elem_tlv_write(
    snd_hctl_elem_t* elem,
    const unsigned int* tlv
);

int
snd_hctl_elem_tlv_command(
    snd_hctl_elem_t* elem,
    const unsigned int* tlv
);

snd_hctl_t*
snd_hctl_elem_get_hctl(snd_hctl_elem_t* elem);

void
snd_hctl_elem_get_id(
    const snd_hctl_elem_t* obj,
    snd_ctl_elem_id_t* ptr
);

unsigned int
snd_hctl_elem_get_numid(const snd_hctl_elem_t* obj);

snd_ctl_elem_iface_t
snd_hctl_elem_get_interface(const snd_hctl_elem_t* obj);

unsigned int
snd_hctl_elem_get_device(const snd_hctl_elem_t* obj);

unsigned int
snd_hctl_elem_get_subdevice(const snd_hctl_elem_t* obj);

const char*
snd_hctl_elem_get_name(const snd_hctl_elem_t* obj);

unsigned int
snd_hctl_elem_get_index(const snd_hctl_elem_t* obj);

void
snd_hctl_elem_set_callback(
    snd_hctl_elem_t* obj,
    snd_hctl_elem_callback_t val
);

void*
snd_hctl_elem_get_callback_private(const snd_hctl_elem_t* obj);

void
snd_hctl_elem_set_callback_private(
    snd_hctl_elem_t* obj,
    void* val
);

int
snd_sctl_build(
    snd_sctl_t** ctl,
    snd_ctl_t* handle,
    snd_config_t* config,
    snd_config_t* private_data,
    int mode
);

int
snd_sctl_free(snd_sctl_t* handle);

int
snd_sctl_install(snd_sctl_t* handle);

int
snd_sctl_remove(snd_sctl_t* handle);

int
snd_ctl_ext_create(
    snd_ctl_ext_t* ext,
    const char* name,
    int mode
);

int
snd_ctl_ext_delete(snd_ctl_ext_t* ext);

const char*
snd_strerror(int errnum);

int
snd_lib_error_set_handler(snd_lib_error_handler_t handler);

snd_local_error_handler_t
snd_lib_error_set_local(snd_local_error_handler_t func);

const char*
snd_asoundlib_version(void);

void*
snd_dlopen(
    const char* file,
    int mode
);

void*
snd_dlsym(
    void* handle,
    const char* name,
    const char* version
);

int
snd_dlclose(void* handle);

int
snd_async_add_handler(
    snd_async_handler_t** handler,
    int fd,
    snd_async_callback_t callback,
    void* private_data
);

int
snd_async_del_handler(snd_async_handler_t* handler);

int
snd_async_handler_get_fd(snd_async_handler_t* handler);

int
snd_async_handler_get_signo(snd_async_handler_t* handler);

void*
snd_async_handler_get_callback_private(snd_async_handler_t* handler);

struct snd_shm_area*
snd_shm_area_create(
    int shmid,
    void* ptr
);

struct snd_shm_area*
snd_shm_area_share(struct snd_shm_area* area);

int
snd_shm_area_destroy(struct snd_shm_area* area);

int
snd_user_file(
    const char* file,
    char** result
);

int
snd_hwdep_open(
    snd_hwdep_t** hwdep,
    const char* name,
    int mode
);

int
snd_hwdep_close(snd_hwdep_t* hwdep);

int
snd_hwdep_poll_descriptors(
    snd_hwdep_t* hwdep,
    struct pollfd* pfds,
    unsigned int space
);

int
snd_hwdep_poll_descriptors_count(snd_hwdep_t* hwdep);

int
snd_hwdep_poll_descriptors_revents(
    snd_hwdep_t* hwdep,
    struct pollfd* pfds,
    unsigned int nfds,
    unsigned short* revents
);

int
snd_hwdep_nonblock(
    snd_hwdep_t* hwdep,
    int nonblock
);

int
snd_hwdep_info(
    snd_hwdep_t* hwdep,
    snd_hwdep_info_t* info
);

int
snd_hwdep_dsp_status(
    snd_hwdep_t* hwdep,
    snd_hwdep_dsp_status_t* status
);

int
snd_hwdep_dsp_load(
    snd_hwdep_t* hwdep,
    snd_hwdep_dsp_image_t* block
);

int
snd_hwdep_ioctl(
    snd_hwdep_t* hwdep,
    unsigned int request,
    void* arg
);

ssize_t
snd_hwdep_write(
    snd_hwdep_t* hwdep,
    const void* buffer,
    size_t size
);

ssize_t
snd_hwdep_read(
    snd_hwdep_t* hwdep,
    void* buffer,
    size_t size
);

size_t
snd_hwdep_info_sizeof(void);

int
snd_hwdep_info_malloc(snd_hwdep_info_t** ptr);

void
snd_hwdep_info_free(snd_hwdep_info_t* obj);

void
snd_hwdep_info_copy(
    snd_hwdep_info_t* dst,
    const snd_hwdep_info_t* src
);

unsigned int
snd_hwdep_info_get_device(const snd_hwdep_info_t* obj);

int
snd_hwdep_info_get_card(const snd_hwdep_info_t* obj);

const char*
snd_hwdep_info_get_id(const snd_hwdep_info_t* obj);

const char*
snd_hwdep_info_get_name(const snd_hwdep_info_t* obj);

snd_hwdep_iface_t
snd_hwdep_info_get_iface(const snd_hwdep_info_t* obj);

void
snd_hwdep_info_set_device(
    snd_hwdep_info_t* obj,
    unsigned int val
);

size_t
snd_hwdep_dsp_status_sizeof(void);

int
snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t** ptr);

void
snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t* obj);

void
snd_hwdep_dsp_status_copy(
    snd_hwdep_dsp_status_t* dst,
    const snd_hwdep_dsp_status_t* src
);

unsigned int
snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t* obj);

const char*
snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t* obj);

unsigned int
snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t* obj);

unsigned int
snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t* obj);

unsigned int
snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t* obj);

size_t
snd_hwdep_dsp_image_sizeof(void);

int
snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t** ptr);

void
snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t* obj);

void
snd_hwdep_dsp_image_copy(
    snd_hwdep_dsp_image_t* dst,
    const snd_hwdep_dsp_image_t* src
);

unsigned int
snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t* obj);

const char*
snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t* obj);

const void*
snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t* obj);

size_t
snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t* obj);

void
snd_hwdep_dsp_image_set_index(
    snd_hwdep_dsp_image_t* obj,
    unsigned int _index
);

void
snd_hwdep_dsp_image_set_name(
    snd_hwdep_dsp_image_t* obj,
    const char* name
);

void
snd_hwdep_dsp_image_set_image(
    snd_hwdep_dsp_image_t* obj,
    void* buffer
);

void
snd_hwdep_dsp_image_set_length(
    snd_hwdep_dsp_image_t* obj,
    size_t length
);

int
snd_input_stdio_open(
    snd_input_t** inputp,
    const char* file,
    const char* mode
);

int
snd_input_stdio_attach(
    snd_input_t** inputp,
    FILE* fp,
    int _close
);

int
snd_input_buffer_open(
    snd_input_t** inputp,
    const char* buffer,
    ssize_t size
);

int
snd_input_close(snd_input_t* input);

int
snd_input_scanf(
    snd_input_t* input,
    const char* format,
    ...
);

char*
snd_input_gets(
    snd_input_t* input,
    char* str,
    size_t size
);

int
snd_input_getc(snd_input_t* input);

int
snd_input_ungetc(
    snd_input_t* input,
    int c
);

int
snd_mixer_open(
    snd_mixer_t** mixer,
    int mode
);

int
snd_mixer_close(snd_mixer_t* mixer);

snd_mixer_elem_t*
snd_mixer_first_elem(snd_mixer_t* mixer);

snd_mixer_elem_t*
snd_mixer_last_elem(snd_mixer_t* mixer);

int
snd_mixer_handle_events(snd_mixer_t* mixer);

int
snd_mixer_attach(
    snd_mixer_t* mixer,
    const char* name
);

int
snd_mixer_attach_hctl(
    snd_mixer_t* mixer,
    snd_hctl_t* hctl
);

int
snd_mixer_detach(
    snd_mixer_t* mixer,
    const char* name
);

int
snd_mixer_detach_hctl(
    snd_mixer_t* mixer,
    snd_hctl_t* hctl
);

int
snd_mixer_get_hctl(
    snd_mixer_t* mixer,
    const char* name,
    snd_hctl_t** hctl
);

int
snd_mixer_poll_descriptors_count(snd_mixer_t* mixer);

int
snd_mixer_poll_descriptors(
    snd_mixer_t* mixer,
    struct pollfd* pfds,
    unsigned int space
);

int
snd_mixer_poll_descriptors_revents(
    snd_mixer_t* mixer,
    struct pollfd* pfds,
    unsigned int nfds,
    unsigned short* revents
);

int
snd_mixer_load(snd_mixer_t* mixer);

void
snd_mixer_free(snd_mixer_t* mixer);

int
snd_mixer_wait(
    snd_mixer_t* mixer,
    int timeout
);

int
snd_mixer_set_compare(
    snd_mixer_t* mixer,
    snd_mixer_compare_t msort
);

void
snd_mixer_set_callback(
    snd_mixer_t* obj,
    snd_mixer_callback_t val
);

void*
snd_mixer_get_callback_private(const snd_mixer_t* obj);

void
snd_mixer_set_callback_private(
    snd_mixer_t* obj,
    void* val
);

unsigned int
snd_mixer_get_count(const snd_mixer_t* obj);

int
snd_mixer_class_unregister(snd_mixer_class_t* clss);

snd_mixer_elem_t*
snd_mixer_elem_next(snd_mixer_elem_t* elem);

snd_mixer_elem_t*
snd_mixer_elem_prev(snd_mixer_elem_t* elem);

void
snd_mixer_elem_set_callback(
    snd_mixer_elem_t* obj,
    snd_mixer_elem_callback_t val
);

void*
snd_mixer_elem_get_callback_private(const snd_mixer_elem_t* obj);

void
snd_mixer_elem_set_callback_private(
    snd_mixer_elem_t* obj,
    void* val
);

snd_mixer_elem_type_t
snd_mixer_elem_get_type(const snd_mixer_elem_t* obj);

int
snd_mixer_class_register(
    snd_mixer_class_t* class_,
    snd_mixer_t* mixer
);

int
snd_mixer_elem_new(
    snd_mixer_elem_t** elem,
    snd_mixer_elem_type_t type,
    int compare_weight,
    void* private_data,
    void(*)(snd_mixer_elem_t*elem) private_free
);

int
snd_mixer_elem_add(
    snd_mixer_elem_t* elem,
    snd_mixer_class_t* class_
);

int
snd_mixer_elem_remove(snd_mixer_elem_t* elem);

void
snd_mixer_elem_free(snd_mixer_elem_t* elem);

int
snd_mixer_elem_info(snd_mixer_elem_t* elem);

int
snd_mixer_elem_value(snd_mixer_elem_t* elem);

int
snd_mixer_elem_attach(
    snd_mixer_elem_t* melem,
    snd_hctl_elem_t* helem
);

int
snd_mixer_elem_detach(
    snd_mixer_elem_t* melem,
    snd_hctl_elem_t* helem
);

int
snd_mixer_elem_empty(snd_mixer_elem_t* melem);

void*
snd_mixer_elem_get_private(const snd_mixer_elem_t* melem);

size_t
snd_mixer_class_sizeof(void);

int
snd_mixer_class_malloc(snd_mixer_class_t** ptr);

void
snd_mixer_class_free(snd_mixer_class_t* obj);

void
snd_mixer_class_copy(
    snd_mixer_class_t* dst,
    const snd_mixer_class_t* src
);

snd_mixer_t*
snd_mixer_class_get_mixer(const snd_mixer_class_t* class_);

snd_mixer_event_t
snd_mixer_class_get_event(const snd_mixer_class_t* class_);

void*
snd_mixer_class_get_private(const snd_mixer_class_t* class_);

snd_mixer_compare_t
snd_mixer_class_get_compare(const snd_mixer_class_t* class_);

int
snd_mixer_class_set_event(
    snd_mixer_class_t* class_,
    snd_mixer_event_t event
);

int
snd_mixer_class_set_private(
    snd_mixer_class_t* class_,
    void* private_data
);

int
snd_mixer_class_set_private_free(
    snd_mixer_class_t* class_,
    void(*)(snd_mixer_class_t*) private_free
);

int
snd_mixer_class_set_compare(
    snd_mixer_class_t* class_,
    snd_mixer_compare_t compare
);

const char*
snd_mixer_selem_channel_name(snd_mixer_selem_channel_id_t channel);

int
snd_mixer_selem_register(
    snd_mixer_t* mixer,
    struct snd_mixer_selem_regopt* options,
    snd_mixer_class_t** classp
);

void
snd_mixer_selem_get_id(
    snd_mixer_elem_t* element,
    snd_mixer_selem_id_t* id
);

const char*
snd_mixer_selem_get_name(snd_mixer_elem_t* elem);

unsigned int
snd_mixer_selem_get_index(snd_mixer_elem_t* elem);

snd_mixer_elem_t*
snd_mixer_find_selem(
    snd_mixer_t* mixer,
    const snd_mixer_selem_id_t* id
);

int
snd_mixer_selem_is_active(snd_mixer_elem_t* elem);

int
snd_mixer_selem_is_playback_mono(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_playback_channel(
    snd_mixer_elem_t* obj,
    snd_mixer_selem_channel_id_t channel
);

int
snd_mixer_selem_is_capture_mono(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_capture_channel(
    snd_mixer_elem_t* obj,
    snd_mixer_selem_channel_id_t channel
);

int
snd_mixer_selem_get_capture_group(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_common_volume(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_playback_volume(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_playback_volume_joined(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_capture_volume(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_capture_volume_joined(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_common_switch(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_playback_switch(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_playback_switch_joined(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_capture_switch(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_capture_switch_joined(snd_mixer_elem_t* elem);

int
snd_mixer_selem_has_capture_switch_exclusive(snd_mixer_elem_t* elem);

int
snd_mixer_selem_ask_playback_vol_dB(
    snd_mixer_elem_t* elem,
    long value,
    long* dBvalue
);

int
snd_mixer_selem_ask_capture_vol_dB(
    snd_mixer_elem_t* elem,
    long value,
    long* dBvalue
);

int
snd_mixer_selem_ask_playback_dB_vol(
    snd_mixer_elem_t* elem,
    long dBvalue,
    int dir,
    long* value
);

int
snd_mixer_selem_ask_capture_dB_vol(
    snd_mixer_elem_t* elem,
    long dBvalue,
    int dir,
    long* value
);

int
snd_mixer_selem_get_playback_volume(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long* value
);

int
snd_mixer_selem_get_capture_volume(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long* value
);

int
snd_mixer_selem_get_playback_dB(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long* value
);

int
snd_mixer_selem_get_capture_dB(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long* value
);

int
snd_mixer_selem_get_playback_switch(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    int* value
);

int
snd_mixer_selem_get_capture_switch(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    int* value
);

int
snd_mixer_selem_set_playback_volume(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long value
);

int
snd_mixer_selem_set_capture_volume(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long value
);

int
snd_mixer_selem_set_playback_dB(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long value,
    int dir
);

int
snd_mixer_selem_set_capture_dB(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    long value,
    int dir
);

int
snd_mixer_selem_set_playback_volume_all(
    snd_mixer_elem_t* elem,
    long value
);

int
snd_mixer_selem_set_capture_volume_all(
    snd_mixer_elem_t* elem,
    long value
);

int
snd_mixer_selem_set_playback_dB_all(
    snd_mixer_elem_t* elem,
    long value,
    int dir
);

int
snd_mixer_selem_set_capture_dB_all(
    snd_mixer_elem_t* elem,
    long value,
    int dir
);

int
snd_mixer_selem_set_playback_switch(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    int value
);

int
snd_mixer_selem_set_capture_switch(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    int value
);

int
snd_mixer_selem_set_playback_switch_all(
    snd_mixer_elem_t* elem,
    int value
);

int
snd_mixer_selem_set_capture_switch_all(
    snd_mixer_elem_t* elem,
    int value
);

int
snd_mixer_selem_get_playback_volume_range(
    snd_mixer_elem_t* elem,
    long* min,
    long* max
);

int
snd_mixer_selem_get_playback_dB_range(
    snd_mixer_elem_t* elem,
    long* min,
    long* max
);

int
snd_mixer_selem_set_playback_volume_range(
    snd_mixer_elem_t* elem,
    long min,
    long max
);

int
snd_mixer_selem_get_capture_volume_range(
    snd_mixer_elem_t* elem,
    long* min,
    long* max
);

int
snd_mixer_selem_get_capture_dB_range(
    snd_mixer_elem_t* elem,
    long* min,
    long* max
);

int
snd_mixer_selem_set_capture_volume_range(
    snd_mixer_elem_t* elem,
    long min,
    long max
);

int
snd_mixer_selem_is_enumerated(snd_mixer_elem_t* elem);

int
snd_mixer_selem_is_enum_playback(snd_mixer_elem_t* elem);

int
snd_mixer_selem_is_enum_capture(snd_mixer_elem_t* elem);

int
snd_mixer_selem_get_enum_items(snd_mixer_elem_t* elem);

int
snd_mixer_selem_get_enum_item_name(
    snd_mixer_elem_t* elem,
    unsigned int idx,
    size_t maxlen,
    char* str
);

int
snd_mixer_selem_get_enum_item(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    unsigned int* idxp
);

int
snd_mixer_selem_set_enum_item(
    snd_mixer_elem_t* elem,
    snd_mixer_selem_channel_id_t channel,
    unsigned int idx
);

size_t
snd_mixer_selem_id_sizeof(void);

int
snd_mixer_selem_id_malloc(snd_mixer_selem_id_t** ptr);

void
snd_mixer_selem_id_free(snd_mixer_selem_id_t* obj);

void
snd_mixer_selem_id_copy(
    snd_mixer_selem_id_t* dst,
    const snd_mixer_selem_id_t* src
);

const char*
snd_mixer_selem_id_get_name(const snd_mixer_selem_id_t* obj);

unsigned int
snd_mixer_selem_id_get_index(const snd_mixer_selem_id_t* obj);

void
snd_mixer_selem_id_set_name(
    snd_mixer_selem_id_t* obj,
    const char* val
);

void
snd_mixer_selem_id_set_index(
    snd_mixer_selem_id_t* obj,
    unsigned int val
);

int
snd_output_stdio_open(
    snd_output_t** outputp,
    const char* file,
    const char* mode
);

int
snd_output_stdio_attach(
    snd_output_t** outputp,
    FILE* fp,
    int _close
);

int
snd_output_buffer_open(snd_output_t** outputp);

size_t
snd_output_buffer_string(
    snd_output_t* output,
    char** buf
);

int
snd_output_close(snd_output_t* output);

int
snd_output_printf(
    snd_output_t* output,
    const char* format,
    ...
);

int
snd_output_vprintf(
    snd_output_t* output,
    const char* format,
    va_list args
);

int
snd_output_puts(
    snd_output_t* output,
    const char* str
);

int
snd_output_putc(
    snd_output_t* output,
    int c
);

int
snd_output_flush(snd_output_t* output);

int
snd_pcm_open(
    snd_pcm_t** pcm,
    const char* name,
    snd_pcm_stream_t stream,
    int mode
);

int
snd_pcm_open_lconf(
    snd_pcm_t** pcm,
    const char* name,
    snd_pcm_stream_t stream,
    int mode,
    snd_config_t* lconf
);

int
snd_pcm_open_fallback(
    snd_pcm_t** pcm,
    snd_config_t* root,
    const char* name,
    const char* orig_name,
    snd_pcm_stream_t stream,
    int mode
);

int
snd_pcm_close(snd_pcm_t* pcm);

const char*
snd_pcm_name(snd_pcm_t* pcm);

snd_pcm_type_t
snd_pcm_type(snd_pcm_t* pcm);

snd_pcm_stream_t
snd_pcm_stream(snd_pcm_t* pcm);

int
snd_pcm_poll_descriptors_count(snd_pcm_t* pcm);

int
snd_pcm_poll_descriptors(
    snd_pcm_t* pcm,
    struct pollfd* pfds,
    unsigned int space
);

int
snd_pcm_poll_descriptors_revents(
    snd_pcm_t* pcm,
    struct pollfd* pfds,
    unsigned int nfds,
    unsigned short* revents
);

int
snd_pcm_nonblock(
    snd_pcm_t* pcm,
    int nonblock
);

static
__inline__ int
snd_pcm_abort(snd_pcm_t* pcm);

int
snd_async_add_pcm_handler(
    snd_async_handler_t** handler,
    snd_pcm_t* pcm,
    snd_async_callback_t callback,
    void* private_data
);

snd_pcm_t*
snd_async_handler_get_pcm(snd_async_handler_t* handler);

int
snd_pcm_info(
    snd_pcm_t* pcm,
    snd_pcm_info_t* info
);

int
snd_pcm_hw_params_current(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params
);

int
snd_pcm_hw_params(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params
);

int
snd_pcm_hw_free(snd_pcm_t* pcm);

int
snd_pcm_sw_params_current(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params
);

int
snd_pcm_sw_params(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params
);

int
snd_pcm_prepare(snd_pcm_t* pcm);

int
snd_pcm_reset(snd_pcm_t* pcm);

int
snd_pcm_status(
    snd_pcm_t* pcm,
    snd_pcm_status_t* status
);

int
snd_pcm_start(snd_pcm_t* pcm);

int
snd_pcm_drop(snd_pcm_t* pcm);

int
snd_pcm_drain(snd_pcm_t* pcm);

int
snd_pcm_pause(
    snd_pcm_t* pcm,
    int enable
);

snd_pcm_state_t
snd_pcm_state(snd_pcm_t* pcm);

int
snd_pcm_hwsync(snd_pcm_t* pcm);

int
snd_pcm_delay(
    snd_pcm_t* pcm,
    snd_pcm_sframes_t* delayp
);

int
snd_pcm_resume(snd_pcm_t* pcm);

int
snd_pcm_htimestamp(
    snd_pcm_t* pcm,
    snd_pcm_uframes_t* avail,
    snd_htimestamp_t* tstamp
);

snd_pcm_sframes_t
snd_pcm_avail(snd_pcm_t* pcm);

snd_pcm_sframes_t
snd_pcm_avail_update(snd_pcm_t* pcm);

int
snd_pcm_avail_delay(
    snd_pcm_t* pcm,
    snd_pcm_sframes_t* availp,
    snd_pcm_sframes_t* delayp
);

snd_pcm_sframes_t
snd_pcm_rewindable(snd_pcm_t* pcm);

snd_pcm_sframes_t
snd_pcm_rewind(
    snd_pcm_t* pcm,
    snd_pcm_uframes_t frames
);

snd_pcm_sframes_t
snd_pcm_forwardable(snd_pcm_t* pcm);

snd_pcm_sframes_t
snd_pcm_forward(
    snd_pcm_t* pcm,
    snd_pcm_uframes_t frames
);

snd_pcm_sframes_t
snd_pcm_writei(
    snd_pcm_t* pcm,
    const void* buffer,
    snd_pcm_uframes_t size
);

snd_pcm_sframes_t
snd_pcm_readi(
    snd_pcm_t* pcm,
    void* buffer,
    snd_pcm_uframes_t size
);

snd_pcm_sframes_t
snd_pcm_writen(
    snd_pcm_t* pcm,
    void** bufs,
    snd_pcm_uframes_t size
);

snd_pcm_sframes_t
snd_pcm_readn(
    snd_pcm_t* pcm,
    void** bufs,
    snd_pcm_uframes_t size
);

int
snd_pcm_wait(
    snd_pcm_t* pcm,
    int timeout
);

int
snd_pcm_link(
    snd_pcm_t* pcm1,
    snd_pcm_t* pcm2
);

int
snd_pcm_unlink(snd_pcm_t* pcm);

snd_pcm_chmap_query_t**
snd_pcm_query_chmaps(snd_pcm_t* pcm);

snd_pcm_chmap_query_t**
snd_pcm_query_chmaps_from_hw(
    int card,
    int dev,
    int subdev,
    snd_pcm_stream_t stream
);

void
snd_pcm_free_chmaps(snd_pcm_chmap_query_t** maps);

snd_pcm_chmap_t*
snd_pcm_get_chmap(snd_pcm_t* pcm);

int
snd_pcm_set_chmap(
    snd_pcm_t* pcm,
    const snd_pcm_chmap_t* map
);

const char*
snd_pcm_chmap_type_name(enum snd_pcm_chmap_type val);

const char*
snd_pcm_chmap_name(enum snd_pcm_chmap_position val);

const char*
snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val);

int
snd_pcm_chmap_print(
    const snd_pcm_chmap_t* map,
    size_t maxlen,
    char* buf
);

unsigned int
snd_pcm_chmap_from_string(const char* str);

snd_pcm_chmap_t*
snd_pcm_chmap_parse_string(const char* str);

int
snd_pcm_recover(
    snd_pcm_t* pcm,
    int err,
    int silent
);

int
snd_pcm_set_params(
    snd_pcm_t* pcm,
    snd_pcm_format_t format,
    snd_pcm_access_t access,
    unsigned int channels,
    unsigned int rate,
    int soft_resample,
    unsigned int latency
);

int
snd_pcm_get_params(
    snd_pcm_t* pcm,
    snd_pcm_uframes_t* buffer_size,
    snd_pcm_uframes_t* period_size
);

size_t
snd_pcm_info_sizeof(void);

int
snd_pcm_info_malloc(snd_pcm_info_t** ptr);

void
snd_pcm_info_free(snd_pcm_info_t* obj);

void
snd_pcm_info_copy(
    snd_pcm_info_t* dst,
    const snd_pcm_info_t* src
);

unsigned int
snd_pcm_info_get_device(const snd_pcm_info_t* obj);

unsigned int
snd_pcm_info_get_subdevice(const snd_pcm_info_t* obj);

snd_pcm_stream_t
snd_pcm_info_get_stream(const snd_pcm_info_t* obj);

int
snd_pcm_info_get_card(const snd_pcm_info_t* obj);

const char*
snd_pcm_info_get_id(const snd_pcm_info_t* obj);

const char*
snd_pcm_info_get_name(const snd_pcm_info_t* obj);

const char*
snd_pcm_info_get_subdevice_name(const snd_pcm_info_t* obj);

snd_pcm_class_t
snd_pcm_info_get_class(const snd_pcm_info_t* obj);

snd_pcm_subclass_t
snd_pcm_info_get_subclass(const snd_pcm_info_t* obj);

unsigned int
snd_pcm_info_get_subdevices_count(const snd_pcm_info_t* obj);

unsigned int
snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t* obj);

snd_pcm_sync_id_t
snd_pcm_info_get_sync(const snd_pcm_info_t* obj);

void
snd_pcm_info_set_device(
    snd_pcm_info_t* obj,
    unsigned int val
);

void
snd_pcm_info_set_subdevice(
    snd_pcm_info_t* obj,
    unsigned int val
);

void
snd_pcm_info_set_stream(
    snd_pcm_info_t* obj,
    snd_pcm_stream_t val
);

int
snd_pcm_hw_params_any(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params
);

int
snd_pcm_hw_params_can_mmap_sample_resolution(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_is_double(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_is_batch(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_is_block_transfer(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_is_monotonic(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_can_overrange(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_supports_audio_ts_type(
    const snd_pcm_hw_params_t* params,
    int type
);

int
snd_pcm_hw_params_get_rate_numden(
    const snd_pcm_hw_params_t* params,
    unsigned int* rate_num,
    unsigned int* rate_den
);

int
snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t* params);

int
snd_pcm_hw_params_get_fifo_size(const snd_pcm_hw_params_t* params);

size_t
snd_pcm_hw_params_sizeof(void);

int
snd_pcm_hw_params_malloc(snd_pcm_hw_params_t** ptr);

void
snd_pcm_hw_params_free(snd_pcm_hw_params_t* obj);

void
snd_pcm_hw_params_copy(
    snd_pcm_hw_params_t* dst,
    const snd_pcm_hw_params_t* src
);

int
snd_pcm_hw_params_get_access(
    const snd_pcm_hw_params_t* params,
    snd_pcm_access_t* _access
);

int
snd_pcm_hw_params_test_access(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_access_t _access
);

int
snd_pcm_hw_params_set_access(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_access_t _access
);

int
snd_pcm_hw_params_set_access_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_access_t* _access
);

int
snd_pcm_hw_params_set_access_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_access_t* _access
);

int
snd_pcm_hw_params_set_access_mask(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_access_mask_t* mask
);

int
snd_pcm_hw_params_get_access_mask(
    snd_pcm_hw_params_t* params,
    snd_pcm_access_mask_t* mask
);

int
snd_pcm_hw_params_get_format(
    const snd_pcm_hw_params_t* params,
    snd_pcm_format_t* val
);

int
snd_pcm_hw_params_test_format(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_format_t val
);

int
snd_pcm_hw_params_set_format(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_format_t val
);

int
snd_pcm_hw_params_set_format_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_format_t* format
);

int
snd_pcm_hw_params_set_format_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_format_t* format
);

int
snd_pcm_hw_params_set_format_mask(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_format_mask_t* mask
);

void
snd_pcm_hw_params_get_format_mask(
    snd_pcm_hw_params_t* params,
    snd_pcm_format_mask_t* mask
);

int
snd_pcm_hw_params_get_subformat(
    const snd_pcm_hw_params_t* params,
    snd_pcm_subformat_t* subformat
);

int
snd_pcm_hw_params_test_subformat(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_subformat_t subformat
);

int
snd_pcm_hw_params_set_subformat(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_subformat_t subformat
);

int
snd_pcm_hw_params_set_subformat_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_subformat_t* subformat
);

int
snd_pcm_hw_params_set_subformat_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_subformat_t* subformat
);

int
snd_pcm_hw_params_set_subformat_mask(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_subformat_mask_t* mask
);

void
snd_pcm_hw_params_get_subformat_mask(
    snd_pcm_hw_params_t* params,
    snd_pcm_subformat_mask_t* mask
);

int
snd_pcm_hw_params_get_channels(
    const snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_get_channels_min(
    const snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_get_channels_max(
    const snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_test_channels(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val
);

int
snd_pcm_hw_params_set_channels(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val
);

int
snd_pcm_hw_params_set_channels_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_set_channels_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_set_channels_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* min,
    unsigned int* max
);

int
snd_pcm_hw_params_set_channels_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_set_channels_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_set_channels_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_get_rate(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_rate_min(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_rate_max(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_test_rate(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_rate(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_rate_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_rate_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_rate_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* min,
    int* mindir,
    unsigned int* max,
    int* maxdir
);

int
snd_pcm_hw_params_set_rate_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_rate_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_rate_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_rate_resample(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val
);

int
snd_pcm_hw_params_get_rate_resample(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_set_export_buffer(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val
);

int
snd_pcm_hw_params_get_export_buffer(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_set_period_wakeup(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val
);

int
snd_pcm_hw_params_get_period_wakeup(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_get_period_time(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_period_time_min(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_period_time_max(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_test_period_time(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_period_time(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_period_time_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_time_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_time_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* min,
    int* mindir,
    unsigned int* max,
    int* maxdir
);

int
snd_pcm_hw_params_set_period_time_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_time_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_time_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_period_size(
    const snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* frames,
    int* dir
);

int
snd_pcm_hw_params_get_period_size_min(
    const snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* frames,
    int* dir
);

int
snd_pcm_hw_params_get_period_size_max(
    const snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* frames,
    int* dir
);

int
snd_pcm_hw_params_test_period_size(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t val,
    int dir
);

int
snd_pcm_hw_params_set_period_size(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t val,
    int dir
);

int
snd_pcm_hw_params_set_period_size_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_size_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_size_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* min,
    int* mindir,
    snd_pcm_uframes_t* max,
    int* maxdir
);

int
snd_pcm_hw_params_set_period_size_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_size_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_size_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val,
    int* dir
);

int
snd_pcm_hw_params_set_period_size_integer(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params
);

int
snd_pcm_hw_params_get_periods(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_periods_min(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_periods_max(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_test_periods(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_periods(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_periods_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_periods_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_periods_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* min,
    int* mindir,
    unsigned int* max,
    int* maxdir
);

int
snd_pcm_hw_params_set_periods_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_periods_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_periods_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_periods_integer(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params
);

int
snd_pcm_hw_params_get_buffer_time(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_buffer_time_min(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_buffer_time_max(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_test_buffer_time(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_buffer_time(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_buffer_time_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_buffer_time_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_buffer_time_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* min,
    int* mindir,
    unsigned int* max,
    int* maxdir
);

int
snd_pcm_hw_params_set_buffer_time_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_buffer_time_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_buffer_time_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_buffer_size(
    const snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_get_buffer_size_min(
    const snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_get_buffer_size_max(
    const snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_test_buffer_size(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_hw_params_set_buffer_size(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_hw_params_set_buffer_size_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_set_buffer_size_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_set_buffer_size_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* min,
    snd_pcm_uframes_t* max
);

int
snd_pcm_hw_params_set_buffer_size_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_set_buffer_size_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_set_buffer_size_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_hw_params_get_min_align(
    const snd_pcm_hw_params_t* params,
    snd_pcm_uframes_t* val
);

size_t
snd_pcm_sw_params_sizeof(void);

int
snd_pcm_sw_params_malloc(snd_pcm_sw_params_t** ptr);

void
snd_pcm_sw_params_free(snd_pcm_sw_params_t* obj);

void
snd_pcm_sw_params_copy(
    snd_pcm_sw_params_t* dst,
    const snd_pcm_sw_params_t* src
);

int
snd_pcm_sw_params_get_boundary(
    const snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_sw_params_set_tstamp_mode(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_tstamp_t val
);

int
snd_pcm_sw_params_get_tstamp_mode(
    const snd_pcm_sw_params_t* params,
    snd_pcm_tstamp_t* val
);

int
snd_pcm_sw_params_set_tstamp_type(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_tstamp_type_t val
);

int
snd_pcm_sw_params_get_tstamp_type(
    const snd_pcm_sw_params_t* params,
    snd_pcm_tstamp_type_t* val
);

int
snd_pcm_sw_params_set_avail_min(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_sw_params_get_avail_min(
    const snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_sw_params_set_period_event(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    int val
);

int
snd_pcm_sw_params_get_period_event(
    const snd_pcm_sw_params_t* params,
    int* val
);

int
snd_pcm_sw_params_set_start_threshold(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_sw_params_get_start_threshold(
    const snd_pcm_sw_params_t* paramsm,
    snd_pcm_uframes_t* val
);

int
snd_pcm_sw_params_set_stop_threshold(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_sw_params_get_stop_threshold(
    const snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_sw_params_set_silence_threshold(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_sw_params_get_silence_threshold(
    const snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_sw_params_set_silence_size(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_sw_params_get_silence_size(
    const snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t* val
);

size_t
snd_pcm_access_mask_sizeof(void);

int
snd_pcm_access_mask_malloc(snd_pcm_access_mask_t** ptr);

void
snd_pcm_access_mask_free(snd_pcm_access_mask_t* obj);

void
snd_pcm_access_mask_copy(
    snd_pcm_access_mask_t* dst,
    const snd_pcm_access_mask_t* src
);

void
snd_pcm_access_mask_none(snd_pcm_access_mask_t* mask);

void
snd_pcm_access_mask_any(snd_pcm_access_mask_t* mask);

int
snd_pcm_access_mask_test(
    const snd_pcm_access_mask_t* mask,
    snd_pcm_access_t val
);

int
snd_pcm_access_mask_empty(const snd_pcm_access_mask_t* mask);

void
snd_pcm_access_mask_set(
    snd_pcm_access_mask_t* mask,
    snd_pcm_access_t val
);

void
snd_pcm_access_mask_reset(
    snd_pcm_access_mask_t* mask,
    snd_pcm_access_t val
);

size_t
snd_pcm_format_mask_sizeof(void);

int
snd_pcm_format_mask_malloc(snd_pcm_format_mask_t** ptr);

void
snd_pcm_format_mask_free(snd_pcm_format_mask_t* obj);

void
snd_pcm_format_mask_copy(
    snd_pcm_format_mask_t* dst,
    const snd_pcm_format_mask_t* src
);

void
snd_pcm_format_mask_none(snd_pcm_format_mask_t* mask);

void
snd_pcm_format_mask_any(snd_pcm_format_mask_t* mask);

int
snd_pcm_format_mask_test(
    const snd_pcm_format_mask_t* mask,
    snd_pcm_format_t val
);

int
snd_pcm_format_mask_empty(const snd_pcm_format_mask_t* mask);

void
snd_pcm_format_mask_set(
    snd_pcm_format_mask_t* mask,
    snd_pcm_format_t val
);

void
snd_pcm_format_mask_reset(
    snd_pcm_format_mask_t* mask,
    snd_pcm_format_t val
);

size_t
snd_pcm_subformat_mask_sizeof(void);

int
snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t** ptr);

void
snd_pcm_subformat_mask_free(snd_pcm_subformat_mask_t* obj);

void
snd_pcm_subformat_mask_copy(
    snd_pcm_subformat_mask_t* dst,
    const snd_pcm_subformat_mask_t* src
);

void
snd_pcm_subformat_mask_none(snd_pcm_subformat_mask_t* mask);

void
snd_pcm_subformat_mask_any(snd_pcm_subformat_mask_t* mask);

int
snd_pcm_subformat_mask_test(
    const snd_pcm_subformat_mask_t* mask,
    snd_pcm_subformat_t val
);

int
snd_pcm_subformat_mask_empty(const snd_pcm_subformat_mask_t* mask);

void
snd_pcm_subformat_mask_set(
    snd_pcm_subformat_mask_t* mask,
    snd_pcm_subformat_t val
);

void
snd_pcm_subformat_mask_reset(
    snd_pcm_subformat_mask_t* mask,
    snd_pcm_subformat_t val
);

size_t
snd_pcm_status_sizeof(void);

int
snd_pcm_status_malloc(snd_pcm_status_t** ptr);

void
snd_pcm_status_free(snd_pcm_status_t* obj);

void
snd_pcm_status_copy(
    snd_pcm_status_t* dst,
    const snd_pcm_status_t* src
);

snd_pcm_state_t
snd_pcm_status_get_state(const snd_pcm_status_t* obj);

void
snd_pcm_status_get_trigger_tstamp(
    const snd_pcm_status_t* obj,
    snd_timestamp_t* ptr
);

void
snd_pcm_status_get_trigger_htstamp(
    const snd_pcm_status_t* obj,
    snd_htimestamp_t* ptr
);

void
snd_pcm_status_get_tstamp(
    const snd_pcm_status_t* obj,
    snd_timestamp_t* ptr
);

void
snd_pcm_status_get_htstamp(
    const snd_pcm_status_t* obj,
    snd_htimestamp_t* ptr
);

void
snd_pcm_status_get_audio_htstamp(
    const snd_pcm_status_t* obj,
    snd_htimestamp_t* ptr
);

void
snd_pcm_status_get_driver_htstamp(
    const snd_pcm_status_t* obj,
    snd_htimestamp_t* ptr
);

void
snd_pcm_status_get_audio_htstamp_report(
    const snd_pcm_status_t* obj,
    snd_pcm_audio_tstamp_report_t* audio_tstamp_report
);

void
snd_pcm_status_set_audio_htstamp_config(
    snd_pcm_status_t* obj,
    snd_pcm_audio_tstamp_config_t* audio_tstamp_config
);

static
void
snd_pcm_pack_audio_tstamp_config(
    unsigned int* data,
    snd_pcm_audio_tstamp_config_t* config
);

static
void
snd_pcm_unpack_audio_tstamp_report(
    unsigned int data,
    unsigned int accuracy,
    snd_pcm_audio_tstamp_report_t* report
);

snd_pcm_sframes_t
snd_pcm_status_get_delay(const snd_pcm_status_t* obj);

snd_pcm_uframes_t
snd_pcm_status_get_avail(const snd_pcm_status_t* obj);

snd_pcm_uframes_t
snd_pcm_status_get_avail_max(const snd_pcm_status_t* obj);

snd_pcm_uframes_t
snd_pcm_status_get_overrange(const snd_pcm_status_t* obj);

const char*
snd_pcm_type_name(snd_pcm_type_t type);

const char*
snd_pcm_stream_name(const snd_pcm_stream_t stream);

const char*
snd_pcm_access_name(const snd_pcm_access_t _access);

const char*
snd_pcm_format_name(const snd_pcm_format_t format);

const char*
snd_pcm_format_description(const snd_pcm_format_t format);

const char*
snd_pcm_subformat_name(const snd_pcm_subformat_t subformat);

const char*
snd_pcm_subformat_description(const snd_pcm_subformat_t subformat);

snd_pcm_format_t
snd_pcm_format_value(const char* name);

const char*
snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode);

const char*
snd_pcm_state_name(const snd_pcm_state_t state);

int
snd_pcm_dump(
    snd_pcm_t* pcm,
    snd_output_t* out
);

int
snd_pcm_dump_hw_setup(
    snd_pcm_t* pcm,
    snd_output_t* out
);

int
snd_pcm_dump_sw_setup(
    snd_pcm_t* pcm,
    snd_output_t* out
);

int
snd_pcm_dump_setup(
    snd_pcm_t* pcm,
    snd_output_t* out
);

int
snd_pcm_hw_params_dump(
    snd_pcm_hw_params_t* params,
    snd_output_t* out
);

int
snd_pcm_sw_params_dump(
    snd_pcm_sw_params_t* params,
    snd_output_t* out
);

int
snd_pcm_status_dump(
    snd_pcm_status_t* status,
    snd_output_t* out
);

int
snd_pcm_mmap_begin(
    snd_pcm_t* pcm,
    const snd_pcm_channel_area_t** areas,
    snd_pcm_uframes_t* offset,
    snd_pcm_uframes_t* frames
);

snd_pcm_sframes_t
snd_pcm_mmap_commit(
    snd_pcm_t* pcm,
    snd_pcm_uframes_t offset,
    snd_pcm_uframes_t frames
);

snd_pcm_sframes_t
snd_pcm_mmap_writei(
    snd_pcm_t* pcm,
    const void* buffer,
    snd_pcm_uframes_t size
);

snd_pcm_sframes_t
snd_pcm_mmap_readi(
    snd_pcm_t* pcm,
    void* buffer,
    snd_pcm_uframes_t size
);

snd_pcm_sframes_t
snd_pcm_mmap_writen(
    snd_pcm_t* pcm,
    void** bufs,
    snd_pcm_uframes_t size
);

snd_pcm_sframes_t
snd_pcm_mmap_readn(
    snd_pcm_t* pcm,
    void** bufs,
    snd_pcm_uframes_t size
);

int
snd_pcm_format_signed(snd_pcm_format_t format);

int
snd_pcm_format_unsigned(snd_pcm_format_t format);

int
snd_pcm_format_linear(snd_pcm_format_t format);

int
snd_pcm_format_float(snd_pcm_format_t format);

int
snd_pcm_format_little_endian(snd_pcm_format_t format);

int
snd_pcm_format_big_endian(snd_pcm_format_t format);

int
snd_pcm_format_cpu_endian(snd_pcm_format_t format);

int
snd_pcm_format_width(snd_pcm_format_t format);

int
snd_pcm_format_physical_width(snd_pcm_format_t format);

snd_pcm_format_t
snd_pcm_build_linear_format(
    int width,
    int pwidth,
    int unsignd,
    int big_endian
);

ssize_t
snd_pcm_format_size(
    snd_pcm_format_t format,
    size_t samples
);

u_int8_t
snd_pcm_format_silence(snd_pcm_format_t format);

u_int16_t
snd_pcm_format_silence_16(snd_pcm_format_t format);

u_int32_t
snd_pcm_format_silence_32(snd_pcm_format_t format);

u_int64_t
snd_pcm_format_silence_64(snd_pcm_format_t format);

int
snd_pcm_format_set_silence(
    snd_pcm_format_t format,
    void* buf,
    unsigned int samples
);

snd_pcm_sframes_t
snd_pcm_bytes_to_frames(
    snd_pcm_t* pcm,
    ssize_t bytes
);

ssize_t
snd_pcm_frames_to_bytes(
    snd_pcm_t* pcm,
    snd_pcm_sframes_t frames
);

long
snd_pcm_bytes_to_samples(
    snd_pcm_t* pcm,
    ssize_t bytes
);

ssize_t
snd_pcm_samples_to_bytes(
    snd_pcm_t* pcm,
    long samples
);

int
snd_pcm_area_silence(
    const snd_pcm_channel_area_t* dst_channel,
    snd_pcm_uframes_t dst_offset,
    unsigned int samples,
    snd_pcm_format_t format
);

int
snd_pcm_areas_silence(
    const snd_pcm_channel_area_t* dst_channels,
    snd_pcm_uframes_t dst_offset,
    unsigned int channels,
    snd_pcm_uframes_t frames,
    snd_pcm_format_t format
);

int
snd_pcm_area_copy(
    const snd_pcm_channel_area_t* dst_channel,
    snd_pcm_uframes_t dst_offset,
    const snd_pcm_channel_area_t* src_channel,
    snd_pcm_uframes_t src_offset,
    unsigned int samples,
    snd_pcm_format_t format
);

int
snd_pcm_areas_copy(
    const snd_pcm_channel_area_t* dst_channels,
    snd_pcm_uframes_t dst_offset,
    const snd_pcm_channel_area_t* src_channels,
    snd_pcm_uframes_t src_offset,
    unsigned int channels,
    snd_pcm_uframes_t frames,
    snd_pcm_format_t format
);

snd_pcm_t*
snd_pcm_hook_get_pcm(snd_pcm_hook_t* hook);

void*
snd_pcm_hook_get_private(snd_pcm_hook_t* hook);

void
snd_pcm_hook_set_private(
    snd_pcm_hook_t* hook,
    void* private_data
);

int
snd_pcm_hook_add(
    snd_pcm_hook_t** hookp,
    snd_pcm_t* pcm,
    snd_pcm_hook_type_t type,
    snd_pcm_hook_func_t func,
    void* private_data
);

int
snd_pcm_hook_remove(snd_pcm_hook_t* hook);

snd_pcm_uframes_t
snd_pcm_meter_get_bufsize(snd_pcm_t* pcm);

unsigned int
snd_pcm_meter_get_channels(snd_pcm_t* pcm);

unsigned int
snd_pcm_meter_get_rate(snd_pcm_t* pcm);

snd_pcm_uframes_t
snd_pcm_meter_get_now(snd_pcm_t* pcm);

snd_pcm_uframes_t
snd_pcm_meter_get_boundary(snd_pcm_t* pcm);

int
snd_pcm_meter_add_scope(
    snd_pcm_t* pcm,
    snd_pcm_scope_t* scope
);

snd_pcm_scope_t*
snd_pcm_meter_search_scope(
    snd_pcm_t* pcm,
    const char* name
);

int
snd_pcm_scope_malloc(snd_pcm_scope_t** ptr);

void
snd_pcm_scope_set_ops(
    snd_pcm_scope_t* scope,
    const snd_pcm_scope_ops_t* val
);

void
snd_pcm_scope_set_name(
    snd_pcm_scope_t* scope,
    const char* val
);

const char*
snd_pcm_scope_get_name(snd_pcm_scope_t* scope);

void*
snd_pcm_scope_get_callback_private(snd_pcm_scope_t* scope);

void
snd_pcm_scope_set_callback_private(
    snd_pcm_scope_t* scope,
    void* val
);

int
snd_pcm_scope_s16_open(
    snd_pcm_t* pcm,
    const char* name,
    snd_pcm_scope_t** scopep
);

int16_t*
snd_pcm_scope_s16_get_channel_buffer(
    snd_pcm_scope_t* scope,
    unsigned int channel
);

int
snd_spcm_init(
    snd_pcm_t* pcm,
    unsigned int rate,
    unsigned int channels,
    snd_pcm_format_t format,
    snd_pcm_subformat_t subformat,
    snd_spcm_latency_t latency,
    snd_pcm_access_t _access,
    snd_spcm_xrun_type_t xrun_type
);

int
snd_spcm_init_duplex(
    snd_pcm_t* playback_pcm,
    snd_pcm_t* capture_pcm,
    unsigned int rate,
    unsigned int channels,
    snd_pcm_format_t format,
    snd_pcm_subformat_t subformat,
    snd_spcm_latency_t latency,
    snd_pcm_access_t _access,
    snd_spcm_xrun_type_t xrun_type,
    snd_spcm_duplex_type_t duplex_type
);

int
snd_spcm_init_get_params(
    snd_pcm_t* pcm,
    unsigned int* rate,
    snd_pcm_uframes_t* buffer_size,
    snd_pcm_uframes_t* period_size
);

const char*
snd_pcm_start_mode_name(snd_pcm_start_t mode);

const char*
snd_pcm_xrun_mode_name(snd_pcm_xrun_t mode);

int
snd_pcm_sw_params_set_start_mode(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_start_t val
);

snd_pcm_start_t
snd_pcm_sw_params_get_start_mode(const snd_pcm_sw_params_t* params);

int
snd_pcm_sw_params_set_xrun_mode(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_xrun_t val
);

snd_pcm_xrun_t
snd_pcm_sw_params_get_xrun_mode(const snd_pcm_sw_params_t* params);

int
snd_pcm_sw_params_set_xfer_align(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t val
);

int
snd_pcm_sw_params_get_xfer_align(
    const snd_pcm_sw_params_t* params,
    snd_pcm_uframes_t* val
);

int
snd_pcm_sw_params_set_sleep_min(
    snd_pcm_t* pcm,
    snd_pcm_sw_params_t* params,
    unsigned int val
);

int
snd_pcm_sw_params_get_sleep_min(
    const snd_pcm_sw_params_t* params,
    unsigned int* val
);

int
snd_pcm_hw_params_get_tick_time(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_tick_time_min(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_get_tick_time_max(
    const snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_test_tick_time(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_tick_time(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int val,
    int dir
);

int
snd_pcm_hw_params_set_tick_time_min(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_tick_time_max(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_tick_time_minmax(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* min,
    int* mindir,
    unsigned int* max,
    int* maxdir
);

int
snd_pcm_hw_params_set_tick_time_near(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_tick_time_first(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_hw_params_set_tick_time_last(
    snd_pcm_t* pcm,
    snd_pcm_hw_params_t* params,
    unsigned int* val,
    int* dir
);

int
snd_pcm_parse_control_id(
    snd_config_t* conf,
    snd_ctl_elem_id_t* ctl_id,
    int* cardp,
    int* cchannelsp,
    int* hwctlp
);

int
snd_pcm_extplug_create(
    snd_pcm_extplug_t* ext,
    const char* name,
    snd_config_t* root,
    snd_config_t* slave_conf,
    snd_pcm_stream_t stream,
    int mode
);

int
snd_pcm_extplug_delete(snd_pcm_extplug_t* ext);

void
snd_pcm_extplug_params_reset(snd_pcm_extplug_t* ext);

int
snd_pcm_extplug_set_param_list(
    snd_pcm_extplug_t* extplug,
    int type,
    unsigned int num_list,
    const unsigned int* list
);

int
snd_pcm_extplug_set_param_minmax(
    snd_pcm_extplug_t* extplug,
    int type,
    unsigned int min,
    unsigned int max
);

int
snd_pcm_extplug_set_slave_param_list(
    snd_pcm_extplug_t* extplug,
    int type,
    unsigned int num_list,
    const unsigned int* list
);

int
snd_pcm_extplug_set_slave_param_minmax(
    snd_pcm_extplug_t* extplug,
    int type,
    unsigned int min,
    unsigned int max
);

static
__inline__ int
snd_pcm_extplug_set_param(
    snd_pcm_extplug_t* extplug,
    int type,
    unsigned int val
);

static
__inline__ int
snd_pcm_extplug_set_slave_param(
    snd_pcm_extplug_t* extplug,
    int type,
    unsigned int val
);

int
snd_pcm_ioplug_create(
    snd_pcm_ioplug_t* io,
    const char* name,
    snd_pcm_stream_t stream,
    int mode
);

int
snd_pcm_ioplug_delete(snd_pcm_ioplug_t* io);

int
snd_pcm_ioplug_reinit_status(snd_pcm_ioplug_t* ioplug);

const snd_pcm_channel_area_t*
snd_pcm_ioplug_mmap_areas(snd_pcm_ioplug_t* ioplug);

void
snd_pcm_ioplug_params_reset(snd_pcm_ioplug_t* io);

int
snd_pcm_ioplug_set_param_minmax(
    snd_pcm_ioplug_t* io,
    int type,
    unsigned int min,
    unsigned int max
);

int
snd_pcm_ioplug_set_param_list(
    snd_pcm_ioplug_t* io,
    int type,
    unsigned int num_list,
    const unsigned int* list
);

int
snd_pcm_ioplug_set_state(
    snd_pcm_ioplug_t* ioplug,
    snd_pcm_state_t state
);

int
snd_rawmidi_open(
    snd_rawmidi_t** in_rmidi,
    snd_rawmidi_t** out_rmidi,
    const char* name,
    int mode
);

int
snd_rawmidi_open_lconf(
    snd_rawmidi_t** in_rmidi,
    snd_rawmidi_t** out_rmidi,
    const char* name,
    int mode,
    snd_config_t* lconf
);

int
snd_rawmidi_close(snd_rawmidi_t* rmidi);

int
snd_rawmidi_poll_descriptors_count(snd_rawmidi_t* rmidi);

int
snd_rawmidi_poll_descriptors(
    snd_rawmidi_t* rmidi,
    struct pollfd* pfds,
    unsigned int space
);

int
snd_rawmidi_poll_descriptors_revents(
    snd_rawmidi_t* rawmidi,
    struct pollfd* pfds,
    unsigned int nfds,
    unsigned short* revent
);

int
snd_rawmidi_nonblock(
    snd_rawmidi_t* rmidi,
    int nonblock
);

size_t
snd_rawmidi_info_sizeof(void);

int
snd_rawmidi_info_malloc(snd_rawmidi_info_t** ptr);

void
snd_rawmidi_info_free(snd_rawmidi_info_t* obj);

void
snd_rawmidi_info_copy(
    snd_rawmidi_info_t* dst,
    const snd_rawmidi_info_t* src
);

unsigned int
snd_rawmidi_info_get_device(const snd_rawmidi_info_t* obj);

unsigned int
snd_rawmidi_info_get_subdevice(const snd_rawmidi_info_t* obj);

snd_rawmidi_stream_t
snd_rawmidi_info_get_stream(const snd_rawmidi_info_t* obj);

int
snd_rawmidi_info_get_card(const snd_rawmidi_info_t* obj);

unsigned int
snd_rawmidi_info_get_flags(const snd_rawmidi_info_t* obj);

const char*
snd_rawmidi_info_get_id(const snd_rawmidi_info_t* obj);

const char*
snd_rawmidi_info_get_name(const snd_rawmidi_info_t* obj);

const char*
snd_rawmidi_info_get_subdevice_name(const snd_rawmidi_info_t* obj);

unsigned int
snd_rawmidi_info_get_subdevices_count(const snd_rawmidi_info_t* obj);

unsigned int
snd_rawmidi_info_get_subdevices_avail(const snd_rawmidi_info_t* obj);

void
snd_rawmidi_info_set_device(
    snd_rawmidi_info_t* obj,
    unsigned int val
);

void
snd_rawmidi_info_set_subdevice(
    snd_rawmidi_info_t* obj,
    unsigned int val
);

void
snd_rawmidi_info_set_stream(
    snd_rawmidi_info_t* obj,
    snd_rawmidi_stream_t val
);

int
snd_rawmidi_info(
    snd_rawmidi_t* rmidi,
    snd_rawmidi_info_t* info
);

size_t
snd_rawmidi_params_sizeof(void);

int
snd_rawmidi_params_malloc(snd_rawmidi_params_t** ptr);

void
snd_rawmidi_params_free(snd_rawmidi_params_t* obj);

void
snd_rawmidi_params_copy(
    snd_rawmidi_params_t* dst,
    const snd_rawmidi_params_t* src
);

int
snd_rawmidi_params_set_buffer_size(
    snd_rawmidi_t* rmidi,
    snd_rawmidi_params_t* params,
    size_t val
);

size_t
snd_rawmidi_params_get_buffer_size(const snd_rawmidi_params_t* params);

int
snd_rawmidi_params_set_avail_min(
    snd_rawmidi_t* rmidi,
    snd_rawmidi_params_t* params,
    size_t val
);

size_t
snd_rawmidi_params_get_avail_min(const snd_rawmidi_params_t* params);

int
snd_rawmidi_params_set_no_active_sensing(
    snd_rawmidi_t* rmidi,
    snd_rawmidi_params_t* params,
    int val
);

int
snd_rawmidi_params_get_no_active_sensing(const snd_rawmidi_params_t* params);

int
snd_rawmidi_params(
    snd_rawmidi_t* rmidi,
    snd_rawmidi_params_t* params
);

int
snd_rawmidi_params_current(
    snd_rawmidi_t* rmidi,
    snd_rawmidi_params_t* params
);

size_t
snd_rawmidi_status_sizeof(void);

int
snd_rawmidi_status_malloc(snd_rawmidi_status_t** ptr);

void
snd_rawmidi_status_free(snd_rawmidi_status_t* obj);

void
snd_rawmidi_status_copy(
    snd_rawmidi_status_t* dst,
    const snd_rawmidi_status_t* src
);

void
snd_rawmidi_status_get_tstamp(
    const snd_rawmidi_status_t* obj,
    snd_htimestamp_t* ptr
);

size_t
snd_rawmidi_status_get_avail(const snd_rawmidi_status_t* obj);

size_t
snd_rawmidi_status_get_xruns(const snd_rawmidi_status_t* obj);

int
snd_rawmidi_status(
    snd_rawmidi_t* rmidi,
    snd_rawmidi_status_t* status
);

int
snd_rawmidi_drain(snd_rawmidi_t* rmidi);

int
snd_rawmidi_drop(snd_rawmidi_t* rmidi);

ssize_t
snd_rawmidi_write(
    snd_rawmidi_t* rmidi,
    const void* buffer,
    size_t size
);

ssize_t
snd_rawmidi_read(
    snd_rawmidi_t* rmidi,
    void* buffer,
    size_t size
);

const char*
snd_rawmidi_name(snd_rawmidi_t* rmidi);

snd_rawmidi_type_t
snd_rawmidi_type(snd_rawmidi_t* rmidi);

snd_rawmidi_stream_t
snd_rawmidi_stream(snd_rawmidi_t* rawmidi);

int
snd_seq_open(
    snd_seq_t** handle,
    const char* name,
    int streams,
    int mode
);

int
snd_seq_open_lconf(
    snd_seq_t** handle,
    const char* name,
    int streams,
    int mode,
    snd_config_t* lconf
);

const char*
snd_seq_name(snd_seq_t* seq);

snd_seq_type_t
snd_seq_type(snd_seq_t* seq);

int
snd_seq_close(snd_seq_t* handle);

int
snd_seq_poll_descriptors_count(
    snd_seq_t* handle,
    short events
);

int
snd_seq_poll_descriptors(
    snd_seq_t* handle,
    struct pollfd* pfds,
    unsigned int space,
    short events
);

int
snd_seq_poll_descriptors_revents(
    snd_seq_t* seq,
    struct pollfd* pfds,
    unsigned int nfds,
    unsigned short* revents
);

int
snd_seq_nonblock(
    snd_seq_t* handle,
    int nonblock
);

int
snd_seq_client_id(snd_seq_t* handle);

size_t
snd_seq_get_output_buffer_size(snd_seq_t* handle);

size_t
snd_seq_get_input_buffer_size(snd_seq_t* handle);

int
snd_seq_set_output_buffer_size(
    snd_seq_t* handle,
    size_t size
);

int
snd_seq_set_input_buffer_size(
    snd_seq_t* handle,
    size_t size
);

size_t
snd_seq_system_info_sizeof(void);

int
snd_seq_system_info_malloc(snd_seq_system_info_t** ptr);

void
snd_seq_system_info_free(snd_seq_system_info_t* ptr);

void
snd_seq_system_info_copy(
    snd_seq_system_info_t* dst,
    const snd_seq_system_info_t* src
);

int
snd_seq_system_info_get_queues(const snd_seq_system_info_t* info);

int
snd_seq_system_info_get_clients(const snd_seq_system_info_t* info);

int
snd_seq_system_info_get_ports(const snd_seq_system_info_t* info);

int
snd_seq_system_info_get_channels(const snd_seq_system_info_t* info);

int
snd_seq_system_info_get_cur_clients(const snd_seq_system_info_t* info);

int
snd_seq_system_info_get_cur_queues(const snd_seq_system_info_t* info);

int
snd_seq_system_info(
    snd_seq_t* handle,
    snd_seq_system_info_t* info
);

size_t
snd_seq_client_info_sizeof(void);

int
snd_seq_client_info_malloc(snd_seq_client_info_t** ptr);

void
snd_seq_client_info_free(snd_seq_client_info_t* ptr);

void
snd_seq_client_info_copy(
    snd_seq_client_info_t* dst,
    const snd_seq_client_info_t* src
);

int
snd_seq_client_info_get_client(const snd_seq_client_info_t* info);

snd_seq_client_type_t
snd_seq_client_info_get_type(const snd_seq_client_info_t* info);

const char*
snd_seq_client_info_get_name(snd_seq_client_info_t* info);

int
snd_seq_client_info_get_broadcast_filter(const snd_seq_client_info_t* info);

int
snd_seq_client_info_get_error_bounce(const snd_seq_client_info_t* info);

int
snd_seq_client_info_get_card(const snd_seq_client_info_t* info);

int
snd_seq_client_info_get_pid(const snd_seq_client_info_t* info);

const unsigned char*
snd_seq_client_info_get_event_filter(const snd_seq_client_info_t* info);

int
snd_seq_client_info_get_num_ports(const snd_seq_client_info_t* info);

int
snd_seq_client_info_get_event_lost(const snd_seq_client_info_t* info);

void
snd_seq_client_info_set_client(
    snd_seq_client_info_t* info,
    int client
);

void
snd_seq_client_info_set_name(
    snd_seq_client_info_t* info,
    const char* name
);

void
snd_seq_client_info_set_broadcast_filter(
    snd_seq_client_info_t* info,
    int val
);

void
snd_seq_client_info_set_error_bounce(
    snd_seq_client_info_t* info,
    int val
);

void
snd_seq_client_info_set_event_filter(
    snd_seq_client_info_t* info,
    unsigned char* filter
);

void
snd_seq_client_info_event_filter_clear(snd_seq_client_info_t* info);

void
snd_seq_client_info_event_filter_add(
    snd_seq_client_info_t* info,
    int event_type
);

void
snd_seq_client_info_event_filter_del(
    snd_seq_client_info_t* info,
    int event_type
);

int
snd_seq_client_info_event_filter_check(
    snd_seq_client_info_t* info,
    int event_type
);

int
snd_seq_get_client_info(
    snd_seq_t* handle,
    snd_seq_client_info_t* info
);

int
snd_seq_get_any_client_info(
    snd_seq_t* handle,
    int client,
    snd_seq_client_info_t* info
);

int
snd_seq_set_client_info(
    snd_seq_t* handle,
    snd_seq_client_info_t* info
);

int
snd_seq_query_next_client(
    snd_seq_t* handle,
    snd_seq_client_info_t* info
);

size_t
snd_seq_client_pool_sizeof(void);

int
snd_seq_client_pool_malloc(snd_seq_client_pool_t** ptr);

void
snd_seq_client_pool_free(snd_seq_client_pool_t* ptr);

void
snd_seq_client_pool_copy(
    snd_seq_client_pool_t* dst,
    const snd_seq_client_pool_t* src
);

int
snd_seq_client_pool_get_client(const snd_seq_client_pool_t* info);

size_t
snd_seq_client_pool_get_output_pool(const snd_seq_client_pool_t* info);

size_t
snd_seq_client_pool_get_input_pool(const snd_seq_client_pool_t* info);

size_t
snd_seq_client_pool_get_output_room(const snd_seq_client_pool_t* info);

size_t
snd_seq_client_pool_get_output_free(const snd_seq_client_pool_t* info);

size_t
snd_seq_client_pool_get_input_free(const snd_seq_client_pool_t* info);

void
snd_seq_client_pool_set_output_pool(
    snd_seq_client_pool_t* info,
    size_t size
);

void
snd_seq_client_pool_set_input_pool(
    snd_seq_client_pool_t* info,
    size_t size
);

void
snd_seq_client_pool_set_output_room(
    snd_seq_client_pool_t* info,
    size_t size
);

int
snd_seq_get_client_pool(
    snd_seq_t* handle,
    snd_seq_client_pool_t* info
);

int
snd_seq_set_client_pool(
    snd_seq_t* handle,
    snd_seq_client_pool_t* info
);

size_t
snd_seq_port_info_sizeof(void);

int
snd_seq_port_info_malloc(snd_seq_port_info_t** ptr);

void
snd_seq_port_info_free(snd_seq_port_info_t* ptr);

void
snd_seq_port_info_copy(
    snd_seq_port_info_t* dst,
    const snd_seq_port_info_t* src
);

int
snd_seq_port_info_get_client(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_port(const snd_seq_port_info_t* info);

const snd_seq_addr_t*
snd_seq_port_info_get_addr(const snd_seq_port_info_t* info);

const char*
snd_seq_port_info_get_name(const snd_seq_port_info_t* info);

unsigned int
snd_seq_port_info_get_capability(const snd_seq_port_info_t* info);

unsigned int
snd_seq_port_info_get_type(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_midi_channels(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_midi_voices(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_synth_voices(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_read_use(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_write_use(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_port_specified(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_timestamping(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_timestamp_real(const snd_seq_port_info_t* info);

int
snd_seq_port_info_get_timestamp_queue(const snd_seq_port_info_t* info);

void
snd_seq_port_info_set_client(
    snd_seq_port_info_t* info,
    int client
);

void
snd_seq_port_info_set_port(
    snd_seq_port_info_t* info,
    int port
);

void
snd_seq_port_info_set_addr(
    snd_seq_port_info_t* info,
    const snd_seq_addr_t* addr
);

void
snd_seq_port_info_set_name(
    snd_seq_port_info_t* info,
    const char* name
);

void
snd_seq_port_info_set_capability(
    snd_seq_port_info_t* info,
    unsigned int capability
);

void
snd_seq_port_info_set_type(
    snd_seq_port_info_t* info,
    unsigned int type
);

void
snd_seq_port_info_set_midi_channels(
    snd_seq_port_info_t* info,
    int channels
);

void
snd_seq_port_info_set_midi_voices(
    snd_seq_port_info_t* info,
    int voices
);

void
snd_seq_port_info_set_synth_voices(
    snd_seq_port_info_t* info,
    int voices
);

void
snd_seq_port_info_set_port_specified(
    snd_seq_port_info_t* info,
    int val
);

void
snd_seq_port_info_set_timestamping(
    snd_seq_port_info_t* info,
    int enable
);

void
snd_seq_port_info_set_timestamp_real(
    snd_seq_port_info_t* info,
    int realtime
);

void
snd_seq_port_info_set_timestamp_queue(
    snd_seq_port_info_t* info,
    int queue
);

int
snd_seq_create_port(
    snd_seq_t* handle,
    snd_seq_port_info_t* info
);

int
snd_seq_delete_port(
    snd_seq_t* handle,
    int port
);

int
snd_seq_get_port_info(
    snd_seq_t* handle,
    int port,
    snd_seq_port_info_t* info
);

int
snd_seq_get_any_port_info(
    snd_seq_t* handle,
    int client,
    int port,
    snd_seq_port_info_t* info
);

int
snd_seq_set_port_info(
    snd_seq_t* handle,
    int port,
    snd_seq_port_info_t* info
);

int
snd_seq_query_next_port(
    snd_seq_t* handle,
    snd_seq_port_info_t* info
);

size_t
snd_seq_port_subscribe_sizeof(void);

int
snd_seq_port_subscribe_malloc(snd_seq_port_subscribe_t** ptr);

void
snd_seq_port_subscribe_free(snd_seq_port_subscribe_t* ptr);

void
snd_seq_port_subscribe_copy(
    snd_seq_port_subscribe_t* dst,
    const snd_seq_port_subscribe_t* src
);

const snd_seq_addr_t*
snd_seq_port_subscribe_get_sender(const snd_seq_port_subscribe_t* info);

const snd_seq_addr_t*
snd_seq_port_subscribe_get_dest(const snd_seq_port_subscribe_t* info);

int
snd_seq_port_subscribe_get_queue(const snd_seq_port_subscribe_t* info);

int
snd_seq_port_subscribe_get_exclusive(const snd_seq_port_subscribe_t* info);

int
snd_seq_port_subscribe_get_time_update(const snd_seq_port_subscribe_t* info);

int
snd_seq_port_subscribe_get_time_real(const snd_seq_port_subscribe_t* info);

void
snd_seq_port_subscribe_set_sender(
    snd_seq_port_subscribe_t* info,
    const snd_seq_addr_t* addr
);

void
snd_seq_port_subscribe_set_dest(
    snd_seq_port_subscribe_t* info,
    const snd_seq_addr_t* addr
);

void
snd_seq_port_subscribe_set_queue(
    snd_seq_port_subscribe_t* info,
    int q
);

void
snd_seq_port_subscribe_set_exclusive(
    snd_seq_port_subscribe_t* info,
    int val
);

void
snd_seq_port_subscribe_set_time_update(
    snd_seq_port_subscribe_t* info,
    int val
);

void
snd_seq_port_subscribe_set_time_real(
    snd_seq_port_subscribe_t* info,
    int val
);

int
snd_seq_get_port_subscription(
    snd_seq_t* handle,
    snd_seq_port_subscribe_t* sub
);

int
snd_seq_subscribe_port(
    snd_seq_t* handle,
    snd_seq_port_subscribe_t* sub
);

int
snd_seq_unsubscribe_port(
    snd_seq_t* handle,
    snd_seq_port_subscribe_t* sub
);

size_t
snd_seq_query_subscribe_sizeof(void);

int
snd_seq_query_subscribe_malloc(snd_seq_query_subscribe_t** ptr);

void
snd_seq_query_subscribe_free(snd_seq_query_subscribe_t* ptr);

void
snd_seq_query_subscribe_copy(
    snd_seq_query_subscribe_t* dst,
    const snd_seq_query_subscribe_t* src
);

int
snd_seq_query_subscribe_get_client(const snd_seq_query_subscribe_t* info);

int
snd_seq_query_subscribe_get_port(const snd_seq_query_subscribe_t* info);

const snd_seq_addr_t*
snd_seq_query_subscribe_get_root(const snd_seq_query_subscribe_t* info);

snd_seq_query_subs_type_t
snd_seq_query_subscribe_get_type(const snd_seq_query_subscribe_t* info);

int
snd_seq_query_subscribe_get_index(const snd_seq_query_subscribe_t* info);

int
snd_seq_query_subscribe_get_num_subs(const snd_seq_query_subscribe_t* info);

const snd_seq_addr_t*
snd_seq_query_subscribe_get_addr(const snd_seq_query_subscribe_t* info);

int
snd_seq_query_subscribe_get_queue(const snd_seq_query_subscribe_t* info);

int
snd_seq_query_subscribe_get_exclusive(const snd_seq_query_subscribe_t* info);

int
snd_seq_query_subscribe_get_time_update(const snd_seq_query_subscribe_t* info);

int
snd_seq_query_subscribe_get_time_real(const snd_seq_query_subscribe_t* info);

void
snd_seq_query_subscribe_set_client(
    snd_seq_query_subscribe_t* info,
    int client
);

void
snd_seq_query_subscribe_set_port(
    snd_seq_query_subscribe_t* info,
    int port
);

void
snd_seq_query_subscribe_set_root(
    snd_seq_query_subscribe_t* info,
    const snd_seq_addr_t* addr
);

void
snd_seq_query_subscribe_set_type(
    snd_seq_query_subscribe_t* info,
    snd_seq_query_subs_type_t type
);

void
snd_seq_query_subscribe_set_index(
    snd_seq_query_subscribe_t* info,
    int _index
);

int
snd_seq_query_port_subscribers(
    snd_seq_t* seq,
    snd_seq_query_subscribe_t* subs
);

size_t
snd_seq_queue_info_sizeof(void);

int
snd_seq_queue_info_malloc(snd_seq_queue_info_t** ptr);

void
snd_seq_queue_info_free(snd_seq_queue_info_t* ptr);

void
snd_seq_queue_info_copy(
    snd_seq_queue_info_t* dst,
    const snd_seq_queue_info_t* src
);

int
snd_seq_queue_info_get_queue(const snd_seq_queue_info_t* info);

const char*
snd_seq_queue_info_get_name(const snd_seq_queue_info_t* info);

int
snd_seq_queue_info_get_owner(const snd_seq_queue_info_t* info);

int
snd_seq_queue_info_get_locked(const snd_seq_queue_info_t* info);

unsigned int
snd_seq_queue_info_get_flags(const snd_seq_queue_info_t* info);

void
snd_seq_queue_info_set_name(
    snd_seq_queue_info_t* info,
    const char* name
);

void
snd_seq_queue_info_set_owner(
    snd_seq_queue_info_t* info,
    int owner
);

void
snd_seq_queue_info_set_locked(
    snd_seq_queue_info_t* info,
    int locked
);

void
snd_seq_queue_info_set_flags(
    snd_seq_queue_info_t* info,
    unsigned int flags
);

int
snd_seq_create_queue(
    snd_seq_t* seq,
    snd_seq_queue_info_t* info
);

int
snd_seq_alloc_named_queue(
    snd_seq_t* seq,
    const char* name
);

int
snd_seq_alloc_queue(snd_seq_t* handle);

int
snd_seq_free_queue(
    snd_seq_t* handle,
    int q
);

int
snd_seq_get_queue_info(
    snd_seq_t* seq,
    int q,
    snd_seq_queue_info_t* info
);

int
snd_seq_set_queue_info(
    snd_seq_t* seq,
    int q,
    snd_seq_queue_info_t* info
);

int
snd_seq_query_named_queue(
    snd_seq_t* seq,
    const char* name
);

int
snd_seq_get_queue_usage(
    snd_seq_t* handle,
    int q
);

int
snd_seq_set_queue_usage(
    snd_seq_t* handle,
    int q,
    int used
);

size_t
snd_seq_queue_status_sizeof(void);

int
snd_seq_queue_status_malloc(snd_seq_queue_status_t** ptr);

void
snd_seq_queue_status_free(snd_seq_queue_status_t* ptr);

void
snd_seq_queue_status_copy(
    snd_seq_queue_status_t* dst,
    const snd_seq_queue_status_t* src
);

int
snd_seq_queue_status_get_queue(const snd_seq_queue_status_t* info);

int
snd_seq_queue_status_get_events(const snd_seq_queue_status_t* info);

snd_seq_tick_time_t
snd_seq_queue_status_get_tick_time(const snd_seq_queue_status_t* info);

const snd_seq_real_time_t*
snd_seq_queue_status_get_real_time(const snd_seq_queue_status_t* info);

unsigned int
snd_seq_queue_status_get_status(const snd_seq_queue_status_t* info);

int
snd_seq_get_queue_status(
    snd_seq_t* handle,
    int q,
    snd_seq_queue_status_t* status
);

size_t
snd_seq_queue_tempo_sizeof(void);

int
snd_seq_queue_tempo_malloc(snd_seq_queue_tempo_t** ptr);

void
snd_seq_queue_tempo_free(snd_seq_queue_tempo_t* ptr);

void
snd_seq_queue_tempo_copy(
    snd_seq_queue_tempo_t* dst,
    const snd_seq_queue_tempo_t* src
);

int
snd_seq_queue_tempo_get_queue(const snd_seq_queue_tempo_t* info);

unsigned int
snd_seq_queue_tempo_get_tempo(const snd_seq_queue_tempo_t* info);

int
snd_seq_queue_tempo_get_ppq(const snd_seq_queue_tempo_t* info);

unsigned int
snd_seq_queue_tempo_get_skew(const snd_seq_queue_tempo_t* info);

unsigned int
snd_seq_queue_tempo_get_skew_base(const snd_seq_queue_tempo_t* info);

void
snd_seq_queue_tempo_set_tempo(
    snd_seq_queue_tempo_t* info,
    unsigned int tempo
);

void
snd_seq_queue_tempo_set_ppq(
    snd_seq_queue_tempo_t* info,
    int ppq
);

void
snd_seq_queue_tempo_set_skew(
    snd_seq_queue_tempo_t* info,
    unsigned int skew
);

void
snd_seq_queue_tempo_set_skew_base(
    snd_seq_queue_tempo_t* info,
    unsigned int base
);

int
snd_seq_get_queue_tempo(
    snd_seq_t* handle,
    int q,
    snd_seq_queue_tempo_t* tempo
);

int
snd_seq_set_queue_tempo(
    snd_seq_t* handle,
    int q,
    snd_seq_queue_tempo_t* tempo
);

size_t
snd_seq_queue_timer_sizeof(void);

int
snd_seq_queue_timer_malloc(snd_seq_queue_timer_t** ptr);

void
snd_seq_queue_timer_free(snd_seq_queue_timer_t* ptr);

void
snd_seq_queue_timer_copy(
    snd_seq_queue_timer_t* dst,
    const snd_seq_queue_timer_t* src
);

int
snd_seq_queue_timer_get_queue(const snd_seq_queue_timer_t* info);

snd_seq_queue_timer_type_t
snd_seq_queue_timer_get_type(const snd_seq_queue_timer_t* info);

const snd_timer_id_t*
snd_seq_queue_timer_get_id(const snd_seq_queue_timer_t* info);

unsigned int
snd_seq_queue_timer_get_resolution(const snd_seq_queue_timer_t* info);

void
snd_seq_queue_timer_set_type(
    snd_seq_queue_timer_t* info,
    snd_seq_queue_timer_type_t type
);

void
snd_seq_queue_timer_set_id(
    snd_seq_queue_timer_t* info,
    const snd_timer_id_t* id
);

void
snd_seq_queue_timer_set_resolution(
    snd_seq_queue_timer_t* info,
    unsigned int resolution
);

int
snd_seq_get_queue_timer(
    snd_seq_t* handle,
    int q,
    snd_seq_queue_timer_t* timer
);

int
snd_seq_set_queue_timer(
    snd_seq_t* handle,
    int q,
    snd_seq_queue_timer_t* timer
);

int
snd_seq_free_event(snd_seq_event_t* ev);

ssize_t
snd_seq_event_length(snd_seq_event_t* ev);

int
snd_seq_event_output(
    snd_seq_t* handle,
    snd_seq_event_t* ev
);

int
snd_seq_event_output_buffer(
    snd_seq_t* handle,
    snd_seq_event_t* ev
);

int
snd_seq_event_output_direct(
    snd_seq_t* handle,
    snd_seq_event_t* ev
);

int
snd_seq_event_input(
    snd_seq_t* handle,
    snd_seq_event_t** ev
);

int
snd_seq_event_input_pending(
    snd_seq_t* seq,
    int fetch_sequencer
);

int
snd_seq_drain_output(snd_seq_t* handle);

int
snd_seq_event_output_pending(snd_seq_t* seq);

int
snd_seq_extract_output(
    snd_seq_t* handle,
    snd_seq_event_t** ev
);

int
snd_seq_drop_output(snd_seq_t* handle);

int
snd_seq_drop_output_buffer(snd_seq_t* handle);

int
snd_seq_drop_input(snd_seq_t* handle);

int
snd_seq_drop_input_buffer(snd_seq_t* handle);

size_t
snd_seq_remove_events_sizeof(void);

int
snd_seq_remove_events_malloc(snd_seq_remove_events_t** ptr);

void
snd_seq_remove_events_free(snd_seq_remove_events_t* ptr);

void
snd_seq_remove_events_copy(
    snd_seq_remove_events_t* dst,
    const snd_seq_remove_events_t* src
);

unsigned int
snd_seq_remove_events_get_condition(const snd_seq_remove_events_t* info);

int
snd_seq_remove_events_get_queue(const snd_seq_remove_events_t* info);

const snd_seq_timestamp_t*
snd_seq_remove_events_get_time(const snd_seq_remove_events_t* info);

const snd_seq_addr_t*
snd_seq_remove_events_get_dest(const snd_seq_remove_events_t* info);

int
snd_seq_remove_events_get_channel(const snd_seq_remove_events_t* info);

int
snd_seq_remove_events_get_event_type(const snd_seq_remove_events_t* info);

int
snd_seq_remove_events_get_tag(const snd_seq_remove_events_t* info);

void
snd_seq_remove_events_set_condition(
    snd_seq_remove_events_t* info,
    unsigned int flags
);

void
snd_seq_remove_events_set_queue(
    snd_seq_remove_events_t* info,
    int queue
);

void
snd_seq_remove_events_set_time(
    snd_seq_remove_events_t* info,
    const snd_seq_timestamp_t* time
);

void
snd_seq_remove_events_set_dest(
    snd_seq_remove_events_t* info,
    const snd_seq_addr_t* addr
);

void
snd_seq_remove_events_set_channel(
    snd_seq_remove_events_t* info,
    int channel
);

void
snd_seq_remove_events_set_event_type(
    snd_seq_remove_events_t* info,
    int type
);

void
snd_seq_remove_events_set_tag(
    snd_seq_remove_events_t* info,
    int tag
);

int
snd_seq_remove_events(
    snd_seq_t* handle,
    snd_seq_remove_events_t* info
);

void
snd_seq_set_bit(
    int nr,
    void* array
);

void
snd_seq_unset_bit(
    int nr,
    void* array
);

int
snd_seq_change_bit(
    int nr,
    void* array
);

int
snd_seq_get_bit(
    int nr,
    void* array
);

struct snd_seq_ev_ext
__attribute__((packed));

int
snd_midi_event_new(
    size_t bufsize,
    snd_midi_event_t** rdev
);

int
snd_midi_event_resize_buffer(
    snd_midi_event_t* dev,
    size_t bufsize
);

void
snd_midi_event_free(snd_midi_event_t* dev);

void
snd_midi_event_init(snd_midi_event_t* dev);

void
snd_midi_event_reset_encode(snd_midi_event_t* dev);

void
snd_midi_event_reset_decode(snd_midi_event_t* dev);

void
snd_midi_event_no_status(
    snd_midi_event_t* dev,
    int on
);

long
snd_midi_event_encode(
    snd_midi_event_t* dev,
    const unsigned char* buf,
    long count,
    snd_seq_event_t* ev
);

int
snd_midi_event_encode_byte(
    snd_midi_event_t* dev,
    int c,
    snd_seq_event_t* ev
);

long
snd_midi_event_decode(
    snd_midi_event_t* dev,
    unsigned char* buf,
    long count,
    const snd_seq_event_t* ev
);

int
snd_seq_control_queue(
    snd_seq_t* seq,
    int q,
    int type,
    int value,
    snd_seq_event_t* ev
);

int
snd_seq_create_simple_port(
    snd_seq_t* seq,
    const char* name,
    unsigned int caps,
    unsigned int type
);

int
snd_seq_delete_simple_port(
    snd_seq_t* seq,
    int port
);

int
snd_seq_connect_from(
    snd_seq_t* seq,
    int my_port,
    int src_client,
    int src_port
);