Linux Packages Manuals » alsa-lib-devel-1.1.1
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 {
77  SND_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */
78  SND_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */
79 
80  SND_HWDEP_IFACE_LAST = SND_HWDEP_IFACE_FW_TASCAM
82 
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 
93 typedef enum _snd_hwdep_type {
101 
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);
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);
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);
120 #define snd_hwdep_info_alloca(ptr) __snd_alloca(ptr, snd_hwdep_info)
124 
125 unsigned int snd_hwdep_info_get_device(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);
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);
134 #define snd_hwdep_dsp_status_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_status)
138 
144 
145 size_t snd_hwdep_dsp_image_sizeof(void);
147 #define snd_hwdep_dsp_image_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_image)
151 
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);
160 void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length);
161 
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 #endif /* __ALSA_HWDEP_H */
169 
int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status)
get the DSP status information
Definition: hwdep.c:502
int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space)
get poll descriptors
Definition: hwdep.c:266
Definition: hwdep.h:59
Definition: hwdep.h:99
void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int _index)
set the DSP block index
Definition: hwdep.c:726
Definition: hwdep.h:67
void snd_hwdep_info_free(snd_hwdep_info_t *obj)
frees the snd_hwdep_info_t structure
Definition: hwdep.c:359
Definition: hwdep.h:74
Definition: hwdep.h:73
Definition: hwdep.h:63
Definition: hwdep.h:58
Definition: hwdep.h:80
int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr)
allocate a new snd_hwdep_dsp_status_t structure
Definition: hwdep.c:539
size_t snd_hwdep_info_sizeof(void)
get size of the snd_hwdep_info_t structure in bytes
Definition: hwdep.c:330
Definition: hwdep.h:71
unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj)
get hwdep device number
Definition: hwdep.c:392
struct _snd_hwdep snd_hwdep_t
Definition: hwdep.h:103
const char * snd_hwdep_info_get_id(const snd_hwdep_info_t *obj)
get hwdep driver identifier
Definition: hwdep.c:403
void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t *obj)
frees the snd_hwdep_dsp_status_t structure
Definition: hwdep.c:555
snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj)
get hwdep protocol interface
Definition: hwdep.c:425
unsigned int snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t *obj)
get the chip status of dsp loader
Definition: hwdep.c:621
Definition: hwdep.h:57
Definition: hwdep.h:60
void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length)
set the DSP block length
Definition: hwdep.c:749
Definition: hwdep.h:76
ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size)
read bytes using HwDep handle
Definition: hwdep.c:488
Definition: hwdep.h:69
int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr)
allocate a new snd_hwdep_dsp_image_t structure
Definition: hwdep.c:644
Definition: hwdep.h:62
size_t snd_hwdep_dsp_image_sizeof(void)
get size of the snd_hwdep_dsp_image_t structure in bytes
Definition: hwdep.c:631
struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t
Definition: hwdep.h:51
int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr)
allocate a new snd_hwdep_info_t structure
Definition: hwdep.c:343
int snd_hwdep_close(snd_hwdep_t *hwdep)
close HwDep handle
Definition: hwdep.c:209
struct _snd_hwdep_info snd_hwdep_info_t
Definition: hwdep.h:45
size_t snd_hwdep_dsp_status_sizeof(void)
get size of the snd_hwdep_dsp_status_t structure in bytes
Definition: hwdep.c:526
void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name)
set the name of the DSP block
Definition: hwdep.c:737
Definition: hwdep.h:70
Definition: hwdep.h:64
void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src)
copy one snd_hwdep_dsp_status_t structure to another
Definition: hwdep.c:566
Definition: hwdep.h:95
unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj)
get the DSP block index
Definition: hwdep.c:682
const char * snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t *obj)
get the name of the DSP block
Definition: hwdep.c:693
unsigned int snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t *obj)
get number of dsp blocks
Definition: hwdep.c:599
unsigned int snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t *obj)
get the driver version of dsp loader
Definition: hwdep.c:577
Definition: hwdep.h:65
Definition: hwdep.h:56
const void * snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t *obj)
get the image pointer of the DSP block
Definition: hwdep.c:715
unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t *obj)
get the bit flags of the loaded dsp blocks
Definition: hwdep.c:610
void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src)
copy one snd_hwdep_info_t structure to another
Definition: hwdep.c:370
Definition: hwdep.h:55
int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock)
set nonblock mode
Definition: hwdep.c:313
int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t *info)
get information about HwDep handle
Definition: hwdep.c:448
Definition: hwdep.h:61
int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block)
load the DSP block
Definition: hwdep.c:515
int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void *arg)
do hardware dependent ioctl
Definition: hwdep.c:462
struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t
Definition: hwdep.h:48
void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t *obj, void *buffer)
set the DSP block image pointer
Definition: hwdep.c:760
snd_hwdep_type_t
Definition: hwdep.h:93
void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src)
copy one snd_hwdep_dsp_image_t structure to another
Definition: hwdep.c:671
int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep)
get count of poll descriptors for HwDep handle
Definition: hwdep.c:253
Definition: hwdep.h:68
Definition: hwdep.h:97
Definition: hwdep.h:75
snd_hwdep_iface_t
Definition: hwdep.h:54
const char * snd_hwdep_info_get_name(const snd_hwdep_info_t *obj)
get hwdep driver name
Definition: hwdep.c:414
ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size)
write bytes using HwDep handle
Definition: hwdep.c:474
Definition: hwdep.h:66
void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj)
frees the snd_hwdep_dsp_image_t structure
Definition: hwdep.c:660
int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode)
Opens a new connection to the HwDep interface.
Definition: hwdep.c:169
const char * snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t *obj)
get the driver id of dsp loader
Definition: hwdep.c:588
int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
get returned events from poll descriptors
Definition: hwdep.c:297
void * ptr
Definition: seq_event.h:199
Definition: hwdep.h:72
size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t *obj)
get the length of the DSP block
Definition: hwdep.c:704
int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj)
get hwdep card number
Definition: hwdep.c:381
void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val)
set hwdep device number
Definition: hwdep.c:436

Generated for ALSA project - the C library reference by doxygen 1.8.5