Skip to content

Commit

Permalink
./update.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Oct 1, 2023
1 parent ca57056 commit 579c751
Show file tree
Hide file tree
Showing 80 changed files with 2,210 additions and 191 deletions.
6 changes: 4 additions & 2 deletions alsa-lib/alsa/asoundef.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ extern "C" {
#define CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PROHIBITED (1<<7) /**< stereo downmis prohibited */
#define CEA861_AUDIO_INFOFRAME_DB5_LSV (0xf<<3) /**< mask - level-shift values */

/** \} */

/**
* \defgroup MIDI_Interface Constants for MIDI v1.0
* Constants for MIDI v1.0.
Expand All @@ -224,6 +226,8 @@ extern "C" {
#define MIDI_CHANNELS 16 /**< Number of channels per port/cable. */
#define MIDI_GM_DRUM_CHANNEL (10-1) /**< Channel number for GM drums. */

/** \} */

/**
* \defgroup MIDI_Commands MIDI Commands
* MIDI command codes.
Expand Down Expand Up @@ -335,8 +339,6 @@ extern "C" {

/** \} */

/** \} */

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 3 additions & 0 deletions alsa-lib/alsa/asoundlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@
#include <stdarg.h>
#include <endian.h>

#ifndef DOC_HIDDEN
#ifndef __GNUC__
#define __inline__ inline
#endif
#endif /* DOC_HIDDEN */

#include <alsa/asoundef.h>
#include <alsa/version.h>
Expand All @@ -53,6 +55,7 @@
#include <alsa/conf.h>
#include <alsa/pcm.h>
#include <alsa/rawmidi.h>
#include <alsa/ump.h>
#include <alsa/timer.h>
#include <alsa/hwdep.h>
#include <alsa/control.h>
Expand Down
12 changes: 11 additions & 1 deletion alsa-lib/alsa/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern "C" {
#endif

/**
* \defgroup Config Configuration Interface
* \defgroup Configuration Configuration Interface
* The configuration functions and types allow you to read, enumerate,
* modify and write the contents of ALSA configuration files.
* \{
Expand Down Expand Up @@ -109,6 +109,16 @@ int snd_config_search_definition(snd_config_t *config,
const char *base, const char *key,
snd_config_t **result);

/**
* \brief custom expansion callback
* \param[out] dst The function puts the handle to the new configuration
* node at the address specified by \a dst.
* \param[in] s string the string to be expanded
* \param[in] private_data Handle to the \c private_data node.
* \return A non-negative value if successful, otherwise a negative error code.
*
* Use a function of this type to define a custom expansion
*/
typedef int (*snd_config_expand_fcn_t)(snd_config_t **dst, const char *s, void *private_data);

int snd_config_expand_custom(snd_config_t *config, snd_config_t *root,
Expand Down
26 changes: 22 additions & 4 deletions alsa-lib/alsa/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ typedef enum _snd_ctl_type {
/** Read only (flag for open mode) \hideinitializer */
#define SND_CTL_READONLY 0x0004

/** Return EINTR instead blocking (flag for open mode) \hideinitializer */
#define SND_CTL_EINTR 0x0080

/** CTL handle */
typedef struct _snd_ctl snd_ctl_t;

Expand All @@ -371,10 +374,6 @@ 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);
Expand Down Expand Up @@ -415,6 +414,11 @@ int snd_ctl_rawmidi_next_device(snd_ctl_t *ctl, int * device);
int snd_ctl_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info);
int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev);
#endif
#ifdef __ALSA_UMP_H
int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device);
int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info);
int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info);
#endif
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);

Expand Down Expand Up @@ -791,6 +795,20 @@ int snd_sctl_remove(snd_sctl_t *handle);

/** \} */

/**
* \defgroup Hint Name Hint Interface
* \ingroup Configuration
* The name hint interface - get descriptive information about a device
* (name, description, input/output).
* \{
*/

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);

/** \} */

#ifdef __cplusplus
}
#endif
Expand Down
12 changes: 6 additions & 6 deletions alsa-lib/alsa/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ const char *snd_asoundlib_version(void);
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif

#ifndef __STRING
/** \brief Return 'x' argument as string */
#define __STRING(x) #x
#endif

#ifdef PIC /* dynamic build */

/** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
Expand Down Expand Up @@ -82,18 +87,13 @@ extern struct snd_dlsym_link *snd_dlsym_start;
void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
__SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
__SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = # name; \
__SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = __STRING(name); \
__SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
}

#endif

#ifndef __STRING
/** \brief Return 'x' argument as string */
#define __STRING(x) #x
#endif

/** \brief Returns the version of a dynamic symbol as a string. */
#define SND_DLSYM_VERSION(version) __STRING(version)

Expand Down
2 changes: 1 addition & 1 deletion alsa-lib/alsa/mixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef struct _snd_mixer_elem snd_mixer_elem_t;

/**
* \brief Mixer callback function
* \param mixer Mixer handle
* \param ctl Mixer handle
* \param mask event mask
* \param elem related mixer element (if any)
* \return 0 on success otherwise a negative error code
Expand Down
32 changes: 22 additions & 10 deletions alsa-lib/alsa/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,15 @@ typedef enum _snd_pcm_tstamp {
SND_PCM_TSTAMP_LAST = SND_PCM_TSTAMP_ENABLE
} snd_pcm_tstamp_t;

/** PCM timestamp type */
typedef enum _snd_pcm_tstamp_type {
SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /**< gettimeofday equivalent */
SND_PCM_TSTAMP_TYPE_MONOTONIC, /**< posix_clock_monotonic equivalent */
SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /**< monotonic_raw (no NTP) */
SND_PCM_TSTAMP_TYPE_LAST = SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
} snd_pcm_tstamp_type_t;

/** PCM audio timestamp type */
typedef enum _snd_pcm_audio_tstamp_type {
/**
* first definition for backwards compatibility only,
Expand All @@ -364,24 +366,22 @@ typedef enum _snd_pcm_audio_tstamp_type {
SND_PCM_AUDIO_TSTAMP_TYPE_LAST = SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
} snd_pcm_audio_tstamp_type_t;

/** PCM audio timestamp config */
typedef struct _snd_pcm_audio_tstamp_config {
/* 5 of max 16 bits used */
unsigned int type_requested:4;
unsigned int report_delay:1; /* add total delay to A/D or D/A */
unsigned int type_requested:4; /**< requested audio tstamp type */
unsigned int report_delay:1; /**< add total delay to A/D or D/A */
} snd_pcm_audio_tstamp_config_t;

/** PCM audio timestamp report */
typedef struct _snd_pcm_audio_tstamp_report {
/* 6 of max 16 bits used for bit-fields */

/* for backwards compatibility */
unsigned int valid:1;
unsigned int valid:1; /**< for backwards compatibility */
unsigned int actual_type:4; /**< actual type if hardware could not support requested timestamp */

/* actual type if hardware could not support requested timestamp */
unsigned int actual_type:4;

/* accuracy represented in ns units */
unsigned int accuracy_report:1; /* 0 if accuracy unknown, 1 if accuracy field is valid */
unsigned int accuracy; /* up to 4.29s, will be packed in separate field */
unsigned int accuracy_report:1; /**< 0 if accuracy unknown, 1 if accuracy field is valid */
unsigned int accuracy; /**< up to 4.29s in ns units, will be packed in separate field */
} snd_pcm_audio_tstamp_report_t;

/** Unsigned frames quantity */
Expand All @@ -393,6 +393,8 @@ typedef long snd_pcm_sframes_t;
#define SND_PCM_NONBLOCK 0x00000001
/** Async notification (flag for open mode) \hideinitializer */
#define SND_PCM_ASYNC 0x00000002
/** Return EINTR instead blocking (wait operation) */
#define SND_PCM_EINTR 0x00000080
/** In an abort state (internal, not allowed for open) */
#define SND_PCM_ABORT 0x00008000
/** Disable automatic (but not forced!) rate resamplinig */
Expand Down Expand Up @@ -498,6 +500,13 @@ typedef union _snd_pcm_sync_id {
unsigned int id32[4];
} snd_pcm_sync_id_t;

/** Infinite wait for snd_pcm_wait() */
#define SND_PCM_WAIT_INFINITE (-1)
/** Wait for next i/o in snd_pcm_wait() */
#define SND_PCM_WAIT_IO (-10001)
/** Wait for drain in snd_pcm_wait() */
#define SND_PCM_WAIT_DRAIN (-10002)

/** #SND_PCM_TYPE_METER scope handle */
typedef struct _snd_pcm_scope snd_pcm_scope_t;

Expand Down Expand Up @@ -722,6 +731,7 @@ 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_is_perfect_drain(const snd_pcm_hw_params_t *params);
int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params); /* deprecated, use audio_ts_type */
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,
Expand Down Expand Up @@ -821,6 +831,8 @@ int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *par
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_set_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
int snd_pcm_hw_params_get_drain_silence(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);
Expand Down
3 changes: 3 additions & 0 deletions alsa-lib/alsa/rawmidi.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ typedef enum _snd_rawmidi_read_mode {
SND_RAWMIDI_READ_TSTAMP = 1,
} snd_rawmidi_read_mode_t;

/** rawmidi info bit flags */
#define SND_RAWMIDI_INFO_UMP 0x00000008 /* rawmidi is UMP */

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,
Expand Down
47 changes: 47 additions & 0 deletions alsa-lib/alsa/seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ typedef enum snd_seq_client_type {
SND_SEQ_KERNEL_CLIENT = 2 /**< kernel client */
} snd_seq_client_type_t;

/** client MIDI version */
enum {
SND_SEQ_CLIENT_LEGACY_MIDI = 0, /**< Legacy client */
SND_SEQ_CLIENT_UMP_MIDI_1_0 = 1, /**< UMP MIDI 1.0 */
SND_SEQ_CLIENT_UMP_MIDI_2_0 = 2 /**< UMP MIDI 2.0 */
};

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) \
Expand All @@ -149,11 +156,22 @@ const unsigned char *snd_seq_client_info_get_event_filter(const snd_seq_client_i
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);

int snd_seq_client_info_get_midi_version(const snd_seq_client_info_t *info);
int snd_seq_client_info_get_ump_group_enabled(const snd_seq_client_info_t *info,
int group);
int snd_seq_client_info_get_ump_groupless_enabled(const snd_seq_client_info_t *info);
int snd_seq_client_info_get_ump_conversion(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_set_midi_version(snd_seq_client_info_t *info, int midi_version);
void snd_seq_client_info_set_ump_group_enabled(snd_seq_client_info_t *info,
int group, int enable);
void snd_seq_client_info_set_ump_groupless_enabled(snd_seq_client_info_t *info,
int enable);
void snd_seq_client_info_set_ump_conversion(snd_seq_client_info_t *info, int enable);

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);
Expand All @@ -165,6 +183,11 @@ int snd_seq_get_any_client_info(snd_seq_t *handle, int client, snd_seq_client_in
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);

int snd_seq_get_ump_endpoint_info(snd_seq_t *seq, int client, void *info);
int snd_seq_get_ump_block_info(snd_seq_t *seq, int client, int blk, void *info);
int snd_seq_set_ump_endpoint_info(snd_seq_t *seq, const void *info);
int snd_seq_set_ump_block_info(snd_seq_t *seq, int blk, const void *info);

/*
*/

Expand Down Expand Up @@ -222,6 +245,14 @@ typedef struct _snd_seq_port_info snd_seq_port_info_t;
#define SND_SEQ_PORT_CAP_SUBS_READ (1<<5) /**< allow read subscription */
#define SND_SEQ_PORT_CAP_SUBS_WRITE (1<<6) /**< allow write subscription */
#define SND_SEQ_PORT_CAP_NO_EXPORT (1<<7) /**< routing not allowed */
#define SND_SEQ_PORT_CAP_INACTIVE (1<<8) /**< inactive port */
#define SND_SEQ_PORT_CAP_UMP_ENDPOINT (1<<9) /**< UMP Endpoint port */

/** port direction */
#define SND_SEQ_PORT_DIR_UNKNOWN 0 /**< Unknown */
#define SND_SEQ_PORT_DIR_INPUT 1 /**< Input only */
#define SND_SEQ_PORT_DIR_OUTPUT 2 /**< Output only */
#define SND_SEQ_PORT_DIR_BIDIRECTION 3 /**< Input/output bidirectional */

/* port type */
/** Messages sent from/to this port have device-specific semantics. */
Expand All @@ -238,6 +269,8 @@ typedef struct _snd_seq_port_info snd_seq_port_info_t;
#define SND_SEQ_PORT_TYPE_MIDI_MT32 (1<<5)
/** This port is compatible with the General MIDI 2 specification. */
#define SND_SEQ_PORT_TYPE_MIDI_GM2 (1<<6)
/** This port is a UMP port. */
#define SND_SEQ_PORT_TYPE_MIDI_UMP (1<<7)
/** This port understands SND_SEQ_EVENT_SAMPLE_xxx messages
(these are not MIDI messages). */
#define SND_SEQ_PORT_TYPE_SYNTH (1<<10)
Expand Down Expand Up @@ -283,6 +316,8 @@ 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);
int snd_seq_port_info_get_direction(const snd_seq_port_info_t *info);
int snd_seq_port_info_get_ump_group(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);
Expand All @@ -297,6 +332,8 @@ 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);
void snd_seq_port_info_set_direction(snd_seq_port_info_t *info, int direction);
void snd_seq_port_info_set_ump_group(snd_seq_port_info_t *info, int ump_group);

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);
Expand Down Expand Up @@ -572,6 +609,12 @@ 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);

int snd_seq_ump_event_output(snd_seq_t *seq, snd_seq_ump_event_t *ev);
int snd_seq_ump_event_output_buffer(snd_seq_t *seq, snd_seq_ump_event_t *ev);
int snd_seq_ump_extract_output(snd_seq_t *seq, snd_seq_ump_event_t **ev_res);
int snd_seq_ump_event_output_direct(snd_seq_t *seq, snd_seq_ump_event_t *ev);
int snd_seq_ump_event_input(snd_seq_t *seq, snd_seq_ump_event_t **ev);

/** \} */

/**
Expand Down Expand Up @@ -729,6 +772,10 @@ extern const unsigned int snd_seq_event_types[];
#define snd_seq_ev_is_direct(ev) \
((ev)->queue == SND_SEQ_QUEUE_DIRECT)

/** UMP events */
#define snd_seq_ev_is_ump(ev) \
((ev)->flags & SND_SEQ_EVENT_UMP)

/** \} */

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 579c751

Please sign in to comment.