Blame include/pcm_plugin.h

Packit 4a16fb
/**
Packit 4a16fb
 * \file include/pcm_plugin.h
Packit 4a16fb
 * \brief Common PCM plugin code
Packit 4a16fb
 * \author Abramo Bagnara <abramo@alsa-project.org>
Packit 4a16fb
 * \author Jaroslav Kysela <perex@perex.cz>
Packit 4a16fb
 * \date 2000-2001
Packit 4a16fb
 *
Packit 4a16fb
 * Application interface library for the ALSA driver.
Packit 4a16fb
 * See the \ref pcm_plugins page for more details.
Packit 4a16fb
 *
Packit 4a16fb
 * \warning Using of contents of this header file might be dangerous
Packit 4a16fb
 *	    in the sense of compatibility reasons. The contents might be
Packit 4a16fb
 *	    freely changed in future.
Packit 4a16fb
 */
Packit 4a16fb
/*
Packit 4a16fb
 *   This library is free software; you can redistribute it and/or modify
Packit 4a16fb
 *   it under the terms of the GNU Lesser General Public License as
Packit 4a16fb
 *   published by the Free Software Foundation; either version 2.1 of
Packit 4a16fb
 *   the License, or (at your option) any later version.
Packit 4a16fb
 *
Packit 4a16fb
 *   This program is distributed in the hope that it will be useful,
Packit 4a16fb
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 4a16fb
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 4a16fb
 *   GNU Lesser General Public License for more details.
Packit 4a16fb
 *
Packit 4a16fb
 *   You should have received a copy of the GNU Lesser General Public
Packit 4a16fb
 *   License along with this library; if not, write to the Free Software
Packit 4a16fb
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 4a16fb
 *
Packit 4a16fb
 */
Packit 4a16fb
Packit 4a16fb
#ifndef __ALSA_PCM_PLUGIN_H
Packit 4a16fb
#define __ALSA_PCM_PLUGIN_H
Packit 4a16fb
Packit 4a16fb
/**
Packit 4a16fb
 * \defgroup PCM_Plugins PCM Plugins
Packit 4a16fb
 * \ingroup PCM
Packit 4a16fb
 * See the \ref pcm_plugins page for more details.
Packit 4a16fb
 * \{
Packit 4a16fb
 */
Packit 4a16fb
  
Packit 4a16fb
#define SND_PCM_PLUGIN_RATE_MIN 4000	/**< minimal rate for the rate plugin */
Packit 4a16fb
#define SND_PCM_PLUGIN_RATE_MAX 768000	/**< maximal rate for the rate plugin */
Packit 4a16fb
Packit 4a16fb
/* ROUTE_FLOAT should be set to 0 for machines without FP unit - like iPAQ */
Packit 4a16fb
#ifdef HAVE_SOFT_FLOAT
Packit 4a16fb
#define SND_PCM_PLUGIN_ROUTE_FLOAT 0	   /**< use integers for route plugin */
Packit 4a16fb
#else
Packit 4a16fb
#define SND_PCM_PLUGIN_ROUTE_FLOAT 1	   /**< use floats for route plugin */
Packit 4a16fb
#endif
Packit 4a16fb
Packit 4a16fb
#define SND_PCM_PLUGIN_ROUTE_RESOLUTION 16 /**< integer resolution for route plugin */
Packit 4a16fb
Packit 4a16fb
#if SND_PCM_PLUGIN_ROUTE_FLOAT
Packit 4a16fb
/** route ttable entry type */
Packit 4a16fb
typedef float snd_pcm_route_ttable_entry_t;
Packit 4a16fb
#define SND_PCM_PLUGIN_ROUTE_HALF 0.5	/**< half value */
Packit 4a16fb
#define SND_PCM_PLUGIN_ROUTE_FULL 1.0	/**< full value */
Packit 4a16fb
#else
Packit 4a16fb
/** route ttable entry type */
Packit 4a16fb
typedef int snd_pcm_route_ttable_entry_t;
Packit 4a16fb
#define SND_PCM_PLUGIN_ROUTE_HALF (SND_PCM_PLUGIN_ROUTE_RESOLUTION / 2)	/**< half value */
Packit 4a16fb
#define SND_PCM_PLUGIN_ROUTE_FULL SND_PCM_PLUGIN_ROUTE_RESOLUTION	/**< full value */
Packit 4a16fb
#endif
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Hardware plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		    int card, int device, int subdevice,
Packit 4a16fb
		    snd_pcm_stream_t stream, int mode,
Packit 4a16fb
		    int mmap_emulation, int sync_ptr_ioctl);
Packit 4a16fb
int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		     snd_config_t *root ATTRIBUTE_UNUSED, snd_config_t *conf,
Packit 4a16fb
		     snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Copy plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		      snd_pcm_t *slave, int close_slave);
Packit 4a16fb
int _snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		       snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
                       snd_pcm_stream_t stream, int mode);
Packit 4a16fb
                                              
Packit 4a16fb
/*
Packit 4a16fb
 *  Linear conversion plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			snd_pcm_format_t sformat, snd_pcm_t *slave,
Packit 4a16fb
			int close_slave);
Packit 4a16fb
int _snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			 snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
			 snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Linear<->Float conversion plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			snd_pcm_format_t sformat, snd_pcm_t *slave,
Packit 4a16fb
			int close_slave);
Packit 4a16fb
int _snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			 snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
			 snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Linear<->mu-Law conversion plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		       snd_pcm_format_t sformat, snd_pcm_t *slave,
Packit 4a16fb
		       int close_slave);
Packit 4a16fb
int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
                        snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Linear<->a-Law conversion plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		      snd_pcm_format_t sformat, snd_pcm_t *slave,
Packit 4a16fb
		      int close_slave);
Packit 4a16fb
int _snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		       snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
		       snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Linear<->Ima-ADPCM conversion plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		       snd_pcm_format_t sformat, snd_pcm_t *slave,
Packit 4a16fb
		       int close_slave);
Packit 4a16fb
int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
			snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Route plugin for linear formats
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable,
Packit 4a16fb
			      unsigned int tt_csize, unsigned int tt_ssize,
Packit 4a16fb
			      unsigned int *tt_cused, unsigned int *tt_sused,
Packit 4a16fb
			      int schannels);
Packit 4a16fb
int snd_pcm_route_determine_ttable(snd_config_t *tt,
Packit 4a16fb
				   unsigned int *tt_csize,
Packit 4a16fb
				   unsigned int *tt_ssize);
Packit 4a16fb
int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		       snd_pcm_format_t sformat, int schannels,
Packit 4a16fb
		       snd_pcm_route_ttable_entry_t *ttable,
Packit 4a16fb
		       unsigned int tt_ssize,
Packit 4a16fb
		       unsigned int tt_cused, unsigned int tt_sused,
Packit 4a16fb
		       snd_pcm_t *slave, int close_slave);
Packit 4a16fb
int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
			snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Rate plugin for linear formats
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		      snd_pcm_format_t sformat, unsigned int srate,
Packit 4a16fb
		      const snd_config_t *converter,
Packit 4a16fb
		      snd_pcm_t *slave, int close_slave);
Packit 4a16fb
int _snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		       snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
		       snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Hooks plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
		       snd_pcm_t *slave, int close_slave);
Packit 4a16fb
int _snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
			snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  LADSPA plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			const char *ladspa_path,
Packit 4a16fb
			unsigned int channels,
Packit 4a16fb
			snd_config_t *ladspa_pplugins,
Packit 4a16fb
			snd_config_t *ladspa_cplugins,
Packit 4a16fb
			snd_pcm_t *slave, int close_slave);
Packit 4a16fb
int _snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
			 snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
			 snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
/*
Packit 4a16fb
 *  Jack plugin
Packit 4a16fb
 */
Packit 4a16fb
int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
					snd_config_t *playback_conf,
Packit 4a16fb
					snd_config_t *capture_conf,
Packit 4a16fb
		      snd_pcm_stream_t stream, int mode);
Packit 4a16fb
int _snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
Packit 4a16fb
                       snd_config_t *root, snd_config_t *conf,
Packit 4a16fb
                       snd_pcm_stream_t stream, int mode);
Packit 4a16fb
Packit 4a16fb
Packit 4a16fb
/** \} */
Packit 4a16fb
Packit 4a16fb
#endif /* __ALSA_PCM_PLUGIN_H */