Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

hwdep.h

00001 
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_LAST = SND_HWDEP_IFACE_VX  
00065 } snd_hwdep_iface_t;
00066 
00068 #define SND_HWDEP_OPEN_READ             (O_RDONLY)
00069 
00070 #define SND_HWDEP_OPEN_WRITE            (O_WRONLY)
00071 
00072 #define SND_HWDEP_OPEN_DUPLEX           (O_RDWR)
00073 
00074 #define SND_HWDEP_OPEN_NONBLOCK         (O_NONBLOCK)
00075 
00077 typedef enum _snd_hwdep_type {
00079         SND_HWDEP_TYPE_HW,
00081         SND_HWDEP_TYPE_SHM,
00083         SND_HWDEP_TYPE_INET
00084 } snd_hwdep_type_t;
00085 
00087 typedef struct _snd_hwdep snd_hwdep_t;
00088 
00089 int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode);
00090 int snd_hwdep_close(snd_hwdep_t *hwdep);
00091 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
00092 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
00093 int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock);
00094 int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info);
00095 int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status);
00096 int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block);
00097 int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg);
00098 ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size);
00099 ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size);
00100 
00101 size_t snd_hwdep_info_sizeof(void);
00103 #define snd_hwdep_info_alloca(ptr) do { assert(ptr); *ptr = (snd_hwdep_info_t *) alloca(snd_hwdep_info_sizeof()); memset(*ptr, 0, snd_hwdep_info_sizeof()); } while (0)
00104 int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr);
00105 void snd_hwdep_info_free(snd_hwdep_info_t *obj);
00106 void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src);
00107 
00108 unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj);
00109 int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj);
00110 const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj);
00111 const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj);
00112 snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj);
00113 void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val);
00114 
00115 size_t snd_hwdep_dsp_status_sizeof(void);
00117 #define snd_hwdep_dsp_status_alloca(ptr) do { assert(ptr); *ptr = (snd_hwdep_dsp_status_t *) alloca(snd_hwdep_dsp_status_sizeof()); memset(*ptr, 0, snd_hwdep_dsp_status_sizeof()); } while (0)
00118 int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr);
00119 void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t *obj);
00120 void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src);
00121 
00122 unsigned int snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t *obj);
00123 const char *snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t *obj);
00124 unsigned int snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t *obj);
00125 unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t *obj);
00126 unsigned int snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t *obj);
00127 
00128 size_t snd_hwdep_dsp_image_sizeof(void);
00130 #define snd_hwdep_dsp_image_alloca(ptr) do { assert(ptr); *ptr = (snd_hwdep_dsp_image_t *) alloca(snd_hwdep_dsp_image_sizeof()); memset(*ptr, 0, snd_hwdep_dsp_image_sizeof()); } while (0)
00131 int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr);
00132 void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj);
00133 void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src);
00134 
00135 unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj);
00136 const char *snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t *obj);
00137 const void *snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t *obj);
00138 size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t *obj);
00139 
00140 void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int index);
00141 void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name);
00142 void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t *obj, void *buffer);
00143 void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length);
00144 
00147 #ifdef __cplusplus
00148 }
00149 #endif
00150 
00151 #endif /* __ALSA_HWDEP_H */
00152 

Generated on Mon Aug 4 00:08:09 2003 for ALSA project - the C library reference by doxygen1.2.18