|
ALSA project - the C library reference
|
00001 00011 /* 00012 * This library is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License as 00014 * published by the Free Software Foundation; either version 2.1 of 00015 * the License, or (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 #ifndef __ALSA_HWDEP_H 00029 #define __ALSA_HWDEP_H 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00042 #define SND_HWDEP_DLSYM_VERSION _dlsym_hwdep_001 00043 00045 typedef struct _snd_hwdep_info snd_hwdep_info_t; 00046 00048 typedef struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t; 00049 00051 typedef struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t; 00052 00054 typedef enum _snd_hwdep_iface { 00055 SND_HWDEP_IFACE_OPL2 = 0, 00056 SND_HWDEP_IFACE_OPL3, 00057 SND_HWDEP_IFACE_OPL4, 00058 SND_HWDEP_IFACE_SB16CSP, 00059 SND_HWDEP_IFACE_EMU10K1, 00060 SND_HWDEP_IFACE_YSS225, 00061 SND_HWDEP_IFACE_ICS2115, 00062 SND_HWDEP_IFACE_SSCAPE, 00063 SND_HWDEP_IFACE_VX, 00064 SND_HWDEP_IFACE_MIXART, 00065 SND_HWDEP_IFACE_USX2Y, 00066 SND_HWDEP_IFACE_EMUX_WAVETABLE, 00067 SND_HWDEP_IFACE_BLUETOOTH, 00068 SND_HWDEP_IFACE_USX2Y_PCM, 00069 SND_HWDEP_IFACE_PCXHR, 00070 SND_HWDEP_IFACE_SB_RC, 00071 SND_HWDEP_IFACE_HDA, 00072 SND_HWDEP_IFACE_USB_STREAM, 00073 SND_HWDEP_IFACE_FW_DICE, 00074 SND_HWDEP_IFACE_FW_FIREWORKS, 00075 SND_HWDEP_IFACE_FW_BEBOB, 00076 SND_HWDEP_IFACE_FW_OXFW, 00077 SND_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */ 00078 SND_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */ 00079 SND_HWDEP_IFACE_LINE6, /* Line6 USB processors */ 00080 SND_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */ 00081 SND_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */ 00082 00083 SND_HWDEP_IFACE_LAST = SND_HWDEP_IFACE_FW_FIREFACE, 00084 } snd_hwdep_iface_t; 00085 00087 #define SND_HWDEP_OPEN_READ (O_RDONLY) 00088 00089 #define SND_HWDEP_OPEN_WRITE (O_WRONLY) 00090 00091 #define SND_HWDEP_OPEN_DUPLEX (O_RDWR) 00092 00093 #define SND_HWDEP_OPEN_NONBLOCK (O_NONBLOCK) 00094 00096 typedef enum _snd_hwdep_type { 00098 SND_HWDEP_TYPE_HW, 00100 SND_HWDEP_TYPE_SHM, 00102 SND_HWDEP_TYPE_INET 00103 } snd_hwdep_type_t; 00104 00106 typedef struct _snd_hwdep snd_hwdep_t; 00107 00108 int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode); 00109 int snd_hwdep_close(snd_hwdep_t *hwdep); 00110 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space); 00111 int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep); 00112 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents); 00113 int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock); 00114 int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info); 00115 int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status); 00116 int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block); 00117 int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg); 00118 ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size); 00119 ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size); 00120 00121 size_t snd_hwdep_info_sizeof(void); 00123 #define snd_hwdep_info_alloca(ptr) __snd_alloca(ptr, snd_hwdep_info) 00124 int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr); 00125 void snd_hwdep_info_free(snd_hwdep_info_t *obj); 00126 void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src); 00127 00128 unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj); 00129 int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj); 00130 const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj); 00131 const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj); 00132 snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj); 00133 void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val); 00134 00135 size_t snd_hwdep_dsp_status_sizeof(void); 00137 #define snd_hwdep_dsp_status_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_status) 00138 int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr); 00139 void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t *obj); 00140 void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src); 00141 00142 unsigned int snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t *obj); 00143 const char *snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t *obj); 00144 unsigned int snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t *obj); 00145 unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t *obj); 00146 unsigned int snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t *obj); 00147 00148 size_t snd_hwdep_dsp_image_sizeof(void); 00150 #define snd_hwdep_dsp_image_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_image) 00151 int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr); 00152 void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj); 00153 void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src); 00154 00155 unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj); 00156 const char *snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t *obj); 00157 const void *snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t *obj); 00158 size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t *obj); 00159 00160 void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int _index); 00161 void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name); 00162 void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t *obj, void *buffer); 00163 void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length); 00164 00167 #ifdef __cplusplus 00168 } 00169 #endif 00170 00171 #endif /* __ALSA_HWDEP_H */ 00172
1.7.3