alsa_ioctl 0.1.0

ioctl bindings for alsa
Documentation
use nix::libc::c_int;
use nix::{ioctl_read, ioctl_readwrite, ioctl_write_ptr};

use super::types;

// #define SNDRV_SEQ_IOCTL_PVERSION	_IOR ('S', 0x00, int)
ioctl_read! {
    seq_pversion, b'S', 0x00, c_int
}

// #define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int)
ioctl_read! {
    seq_client_id, b'S', 0x01, c_int
}

// #define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info)
ioctl_readwrite! {
    seq_system_info, b'S', 0x02, types::SndSeqSystemInfo
}

// #define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info)
ioctl_readwrite! {
    seq_running_mode, b'S', 0x03, types::SndSeqRunningInfo
}

//
// Client
//

// #define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info)
ioctl_readwrite! {
    seq_get_client_info, b'S', 0x10, types::SndSeqClientInfo
}

// #define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info)
ioctl_write_ptr! {
    seq_set_client_info, b'S', 0x11, types::SndSeqClientInfo
}

//
// Port
//

// #define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info)
ioctl_readwrite! {
    seq_create_port, b'S', 0x20, types::SndSeqPortInfo
}

// #define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info)
ioctl_write_ptr! {
    seq_delete_port, b'S', 0x21, types::SndSeqPortInfo
}

// #define SNDRV_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, struct snd_seq_port_info)
ioctl_readwrite! {
    seq_get_port_info, b'S', 0x22, types::SndSeqPortInfo
}

// #define SNDRV_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, struct snd_seq_port_info)
ioctl_write_ptr! {
    seq_set_port_info, b'S', 0x23, types::SndSeqPortInfo
}

//
// Subscribe
//

// #define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, struct snd_seq_port_subscribe)
ioctl_write_ptr! {
    seq_subscribe_port, b'S', 0x30, types::SndSeqPortSubscribe
}

// #define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
ioctl_write_ptr! {
    seq_unsubscribe_port, b'S', 0x31, types::SndSeqPortSubscribe
}

//
// Misc
//

// #define SNDRV_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, struct snd_seq_queue_info)
ioctl_readwrite! {
    seq_create_queue, b'S', 0x32, types::SndSeqQueueInfo
}

// #define SNDRV_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, struct snd_seq_queue_info)
ioctl_write_ptr! {
    seq_delete_queue, b'S', 0x33, types::SndSeqQueueInfo
}

// #define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, struct snd_seq_queue_info)
ioctl_readwrite! {
    seq_get_queue_info, b'S', 0x34, types::SndSeqQueueInfo
}

// #define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, struct snd_seq_queue_info)
ioctl_readwrite! {
    seq_set_queue_info, b'S', 0x35, types::SndSeqQueueInfo
}

// #define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, struct snd_seq_queue_info)
ioctl_readwrite! {
    seq_get_named_queue, b'S', 0x36, types::SndSeqQueueInfo
}

// #define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
ioctl_readwrite! {
    seq_get_queue_status, b'S', 0x40, types::SndSeqQueueStatus
}

// #define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, struct snd_seq_queue_tempo)
ioctl_readwrite! {
    seq_get_queue_tempo, b'S', 0x41, types::SndSeqQueueTempo
}

// #define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, struct snd_seq_queue_tempo)
ioctl_write_ptr! {
    seq_set_queue_tempo, b'S', 0x42, types::SndSeqQueueTempo
}

// #define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER	_IOWR('S', 0x45, struct snd_seq_queue_timer)
ioctl_readwrite! {
    seq_get_queue_timer, b'S', 0x45, types::SndSeqQueueTimer
}

// #define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, struct snd_seq_queue_timer)
ioctl_write_ptr! {
    seq_set_queue_timer, b'S', 0x46, types::SndSeqQueueTimer
}

// #define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, struct snd_seq_queue_client)
ioctl_readwrite! {
    seq_get_queue_client, b'S', 0x49, types::SndSeqQueueClient
}

// #define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, struct snd_seq_queue_client)
ioctl_write_ptr! {
    seq_set_queue_client, b'S', 0x4a, types::SndSeqQueueClient
}

// #define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, struct snd_seq_client_pool)
ioctl_readwrite! {
    seq_get_client_pool, b'S', 0x4b, types::SndSeqClientPool
}

// #define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, struct snd_seq_client_pool)
ioctl_write_ptr! {
    seq_set_client_pool, b'S', 0x4c, types::SndSeqClientPool
}

// #define SNDRV_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, struct snd_seq_remove_events)
ioctl_write_ptr! {
    seq_remove_events, b'S', 0x4e, types::SndSeqRemoveEvents
}

// #define SNDRV_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, struct snd_seq_query_subs)
ioctl_readwrite! {
    seq_query_subs, b'S', 0x4f, types::SndSeqQuerySubs
}

// #define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, struct snd_seq_port_subscribe)
ioctl_readwrite! {
    seq_get_subscription, b'S', 0x50, types::SndSeqPortSubscribe
}

// #define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, struct snd_seq_client_info)
ioctl_readwrite! {
    seq_query_next_client, b'S', 0x51, types::SndSeqClientInfo
}

// #define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, struct snd_seq_port_info)
ioctl_readwrite! {
    seq_query_next_port, b'S', 0x52, types::SndSeqPortInfo
}