annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/alsa/pcm_plugin.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /**
jpayne@69 2 * \file include/pcm_plugin.h
jpayne@69 3 * \brief Common PCM plugin code
jpayne@69 4 * \author Abramo Bagnara <abramo@alsa-project.org>
jpayne@69 5 * \author Jaroslav Kysela <perex@perex.cz>
jpayne@69 6 * \date 2000-2001
jpayne@69 7 *
jpayne@69 8 * Application interface library for the ALSA driver.
jpayne@69 9 * See the \ref pcm_plugins page for more details.
jpayne@69 10 *
jpayne@69 11 * \warning Using of contents of this header file might be dangerous
jpayne@69 12 * in the sense of compatibility reasons. The contents might be
jpayne@69 13 * freely changed in future.
jpayne@69 14 */
jpayne@69 15 /*
jpayne@69 16 * This library is free software; you can redistribute it and/or modify
jpayne@69 17 * it under the terms of the GNU Lesser General Public License as
jpayne@69 18 * published by the Free Software Foundation; either version 2.1 of
jpayne@69 19 * the License, or (at your option) any later version.
jpayne@69 20 *
jpayne@69 21 * This program is distributed in the hope that it will be useful,
jpayne@69 22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jpayne@69 23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
jpayne@69 24 * GNU Lesser General Public License for more details.
jpayne@69 25 *
jpayne@69 26 * You should have received a copy of the GNU Lesser General Public
jpayne@69 27 * License along with this library; if not, write to the Free Software
jpayne@69 28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
jpayne@69 29 *
jpayne@69 30 */
jpayne@69 31
jpayne@69 32 #ifndef __ALSA_PCM_PLUGIN_H
jpayne@69 33 #define __ALSA_PCM_PLUGIN_H
jpayne@69 34
jpayne@69 35 /**
jpayne@69 36 * \defgroup PCM_Plugins PCM Plugins
jpayne@69 37 * \ingroup PCM
jpayne@69 38 * See the \ref pcm_plugins page for more details.
jpayne@69 39 * \{
jpayne@69 40 */
jpayne@69 41
jpayne@69 42 #define SND_PCM_PLUGIN_RATE_MIN 4000 /**< minimal rate for the rate plugin */
jpayne@69 43 #define SND_PCM_PLUGIN_RATE_MAX 768000 /**< maximal rate for the rate plugin */
jpayne@69 44
jpayne@69 45 /* ROUTE_FLOAT should be set to 0 for machines without FP unit - like iPAQ */
jpayne@69 46 #ifdef HAVE_SOFT_FLOAT
jpayne@69 47 #define SND_PCM_PLUGIN_ROUTE_FLOAT 0 /**< use integers for route plugin */
jpayne@69 48 #else
jpayne@69 49 #define SND_PCM_PLUGIN_ROUTE_FLOAT 1 /**< use floats for route plugin */
jpayne@69 50 #endif
jpayne@69 51
jpayne@69 52 #define SND_PCM_PLUGIN_ROUTE_RESOLUTION 16 /**< integer resolution for route plugin */
jpayne@69 53
jpayne@69 54 #if SND_PCM_PLUGIN_ROUTE_FLOAT
jpayne@69 55 /** route ttable entry type */
jpayne@69 56 typedef float snd_pcm_route_ttable_entry_t;
jpayne@69 57 #define SND_PCM_PLUGIN_ROUTE_HALF 0.5 /**< half value */
jpayne@69 58 #define SND_PCM_PLUGIN_ROUTE_FULL 1.0 /**< full value */
jpayne@69 59 #else
jpayne@69 60 /** route ttable entry type */
jpayne@69 61 typedef int snd_pcm_route_ttable_entry_t;
jpayne@69 62 #define SND_PCM_PLUGIN_ROUTE_HALF (SND_PCM_PLUGIN_ROUTE_RESOLUTION / 2) /**< half value */
jpayne@69 63 #define SND_PCM_PLUGIN_ROUTE_FULL SND_PCM_PLUGIN_ROUTE_RESOLUTION /**< full value */
jpayne@69 64 #endif
jpayne@69 65
jpayne@69 66 /*
jpayne@69 67 * Hardware plugin
jpayne@69 68 */
jpayne@69 69 int snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 70 int card, int device, int subdevice,
jpayne@69 71 snd_pcm_stream_t stream, int mode,
jpayne@69 72 int mmap_emulation, int sync_ptr_ioctl);
jpayne@69 73 int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 74 snd_config_t *root ATTRIBUTE_UNUSED, snd_config_t *conf,
jpayne@69 75 snd_pcm_stream_t stream, int mode);
jpayne@69 76
jpayne@69 77 /*
jpayne@69 78 * Copy plugin
jpayne@69 79 */
jpayne@69 80 int snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 81 snd_pcm_t *slave, int close_slave);
jpayne@69 82 int _snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 83 snd_config_t *root, snd_config_t *conf,
jpayne@69 84 snd_pcm_stream_t stream, int mode);
jpayne@69 85
jpayne@69 86 /*
jpayne@69 87 * Linear conversion plugin
jpayne@69 88 */
jpayne@69 89 int snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 90 snd_pcm_format_t sformat, snd_pcm_t *slave,
jpayne@69 91 int close_slave);
jpayne@69 92 int _snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 93 snd_config_t *root, snd_config_t *conf,
jpayne@69 94 snd_pcm_stream_t stream, int mode);
jpayne@69 95
jpayne@69 96 /*
jpayne@69 97 * Linear<->Float conversion plugin
jpayne@69 98 */
jpayne@69 99 int snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 100 snd_pcm_format_t sformat, snd_pcm_t *slave,
jpayne@69 101 int close_slave);
jpayne@69 102 int _snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 103 snd_config_t *root, snd_config_t *conf,
jpayne@69 104 snd_pcm_stream_t stream, int mode);
jpayne@69 105
jpayne@69 106 /*
jpayne@69 107 * Linear<->mu-Law conversion plugin
jpayne@69 108 */
jpayne@69 109 int snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 110 snd_pcm_format_t sformat, snd_pcm_t *slave,
jpayne@69 111 int close_slave);
jpayne@69 112 int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 113 snd_config_t *root, snd_config_t *conf,
jpayne@69 114 snd_pcm_stream_t stream, int mode);
jpayne@69 115
jpayne@69 116 /*
jpayne@69 117 * Linear<->a-Law conversion plugin
jpayne@69 118 */
jpayne@69 119 int snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 120 snd_pcm_format_t sformat, snd_pcm_t *slave,
jpayne@69 121 int close_slave);
jpayne@69 122 int _snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 123 snd_config_t *root, snd_config_t *conf,
jpayne@69 124 snd_pcm_stream_t stream, int mode);
jpayne@69 125
jpayne@69 126 /*
jpayne@69 127 * Linear<->Ima-ADPCM conversion plugin
jpayne@69 128 */
jpayne@69 129 int snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 130 snd_pcm_format_t sformat, snd_pcm_t *slave,
jpayne@69 131 int close_slave);
jpayne@69 132 int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 133 snd_config_t *root, snd_config_t *conf,
jpayne@69 134 snd_pcm_stream_t stream, int mode);
jpayne@69 135
jpayne@69 136 /*
jpayne@69 137 * Route plugin for linear formats
jpayne@69 138 */
jpayne@69 139 int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable,
jpayne@69 140 unsigned int tt_csize, unsigned int tt_ssize,
jpayne@69 141 unsigned int *tt_cused, unsigned int *tt_sused,
jpayne@69 142 int schannels);
jpayne@69 143 int snd_pcm_route_determine_ttable(snd_config_t *tt,
jpayne@69 144 unsigned int *tt_csize,
jpayne@69 145 unsigned int *tt_ssize);
jpayne@69 146 int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 147 snd_pcm_format_t sformat, int schannels,
jpayne@69 148 snd_pcm_route_ttable_entry_t *ttable,
jpayne@69 149 unsigned int tt_ssize,
jpayne@69 150 unsigned int tt_cused, unsigned int tt_sused,
jpayne@69 151 snd_pcm_t *slave, int close_slave);
jpayne@69 152 int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 153 snd_config_t *root, snd_config_t *conf,
jpayne@69 154 snd_pcm_stream_t stream, int mode);
jpayne@69 155
jpayne@69 156 /*
jpayne@69 157 * Rate plugin for linear formats
jpayne@69 158 */
jpayne@69 159 int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 160 snd_pcm_format_t sformat, unsigned int srate,
jpayne@69 161 const snd_config_t *converter,
jpayne@69 162 snd_pcm_t *slave, int close_slave);
jpayne@69 163 int _snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 164 snd_config_t *root, snd_config_t *conf,
jpayne@69 165 snd_pcm_stream_t stream, int mode);
jpayne@69 166
jpayne@69 167 /*
jpayne@69 168 * Hooks plugin
jpayne@69 169 */
jpayne@69 170 int snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 171 snd_pcm_t *slave, int close_slave);
jpayne@69 172 int _snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 173 snd_config_t *root, snd_config_t *conf,
jpayne@69 174 snd_pcm_stream_t stream, int mode);
jpayne@69 175
jpayne@69 176 /*
jpayne@69 177 * LADSPA plugin
jpayne@69 178 */
jpayne@69 179 int snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 180 const char *ladspa_path,
jpayne@69 181 unsigned int channels,
jpayne@69 182 snd_config_t *ladspa_pplugins,
jpayne@69 183 snd_config_t *ladspa_cplugins,
jpayne@69 184 snd_pcm_t *slave, int close_slave);
jpayne@69 185 int _snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 186 snd_config_t *root, snd_config_t *conf,
jpayne@69 187 snd_pcm_stream_t stream, int mode);
jpayne@69 188
jpayne@69 189 /*
jpayne@69 190 * Jack plugin
jpayne@69 191 */
jpayne@69 192 int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 193 snd_config_t *playback_conf,
jpayne@69 194 snd_config_t *capture_conf,
jpayne@69 195 snd_pcm_stream_t stream, int mode);
jpayne@69 196 int _snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
jpayne@69 197 snd_config_t *root, snd_config_t *conf,
jpayne@69 198 snd_pcm_stream_t stream, int mode);
jpayne@69 199
jpayne@69 200
jpayne@69 201 /** \} */
jpayne@69 202
jpayne@69 203 #endif /* __ALSA_PCM_PLUGIN_H */