ALSA project - the C library reference: /builddir/build/BUILD/alsa-lib-1.1.8/include/hwdep.h Source File

ALSA project - the C library reference

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 {
55 SND_HWDEP_IFACE_OPL2 = 0,
56 SND_HWDEP_IFACE_OPL3,
57 SND_HWDEP_IFACE_OPL4,
58 SND_HWDEP_IFACE_SB16CSP,
59 SND_HWDEP_IFACE_EMU10K1,
60 SND_HWDEP_IFACE_YSS225,
61 SND_HWDEP_IFACE_ICS2115,
62 SND_HWDEP_IFACE_SSCAPE,
63 SND_HWDEP_IFACE_VX,
64 SND_HWDEP_IFACE_MIXART,
65 SND_HWDEP_IFACE_USX2Y,
66 SND_HWDEP_IFACE_EMUX_WAVETABLE,
67 SND_HWDEP_IFACE_BLUETOOTH,
68 SND_HWDEP_IFACE_USX2Y_PCM,
69 SND_HWDEP_IFACE_PCXHR,
70 SND_HWDEP_IFACE_SB_RC,
71 SND_HWDEP_IFACE_HDA,
72 SND_HWDEP_IFACE_USB_STREAM,
73 SND_HWDEP_IFACE_FW_DICE,
74 SND_HWDEP_IFACE_FW_FIREWORKS,
75 SND_HWDEP_IFACE_FW_BEBOB,
76 SND_HWDEP_IFACE_FW_OXFW,
77 SND_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */
78 SND_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */
79 SND_HWDEP_IFACE_LINE6, /* Line6 USB processors */
80 SND_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */
81 SND_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */
82
83 SND_HWDEP_IFACE_LAST = SND_HWDEP_IFACE_FW_FIREFACE,
84 } snd_hwdep_iface_t;
85
87 #define SND_HWDEP_OPEN_READ (O_RDONLY)
88
89 #define SND_HWDEP_OPEN_WRITE (O_WRONLY)
90
91 #define SND_HWDEP_OPEN_DUPLEX (O_RDWR)
92
93 #define SND_HWDEP_OPEN_NONBLOCK (O_NONBLOCK)
94
96 typedef enum _snd_hwdep_type {
98 SND_HWDEP_TYPE_HW,
100 SND_HWDEP_TYPE_SHM,
102 SND_HWDEP_TYPE_INET
103 } snd_hwdep_type_t;
104
106 typedef struct _snd_hwdep snd_hwdep_t;
107
108 int snd_hwdep_open(snd_hwdep_t **hwdep, const char *name, int mode);
109 int snd_hwdep_close(snd_hwdep_t *hwdep);
110 int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
111 int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep);
112 int snd_hwdep_poll_descriptors_revents(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
113 int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock);
114 int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info);
115 int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status);
116 int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block);
117 int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void * arg);
118 ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size);
119 ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size);
120
121 size_t snd_hwdep_info_sizeof(void);
123 #define snd_hwdep_info_alloca(ptr) __snd_alloca(ptr, snd_hwdep_info)
124 int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr);
125 void snd_hwdep_info_free(snd_hwdep_info_t *obj);
126 void snd_hwdep_info_copy(snd_hwdep_info_t *dst, const snd_hwdep_info_t *src);
127
128 unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj);
129 int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj);
130 const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj);
131 const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj);
132 snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj);
133 void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val);
134
135 size_t snd_hwdep_dsp_status_sizeof(void);
137 #define snd_hwdep_dsp_status_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_status)
138 int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr);
139 void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t *obj);
140 void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t *dst, const snd_hwdep_dsp_status_t *src);
141
142 unsigned int snd_hwdep_dsp_status_get_version(const snd_hwdep_dsp_status_t *obj);
143 const char *snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t *obj);
144 unsigned int snd_hwdep_dsp_status_get_num_dsps(const snd_hwdep_dsp_status_t *obj);
145 unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const snd_hwdep_dsp_status_t *obj);
146 unsigned int snd_hwdep_dsp_status_get_chip_ready(const snd_hwdep_dsp_status_t *obj);
147
148 size_t snd_hwdep_dsp_image_sizeof(void);
150 #define snd_hwdep_dsp_image_alloca(ptr) __snd_alloca(ptr, snd_hwdep_dsp_image)
151 int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr);
152 void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj);
153 void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t *dst, const snd_hwdep_dsp_image_t *src);
154
155 unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj);
156 const char *snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t *obj);
157 const void *snd_hwdep_dsp_image_get_image(const snd_hwdep_dsp_image_t *obj);
158 size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t *obj);
159
160 void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t *obj, unsigned int _index);
161 void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t *obj, const char *name);
162 void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t *obj, void *buffer);
163 void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t *obj, size_t length);
164
167 #ifdef __cplusplus
168 }
169 #endif
170
171 #endif /* __ALSA_HWDEP_H */
172
snd_hwdep_dsp_status
int snd_hwdep_dsp_status(snd_hwdep_t *hwdep, snd_hwdep_dsp_status_t *status)
get the DSP status information
Definition: hwdep.c:502
snd_hwdep_poll_descriptors
int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space)
get poll descriptors
Definition: hwdep.c:266
SND_HWDEP_IFACE_EMU10K1
Definition: hwdep.h:59
SND_HWDEP_TYPE_INET
Definition: hwdep.h:102
snd_hwdep_dsp_image_set_index
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
SND_HWDEP_IFACE_BLUETOOTH
Definition: hwdep.h:67
snd_hwdep_info_free
void snd_hwdep_info_free(snd_hwdep_info_t *obj)
frees the snd_hwdep_info_t structure
Definition: hwdep.c:359
SND_HWDEP_IFACE_FW_FIREWORKS
Definition: hwdep.h:74
SND_HWDEP_IFACE_FW_DICE
Definition: hwdep.h:73
SND_HWDEP_IFACE_VX
Definition: hwdep.h:63
SND_HWDEP_IFACE_SB16CSP
Definition: hwdep.h:58
SND_HWDEP_IFACE_LAST
Definition: hwdep.h:83
snd_hwdep_dsp_status_malloc
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
snd_hwdep_info_sizeof
size_t snd_hwdep_info_sizeof(void)
get size of the snd_hwdep_info_t structure in bytes
Definition: hwdep.c:330
SND_HWDEP_IFACE_HDA
Definition: hwdep.h:71
snd_hwdep_info_get_device
unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t *obj)
get hwdep device number
Definition: hwdep.c:392
snd_hwdep_t
struct _snd_hwdep snd_hwdep_t
Definition: hwdep.h:106
snd_hwdep_info_get_id
const char * snd_hwdep_info_get_id(const snd_hwdep_info_t *obj)
get hwdep driver identifier
Definition: hwdep.c:403
snd_hwdep_dsp_status_free
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_info_get_iface
snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t *obj)
get hwdep protocol interface
Definition: hwdep.c:425
snd_hwdep_dsp_status_get_chip_ready
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
SND_HWDEP_IFACE_OPL4
Definition: hwdep.h:57
SND_HWDEP_IFACE_YSS225
Definition: hwdep.h:60
snd_hwdep_dsp_image_set_length
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
SND_HWDEP_IFACE_FW_OXFW
Definition: hwdep.h:76
snd_hwdep_read
ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size)
read bytes using HwDep handle
Definition: hwdep.c:488
SND_HWDEP_IFACE_PCXHR
Definition: hwdep.h:69
snd_hwdep_dsp_image_malloc
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
SND_HWDEP_IFACE_SSCAPE
Definition: hwdep.h:62
snd_hwdep_dsp_image_sizeof
size_t snd_hwdep_dsp_image_sizeof(void)
get size of the snd_hwdep_dsp_image_t structure in bytes
Definition: hwdep.c:631
snd_hwdep_dsp_image_t
struct _snd_hwdep_dsp_image snd_hwdep_dsp_image_t
Definition: hwdep.h:51
snd_hwdep_info_malloc
int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr)
allocate a new snd_hwdep_info_t structure
Definition: hwdep.c:343
snd_hwdep_close
int snd_hwdep_close(snd_hwdep_t *hwdep)
close HwDep handle
Definition: hwdep.c:209
snd_hwdep_info_t
struct _snd_hwdep_info snd_hwdep_info_t
Definition: hwdep.h:45
snd_hwdep_dsp_status_sizeof
size_t snd_hwdep_dsp_status_sizeof(void)
get size of the snd_hwdep_dsp_status_t structure in bytes
Definition: hwdep.c:526
snd_hwdep_dsp_image_set_name
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
SND_HWDEP_IFACE_SB_RC
Definition: hwdep.h:70
SND_HWDEP_IFACE_MIXART
Definition: hwdep.h:64
snd_hwdep_dsp_status_copy
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
SND_HWDEP_TYPE_HW
Definition: hwdep.h:98
snd_hwdep_dsp_image_get_index
unsigned int snd_hwdep_dsp_image_get_index(const snd_hwdep_dsp_image_t *obj)
get the DSP block index
Definition: hwdep.c:682
snd_hwdep_dsp_image_get_name
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
snd_hwdep_dsp_status_get_num_dsps
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
snd_hwdep_dsp_status_get_version
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
SND_HWDEP_IFACE_USX2Y
Definition: hwdep.h:65
SND_HWDEP_IFACE_OPL3
Definition: hwdep.h:56
snd_hwdep_dsp_image_get_image
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
snd_hwdep_dsp_status_get_dsp_loaded
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
snd_hwdep_info_copy
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
SND_HWDEP_IFACE_OPL2
Definition: hwdep.h:55
snd_hwdep_nonblock
int snd_hwdep_nonblock(snd_hwdep_t *hwdep, int nonblock)
set nonblock mode
Definition: hwdep.c:313
snd_hwdep_info
int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t *info)
get information about HwDep handle
Definition: hwdep.c:448
SND_HWDEP_IFACE_ICS2115
Definition: hwdep.h:61
snd_hwdep_dsp_load
int snd_hwdep_dsp_load(snd_hwdep_t *hwdep, snd_hwdep_dsp_image_t *block)
load the DSP block
Definition: hwdep.c:515
snd_hwdep_ioctl
int snd_hwdep_ioctl(snd_hwdep_t *hwdep, unsigned int request, void *arg)
do hardware dependent ioctl
Definition: hwdep.c:462
snd_hwdep_dsp_status_t
struct _snd_hwdep_dsp_status snd_hwdep_dsp_status_t
Definition: hwdep.h:48
snd_hwdep_dsp_image_set_image
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
snd_hwdep_type_t
Definition: hwdep.h:96
snd_hwdep_dsp_image_copy
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
snd_hwdep_poll_descriptors_count
int snd_hwdep_poll_descriptors_count(snd_hwdep_t *hwdep)
get count of poll descriptors for HwDep handle
Definition: hwdep.c:253
SND_HWDEP_IFACE_USX2Y_PCM
Definition: hwdep.h:68
SND_HWDEP_TYPE_SHM
Definition: hwdep.h:100
SND_HWDEP_IFACE_FW_BEBOB
Definition: hwdep.h:75
snd_hwdep_iface_t
snd_hwdep_iface_t
Definition: hwdep.h:54
snd_hwdep_info_get_name
const char * snd_hwdep_info_get_name(const snd_hwdep_info_t *obj)
get hwdep driver name
Definition: hwdep.c:414
snd_hwdep_write
ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size)
write bytes using HwDep handle
Definition: hwdep.c:474
SND_HWDEP_IFACE_EMUX_WAVETABLE
Definition: hwdep.h:66
snd_hwdep_dsp_image_free
void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t *obj)
frees the snd_hwdep_dsp_image_t structure
Definition: hwdep.c:660
snd_hwdep_open
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
snd_hwdep_dsp_status_get_id
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
snd_hwdep_poll_descriptors_revents
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
ptr
void * ptr
Definition: seq_event.h:199
SND_HWDEP_IFACE_USB_STREAM
Definition: hwdep.h:72
snd_hwdep_dsp_image_get_length
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
snd_hwdep_info_get_card
int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj)
get hwdep card number
Definition: hwdep.c:381
snd_hwdep_info_set_device
void snd_hwdep_info_set_device(snd_hwdep_info_t *obj, unsigned int val)
set hwdep device number
Definition: hwdep.c:436