Loading...
Searching...
No Matches
pcm_plugin.h
Go to the documentation of this file.
/*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __ALSA_PCM_PLUGIN_H
#define __ALSA_PCM_PLUGIN_H
#define SND_PCM_PLUGIN_RATE_MIN 4000
#define SND_PCM_PLUGIN_RATE_MAX 768000
/* ROUTE_FLOAT should be set to 0 for machines without FP unit - like iPAQ */
#ifdef HAVE_SOFT_FLOAT
#define SND_PCM_PLUGIN_ROUTE_FLOAT 0
#else
#define SND_PCM_PLUGIN_ROUTE_FLOAT 1
#endif
#define SND_PCM_PLUGIN_ROUTE_RESOLUTION 16
#if SND_PCM_PLUGIN_ROUTE_FLOAT
typedef float snd_pcm_route_ttable_entry_t;
#define SND_PCM_PLUGIN_ROUTE_HALF 0.5
#define SND_PCM_PLUGIN_ROUTE_FULL 1.0
#else
typedef int snd_pcm_route_ttable_entry_t;
#define SND_PCM_PLUGIN_ROUTE_HALF (SND_PCM_PLUGIN_ROUTE_RESOLUTION / 2)
#define SND_PCM_PLUGIN_ROUTE_FULL SND_PCM_PLUGIN_ROUTE_RESOLUTION
#endif
/*
* Hardware plugin
*/
int snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
int card, int device, int subdevice,
snd_pcm_stream_t stream, int mode,
int mmap_emulation, int sync_ptr_ioctl);
int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root ATTRIBUTE_UNUSED, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Copy plugin
*/
int snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_t *slave, int close_slave);
int _snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Linear conversion plugin
*/
int snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, snd_pcm_t *slave,
int close_slave);
int _snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Linear<->Float conversion plugin
*/
int snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, snd_pcm_t *slave,
int close_slave);
int _snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Linear<->mu-Law conversion plugin
*/
int snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, snd_pcm_t *slave,
int close_slave);
int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Linear<->a-Law conversion plugin
*/
int snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, snd_pcm_t *slave,
int close_slave);
int _snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Linear<->Ima-ADPCM conversion plugin
*/
int snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, snd_pcm_t *slave,
int close_slave);
int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* IEC958 subframe conversion plugin
*/
int snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, snd_pcm_t *slave,
int close_slave,
const unsigned char *status_bits,
const unsigned char *preamble_vals,
int hdmi_mode);
int _snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Route plugin for linear formats
*/
int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable,
unsigned int tt_csize, unsigned int tt_ssize,
unsigned int *tt_cused, unsigned int *tt_sused,
int schannels);
int snd_pcm_route_determine_ttable(snd_config_t *tt,
unsigned int *tt_csize,
unsigned int *tt_ssize);
int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, int schannels,
snd_pcm_route_ttable_entry_t *ttable,
unsigned int tt_ssize,
unsigned int tt_cused, unsigned int tt_sused,
snd_pcm_t *slave, int close_slave);
int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Rate plugin for linear formats
*/
int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_format_t sformat, unsigned int srate,
const snd_config_t *converter,
snd_pcm_t *slave, int close_slave);
int _snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Hooks plugin
*/
int snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
snd_pcm_t *slave, int close_slave);
int _snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* LADSPA plugin
*/
int snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,
const char *ladspa_path,
unsigned int channels,
snd_config_t *ladspa_pplugins,
snd_config_t *ladspa_cplugins,
snd_pcm_t *slave, int close_slave);
int _snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
/*
* Jack plugin
*/
int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *playback_conf,
snd_config_t *capture_conf,
snd_pcm_stream_t stream, int mode);
int _snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
#endif /* __ALSA_PCM_PLUGIN_H */
snd_config_t
struct _snd_config snd_config_t
Internal structure for a configuration node object.
Definition conf.h:74
_snd_pcm_alaw_open
int _snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new A-Law conversion PCM.
Definition pcm_alaw.c:508
snd_pcm_hooks_open
int snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name, snd_pcm_t *slave, int close_slave)
Creates a new hooks PCM.
Definition pcm_hooks.c:216
snd_pcm_hw_open
int snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name, int card, int device, int subdevice, snd_pcm_stream_t stream, int mode, int mmap_emulation, int sync_ptr_ioctl)
Creates a new hw PCM.
Definition pcm_hw.c:1757
_snd_pcm_lfloat_open
int _snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new linear<->float conversion PCM.
Definition pcm_lfloat.c:466
snd_pcm_lfloat_open
int snd_pcm_lfloat_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave)
Creates a new linear conversion PCM.
Definition pcm_lfloat.c:382
_snd_pcm_copy_open
int _snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new copy PCM.
Definition pcm_copy.c:262
_snd_pcm_hooks_open
int _snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new hooks PCM.
Definition pcm_hooks.c:482
snd_pcm_mulaw_open
int snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave)
Creates a new Mu-Law conversion PCM.
Definition pcm_mulaw.c:439
snd_pcm_route_ttable_entry_t
int snd_pcm_route_ttable_entry_t
Definition pcm_plugin.h:61
_snd_pcm_linear_open
int _snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new linear conversion PCM.
Definition pcm_linear.c:509
_snd_pcm_adpcm_open
int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new Ima-ADPCM conversion PCM.
Definition pcm_adpcm.c:633
snd_pcm_route_determine_ttable
int snd_pcm_route_determine_ttable(snd_config_t *tt, unsigned int *tt_csize, unsigned int *tt_ssize)
Determine route matrix sizes.
Definition pcm_route.c:1134
_snd_pcm_hw_open
int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new hw PCM.
Definition pcm_hw.c:1884
_snd_pcm_jack_open
int _snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new Jack PCM (internal).
snd_pcm_copy_open
int snd_pcm_copy_open(snd_pcm_t **pcmp, const char *name, snd_pcm_t *slave, int close_slave)
Creates a new copy PCM.
Definition pcm_copy.c:184
snd_pcm_iec958_open
int snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave, const unsigned char *status_bits, const unsigned char *preamble_vals, int hdmi_mode)
Creates a new IEC958 subframe conversion PCM.
Definition pcm_iec958.c:564
_snd_pcm_rate_open
int _snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new rate PCM.
Definition pcm_rate.c:1688
_snd_pcm_iec958_open
int _snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new IEC958 subframe conversion PCM.
Definition pcm_iec958.c:686
_snd_pcm_mulaw_open
int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new Mu-Law conversion PCM.
Definition pcm_mulaw.c:523
snd_pcm_jack_open
int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name, snd_config_t *playback_conf, snd_config_t *capture_conf, snd_pcm_stream_t stream, int mode)
Creates a new Jack PCM.
snd_pcm_route_load_ttable
int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable, unsigned int tt_csize, unsigned int tt_ssize, unsigned int *tt_cused, unsigned int *tt_sused, int schannels)
Load route matrix.
Definition pcm_route.c:1235
_snd_pcm_route_open
int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new Route & Volume PCM.
Definition pcm_route.c:1297
snd_pcm_rate_open
int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, unsigned int srate, const snd_config_t *converter, snd_pcm_t *slave, int close_slave)
Creates a new rate PCM.
Definition pcm_rate.c:1504
snd_pcm_linear_open
int snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave)
Creates a new linear conversion PCM.
Definition pcm_linear.c:427
snd_pcm_ladspa_open
int snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name, const char *ladspa_path, unsigned int channels, snd_config_t *ladspa_pplugins, snd_config_t *ladspa_cplugins, snd_pcm_t *slave, int close_slave)
Creates a new LADSPA<->ALSA Plugin.
Definition pcm_ladspa.c:1586
snd_pcm_alaw_open
int snd_pcm_alaw_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave)
Creates a new A-Law conversion PCM.
Definition pcm_alaw.c:424
snd_pcm_route_open
int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, int schannels, snd_pcm_route_ttable_entry_t *ttable, unsigned int tt_ssize, unsigned int tt_cused, unsigned int tt_sused, snd_pcm_t *slave, int close_slave)
Creates a new Route & Volume PCM.
Definition pcm_route.c:1025
_snd_pcm_ladspa_open
int _snd_pcm_ladspa_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
Creates a new LADSPA<->ALSA PCM.
Definition pcm_ladspa.c:1733
snd_pcm_adpcm_open
int snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave)
Creates a new Ima-ADPCM conversion PCM.
Definition pcm_adpcm.c:550
snd_pcm_t
struct _snd_pcm snd_pcm_t
Definition pcm.h:422
snd_pcm_format_t
snd_pcm_format_t
Definition pcm.h:129
snd_pcm_stream_t
snd_pcm_stream_t
Definition pcm.h:105