FS#8961 - Anti-Aliased Fonts.
[kugel-rb.git] / firmware / export / config_caps.h
blobfcb13debfcd4ebc3a340cba3f022a2c17c07b854
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 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
22 ****************************************************************************/
24 /** INPUTS **/
26 /* NOTE: Playback is implied in all this. Make sense? :) */
27 #define SRC_MIC 0
28 #define SRC_LINEIN 1
29 #define SRC_SPDIF 2
30 #define SRC_FMRADIO 3
32 #define SRC_CAP_MIC (1 << SRC_MIC)
33 #define SRC_CAP_LINEIN (1 << SRC_LINEIN)
34 #define SRC_CAP_SPDIF (1 << SRC_SPDIF)
35 #define SRC_CAP_FMRADIO (1 << SRC_FMRADIO)
37 /* audio monitor mux sources */
38 #ifndef INPUT_SRC_CAPS
39 #define INPUT_SRC_CAPS 0 /* Nothing but playback */
40 #endif
42 /* Microphone */
43 #if (INPUT_SRC_CAPS & SRC_CAP_MIC)
44 #define HAVE_MIC_IN
45 #define HAVE_MIC_IN_(...) __VA_ARGS__
46 #else
47 #define HAVE_MIC_IN_(...)
48 #endif
49 /* Line In */
50 #if (INPUT_SRC_CAPS & SRC_CAP_LINEIN)
51 #define HAVE_LINE_IN
52 #define HAVE_LINE_IN_(...) __VA_ARGS__
53 #else
54 #define HAVE_LINE_IN_(...)
55 #endif
56 /* S/PDIF */
57 #if (INPUT_SRC_CAPS & SRC_CAP_SPDIF)
58 #define HAVE_SPDIF_IN
59 #define HAVE_SPDIF_IN_(...) __VA_ARGS__
60 #else
61 #define HAVE_SPDIF_IN_(...)
62 #endif
63 /* FM Radio */
64 #if (INPUT_SRC_CAPS & SRC_CAP_FMRADIO)
65 #define HAVE_FMRADIO_IN
66 #define HAVE_FMRADIO_IN_(...) __VA_ARGS__
67 #else
68 #define HAVE_FMRADIO_IN_(...)
69 #endif
71 #if INPUT_SRC_CAPS != 0 && (INPUT_SRC_CAPS & (INPUT_SRC_CAPS-1)) != 0
72 #define HAVE_MULTI_INPUT_SRC
73 #endif
75 #ifdef HAVE_RECORDING
76 /* Recordable source implies it has the input as well */
78 /* For now there's no restrictions on any targets with which inputs
79 are recordable so define them as equivalent - if they do differ,
80 special handling is needed right now. */
81 #ifndef REC_SRC_CAPS
82 #define REC_SRC_CAPS INPUT_SRC_CAPS
83 #endif
85 /* Microphone */
86 #if (REC_SRC_CAPS & SRC_CAP_MIC)
87 #define HAVE_MIC_REC
88 #define HAVE_MIC_REC_(...) __VA_ARGS__
89 #else
90 #define HAVE_MIC_REC_(...)
91 #endif
92 /* Line In */
93 #if (REC_SRC_CAPS & SRC_CAP_LINEIN)
94 #define HAVE_LINE_REC
95 #define HAVE_LINE_REC_(...) __VA_ARGS__
96 #else
97 #define HAVE_LINE_REC_(...)
98 #endif
99 /* S/PDIF */
100 #if (REC_SRC_CAPS & SRC_CAP_SPDIF)
101 #define HAVE_SPDIF_REC
102 #define HAVE_SPDIF_REC_(...) __VA_ARGS__
103 #else
104 #define HAVE_SPDIF_REC_(...)
105 #endif
106 /* FM Radio */
107 #if (REC_SRC_CAPS & SRC_CAP_FMRADIO)
108 #define HAVE_FMRADIO_REC
109 #define HAVE_FMRADIO_REC_(...) __VA_ARGS__
110 #else
111 #define HAVE_FMRADIO_REC_(...)
112 #endif
114 #if REC_SRC_CAPS != 0 && (REC_SRC_CAPS & (REC_SRC_CAPS-1)) != 0
115 #define HAVE_MULTI_REC_SRC
116 #endif
118 #endif /* HAVE_RECORDING */