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
pcm_extplug.h
Go to the documentation of this file.
1 
10 /*
11  * ALSA external PCM plugin SDK (draft version)
12  *
13  * Copyright (c) 2005 Takashi Iwai <tiwai@suse.de>
14  *
15  * This library is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU Lesser General Public License as
17  * published by the Free Software Foundation; either version 2.1 of
18  * the License, or (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU Lesser General Public License for more details.
24  *
25  * You should have received a copy of the GNU Lesser General Public
26  * License along with this library; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28  *
29  */
30 
31 #ifndef __ALSA_PCM_EXTPLUG_H
32 #define __ALSA_PCM_EXTPLUG_H
33 
42 enum {
46 };
47 
49 typedef struct snd_pcm_extplug snd_pcm_extplug_t;
52 #ifdef DOC_HIDDEN
53 /* redefine typedefs for stupid doxygen */
56 #endif
57 
58 /*
59  * Protocol version
60  */
61 #define SND_PCM_EXTPLUG_VERSION_MAJOR 1
62 #define SND_PCM_EXTPLUG_VERSION_MINOR 0
63 #define SND_PCM_EXTPLUG_VERSION_TINY 2
67 #define SND_PCM_EXTPLUG_VERSION ((SND_PCM_EXTPLUG_VERSION_MAJOR<<16) |\
68  (SND_PCM_EXTPLUG_VERSION_MINOR<<8) |\
69  (SND_PCM_EXTPLUG_VERSION_TINY))
70 
77  unsigned int version;
81  const char *name;
89  void *private_data;
109  unsigned int channels;
113  unsigned int rate;
125  unsigned int slave_channels;
126 };
127 
134  const snd_pcm_channel_area_t *dst_areas,
135  snd_pcm_uframes_t dst_offset,
136  const snd_pcm_channel_area_t *src_areas,
137  snd_pcm_uframes_t src_offset,
138  snd_pcm_uframes_t size);
142  int (*close)(snd_pcm_extplug_t *ext);
154  void (*dump)(snd_pcm_extplug_t *ext, snd_output_t *out);
158  int (*init)(snd_pcm_extplug_t *ext);
162  snd_pcm_chmap_query_t **(*query_chmaps)(snd_pcm_extplug_t *ext);
166  snd_pcm_chmap_t *(*get_chmap)(snd_pcm_extplug_t *ext);
170  int (*set_chmap)(snd_pcm_extplug_t *ext, const snd_pcm_chmap_t *map);
171 };
172 
173 
174 int snd_pcm_extplug_create(snd_pcm_extplug_t *ext, const char *name,
175  snd_config_t *root, snd_config_t *slave_conf,
176  snd_pcm_stream_t stream, int mode);
178 
179 /* clear hw_parameter setting */
181 
182 /* hw_parameter setting */
183 int snd_pcm_extplug_set_param_list(snd_pcm_extplug_t *extplug, int type, unsigned int num_list, const unsigned int *list);
184 int snd_pcm_extplug_set_param_minmax(snd_pcm_extplug_t *extplug, int type, unsigned int min, unsigned int max);
185 int snd_pcm_extplug_set_slave_param_list(snd_pcm_extplug_t *extplug, int type, unsigned int num_list, const unsigned int *list);
186 int snd_pcm_extplug_set_slave_param_minmax(snd_pcm_extplug_t *extplug, int type, unsigned int min, unsigned int max);
187 
191 static __inline__ int snd_pcm_extplug_set_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
192 {
193  return snd_pcm_extplug_set_param_list(extplug, type, 1, &val);
194 }
195 
199 static __inline__ int snd_pcm_extplug_set_slave_param(snd_pcm_extplug_t *extplug, int type, unsigned int val)
200 {
201  return snd_pcm_extplug_set_slave_param_list(extplug, type, 1, &val);
202 }
203 
206 #endif /* __ALSA_PCM_EXTPLUG_H */
Definition: pcm_extplug.h:44
snd_pcm_format_t format
Definition: pcm_extplug.h:101
int snd_pcm_extplug_create(snd_pcm_extplug_t *ext, const char *name, snd_config_t *root, snd_config_t *slave_conf, snd_pcm_stream_t stream, int mode)
Create an extplug instance.
Definition: pcm_extplug.c:663
Definition: pcm_extplug.h:72
Definition: pcm.h:594
snd_pcm_extplug_callback snd_pcm_extplug_callback_t
Definition: pcm_extplug.h:55
snd_pcm_t * pcm
Definition: pcm_extplug.h:93
Definition: pcm.h:448
snd_pcm_subformat_t
Definition: pcm.h:266
struct _snd_pcm_hw_params snd_pcm_hw_params_t
Definition: pcm.h:62
Definition: pcm.h:588
int snd_pcm_extplug_set_slave_param_list(snd_pcm_extplug_t *extplug, int type, unsigned int num_list, const unsigned int *list)
Set slave parameter as the list.
Definition: pcm_extplug.c:766
Definition: pcm_extplug.h:43
snd_pcm_format_t slave_format
Definition: pcm_extplug.h:117
int snd_pcm_extplug_set_param_list(snd_pcm_extplug_t *extplug, int type, unsigned int num_list, const unsigned int *list)
Set master parameter as the list.
Definition: pcm_extplug.c:814
snd_pcm_format_t
Definition: pcm.h:123
long snd_pcm_sframes_t
Definition: pcm.h:356
snd_pcm_stream_t stream
Definition: pcm_extplug.h:97
unsigned int rate
Definition: pcm_extplug.h:113
snd_pcm_extplug snd_pcm_extplug_t
Definition: pcm_extplug.h:54
snd_pcm_subformat_t slave_subformat
Definition: pcm_extplug.h:121
struct _snd_output snd_output_t
Internal structure for an output object.
Definition: output.h:54
void(* dump)(snd_pcm_extplug_t *ext, snd_output_t *out)
Definition: pcm_extplug.h:154
int(* hw_params)(snd_pcm_extplug_t *ext, snd_pcm_hw_params_t *params)
Definition: pcm_extplug.h:146
const snd_pcm_extplug_callback_t * callback
Definition: pcm_extplug.h:85
void snd_pcm_extplug_params_reset(snd_pcm_extplug_t *ext)
Reset extplug parameters.
Definition: pcm_extplug.c:748
int(* hw_free)(snd_pcm_extplug_t *ext)
Definition: pcm_extplug.h:150
unsigned int version
Definition: pcm_extplug.h:77
int(* init)(snd_pcm_extplug_t *ext)
Definition: pcm_extplug.h:158
Definition: pcm_extplug.h:45
int(* set_chmap)(snd_pcm_extplug_t *ext, const snd_pcm_chmap_t *map)
Definition: pcm_extplug.h:170
snd_pcm_subformat_t subformat
Definition: pcm_extplug.h:105
int snd_pcm_extplug_set_param_minmax(snd_pcm_extplug_t *extplug, int type, unsigned int min, unsigned int max)
Set master parameter as the min/max values.
Definition: pcm_extplug.c:836
struct _snd_config snd_config_t
Internal structure for a configuration node object.
Definition: conf.h:69
unsigned int channels
Definition: pcm_extplug.h:109
void * private_data
Definition: pcm_extplug.h:89
int snd_pcm_extplug_set_slave_param_minmax(snd_pcm_extplug_t *extplug, int type, unsigned int min, unsigned int max)
Set slave parameter as the min/max values.
Definition: pcm_extplug.c:788
Definition: pcm_extplug.h:129
unsigned long snd_pcm_uframes_t
Definition: pcm.h:354
snd_pcm_sframes_t(* transfer)(snd_pcm_extplug_t *ext, const snd_pcm_channel_area_t *dst_areas, snd_pcm_uframes_t dst_offset, const snd_pcm_channel_area_t *src_areas, snd_pcm_uframes_t src_offset, snd_pcm_uframes_t size)
Definition: pcm_extplug.h:133
snd_pcm_stream_t
Definition: pcm.h:99
int(* close)(snd_pcm_extplug_t *ext)
Definition: pcm_extplug.h:142
unsigned int slave_channels
Definition: pcm_extplug.h:125
int snd_pcm_extplug_delete(snd_pcm_extplug_t *ext)
Delete the extplug instance.
Definition: pcm_extplug.c:736
struct _snd_pcm snd_pcm_t
Definition: pcm.h:374
const char * name
Definition: pcm_extplug.h:81

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