Add a note about Rockbox not running on Sansas v2 (FS#8477 by Marc Guay).
[Rockbox.git] / firmware / export / config_caps.h
blob62cae8f8d85cce333c66ca3972f17eb042135ddb
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Michael Sevakis
12 * Convert caps masks into HAVE_* defines
14 * All files in this archive are subject to the GNU General Public License.
15 * See the file COPYING in the source tree root for full license agreement.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 /** INPUTS **/
24 /* NOTE: Playback is implied in all this. Make sense? :) */
25 #define SRC_MIC 0
26 #define SRC_LINEIN 1
27 #define SRC_SPDIF 2
28 #define SRC_FMRADIO 3
30 #define SRC_CAP_MIC (1 << SRC_MIC)
31 #define SRC_CAP_LINEIN (1 << SRC_LINEIN)
32 #define SRC_CAP_SPDIF (1 << SRC_SPDIF)
33 #define SRC_CAP_FMRADIO (1 << SRC_FMRADIO)
35 /* audio monitor mux sources */
36 #ifndef INPUT_SRC_CAPS
37 #define INPUT_SRC_CAPS 0 /* Nothing but playback */
38 #endif
40 /* Microphone */
41 #if (INPUT_SRC_CAPS & SRC_CAP_MIC)
42 #define HAVE_MIC_IN
43 #define HAVE_MIC_IN_(...) __VA_ARGS__
44 #else
45 #define HAVE_MIC_IN_(...)
46 #endif
47 /* Line In */
48 #if (INPUT_SRC_CAPS & SRC_CAP_LINEIN)
49 #define HAVE_LINE_IN
50 #define HAVE_LINE_IN_(...) __VA_ARGS__
51 #else
52 #define HAVE_LINE_IN_(...)
53 #endif
54 /* S/PDIF */
55 #if (INPUT_SRC_CAPS & SRC_CAP_SPDIF)
56 #define HAVE_SPDIF_IN
57 #define HAVE_SPDIF_IN_(...) __VA_ARGS__
58 #else
59 #define HAVE_SPDIF_IN_(...)
60 #endif
61 /* FM Radio */
62 #if (INPUT_SRC_CAPS & SRC_CAP_FMRADIO)
63 #define HAVE_FMRADIO_IN
64 #define HAVE_FMRADIO_IN_(...) __VA_ARGS__
65 #else
66 #define HAVE_FMRADIO_IN_(...)
67 #endif
69 #if INPUT_SRC_CAPS != 0 && (INPUT_SRC_CAPS & (INPUT_SRC_CAPS-1)) != 0
70 #define HAVE_MULTI_INPUT_SRC
71 #endif
73 #ifdef HAVE_RECORDING
74 /* Recordable source implies it has the input as well */
76 /* For now there's no restrictions on any targets with which inputs
77 are recordable so define them as equivalent - if they do differ,
78 special handling is needed right now. */
79 #ifndef REC_SRC_CAPS
80 #define REC_SRC_CAPS INPUT_SRC_CAPS
81 #endif
83 /* Microphone */
84 #if (REC_SRC_CAPS & SRC_CAP_MIC)
85 #define HAVE_MIC_REC
86 #define HAVE_MIC_REC_(...) __VA_ARGS__
87 #else
88 #define HAVE_MIC_REC_(...)
89 #endif
90 /* Line In */
91 #if (REC_SRC_CAPS & SRC_CAP_LINEIN)
92 #define HAVE_LINE_REC
93 #define HAVE_LINE_REC_(...) __VA_ARGS__
94 #else
95 #define HAVE_LINE_REC_(...)
96 #endif
97 /* S/PDIF */
98 #if (REC_SRC_CAPS & SRC_CAP_SPDIF)
99 #define HAVE_SPDIF_REC
100 #define HAVE_SPDIF_REC_(...) __VA_ARGS__
101 #else
102 #define HAVE_SPDIF_REC_(...)
103 #endif
104 /* FM Radio */
105 #if (REC_SRC_CAPS & SRC_CAP_FMRADIO)
106 #define HAVE_FMRADIO_REC
107 #define HAVE_FMRADIO_REC_(...) __VA_ARGS__
108 #else
109 #define HAVE_FMRADIO_REC_(...)
110 #endif
112 #if REC_SRC_CAPS != 0 && (REC_SRC_CAPS & (REC_SRC_CAPS-1)) != 0
113 #define HAVE_MULTI_REC_SRC
114 #endif
116 #endif /* HAVE_RECORDING */