OSDN Git Service

topology: Parse and build private data of physical links
[android-x86/external-alsa-lib.git] / include / seq.h
index 5c77390..d05940e 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * \file include/seq.h
  * \brief Application interface library for the ALSA driver
- * \author Jaroslav Kysela <perex@suse.cz>
+ * \author Jaroslav Kysela <perex@perex.cz>
  * \author Abramo Bagnara <abramo@alsa-project.org>
  * \author Takashi Iwai <tiwai@suse.de>
  * \date 1998-2001
@@ -46,15 +46,6 @@ extern "C" {
 /** Sequencer handle */
 typedef struct _snd_seq snd_seq_t;
 
-#ifndef DOC_HIDDEN
-#define SND_ALLOCA(type,ptr) \
-do {\
-       assert(ptr);\
-       *ptr = (type##_t *)alloca(type##_sizeof());\
-       memset(*ptr, 0, type##_sizeof());\
-} while (0)
-#endif
-
 /**
  * sequencer opening stream types
  */
@@ -106,7 +97,7 @@ typedef struct _snd_seq_system_info snd_seq_system_info_t;
 size_t snd_seq_system_info_sizeof(void);
 /** allocate a #snd_seq_system_info_t container on stack */
 #define snd_seq_system_info_alloca(ptr) \
-       SND_ALLOCA(snd_seq_system_info, ptr)
+       __snd_alloca(ptr, snd_seq_system_info)
 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);
@@ -142,7 +133,7 @@ typedef enum snd_seq_client_type {
 size_t snd_seq_client_info_sizeof(void);
 /** allocate a #snd_seq_client_info_t container on stack */
 #define snd_seq_client_info_alloca(ptr) \
-       SND_ALLOCA(snd_seq_client_info, ptr)
+       __snd_alloca(ptr, snd_seq_client_info)
 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);
@@ -152,6 +143,8 @@ snd_seq_client_type_t snd_seq_client_info_get_type(const snd_seq_client_info_t *
 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);
@@ -162,6 +155,11 @@ void snd_seq_client_info_set_broadcast_filter(snd_seq_client_info_t *info, int v
 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);
@@ -176,7 +174,7 @@ typedef struct _snd_seq_client_pool snd_seq_client_pool_t;
 size_t snd_seq_client_pool_sizeof(void);
 /** allocate a #snd_seq_client_pool_t container on stack */
 #define snd_seq_client_pool_alloca(ptr) \
-       SND_ALLOCA(snd_seq_client_pool, ptr)
+       __snd_alloca(ptr, snd_seq_client_pool)
 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);
@@ -265,7 +263,7 @@ typedef struct _snd_seq_port_info snd_seq_port_info_t;
 size_t snd_seq_port_info_sizeof(void);
 /** allocate a #snd_seq_port_info_t container on stack */
 #define snd_seq_port_info_alloca(ptr) \
-       SND_ALLOCA(snd_seq_port_info, ptr)
+       __snd_alloca(ptr, snd_seq_port_info)
 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);
@@ -323,7 +321,7 @@ typedef struct _snd_seq_port_subscribe snd_seq_port_subscribe_t;
 size_t snd_seq_port_subscribe_sizeof(void);
 /** allocate a #snd_seq_port_subscribe_t container on stack */
 #define snd_seq_port_subscribe_alloca(ptr) \
-       SND_ALLOCA(snd_seq_port_subscribe, ptr)
+       __snd_alloca(ptr, snd_seq_port_subscribe)
 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);
@@ -361,7 +359,7 @@ typedef enum {
 size_t snd_seq_query_subscribe_sizeof(void);
 /** allocate a #snd_seq_query_subscribe_t container on stack */
 #define snd_seq_query_subscribe_alloca(ptr) \
-       SND_ALLOCA(snd_seq_query_subscribe, ptr)
+       __snd_alloca(ptr, snd_seq_query_subscribe)
 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);
@@ -411,7 +409,7 @@ typedef struct _snd_seq_queue_timer snd_seq_queue_timer_t;
 size_t snd_seq_queue_info_sizeof(void);
 /** allocate a #snd_seq_queue_info_t container on stack */
 #define snd_seq_queue_info_alloca(ptr) \
-       SND_ALLOCA(snd_seq_queue_info, ptr)
+       __snd_alloca(ptr, snd_seq_queue_info)
 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);
@@ -443,7 +441,7 @@ int snd_seq_set_queue_usage(snd_seq_t *handle, int q, int used);
 size_t snd_seq_queue_status_sizeof(void);
 /** allocate a #snd_seq_queue_status_t container on stack */
 #define snd_seq_queue_status_alloca(ptr) \
-       SND_ALLOCA(snd_seq_queue_status, ptr)
+       __snd_alloca(ptr, snd_seq_queue_status)
 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);
@@ -461,7 +459,7 @@ int snd_seq_get_queue_status(snd_seq_t *handle, int q, snd_seq_queue_status_t *s
 size_t snd_seq_queue_tempo_sizeof(void);
 /** allocate a #snd_seq_queue_tempo_t container on stack */
 #define snd_seq_queue_tempo_alloca(ptr) \
-       SND_ALLOCA(snd_seq_queue_tempo, ptr)
+       __snd_alloca(ptr, snd_seq_queue_tempo)
 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);
@@ -492,7 +490,7 @@ typedef enum {
 size_t snd_seq_queue_timer_sizeof(void);
 /** allocate a #snd_seq_queue_timer_t container on stack */
 #define snd_seq_queue_timer_alloca(ptr) \
-       SND_ALLOCA(snd_seq_queue_timer, ptr)
+       __snd_alloca(ptr, snd_seq_queue_timer)
 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);
@@ -551,7 +549,7 @@ typedef struct _snd_seq_remove_events snd_seq_remove_events_t;
 size_t snd_seq_remove_events_sizeof(void);
 /** allocate a #snd_seq_remove_events_t container on stack */
 #define snd_seq_remove_events_alloca(ptr) \
-       SND_ALLOCA(snd_seq_remove_events, ptr)
+       __snd_alloca(ptr, snd_seq_remove_events)
 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);
@@ -584,6 +582,7 @@ 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);