| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
#ifndef __ALSA_HWDEP_H |
| 29 |
#define __ALSA_HWDEP_H |
| 30 |
|
| 31 |
#ifdef __cplusplus |
| 32 |
extern "C" { |
| 33 |
#endif |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
#define SND_HWDEP_DLSYM_VERSION _dlsym_hwdep_001 |
| 43 |
|
| 44 |
|
| 45 |
typedef struct _snd_hwdep_info snd_hwdep_info_t; |
| 46 |
|
| 47 |
|
| 48 |
typedef struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t; |
| 49 |
|
| 50 |
|
| 51 |
typedef struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t; |
| 52 |
|
| 53 |
|
| 54 |
typedef enum _snd_hwdep_iface { |
| 55 |
SND_HWDEP_IFACE_OPL2 = 0, |
| 56 |
SND_HWDEP_IFACE_OPL3, |
| 57 |
SND_HWDEP_IFACE_OPL4, |
| 58 |
SND_HWDEP_IFACE_SB16CSP, |
| 59 |
SND_HWDEP_IFACE_EMU10K1, |
| 60 |
SND_HWDEP_IFACE_YSS225, |
| 61 |
SND_HWDEP_IFACE_ICS2115, |
| 62 |
SND_HWDEP_IFACE_SSCAPE, |
| 63 |
SND_HWDEP_IFACE_VX, |
| 64 |
SND_HWDEP_IFACE_MIXART, |
| 65 |
SND_HWDEP_IFACE_USX2Y, |
| 66 |
SND_HWDEP_IFACE_EMUX_WAVETABLE, |
| 67 |
SND_HWDEP_IFACE_BLUETOOTH, |
| 68 |
SND_HWDEP_IFACE_USX2Y_PCM, |
| 69 |
SND_HWDEP_IFACE_PCXHR, |
| 70 |
SND_HWDEP_IFACE_SB_RC, |
| 71 |
SND_HWDEP_IFACE_HDA, |
| 72 |
SND_HWDEP_IFACE_USB_STREAM, |
| 73 |
SND_HWDEP_IFACE_FW_DICE, |
| 74 |
SND_HWDEP_IFACE_FW_FIREWORKS, |
| 75 |
SND_HWDEP_IFACE_FW_BEBOB, |
| 76 |
SND_HWDEP_IFACE_FW_OXFW, |
| 77 |
SND_HWDEP_IFACE_FW_DIGI00X, |
| 78 |
SND_HWDEP_IFACE_FW_TASCAM, |
| 79 |
|
| 80 |
SND_HWDEP_IFACE_LAST = SND_HWDEP_IFACE_FW_TASCAM |
| 81 |
} snd_hwdep_iface_t; |
| 82 |
|
| 83 |
|
| 84 |
#define SND_HWDEP_OPEN_READ (O_RDONLY) |
| 85 |
|
| 86 |
#define SND_HWDEP_OPEN_WRITE (O_WRONLY) |
| 87 |
|
| 88 |
#define SND_HWDEP_OPEN_DUPLEX (O_RDWR) |
| 89 |
|
| 90 |
#define SND_HWDEP_OPEN_NONBLOCK (O_NONBLOCK) |
| 91 |
|
| 92 |
|
| 93 |
typedef enum _snd_hwdep_type { |
| 94 |
|
| 95 |
SND_HWDEP_TYPE_HW, |
| 96 |
|
| 97 |
SND_HWDEP_TYPE_SHM, |
| 98 |
|
| 99 |
SND_HWDEP_TYPE_INET |
| 100 |
} snd_hwdep_type_t; |
| 101 |
|
| 102 |
|
| 103 |
typedef struct _snd_hwdep snd_hwdep_t; |
| 104 |
|
| 105 |
int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode); |
| 106 |
int snd_hwdep_close(snd_hwdep_t *hwdep); |
| 107 |
int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space); |
| 108 |
int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep); |
| 109 |
int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents); |
| 110 |
int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock); |
| 111 |
int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info); |
| 112 |
int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status); |
| 113 |
int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block); |
| 114 |
int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg); |
| 115 |
ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size); |
| 116 |
ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size); |
| 117 |
|
| 118 |
size_t snd_hwdep_info_sizeof(void); |
| 119 |
|
| 120 |
#define snd_hwdep_info_alloca(ptr) __snd_alloca(ptr, snd_hwdep_info) |
| 121 |
int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr); |
| 122 |
void snd_hwdep_info_free(snd_hwdep_info_t *obj); |
| 123 |
void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src); |
| 124 |
|
| 125 |
unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj); |
| 126 |
int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj); |
| 127 |
const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj); |
| 128 |
const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj); |
| 129 |
snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj); |
| 130 |
void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val); |
| 131 |
|
| 132 |
size_t snd_hwdep_dsp_status_sizeof(void); |
| 133 |
|
| 134 |
#define snd_hwdep_dsp_status_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_status) |
| 135 |
int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr); |
| 136 |
void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t *obj); |
| 137 |
void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src); |
| 138 |
|
| 139 |
unsigned int snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t *obj); |
| 140 |
const char *snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t *obj); |
| 141 |
unsigned int snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t *obj); |
| 142 |
unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t *obj); |
| 143 |
unsigned int snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t *obj); |
| 144 |
|
| 145 |
size_t snd_hwdep_dsp_image_sizeof(void); |
| 146 |
|
| 147 |
#define snd_hwdep_dsp_image_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_image) |
| 148 |
int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr); |
| 149 |
void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj); |
| 150 |
void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src); |
| 151 |
|
| 152 |
unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj); |
| 153 |
const char *snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t *obj); |
| 154 |
const void *snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t *obj); |
| 155 |
size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t *obj); |
| 156 |
|
| 157 |
void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int _index); |
| 158 |
void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name); |
| 159 |
void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t *obj, void *buffer); |
| 160 |
void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length); |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
#ifdef __cplusplus |
| 165 |
} |
| 166 |
#endif |
| 167 |
|
| 168 |
#endif |
| 169 |
|