Path: blob/master/thirdparty/linuxbsd_headers/alsa/pcm_plugin.h
9898 views
/**1* \file include/pcm_plugin.h2* \brief Common PCM plugin code3* \author Abramo Bagnara <[email protected]>4* \author Jaroslav Kysela <[email protected]>5* \date 2000-20016*7* Application interface library for the ALSA driver.8* See the \ref pcm_plugins page for more details.9*10* \warning Using of contents of this header file might be dangerous11* in the sense of compatibility reasons. The contents might be12* freely changed in future.13*/14/*15* This library is free software; you can redistribute it and/or modify16* it under the terms of the GNU Lesser General Public License as17* published by the Free Software Foundation; either version 2.1 of18* 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 of22* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the23* GNU Lesser General Public License for more details.24*25* You should have received a copy of the GNU Lesser General Public26* License along with this library; if not, write to the Free Software27* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA28*29*/3031#ifndef __ALSA_PCM_PLUGIN_H3233/**34* \defgroup PCM_Plugins PCM Plugins35* \ingroup PCM36* See the \ref pcm_plugins page for more details.37* \{38*/3940#define SND_PCM_PLUGIN_RATE_MIN 4000 /**< minimal rate for the rate plugin */41#define SND_PCM_PLUGIN_RATE_MAX 192000 /**< maximal rate for the rate plugin */4243/* ROUTE_FLOAT should be set to 0 for machines without FP unit - like iPAQ */44#ifdef HAVE_SOFT_FLOAT45#define SND_PCM_PLUGIN_ROUTE_FLOAT 0 /**< use integers for route plugin */46#else47#define SND_PCM_PLUGIN_ROUTE_FLOAT 1 /**< use floats for route plugin */48#endif4950#define SND_PCM_PLUGIN_ROUTE_RESOLUTION 16 /**< integer resolution for route plugin */5152#if SND_PCM_PLUGIN_ROUTE_FLOAT53/** route ttable entry type */54typedef float snd_pcm_route_ttable_entry_t;55#define SND_PCM_PLUGIN_ROUTE_HALF 0.5 /**< half value */56#define SND_PCM_PLUGIN_ROUTE_FULL 1.0 /**< full value */57#else58/** route ttable entry type */59typedef int snd_pcm_route_ttable_entry_t;60#define SND_PCM_PLUGIN_ROUTE_HALF (SND_PCM_PLUGIN_ROUTE_RESOLUTION / 2) /**< half value */61#define SND_PCM_PLUGIN_ROUTE_FULL SND_PCM_PLUGIN_ROUTE_RESOLUTION /**< full value */62#endif6364/*65* Hardware plugin66*/67int snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,68int card, int device, int subdevice,69snd_pcm_stream_t stream, int mode,70int mmap_emulation, int sync_ptr_ioctl);71int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,72snd_config_t *root ATTRIBUTE_UNUSED, snd_config_t *conf,73snd_pcm_stream_t stream, int mode);7475/*76* Copy plugin77*/78int snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,79snd_pcm_t *slave, int close_slave);80int _snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,81snd_config_t *root, snd_config_t *conf,82snd_pcm_stream_t stream, int mode);8384/*85* Linear conversion plugin86*/87int snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,88snd_pcm_format_t sformat, snd_pcm_t *slave,89int close_slave);90int _snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,91snd_config_t *root, snd_config_t *conf,92snd_pcm_stream_t stream, int mode);9394/*95* Linear<->Float conversion plugin96*/97int snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,98snd_pcm_format_t sformat, snd_pcm_t *slave,99int close_slave);100int _snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,101snd_config_t *root, snd_config_t *conf,102snd_pcm_stream_t stream, int mode);103104/*105* Linear<->mu-Law conversion plugin106*/107int snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,108snd_pcm_format_t sformat, snd_pcm_t *slave,109int close_slave);110int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,111snd_config_t *root, snd_config_t *conf,112snd_pcm_stream_t stream, int mode);113114/*115* Linear<->a-Law conversion plugin116*/117int snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,118snd_pcm_format_t sformat, snd_pcm_t *slave,119int close_slave);120int _snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,121snd_config_t *root, snd_config_t *conf,122snd_pcm_stream_t stream, int mode);123124/*125* Linear<->Ima-ADPCM conversion plugin126*/127int snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,128snd_pcm_format_t sformat, snd_pcm_t *slave,129int close_slave);130int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,131snd_config_t *root, snd_config_t *conf,132snd_pcm_stream_t stream, int mode);133134/*135* Route plugin for linear formats136*/137int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable,138unsigned int tt_csize, unsigned int tt_ssize,139unsigned int *tt_cused, unsigned int *tt_sused,140int schannels);141int snd_pcm_route_determine_ttable(snd_config_t *tt,142unsigned int *tt_csize,143unsigned int *tt_ssize);144int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,145snd_pcm_format_t sformat, int schannels,146snd_pcm_route_ttable_entry_t *ttable,147unsigned int tt_ssize,148unsigned int tt_cused, unsigned int tt_sused,149snd_pcm_t *slave, int close_slave);150int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,151snd_config_t *root, snd_config_t *conf,152snd_pcm_stream_t stream, int mode);153154/*155* Rate plugin for linear formats156*/157int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,158snd_pcm_format_t sformat, unsigned int srate,159const snd_config_t *converter,160snd_pcm_t *slave, int close_slave);161int _snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,162snd_config_t *root, snd_config_t *conf,163snd_pcm_stream_t stream, int mode);164165/*166* Hooks plugin167*/168int snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,169snd_pcm_t *slave, int close_slave);170int _snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,171snd_config_t *root, snd_config_t *conf,172snd_pcm_stream_t stream, int mode);173174/*175* LADSPA plugin176*/177int snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,178const char *ladspa_path,179unsigned int channels,180snd_config_t *ladspa_pplugins,181snd_config_t *ladspa_cplugins,182snd_pcm_t *slave, int close_slave);183int _snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,184snd_config_t *root, snd_config_t *conf,185snd_pcm_stream_t stream, int mode);186187/*188* Jack plugin189*/190int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,191snd_config_t *playback_conf,192snd_config_t *capture_conf,193snd_pcm_stream_t stream, int mode);194int _snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,195snd_config_t *root, snd_config_t *conf,196snd_pcm_stream_t stream, int mode);197198199/** \} */200201#endif /* __ALSA_PCM_PLUGIN_H */202203204