ALSA project - the C library reference
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hwdep.h
Go to the documentation of this file.
1 
11 /*
12  * This library is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License as
14  * published by the Free Software Foundation; either version 2.1 of
15  * the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  */
27 
28 #ifndef __ALSA_HWDEP_H
29 #define __ALSA_HWDEP_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
42 #define SND_HWDEP_DLSYM_VERSION _dlsym_hwdep_001
43 
45 typedef struct _snd_hwdep_info snd_hwdep_info_t;
46 
48 typedef struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t;
49 
51 typedef struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t;
52 
54 typedef enum _snd_hwdep_iface {
80 
82 #define SND_HWDEP_OPEN_READ (O_RDONLY)
83 
84 #define SND_HWDEP_OPEN_WRITE (O_WRONLY)
85 
86 #define SND_HWDEP_OPEN_DUPLEX (O_RDWR)
87 
88 #define SND_HWDEP_OPEN_NONBLOCK (O_NONBLOCK)
89 
91 typedef enum _snd_hwdep_type {
99 
101 typedef struct _snd_hwdep snd_hwdep_t;
102 
103 int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode);
104 int snd_hwdep_close(snd_hwdep_t *hwdep);
105 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
107 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
108 int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock);
109 int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info);
112 int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg);
113 ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size);
114 ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size);
115 
116 size_t snd_hwdep_info_sizeof(void);
118 #define snd_hwdep_info_alloca(ptr) __snd_alloca(ptr, snd_hwdep_info)
122 
123 unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj);
125 const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj);
126 const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj);
128 void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val);
129 
130 size_t snd_hwdep_dsp_status_sizeof(void);
132 #define snd_hwdep_dsp_status_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_status)
136 
142 
143 size_t snd_hwdep_dsp_image_sizeof(void);
145 #define snd_hwdep_dsp_image_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_image)
149 
154 
155 void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int _index);
156 void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name);
158 void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length);
159 
162 #ifdef __cplusplus
163 }
164 #endif
165 
166 #endif /* __ALSA_HWDEP_H */
167