summaryrefslogtreecommitdiff
path: root/include/alsa/pcm_external.h
blob: 204a450c7d12b72f7c7ad00be9b93c0b44b9eb3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
 * \file include/pcm_external.h
 * \brief External PCM plugin SDK
 * \author Takashi Iwai <tiwai@suse.de>
 * \date 2005
 *
 * Extern PCM plugin SDK.
 */

/*
 *   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_EXTERNAL_H
#define __ALSA_PCM_EXTERNAL_H

#include "pcm.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 *  \defgroup Plugin_SDK External PCM plugin SDK
 *  \{
 */

/**
 * Define the object entry for external PCM plugins
 */
#define SND_PCM_PLUGIN_ENTRY(name) _snd_pcm_##name##_open

/**
 * Define the symbols of the given plugin with versions
 */
#define SND_PCM_PLUGIN_SYMBOL(name) SND_DLSYM_BUILD_VERSION(SND_PCM_PLUGIN_ENTRY(name), SND_PCM_DLSYM_VERSION);

/**
 * Define the plugin
 */
#define SND_PCM_PLUGIN_DEFINE_FUNC(plugin) \
int SND_PCM_PLUGIN_ENTRY(plugin) (snd_pcm_t **pcmp, const char *name,\
                                  snd_config_t *root, snd_config_t *conf, \
                                  snd_pcm_stream_t stream, int mode)

#include "pcm_ioplug.h"
#include "pcm_extplug.h"

int snd_pcm_parse_control_id(snd_config_t *conf, snd_ctl_elem_id_t *ctl_id, int *cardp,
                             int *cchannelsp, int *hwctlp);

/** \} */

#ifdef __cplusplus
}
#endif

#endif /* __ALSA_PCM_EXTERNAL_H */