blob: 62cae8f8d85cce333c66ca3972f17eb042135ddb (
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2007 by Michael Sevakis
*
* Convert caps masks into HAVE_* defines
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
/** INPUTS **/
/* NOTE: Playback is implied in all this. Make sense? :) */
#define SRC_MIC 0
#define SRC_LINEIN 1
#define SRC_SPDIF 2
#define SRC_FMRADIO 3
#define SRC_CAP_MIC (1 << SRC_MIC)
#define SRC_CAP_LINEIN (1 << SRC_LINEIN)
#define SRC_CAP_SPDIF (1 << SRC_SPDIF)
#define SRC_CAP_FMRADIO (1 << SRC_FMRADIO)
/* audio monitor mux sources */
#ifndef INPUT_SRC_CAPS
#define INPUT_SRC_CAPS 0 /* Nothing but playback */
#endif
/* Microphone */
#if (INPUT_SRC_CAPS & SRC_CAP_MIC)
#define HAVE_MIC_IN
#define HAVE_MIC_IN_(...) __VA_ARGS__
#else
#define HAVE_MIC_IN_(...)
#endif
/* Line In */
#if (INPUT_SRC_CAPS & SRC_CAP_LINEIN)
#define HAVE_LINE_IN
#define HAVE_LINE_IN_(...) __VA_ARGS__
#else
#define HAVE_LINE_IN_(...)
#endif
/* S/PDIF */
#if (INPUT_SRC_CAPS & SRC_CAP_SPDIF)
#define HAVE_SPDIF_IN
#define HAVE_SPDIF_IN_(...) __VA_ARGS__
#else
#define HAVE_SPDIF_IN_(...)
#endif
/* FM Radio */
#if (INPUT_SRC_CAPS & SRC_CAP_FMRADIO)
#define HAVE_FMRADIO_IN
#define HAVE_FMRADIO_IN_(...) __VA_ARGS__
#else
#define HAVE_FMRADIO_IN_(...)
#endif
#if INPUT_SRC_CAPS != 0 && (INPUT_SRC_CAPS & (INPUT_SRC_CAPS-1)) != 0
#define HAVE_MULTI_INPUT_SRC
#endif
#ifdef HAVE_RECORDING
/* Recordable source implies it has the input as well */
/* For now there's no restrictions on any targets with which inputs
are recordable so define them as equivalent - if they do differ,
special handling is needed right now. */
#ifndef REC_SRC_CAPS
#define REC_SRC_CAPS INPUT_SRC_CAPS
#endif
/* Microphone */
#if (REC_SRC_CAPS & SRC_CAP_MIC)
#define HAVE_MIC_REC
#define HAVE_MIC_REC_(...) __VA_ARGS__
#else
#define HAVE_MIC_REC_(...)
#endif
/* Line In */
#if (REC_SRC_CAPS & SRC_CAP_LINEIN)
#define HAVE_LINE_REC
#define HAVE_LINE_REC_(...) __VA_ARGS__
#else
#define HAVE_LINE_REC_(...)
#endif
/* S/PDIF */
#if (REC_SRC_CAPS & SRC_CAP_SPDIF)
#define HAVE_SPDIF_REC
#define HAVE_SPDIF_REC_(...) __VA_ARGS__
#else
#define HAVE_SPDIF_REC_(...)
#endif
/* FM Radio */
#if (REC_SRC_CAPS & SRC_CAP_FMRADIO)
#define HAVE_FMRADIO_REC
#define HAVE_FMRADIO_REC_(...) __VA_ARGS__
#else
#define HAVE_FMRADIO_REC_(...)
#endif
#if REC_SRC_CAPS != 0 && (REC_SRC_CAPS & (REC_SRC_CAPS-1)) != 0
#define HAVE_MULTI_REC_SRC
#endif
#endif /* HAVE_RECORDING */
|