mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Merge kernel uapi/sound/asound.h and asequencer.h
Instead of keeping modified asound.h and asequencer.h, copy the files in the kernel include/uapi/sound as is, and give some renames for avoiding conflicts with alsa-lib's definitions. Some structs, unions and typedefs in asound.h and asequencer.h are once renamed in local.h before inclusion, then renamed back again. A bonus by this action is that some local codes don't have to refer to sndrv_xxx any longer. However, some codes like src/seq/seq.c need explicit cast because of unavoidable conflicts of struct types. Another significant change is that now snd_pcm_sw_params.period_event field is removed. Instead, try to access the last reserved field internally. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
3fd4ab9be0
commit
9b5beef1dd
12 changed files with 590 additions and 636 deletions
142
include/local.h
142
include/local.h
|
|
@ -32,6 +32,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <sys/poll.h>
|
||||
#include <errno.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#include "config.h"
|
||||
#ifdef SUPPORT_RESMGR
|
||||
|
|
@ -44,65 +45,82 @@
|
|||
#endif
|
||||
|
||||
#define _snd_config_iterator list_head
|
||||
#define _snd_interval sndrv_interval
|
||||
#define _snd_pcm_info sndrv_pcm_info
|
||||
#define _snd_pcm_hw_params sndrv_pcm_hw_params
|
||||
#define _snd_pcm_sw_params sndrv_pcm_sw_params
|
||||
#define _snd_pcm_status sndrv_pcm_status
|
||||
#define _snd_interval snd_interval
|
||||
#define _snd_pcm_info snd_pcm_info
|
||||
#define _snd_pcm_hw_params snd_pcm_hw_params
|
||||
#define _snd_pcm_sw_params snd_pcm_sw_params
|
||||
#define _snd_pcm_status snd_pcm_status
|
||||
|
||||
#define _snd_ctl_card_info sndrv_ctl_card_info
|
||||
#define _snd_ctl_elem_id sndrv_ctl_elem_id
|
||||
#define _snd_ctl_elem_list sndrv_ctl_elem_list
|
||||
#define _snd_ctl_elem_info sndrv_ctl_elem_info
|
||||
#define _snd_ctl_elem_value sndrv_ctl_elem_value
|
||||
#define _snd_ctl_event sndrv_ctl_event
|
||||
#define _snd_ctl_card_info snd_ctl_card_info
|
||||
#define _snd_ctl_elem_id snd_ctl_elem_id
|
||||
#define _snd_ctl_elem_list snd_ctl_elem_list
|
||||
#define _snd_ctl_elem_info snd_ctl_elem_info
|
||||
#define _snd_ctl_elem_value snd_ctl_elem_value
|
||||
#define _snd_ctl_event snd_ctl_event
|
||||
|
||||
#define _snd_rawmidi_info sndrv_rawmidi_info
|
||||
#define _snd_rawmidi_params sndrv_rawmidi_params
|
||||
#define _snd_rawmidi_status sndrv_rawmidi_status
|
||||
#define _snd_rawmidi_info snd_rawmidi_info
|
||||
#define _snd_rawmidi_params snd_rawmidi_params
|
||||
#define _snd_rawmidi_status snd_rawmidi_status
|
||||
|
||||
#define _snd_hwdep_info sndrv_hwdep_info
|
||||
#define _snd_hwdep_dsp_status sndrv_hwdep_dsp_status
|
||||
#define _snd_hwdep_dsp_image sndrv_hwdep_dsp_image
|
||||
#define _snd_hwdep_info snd_hwdep_info
|
||||
#define _snd_hwdep_dsp_status snd_hwdep_dsp_status
|
||||
#define _snd_hwdep_dsp_image snd_hwdep_dsp_image
|
||||
|
||||
#define _snd_seq_queue_tempo sndrv_seq_queue_tempo
|
||||
#define _snd_seq_client_info sndrv_seq_client_info
|
||||
#define _snd_seq_port_info sndrv_seq_port_info
|
||||
#define _snd_seq_system_info sndrv_seq_system_info
|
||||
#define _snd_seq_queue_info sndrv_seq_queue_info
|
||||
#define _snd_seq_queue_status sndrv_seq_queue_status
|
||||
#define _snd_seq_queue_timer sndrv_seq_queue_timer
|
||||
#define _snd_seq_port_subscribe sndrv_seq_port_subscribe
|
||||
#define _snd_seq_query_subscribe sndrv_seq_query_subs
|
||||
#define _snd_seq_client_pool sndrv_seq_client_pool
|
||||
#define _snd_seq_remove_events sndrv_seq_remove_events
|
||||
#define _snd_seq_queue_tempo snd_seq_queue_tempo
|
||||
#define _snd_seq_client_info snd_seq_client_info
|
||||
#define _snd_seq_port_info snd_seq_port_info
|
||||
#define _snd_seq_system_info snd_seq_system_info
|
||||
#define _snd_seq_queue_info snd_seq_queue_info
|
||||
#define _snd_seq_queue_status snd_seq_queue_status
|
||||
#define _snd_seq_queue_timer snd_seq_queue_timer
|
||||
#define _snd_seq_port_subscribe snd_seq_port_subscribe
|
||||
#define _snd_seq_query_subscribe snd_seq_query_subs
|
||||
#define _snd_seq_client_pool snd_seq_client_pool
|
||||
#define _snd_seq_remove_events snd_seq_remove_events
|
||||
|
||||
#define sndrv_seq_addr snd_seq_addr
|
||||
#define sndrv_seq_tick_time_t snd_seq_tick_time_t
|
||||
#define sndrv_seq_real_time snd_seq_real_time
|
||||
#define sndrv_seq_timestamp snd_seq_timestamp
|
||||
#define sndrv_seq_event snd_seq_event
|
||||
|
||||
#if 0
|
||||
typedef struct sndrv_seq_addr snd_seq_addr_t;
|
||||
#define snd_seq_tick_time_t sndrv_seq_tick_time_t
|
||||
typedef struct sndrv_seq_real_time snd_seq_real_time_t;
|
||||
typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
|
||||
typedef struct sndrv_seq_event snd_seq_event_t;
|
||||
#endif
|
||||
|
||||
#define _snd_timer_id sndrv_timer_id
|
||||
#define _snd_timer_ginfo sndrv_timer_ginfo
|
||||
#define _snd_timer_gparams sndrv_timer_gparams
|
||||
#define _snd_timer_gstatus sndrv_timer_gstatus
|
||||
#define _snd_timer_select sndrv_timer_select
|
||||
#define _snd_timer_info sndrv_timer_info
|
||||
#define _snd_timer_params sndrv_timer_params
|
||||
#define _snd_timer_status sndrv_timer_status
|
||||
#define _snd_timer_id snd_timer_id
|
||||
#define _snd_timer_ginfo snd_timer_ginfo
|
||||
#define _snd_timer_gparams snd_timer_gparams
|
||||
#define _snd_timer_gstatus snd_timer_gstatus
|
||||
#define _snd_timer_select snd_timer_select
|
||||
#define _snd_timer_info snd_timer_info
|
||||
#define _snd_timer_params snd_timer_params
|
||||
#define _snd_timer_status snd_timer_status
|
||||
|
||||
#define ALSA_LIBRARY_BUILD
|
||||
|
||||
/* rename some types for avoiding conflicts with alsalib's definitions */
|
||||
#define snd_aes_iec958 sndrv_aes_iec958
|
||||
#define snd_pcm_uframes_t sndrv_pcm_uframes_t
|
||||
#define snd_pcm_sframes_t sndrv_pcm_sframes_t
|
||||
#define snd_pcm_access_t sndrv_pcm_access_t
|
||||
#define snd_pcm_format_t sndrv_pcm_format_t
|
||||
#define snd_pcm_subformat_t sndrv_pcm_subformat_t
|
||||
#define snd_pcm_state_t sndrv_pcm_state_t
|
||||
#define snd_interval sndrv_interval
|
||||
#define snd_mask sndrv_mask
|
||||
#define snd_ctl_elem_type_t sndrv_ctl_elem_type_t
|
||||
#define snd_ctl_elem_iface_t sndrv_ctl_elem_iface_t
|
||||
#define snd_ctl_tlv sndrv_ctl_tlv
|
||||
|
||||
/* kill and replace kernel-specific types */
|
||||
#define __user
|
||||
#define __force
|
||||
#define __kernel_off_t off_t
|
||||
|
||||
#include <sound/asound.h>
|
||||
|
||||
/* take back superfluous renames; some can be kept as is */
|
||||
#undef snd_aes_iec958
|
||||
#undef snd_pcm_uframes_t
|
||||
#undef snd_pcm_sframes_t
|
||||
#undef snd_pcm_access_t
|
||||
#undef snd_pcm_format_t
|
||||
#undef snd_pcm_subformat_t
|
||||
#undef snd_pcm_state_t
|
||||
#undef snd_ctl_elem_type_t
|
||||
#undef snd_ctl_elem_iface_t
|
||||
|
||||
#include <sound/asoundef.h>
|
||||
#include "alsa-symbols.h"
|
||||
#include "version.h"
|
||||
|
|
@ -120,7 +138,31 @@ typedef struct sndrv_seq_event snd_seq_event_t;
|
|||
#include "mixer.h"
|
||||
#include "seq_event.h"
|
||||
#include "seq.h"
|
||||
|
||||
/* rename some types for avoiding conflicts with alsalib's definitions */
|
||||
#define snd_seq_addr sndrv_seq_addr
|
||||
#define snd_seq_tick_time_t sndrv_seq_tick_time_t
|
||||
#define snd_seq_real_time sndrv_seq_real_time
|
||||
#define snd_seq_timestamp sndrv_seq_timestamp
|
||||
#define snd_seq_event sndrv_seq_event
|
||||
#define snd_seq_connect sndrv_seq_connect
|
||||
#define snd_seq_ev_note sndrv_seq_ev_note
|
||||
#define snd_seq_ev_ctrl sndrv_seq_ev_ctrl
|
||||
#define snd_seq_ev_raw8 sndrv_seq_ev_raw8
|
||||
#define snd_seq_ev_raw32 sndrv_seq_ev_raw32
|
||||
#define snd_seq_ev_ext sndrv_seq_ev_ext
|
||||
#define snd_seq_result sndrv_seq_result
|
||||
#define snd_seq_queue_skew sndrv_seq_queue_skew
|
||||
#define snd_seq_ev_queue_control sndrv_seq_ev_queue_control
|
||||
#define snd_seq_client_t sndrv_seq_client_t
|
||||
#define snd_seq_client_type_t sndrv_seq_client_type_t
|
||||
|
||||
#include <sound/asequencer.h>
|
||||
|
||||
/* take back some renames */
|
||||
#undef snd_seq_client_t
|
||||
#undef snd_seq_client_type_t
|
||||
|
||||
#include "seqmid.h"
|
||||
#include "seq_midi_event.h"
|
||||
#include "list.h"
|
||||
|
|
|
|||
|
|
@ -19,31 +19,25 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
#ifndef __SOUND_ASEQUENCER_H
|
||||
#define __SOUND_ASEQUENCER_H
|
||||
#ifndef _UAPI__SOUND_ASEQUENCER_H
|
||||
#define _UAPI__SOUND_ASEQUENCER_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <sound/asound.h>
|
||||
|
||||
/** version of the sequencer */
|
||||
#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/**
|
||||
* definition of sequencer event types
|
||||
*/
|
||||
|
||||
/** system messages
|
||||
* event data type = #sndrv_seq_result_t
|
||||
* event data type = #snd_seq_result
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_SYSTEM 0
|
||||
#define SNDRV_SEQ_EVENT_RESULT 1
|
||||
|
||||
/** note messages (channel specific)
|
||||
* event data type = #sndrv_seq_ev_note
|
||||
* event data type = #snd_seq_ev_note
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_NOTE 5
|
||||
#define SNDRV_SEQ_EVENT_NOTEON 6
|
||||
|
|
@ -51,7 +45,7 @@
|
|||
#define SNDRV_SEQ_EVENT_KEYPRESS 8
|
||||
|
||||
/** control messages (channel specific)
|
||||
* event data type = #sndrv_seq_ev_ctrl
|
||||
* event data type = #snd_seq_ev_ctrl
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_CONTROLLER 10
|
||||
#define SNDRV_SEQ_EVENT_PGMCHANGE 11
|
||||
|
|
@ -62,7 +56,7 @@
|
|||
#define SNDRV_SEQ_EVENT_REGPARAM 16 /**< 14 bit RPN address + 14 bit unsigned value */
|
||||
|
||||
/** synchronisation messages
|
||||
* event data type = #sndrv_seq_ev_ctrl
|
||||
* event data type = #snd_seq_ev_ctrl
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_SONGPOS 20 /* Song Position Pointer with LSB and MSB values */
|
||||
#define SNDRV_SEQ_EVENT_SONGSEL 21 /* Song Select with song ID number */
|
||||
|
|
@ -71,7 +65,7 @@
|
|||
#define SNDRV_SEQ_EVENT_KEYSIGN 24 /* SMF Key Signature event */
|
||||
|
||||
/** timer messages
|
||||
* event data type = sndrv_seq_ev_queue_control_t
|
||||
* event data type = snd_seq_ev_queue_control
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_START 30 /* midi Real Time Start message */
|
||||
#define SNDRV_SEQ_EVENT_CONTINUE 31 /* midi Real Time Continue message */
|
||||
|
|
@ -97,7 +91,7 @@
|
|||
#define SNDRV_SEQ_EVENT_OSS 51 /* OSS raw event */
|
||||
|
||||
/** system status messages (broadcast for subscribers)
|
||||
* event data type = sndrv_seq_addr_t
|
||||
* event data type = snd_seq_addr
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_CLIENT_START 60 /* new client has connected */
|
||||
#define SNDRV_SEQ_EVENT_CLIENT_EXIT 61 /* client has left the system */
|
||||
|
|
@ -107,7 +101,7 @@
|
|||
#define SNDRV_SEQ_EVENT_PORT_CHANGE 65 /* port status/info has changed */
|
||||
|
||||
/** port connection changes
|
||||
* event data type = sndrv_seq_connect_t
|
||||
* event data type = snd_seq_connect
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */
|
||||
#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */
|
||||
|
|
@ -132,7 +126,7 @@
|
|||
/* 119-129: reserved */
|
||||
|
||||
/* 130-139: variable length events
|
||||
* event data type = sndrv_seq_ev_ext
|
||||
* event data type = snd_seq_ev_ext
|
||||
* (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set)
|
||||
*/
|
||||
#define SNDRV_SEQ_EVENT_SYSEX 130 /* system exclusive data (variable length) */
|
||||
|
|
@ -156,18 +150,18 @@
|
|||
#define SNDRV_SEQ_EVENT_NONE 255
|
||||
|
||||
|
||||
typedef unsigned char sndrv_seq_event_type_t;
|
||||
typedef unsigned char snd_seq_event_type_t;
|
||||
|
||||
/** event address */
|
||||
struct sndrv_seq_addr {
|
||||
struct snd_seq_addr {
|
||||
unsigned char client; /**< Client number: 0..255, 255 = broadcast to all clients */
|
||||
unsigned char port; /**< Port within client: 0..255, 255 = broadcast to all ports */
|
||||
};
|
||||
|
||||
/** port connection */
|
||||
struct sndrv_seq_connect {
|
||||
struct sndrv_seq_addr sender;
|
||||
struct sndrv_seq_addr dest;
|
||||
struct snd_seq_connect {
|
||||
struct snd_seq_addr sender;
|
||||
struct snd_seq_addr dest;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -196,7 +190,7 @@ struct sndrv_seq_connect {
|
|||
|
||||
|
||||
/* note event */
|
||||
struct sndrv_seq_ev_note {
|
||||
struct snd_seq_ev_note {
|
||||
unsigned char channel;
|
||||
unsigned char note;
|
||||
unsigned char velocity;
|
||||
|
|
@ -205,7 +199,7 @@ struct sndrv_seq_ev_note {
|
|||
};
|
||||
|
||||
/* controller event */
|
||||
struct sndrv_seq_ev_ctrl {
|
||||
struct snd_seq_ev_ctrl {
|
||||
unsigned char channel;
|
||||
unsigned char unused1, unused2, unused3; /* pad */
|
||||
unsigned int param;
|
||||
|
|
@ -213,91 +207,91 @@ struct sndrv_seq_ev_ctrl {
|
|||
};
|
||||
|
||||
/* generic set of bytes (12x8 bit) */
|
||||
struct sndrv_seq_ev_raw8 {
|
||||
struct snd_seq_ev_raw8 {
|
||||
unsigned char d[12]; /* 8 bit value */
|
||||
};
|
||||
|
||||
/* generic set of integers (3x32 bit) */
|
||||
struct sndrv_seq_ev_raw32 {
|
||||
struct snd_seq_ev_raw32 {
|
||||
unsigned int d[3]; /* 32 bit value */
|
||||
};
|
||||
|
||||
/* external stored data */
|
||||
struct sndrv_seq_ev_ext {
|
||||
struct snd_seq_ev_ext {
|
||||
unsigned int len; /* length of data */
|
||||
void *ptr; /* pointer to data (note: maybe 64-bit) */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct sndrv_seq_result {
|
||||
struct snd_seq_result {
|
||||
int event; /* processed event type */
|
||||
int result;
|
||||
};
|
||||
|
||||
|
||||
struct sndrv_seq_real_time {
|
||||
struct snd_seq_real_time {
|
||||
unsigned int tv_sec; /* seconds */
|
||||
unsigned int tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
typedef unsigned int sndrv_seq_tick_time_t; /* midi ticks */
|
||||
typedef unsigned int snd_seq_tick_time_t; /* midi ticks */
|
||||
|
||||
union sndrv_seq_timestamp {
|
||||
sndrv_seq_tick_time_t tick;
|
||||
struct sndrv_seq_real_time time;
|
||||
union snd_seq_timestamp {
|
||||
snd_seq_tick_time_t tick;
|
||||
struct snd_seq_real_time time;
|
||||
};
|
||||
|
||||
struct sndrv_seq_queue_skew {
|
||||
struct snd_seq_queue_skew {
|
||||
unsigned int value;
|
||||
unsigned int base;
|
||||
};
|
||||
|
||||
/* queue timer control */
|
||||
struct sndrv_seq_ev_queue_control {
|
||||
struct snd_seq_ev_queue_control {
|
||||
unsigned char queue; /* affected queue */
|
||||
unsigned char pad[3]; /* reserved */
|
||||
union {
|
||||
signed int value; /* affected value (e.g. tempo) */
|
||||
union sndrv_seq_timestamp time; /* time */
|
||||
union snd_seq_timestamp time; /* time */
|
||||
unsigned int position; /* sync position */
|
||||
struct sndrv_seq_queue_skew skew;
|
||||
struct snd_seq_queue_skew skew;
|
||||
unsigned int d32[2];
|
||||
unsigned char d8[8];
|
||||
} param;
|
||||
};
|
||||
|
||||
/* quoted event - inside the kernel only */
|
||||
struct sndrv_seq_ev_quote {
|
||||
struct sndrv_seq_addr origin; /* original sender */
|
||||
struct snd_seq_ev_quote {
|
||||
struct snd_seq_addr origin; /* original sender */
|
||||
unsigned short value; /* optional data */
|
||||
struct sndrv_seq_event *event; /* quoted event */
|
||||
struct snd_seq_event *event; /* quoted event */
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
/* sequencer event */
|
||||
struct sndrv_seq_event {
|
||||
sndrv_seq_event_type_t type; /* event type */
|
||||
struct snd_seq_event {
|
||||
snd_seq_event_type_t type; /* event type */
|
||||
unsigned char flags; /* event flags */
|
||||
char tag;
|
||||
|
||||
unsigned char queue; /* schedule queue */
|
||||
union sndrv_seq_timestamp time; /* schedule time */
|
||||
union snd_seq_timestamp time; /* schedule time */
|
||||
|
||||
|
||||
struct sndrv_seq_addr source; /* source address */
|
||||
struct sndrv_seq_addr dest; /* destination address */
|
||||
struct snd_seq_addr source; /* source address */
|
||||
struct snd_seq_addr dest; /* destination address */
|
||||
|
||||
union { /* event data... */
|
||||
struct sndrv_seq_ev_note note;
|
||||
struct sndrv_seq_ev_ctrl control;
|
||||
struct sndrv_seq_ev_raw8 raw8;
|
||||
struct sndrv_seq_ev_raw32 raw32;
|
||||
struct sndrv_seq_ev_ext ext;
|
||||
struct sndrv_seq_ev_queue_control queue;
|
||||
union sndrv_seq_timestamp time;
|
||||
struct sndrv_seq_addr addr;
|
||||
struct sndrv_seq_connect connect;
|
||||
struct sndrv_seq_result result;
|
||||
struct sndrv_seq_ev_quote quote;
|
||||
struct snd_seq_ev_note note;
|
||||
struct snd_seq_ev_ctrl control;
|
||||
struct snd_seq_ev_raw8 raw8;
|
||||
struct snd_seq_ev_raw32 raw32;
|
||||
struct snd_seq_ev_ext ext;
|
||||
struct snd_seq_ev_queue_control queue;
|
||||
union snd_seq_timestamp time;
|
||||
struct snd_seq_addr addr;
|
||||
struct snd_seq_connect connect;
|
||||
struct snd_seq_result result;
|
||||
struct snd_seq_ev_quote quote;
|
||||
} data;
|
||||
};
|
||||
|
||||
|
|
@ -305,72 +299,15 @@ struct sndrv_seq_event {
|
|||
/*
|
||||
* bounce event - stored as variable size data
|
||||
*/
|
||||
struct sndrv_seq_event_bounce {
|
||||
struct snd_seq_event_bounce {
|
||||
int err;
|
||||
struct sndrv_seq_event event;
|
||||
struct snd_seq_event event;
|
||||
/* external data follows here. */
|
||||
};
|
||||
|
||||
#define sndrv_seq_event_bounce_ext_data(ev) ((void*)((char *)(ev)->data.ext.ptr + sizeof(sndrv_seq_event_bounce_t)))
|
||||
|
||||
/*
|
||||
* type check macros
|
||||
*/
|
||||
/* result events: 0-4 */
|
||||
#define sndrv_seq_ev_is_result_type(ev) ((ev)->type < 5)
|
||||
/* channel specific events: 5-19 */
|
||||
#define sndrv_seq_ev_is_channel_type(ev) ((ev)->type >= 5 && (ev)->type < 20)
|
||||
/* note events: 5-9 */
|
||||
#define sndrv_seq_ev_is_note_type(ev) ((ev)->type >= 5 && (ev)->type < 10)
|
||||
/* control events: 10-19 */
|
||||
#define sndrv_seq_ev_is_control_type(ev) ((ev)->type >= 10 && (ev)->type < 20)
|
||||
/* queue control events: 30-39 */
|
||||
#define sndrv_seq_ev_is_queue_type(ev) ((ev)->type >= 30 && (ev)->type < 40)
|
||||
/* system status messages */
|
||||
#define sndrv_seq_ev_is_message_type(ev) ((ev)->type >= 60 && (ev)->type < 69)
|
||||
/* sample messages */
|
||||
#define sndrv_seq_ev_is_sample_type(ev) ((ev)->type >= 70 && (ev)->type < 79)
|
||||
/* user-defined messages */
|
||||
#define sndrv_seq_ev_is_user_type(ev) ((ev)->type >= 90 && (ev)->type < 99)
|
||||
/* fixed length events: 0-99 */
|
||||
#define sndrv_seq_ev_is_fixed_type(ev) ((ev)->type < 100)
|
||||
/* variable length events: 130-139 */
|
||||
#define sndrv_seq_ev_is_variable_type(ev) ((ev)->type >= 130 && (ev)->type < 140)
|
||||
/* reserved for kernel */
|
||||
#define sndrv_seq_ev_is_reserved(ev) ((ev)->type >= 150)
|
||||
|
||||
/* direct dispatched events */
|
||||
#define sndrv_seq_ev_is_direct(ev) ((ev)->queue == SNDRV_SEQ_QUEUE_DIRECT)
|
||||
|
||||
/*
|
||||
* macros to check event flags
|
||||
*/
|
||||
/* prior events */
|
||||
#define sndrv_seq_ev_is_prior(ev) (((ev)->flags & SNDRV_SEQ_PRIORITY_MASK) == SNDRV_SEQ_PRIORITY_HIGH)
|
||||
|
||||
/* event length type */
|
||||
#define sndrv_seq_ev_length_type(ev) ((ev)->flags & SNDRV_SEQ_EVENT_LENGTH_MASK)
|
||||
#define sndrv_seq_ev_is_fixed(ev) (sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_FIXED)
|
||||
#define sndrv_seq_ev_is_variable(ev) (sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
|
||||
#define sndrv_seq_ev_is_varusr(ev) (sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARUSR)
|
||||
|
||||
/* time-stamp type */
|
||||
#define sndrv_seq_ev_timestamp_type(ev) ((ev)->flags & SNDRV_SEQ_TIME_STAMP_MASK)
|
||||
#define sndrv_seq_ev_is_tick(ev) (sndrv_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_TICK)
|
||||
#define sndrv_seq_ev_is_real(ev) (sndrv_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_REAL)
|
||||
|
||||
/* time-mode type */
|
||||
#define sndrv_seq_ev_timemode_type(ev) ((ev)->flags & SNDRV_SEQ_TIME_MODE_MASK)
|
||||
#define sndrv_seq_ev_is_abstime(ev) (sndrv_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_ABS)
|
||||
#define sndrv_seq_ev_is_reltime(ev) (sndrv_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_REL)
|
||||
|
||||
/* queue sync port */
|
||||
#define sndrv_seq_queue_sync_port(q) ((q) + 16)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/* system information */
|
||||
struct sndrv_seq_system_info {
|
||||
struct snd_seq_system_info {
|
||||
int queues; /* maximum queues count */
|
||||
int clients; /* maximum clients count */
|
||||
int ports; /* maximum ports per client */
|
||||
|
|
@ -382,7 +319,7 @@ struct sndrv_seq_system_info {
|
|||
|
||||
|
||||
/* system running information */
|
||||
struct sndrv_seq_running_info {
|
||||
struct snd_seq_running_info {
|
||||
unsigned char client; /* client id */
|
||||
unsigned char big_endian; /* 1 = big-endian */
|
||||
unsigned char cpu_mode; /* 4 = 32bit, 8 = 64bit */
|
||||
|
|
@ -399,11 +336,10 @@ struct sndrv_seq_running_info {
|
|||
|
||||
|
||||
/* client types */
|
||||
enum sndrv_seq_client_type {
|
||||
NO_CLIENT = 0,
|
||||
USER_CLIENT = 1,
|
||||
KERNEL_CLIENT = 2
|
||||
};
|
||||
typedef int __bitwise snd_seq_client_type_t;
|
||||
#define NO_CLIENT ((__force snd_seq_client_type_t) 0)
|
||||
#define USER_CLIENT ((__force snd_seq_client_type_t) 1)
|
||||
#define KERNEL_CLIENT ((__force snd_seq_client_type_t) 2)
|
||||
|
||||
/* event filter flags */
|
||||
#define SNDRV_SEQ_FILTER_BROADCAST (1<<0) /* accept broadcast messages */
|
||||
|
|
@ -411,9 +347,9 @@ enum sndrv_seq_client_type {
|
|||
#define SNDRV_SEQ_FILTER_BOUNCE (1<<2) /* accept bounce event in error */
|
||||
#define SNDRV_SEQ_FILTER_USE_EVENT (1<<31) /* use event filter */
|
||||
|
||||
struct sndrv_seq_client_info {
|
||||
struct snd_seq_client_info {
|
||||
int client; /* client number to inquire */
|
||||
int type; /* client type */
|
||||
snd_seq_client_type_t type; /* client type */
|
||||
char name[64]; /* client name */
|
||||
unsigned int filter; /* filter flags */
|
||||
unsigned char multicast_filter[8]; /* multicast filter bitmap */
|
||||
|
|
@ -425,7 +361,7 @@ struct sndrv_seq_client_info {
|
|||
|
||||
|
||||
/* client pool size */
|
||||
struct sndrv_seq_client_pool {
|
||||
struct snd_seq_client_pool {
|
||||
int client; /* client number to inquire */
|
||||
int output_pool; /* outgoing (write) pool size */
|
||||
int input_pool; /* incoming (read) pool size */
|
||||
|
|
@ -449,13 +385,13 @@ struct sndrv_seq_client_pool {
|
|||
#define SNDRV_SEQ_REMOVE_IGNORE_OFF (1<<8) /* Do not flush off events */
|
||||
#define SNDRV_SEQ_REMOVE_TAG_MATCH (1<<9) /* Restrict to events with given tag */
|
||||
|
||||
struct sndrv_seq_remove_events {
|
||||
struct snd_seq_remove_events {
|
||||
unsigned int remove_mode; /* Flags that determine what gets removed */
|
||||
|
||||
union sndrv_seq_timestamp time;
|
||||
union snd_seq_timestamp time;
|
||||
|
||||
unsigned char queue; /* Queue for REMOVE_DEST */
|
||||
struct sndrv_seq_addr dest; /* Address for REMOVE_DEST */
|
||||
struct snd_seq_addr dest; /* Address for REMOVE_DEST */
|
||||
unsigned char channel; /* Channel for REMOVE_DEST */
|
||||
|
||||
int type; /* For REMOVE_EVENT_TYPE */
|
||||
|
|
@ -508,8 +444,8 @@ struct sndrv_seq_remove_events {
|
|||
#define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1)
|
||||
#define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2)
|
||||
|
||||
struct sndrv_seq_port_info {
|
||||
struct sndrv_seq_addr addr; /* client/port numbers */
|
||||
struct snd_seq_port_info {
|
||||
struct snd_seq_addr addr; /* client/port numbers */
|
||||
char name[64]; /* port name */
|
||||
|
||||
unsigned int capability; /* port capability bits */
|
||||
|
|
@ -532,7 +468,7 @@ struct sndrv_seq_port_info {
|
|||
#define SNDRV_SEQ_QUEUE_FLG_SYNC (1<<0) /* sync enabled */
|
||||
|
||||
/* queue information */
|
||||
struct sndrv_seq_queue_info {
|
||||
struct snd_seq_queue_info {
|
||||
int queue; /* queue id */
|
||||
|
||||
/*
|
||||
|
|
@ -540,7 +476,7 @@ struct sndrv_seq_queue_info {
|
|||
* etc. if the queue is locked for other clients
|
||||
*/
|
||||
int owner; /* client id for owner of the queue */
|
||||
int locked:1; /* timing queue locked for other queues */
|
||||
unsigned locked:1; /* timing queue locked for other queues */
|
||||
char name[64]; /* name of this queue */
|
||||
unsigned int flags; /* flags */
|
||||
char reserved[60]; /* for future use */
|
||||
|
|
@ -548,11 +484,11 @@ struct sndrv_seq_queue_info {
|
|||
};
|
||||
|
||||
/* queue info/status */
|
||||
struct sndrv_seq_queue_status {
|
||||
struct snd_seq_queue_status {
|
||||
int queue; /* queue id */
|
||||
int events; /* read-only - queue size */
|
||||
sndrv_seq_tick_time_t tick; /* current tick */
|
||||
struct sndrv_seq_real_time time; /* current time */
|
||||
snd_seq_tick_time_t tick; /* current tick */
|
||||
struct snd_seq_real_time time; /* current time */
|
||||
int running; /* running state of queue */
|
||||
int flags; /* various flags */
|
||||
char reserved[64]; /* for the future */
|
||||
|
|
@ -560,7 +496,7 @@ struct sndrv_seq_queue_status {
|
|||
|
||||
|
||||
/* queue tempo */
|
||||
struct sndrv_seq_queue_tempo {
|
||||
struct snd_seq_queue_tempo {
|
||||
int queue; /* sequencer queue */
|
||||
unsigned int tempo; /* current tempo, us/tick */
|
||||
int ppq; /* time resolution, ticks/quarter */
|
||||
|
|
@ -576,12 +512,12 @@ struct sndrv_seq_queue_tempo {
|
|||
#define SNDRV_SEQ_TIMER_MIDI_TICK 2 /* Midi Timer Tick (TICK event) */
|
||||
|
||||
/* queue timer info */
|
||||
struct sndrv_seq_queue_timer {
|
||||
struct snd_seq_queue_timer {
|
||||
int queue; /* sequencer queue */
|
||||
int type; /* source timer type */
|
||||
union {
|
||||
struct {
|
||||
struct sndrv_timer_id id; /* ALSA's timer ID */
|
||||
struct snd_timer_id id; /* ALSA's timer ID */
|
||||
unsigned int resolution; /* resolution in Hz */
|
||||
} alsa;
|
||||
} u;
|
||||
|
|
@ -589,7 +525,7 @@ struct sndrv_seq_queue_timer {
|
|||
};
|
||||
|
||||
|
||||
struct sndrv_seq_queue_client {
|
||||
struct snd_seq_queue_client {
|
||||
int queue; /* sequencer queue */
|
||||
int client; /* sequencer client */
|
||||
int used; /* queue is used with this client
|
||||
|
|
@ -603,9 +539,9 @@ struct sndrv_seq_queue_client {
|
|||
#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1<<1)
|
||||
#define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1<<2)
|
||||
|
||||
struct sndrv_seq_port_subscribe {
|
||||
struct sndrv_seq_addr sender; /* sender address */
|
||||
struct sndrv_seq_addr dest; /* destination address */
|
||||
struct snd_seq_port_subscribe {
|
||||
struct snd_seq_addr sender; /* sender address */
|
||||
struct snd_seq_addr dest; /* destination address */
|
||||
unsigned int voices; /* number of voices to be allocated (0 = don't care) */
|
||||
unsigned int flags; /* modes */
|
||||
unsigned char queue; /* input time-stamp queue (optional) */
|
||||
|
|
@ -617,12 +553,12 @@ struct sndrv_seq_port_subscribe {
|
|||
#define SNDRV_SEQ_QUERY_SUBS_READ 0
|
||||
#define SNDRV_SEQ_QUERY_SUBS_WRITE 1
|
||||
|
||||
struct sndrv_seq_query_subs {
|
||||
struct sndrv_seq_addr root; /* client/port id to be searched */
|
||||
struct snd_seq_query_subs {
|
||||
struct snd_seq_addr root; /* client/port id to be searched */
|
||||
int type; /* READ or WRITE */
|
||||
int index; /* 0..N-1 */
|
||||
int num_subs; /* R/O: number of subscriptions on this port */
|
||||
struct sndrv_seq_addr addr; /* R/O: result */
|
||||
struct snd_seq_addr addr; /* R/O: result */
|
||||
unsigned char queue; /* R/O: result */
|
||||
unsigned int flags; /* R/O: result */
|
||||
char reserved[64]; /* for future use */
|
||||
|
|
@ -635,44 +571,44 @@ struct sndrv_seq_query_subs {
|
|||
|
||||
#define SNDRV_SEQ_IOCTL_PVERSION _IOR ('S', 0x00, int)
|
||||
#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR ('S', 0x01, int)
|
||||
#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct sndrv_seq_system_info)
|
||||
#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct sndrv_seq_running_info)
|
||||
#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info)
|
||||
#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info)
|
||||
|
||||
#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct sndrv_seq_client_info)
|
||||
#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct sndrv_seq_client_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info)
|
||||
#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct snd_seq_client_info)
|
||||
|
||||
#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct sndrv_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct sndrv_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct sndrv_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct sndrv_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct snd_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct snd_seq_port_info)
|
||||
|
||||
#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct sndrv_seq_port_subscribe)
|
||||
#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct sndrv_seq_port_subscribe)
|
||||
#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct snd_seq_port_subscribe)
|
||||
#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
|
||||
|
||||
#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct sndrv_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct sndrv_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct sndrv_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct sndrv_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct sndrv_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct sndrv_seq_queue_status)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct sndrv_seq_queue_tempo)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct sndrv_seq_queue_tempo)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER _IOWR('S', 0x43, struct sndrv_seq_queue_owner)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER _IOW ('S', 0x44, struct sndrv_seq_queue_owner)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct sndrv_seq_queue_timer)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct sndrv_seq_queue_timer)
|
||||
#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct snd_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER _IOWR('S', 0x43, struct snd_seq_queue_owner)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER _IOW ('S', 0x44, struct snd_seq_queue_owner)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer)
|
||||
/* XXX
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC _IOWR('S', 0x53, struct sndrv_seq_queue_sync)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC _IOW ('S', 0x54, struct sndrv_seq_queue_sync)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC _IOWR('S', 0x53, struct snd_seq_queue_sync)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC _IOW ('S', 0x54, struct snd_seq_queue_sync)
|
||||
*/
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct sndrv_seq_queue_client)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct sndrv_seq_queue_client)
|
||||
#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct sndrv_seq_client_pool)
|
||||
#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct sndrv_seq_client_pool)
|
||||
#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct sndrv_seq_remove_events)
|
||||
#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct sndrv_seq_query_subs)
|
||||
#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct sndrv_seq_port_subscribe)
|
||||
#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct sndrv_seq_client_info)
|
||||
#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct sndrv_seq_port_info)
|
||||
#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
|
||||
#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client)
|
||||
#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)
|
||||
#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct snd_seq_client_pool)
|
||||
#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct snd_seq_remove_events)
|
||||
#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs)
|
||||
#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe)
|
||||
#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info)
|
||||
#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info)
|
||||
|
||||
#endif /* __SOUND_ASEQUENCER_H */
|
||||
#endif /* _UAPI__SOUND_ASEQUENCER_H */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -217,7 +217,7 @@ static int snd_ctl_hw_elem_tlv(snd_ctl_t *handle, int op_flag,
|
|||
{
|
||||
int inum;
|
||||
snd_ctl_hw_t *hw = handle->private_data;
|
||||
struct sndrv_ctl_tlv *xtlv;
|
||||
struct snd_ctl_tlv *xtlv;
|
||||
|
||||
/* we don't support TLV on protocol ver 2.0.3 or earlier */
|
||||
if (hw->protocol < SNDRV_PROTOCOL_VERSION(2, 0, 4))
|
||||
|
|
@ -229,7 +229,7 @@ static int snd_ctl_hw_elem_tlv(snd_ctl_t *handle, int op_flag,
|
|||
case 1: inum = SNDRV_CTL_IOCTL_TLV_WRITE; break;
|
||||
default: return -EINVAL;
|
||||
}
|
||||
xtlv = malloc(sizeof(struct sndrv_ctl_tlv) + tlv_size);
|
||||
xtlv = malloc(sizeof(struct snd_ctl_tlv) + tlv_size);
|
||||
if (xtlv == NULL)
|
||||
return -ENOMEM;
|
||||
xtlv->numid = numid;
|
||||
|
|
|
|||
|
|
@ -895,7 +895,7 @@ int snd_pcm_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params)
|
|||
pcm->tstamp_mode = params->tstamp_mode;
|
||||
pcm->period_step = params->period_step;
|
||||
pcm->avail_min = params->avail_min;
|
||||
pcm->period_event = params->period_event;
|
||||
pcm->period_event = sw_get_period_event(params);
|
||||
pcm->start_threshold = params->start_threshold;
|
||||
pcm->stop_threshold = params->stop_threshold;
|
||||
pcm->silence_threshold = params->silence_threshold;
|
||||
|
|
@ -5572,7 +5572,7 @@ int snd_pcm_sw_params_current(snd_pcm_t *pcm, snd_pcm_sw_params_t *params)
|
|||
params->period_step = pcm->period_step;
|
||||
params->sleep_min = 0;
|
||||
params->avail_min = pcm->avail_min;
|
||||
params->period_event = pcm->period_event;
|
||||
sw_set_period_event(params, pcm->period_event);
|
||||
params->xfer_align = 1;
|
||||
params->start_threshold = pcm->start_threshold;
|
||||
params->stop_threshold = pcm->stop_threshold;
|
||||
|
|
@ -5880,7 +5880,7 @@ int snd_pcm_sw_params_get_avail_min(const snd_pcm_sw_params_t *params, snd_pcm_u
|
|||
int snd_pcm_sw_params_set_period_event(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, int val)
|
||||
{
|
||||
assert(pcm && params);
|
||||
params->period_event = val;
|
||||
sw_set_period_event(params, val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -5893,7 +5893,7 @@ int snd_pcm_sw_params_set_period_event(snd_pcm_t *pcm, snd_pcm_sw_params_t *para
|
|||
int snd_pcm_sw_params_get_period_event(const snd_pcm_sw_params_t *params, int *val)
|
||||
{
|
||||
assert(params && val);
|
||||
*val = params->period_event;
|
||||
*val = sw_get_period_event(params);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct sndrv_pcm_hw_params_old {
|
|||
unsigned int flags;
|
||||
unsigned int masks[SNDRV_PCM_HW_PARAM_SUBFORMAT -
|
||||
SNDRV_PCM_HW_PARAM_ACCESS + 1];
|
||||
struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
|
||||
struct snd_interval intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
|
||||
SNDRV_PCM_HW_PARAM_SAMPLE_BITS + 1];
|
||||
unsigned int rmask;
|
||||
unsigned int cmask;
|
||||
|
|
@ -92,9 +92,9 @@ typedef struct {
|
|||
int fd;
|
||||
int card, device, subdevice;
|
||||
int sync_ptr_ioctl;
|
||||
volatile struct sndrv_pcm_mmap_status * mmap_status;
|
||||
struct sndrv_pcm_mmap_control *mmap_control;
|
||||
struct sndrv_pcm_sync_ptr *sync_ptr;
|
||||
volatile struct snd_pcm_mmap_status * mmap_status;
|
||||
struct snd_pcm_mmap_control *mmap_control;
|
||||
struct snd_pcm_sync_ptr *sync_ptr;
|
||||
snd_pcm_uframes_t hw_ptr;
|
||||
snd_pcm_uframes_t appl_ptr;
|
||||
int period_event;
|
||||
|
|
@ -116,7 +116,7 @@ typedef struct {
|
|||
|
||||
/* update appl_ptr with driver */
|
||||
#define FAST_PCM_STATE(hw) \
|
||||
((enum sndrv_pcm_state) (hw)->mmap_status->state)
|
||||
((snd_pcm_state_t) (hw)->mmap_status->state)
|
||||
#define FAST_PCM_TSTAMP(hw) \
|
||||
((hw)->mmap_status->tstamp)
|
||||
|
||||
|
|
@ -434,8 +434,8 @@ static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
|
|||
{
|
||||
snd_pcm_hw_t *hw = pcm->private_data;
|
||||
int fd = hw->fd, err;
|
||||
int old_period_event = params->period_event;
|
||||
params->period_event = 0;
|
||||
int old_period_event = sw_get_period_event(params);
|
||||
sw_set_period_event(params, 0);
|
||||
if ((snd_pcm_tstamp_t) params->tstamp_mode == pcm->tstamp_mode &&
|
||||
params->period_step == pcm->period_step &&
|
||||
params->start_threshold == pcm->start_threshold &&
|
||||
|
|
@ -451,7 +451,7 @@ static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
|
|||
SYSMSG("SNDRV_PCM_IOCTL_SW_PARAMS failed (%i)", err);
|
||||
return err;
|
||||
}
|
||||
params->period_event = old_period_event;
|
||||
sw_set_period_event(params, old_period_event);
|
||||
hw->mmap_control->avail_min = params->avail_min;
|
||||
if (hw->period_event != old_period_event) {
|
||||
err = snd_pcm_hw_change_timer(pcm, old_period_event);
|
||||
|
|
@ -465,7 +465,7 @@ static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
|
|||
static int snd_pcm_hw_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info)
|
||||
{
|
||||
snd_pcm_hw_t *hw = pcm->private_data;
|
||||
struct sndrv_pcm_channel_info i;
|
||||
struct snd_pcm_channel_info i;
|
||||
int fd = hw->fd, err;
|
||||
i.channel = info->channel;
|
||||
if (ioctl(fd, SNDRV_PCM_IOCTL_CHANNEL_INFO, &i) < 0) {
|
||||
|
|
@ -761,7 +761,7 @@ static snd_pcm_sframes_t snd_pcm_hw_writei(snd_pcm_t *pcm, const void *buffer, s
|
|||
int err;
|
||||
snd_pcm_hw_t *hw = pcm->private_data;
|
||||
int fd = hw->fd;
|
||||
struct sndrv_xferi xferi;
|
||||
struct snd_xferi xferi;
|
||||
xferi.buf = (char*) buffer;
|
||||
xferi.frames = size;
|
||||
xferi.result = 0; /* make valgrind happy */
|
||||
|
|
@ -780,7 +780,7 @@ static snd_pcm_sframes_t snd_pcm_hw_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_
|
|||
int err;
|
||||
snd_pcm_hw_t *hw = pcm->private_data;
|
||||
int fd = hw->fd;
|
||||
struct sndrv_xfern xfern;
|
||||
struct snd_xfern xfern;
|
||||
memset(&xfern, 0, sizeof(xfern)); /* make valgrind happy */
|
||||
xfern.bufs = bufs;
|
||||
xfern.frames = size;
|
||||
|
|
@ -799,7 +799,7 @@ static snd_pcm_sframes_t snd_pcm_hw_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_
|
|||
int err;
|
||||
snd_pcm_hw_t *hw = pcm->private_data;
|
||||
int fd = hw->fd;
|
||||
struct sndrv_xferi xferi;
|
||||
struct snd_xferi xferi;
|
||||
xferi.buf = buffer;
|
||||
xferi.frames = size;
|
||||
xferi.result = 0; /* make valgrind happy */
|
||||
|
|
@ -818,7 +818,7 @@ static snd_pcm_sframes_t snd_pcm_hw_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_u
|
|||
int err;
|
||||
snd_pcm_hw_t *hw = pcm->private_data;
|
||||
int fd = hw->fd;
|
||||
struct sndrv_xfern xfern;
|
||||
struct snd_xfern xfern;
|
||||
memset(&xfern, 0, sizeof(xfern)); /* make valgrind happy */
|
||||
xfern.bufs = bufs;
|
||||
xfern.frames = size;
|
||||
|
|
@ -835,12 +835,12 @@ static snd_pcm_sframes_t snd_pcm_hw_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_u
|
|||
static int snd_pcm_hw_mmap_status(snd_pcm_t *pcm)
|
||||
{
|
||||
snd_pcm_hw_t *hw = pcm->private_data;
|
||||
struct sndrv_pcm_sync_ptr sync_ptr;
|
||||
struct snd_pcm_sync_ptr sync_ptr;
|
||||
void *ptr;
|
||||
int err;
|
||||
ptr = MAP_FAILED;
|
||||
if (hw->sync_ptr_ioctl == 0)
|
||||
ptr = mmap(NULL, page_align(sizeof(struct sndrv_pcm_mmap_status)),
|
||||
ptr = mmap(NULL, page_align(sizeof(struct snd_pcm_mmap_status)),
|
||||
PROT_READ, MAP_FILE|MAP_SHARED,
|
||||
hw->fd, SNDRV_PCM_MMAP_OFFSET_STATUS);
|
||||
if (ptr == MAP_FAILED || ptr == NULL) {
|
||||
|
|
@ -853,7 +853,7 @@ static int snd_pcm_hw_mmap_status(snd_pcm_t *pcm)
|
|||
SYSMSG("SNDRV_PCM_IOCTL_SYNC_PTR failed (%i)", err);
|
||||
return err;
|
||||
}
|
||||
hw->sync_ptr = calloc(1, sizeof(struct sndrv_pcm_sync_ptr));
|
||||
hw->sync_ptr = calloc(1, sizeof(struct snd_pcm_sync_ptr));
|
||||
if (hw->sync_ptr == NULL)
|
||||
return -ENOMEM;
|
||||
hw->mmap_status = &hw->sync_ptr->s.status;
|
||||
|
|
@ -862,7 +862,7 @@ static int snd_pcm_hw_mmap_status(snd_pcm_t *pcm)
|
|||
} else {
|
||||
hw->mmap_status = ptr;
|
||||
}
|
||||
snd_pcm_set_hw_ptr(pcm, &hw->mmap_status->hw_ptr, hw->fd, SNDRV_PCM_MMAP_OFFSET_STATUS + offsetof(struct sndrv_pcm_mmap_status, hw_ptr));
|
||||
snd_pcm_set_hw_ptr(pcm, &hw->mmap_status->hw_ptr, hw->fd, SNDRV_PCM_MMAP_OFFSET_STATUS + offsetof(struct snd_pcm_mmap_status, hw_ptr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -872,7 +872,7 @@ static int snd_pcm_hw_mmap_control(snd_pcm_t *pcm)
|
|||
void *ptr;
|
||||
int err;
|
||||
if (hw->sync_ptr == NULL) {
|
||||
ptr = mmap(NULL, page_align(sizeof(struct sndrv_pcm_mmap_control)),
|
||||
ptr = mmap(NULL, page_align(sizeof(struct snd_pcm_mmap_control)),
|
||||
PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED,
|
||||
hw->fd, SNDRV_PCM_MMAP_OFFSET_CONTROL);
|
||||
if (ptr == MAP_FAILED || ptr == NULL) {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define _snd_mask sndrv_mask
|
||||
#define _snd_pcm_access_mask _snd_mask
|
||||
|
|
@ -38,7 +39,6 @@
|
|||
#define SND_MASK_INLINE
|
||||
#include "mask.h"
|
||||
|
||||
typedef enum sndrv_pcm_hw_param snd_pcm_hw_param_t;
|
||||
#define SND_PCM_HW_PARAM_ACCESS SNDRV_PCM_HW_PARAM_ACCESS
|
||||
#define SND_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_FIRST_MASK
|
||||
#define SND_PCM_HW_PARAM_FORMAT SNDRV_PCM_HW_PARAM_FORMAT
|
||||
|
|
@ -578,7 +578,7 @@ static inline int muldiv_near(int a, int b, int c)
|
|||
}
|
||||
|
||||
int snd_pcm_hw_refine(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_params_internal(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||
int snd_pcm_hw_refine_soft(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||
int snd_pcm_hw_refine_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
|
||||
int (*cprepare)(snd_pcm_t *pcm,
|
||||
|
|
@ -995,3 +995,13 @@ static inline int snd_pcm_may_wait_for_avail_min(snd_pcm_t *pcm, snd_pcm_uframes
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* hack to access to internal period_event in snd_pcm_sw_parmams */
|
||||
static inline int sw_get_period_event(const snd_pcm_sw_params_t *params)
|
||||
{
|
||||
return params->reserved[sizeof(params->reserved) / sizeof(params->reserved[0])- 1];
|
||||
}
|
||||
|
||||
static inline void sw_set_period_event(snd_pcm_sw_params_t *params, int val)
|
||||
{
|
||||
params->reserved[sizeof(params->reserved) / sizeof(params->reserved[0]) - 1] = val;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2309,7 +2309,7 @@ int snd_pcm_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|||
max periods
|
||||
Return 0 on success otherwise a negative error code
|
||||
*/
|
||||
int _snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||
int _snd_pcm_hw_params_internal(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||
{
|
||||
int err;
|
||||
snd_pcm_sw_params_t sw;
|
||||
|
|
|
|||
|
|
@ -1899,7 +1899,7 @@ 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)
|
||||
{
|
||||
assert(info);
|
||||
return &info->addr;
|
||||
return (const snd_seq_addr_t *) &info->addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2094,7 +2094,7 @@ 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)
|
||||
{
|
||||
assert(info);
|
||||
info->addr = *addr;
|
||||
info->addr = *(const struct sndrv_seq_addr *)addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2444,7 +2444,7 @@ void snd_seq_port_subscribe_copy(snd_seq_port_subscribe_t *dst, const snd_seq_po
|
|||
const snd_seq_addr_t *snd_seq_port_subscribe_get_sender(const snd_seq_port_subscribe_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->sender;
|
||||
return (const snd_seq_addr_t *)&info->sender;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2456,7 +2456,7 @@ const snd_seq_addr_t *snd_seq_port_subscribe_get_sender(const snd_seq_port_subsc
|
|||
const snd_seq_addr_t *snd_seq_port_subscribe_get_dest(const snd_seq_port_subscribe_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->dest;
|
||||
return (const snd_seq_addr_t *)&info->dest;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2729,7 +2729,7 @@ 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)
|
||||
{
|
||||
assert(info);
|
||||
return &info->root;
|
||||
return (const snd_seq_addr_t *)&info->root;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2781,7 +2781,7 @@ 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)
|
||||
{
|
||||
assert(info);
|
||||
return &info->addr;
|
||||
return (const snd_seq_addr_t *)&info->addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2872,7 +2872,7 @@ 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)
|
||||
{
|
||||
assert(info);
|
||||
info->root = *addr;
|
||||
info->root = *(const struct snd_seq_addr *)addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3227,7 +3227,7 @@ int snd_seq_query_named_queue(snd_seq_t *seq, const char *name)
|
|||
*/
|
||||
int snd_seq_get_queue_usage(snd_seq_t *seq, int q)
|
||||
{
|
||||
struct sndrv_seq_queue_client info;
|
||||
struct snd_seq_queue_client info;
|
||||
int err;
|
||||
assert(seq);
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
|
@ -3249,7 +3249,7 @@ int snd_seq_get_queue_usage(snd_seq_t *seq, int q)
|
|||
*/
|
||||
int snd_seq_set_queue_usage(snd_seq_t *seq, int q, int used)
|
||||
{
|
||||
struct sndrv_seq_queue_client info;
|
||||
struct snd_seq_queue_client info;
|
||||
assert(seq);
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.queue = q;
|
||||
|
|
@ -3351,7 +3351,7 @@ snd_seq_tick_time_t snd_seq_queue_status_get_tick_time(const snd_seq_queue_statu
|
|||
const snd_seq_real_time_t *snd_seq_queue_status_get_real_time(const snd_seq_queue_status_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->time;
|
||||
return (const snd_seq_real_time_t *)&info->time;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4289,7 +4289,7 @@ 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)
|
||||
{
|
||||
assert(info);
|
||||
return &info->time;
|
||||
return (const snd_seq_timestamp_t *)&info->time;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4302,7 +4302,7 @@ const snd_seq_timestamp_t *snd_seq_remove_events_get_time(const snd_seq_remove_e
|
|||
const snd_seq_addr_t *snd_seq_remove_events_get_dest(const snd_seq_remove_events_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return &info->dest;
|
||||
return (const snd_seq_addr_t *)&info->dest;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4380,7 +4380,7 @@ 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)
|
||||
{
|
||||
assert(info);
|
||||
info->time = *time;
|
||||
info->time = *(const union sndrv_seq_timestamp *)time;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4393,7 +4393,7 @@ void snd_seq_remove_events_set_time(snd_seq_remove_events_t *info, const snd_seq
|
|||
void snd_seq_remove_events_set_dest(snd_seq_remove_events_t *info, const snd_seq_addr_t *addr)
|
||||
{
|
||||
assert(info);
|
||||
info->dest = *addr;
|
||||
info->dest = *(const struct sndrv_seq_addr *)addr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4475,7 +4475,7 @@ static int remove_match(snd_seq_remove_events_t *info, snd_seq_event_t *ev)
|
|||
if (info->remove_mode & SNDRV_SEQ_REMOVE_TIME_TICK)
|
||||
res = snd_seq_compare_tick_time(&ev->time.tick, &info->time.tick);
|
||||
else
|
||||
res = snd_seq_compare_real_time(&ev->time.time, &info->time.time);
|
||||
res = snd_seq_compare_real_time(&ev->time.time, (snd_seq_real_time_t *)&info->time.time);
|
||||
if (!res)
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4483,7 +4483,7 @@ static int remove_match(snd_seq_remove_events_t *info, snd_seq_event_t *ev)
|
|||
if (info->remove_mode & SNDRV_SEQ_REMOVE_TIME_TICK)
|
||||
res = snd_seq_compare_tick_time(&ev->time.tick, &info->time.tick);
|
||||
else
|
||||
res = snd_seq_compare_real_time(&ev->time.time, &info->time.time);
|
||||
res = snd_seq_compare_real_time(&ev->time.time, (snd_seq_real_time_t *)&info->time.time);
|
||||
if (res)
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
|
|||
|
||||
#ifdef SNDRV_SEQ_IOCTL_RUNNING_MODE
|
||||
{
|
||||
struct sndrv_seq_running_info run_mode;
|
||||
struct snd_seq_running_info run_mode;
|
||||
/* check running mode */
|
||||
memset(&run_mode, 0, sizeof(run_mode));
|
||||
run_mode.client = client;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#define SND_SEQ_IBUF_SIZE 500 /* in event_size aligned */
|
||||
#define DEFAULT_TMPBUF_SIZE 20
|
||||
|
||||
typedef struct sndrv_seq_queue_client snd_seq_queue_client_t;
|
||||
typedef struct snd_seq_queue_client snd_seq_queue_client_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const char *_snd_module_timer_hw = "";
|
|||
#define SNDRV_FILE_TIMER ALSA_DEVICE_DIRECTORY "timer"
|
||||
#define SNDRV_TIMER_VERSION_MAX SNDRV_PROTOCOL_VERSION(2, 0, 5)
|
||||
|
||||
#define SNDRV_TIMER_IOCTL_STATUS_OLD _IOW('T', 0x14, struct sndrv_timer_status)
|
||||
#define SNDRV_TIMER_IOCTL_STATUS_OLD _IOW('T', 0x14, struct snd_timer_status)
|
||||
|
||||
enum {
|
||||
SNDRV_TIMER_IOCTL_START_OLD = _IO('T', 0x20),
|
||||
|
|
@ -225,7 +225,7 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
|
|||
{
|
||||
int fd, ver, tmode, ret;
|
||||
snd_timer_t *tmr;
|
||||
struct sndrv_timer_select sel;
|
||||
struct snd_timer_select sel;
|
||||
|
||||
*handle = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue