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 enum _snd_hwdep_iface {
00049         SND_HWDEP_IFACE_OPL2 = 0,       
00050         SND_HWDEP_IFACE_OPL3,           
00051         SND_HWDEP_IFACE_OPL4,           
00052         SND_HWDEP_IFACE_SB16CSP,        
00053         SND_HWDEP_IFACE_EMU10K1,        
00054         SND_HWDEP_IFACE_YSS225,         
00055         SND_HWDEP_IFACE_ICS2115,        
00056         SND_HWDEP_IFACE_LAST = SND_HWDEP_IFACE_ICS2115  
00057 } snd_hwdep_iface_t;
00058 
00060 #define SND_HWDEP_OPEN_READ             (O_RDONLY)
00061 
00062 #define SND_HWDEP_OPEN_WRITE            (O_WRONLY)
00063 
00064 #define SND_HWDEP_OPEN_DUPLEX           (O_RDWR)
00065 
00066 #define SND_HWDEP_OPEN_NONBLOCK         (O_NONBLOCK)
00067 
00069 typedef enum _snd_hwdep_type {
00071         SND_HWDEP_TYPE_HW,
00073         SND_HWDEP_TYPE_SHM,
00075         SND_HWDEP_TYPE_INET
00076 } snd_hwdep_type_t;
00077 
00079 typedef struct _snd_hwdep snd_hwdep_t;
00080 
00081 int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode);
00082 int snd_hwdep_close(snd_hwdep_t *hwdep);
00083 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
00084 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
00085 int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock);
00086 int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info);
00087 int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg);
00088 ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size);
00089 ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size);
00090 
00091 size_t snd_hwdep_info_sizeof(void);
00093 #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)
00094 int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr);
00095 void snd_hwdep_info_free(snd_hwdep_info_t *obj);
00096 void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src);
00097 
00098 unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj);
00099 int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj);
00100 const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj);
00101 const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj);
00102 snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj);
00103 void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val);
00104 
00107 #ifdef __cplusplus
00108 }
00109 #endif
00110 
00111 #endif /* __ALSA_HWDEP_H */
00112 

Generated on Wed Feb 19 12:45:31 2003 for ALSA project - the C library reference by doxygen1.2.18