root/tags/2.0.0/config.h.in

Revision 1562, 11.2 kB (checked in by ppalmers, 15 years ago)

generate correct version strings for exported versions (i.e. no - at the end)

Line 
1 /* config.h.in. */
2 #ifndef CONFIG_H
3 #define CONFIG_H
4
5 /* Name of package */
6 #define PACKAGE $PACKAGE
7
8 /* Define to the address where bug reports for this package should be sent. */
9 #define PACKAGE_BUGREPORT "<ffado-devel@lists.sf.net>"
10
11 /* Define to the full name of this package. */
12 #define PACKAGE_NAME "$PACKAGE"
13
14 /* Define to the full name and version of this package. */
15 #define PACKAGE_STRING "$PACKAGE $VERSION$REVISIONSTRING"
16
17 /* Define to the one symbol short name of this package. */
18 #define PACKAGE_TARNAME "$PACKAGE"
19
20 /* Define to the version of this package. */
21 #define PACKAGE_VERSION "$VERSION$REVISIONSTRING"
22
23 /* Define to the version of the cace. */
24 #define CACHE_VERSION "$VERSION$REVISIONSTRING"
25 #define CACHEDIR "$CACHEDIR"
26
27 /* Define to the api version */
28 #define FFADO_API_VERSION $FFADO_API_VERSION
29
30 #define BINDIR "$BINDIR"
31 #define LIBDIR "$LIBDIR"
32 #define SHAREDIR "$SHAREDIR"
33
34 /* configuration file locations */
35 #define USER_CONFIG_FILE    "$USER_CONFIG_FILE"
36 #define SYSTEM_CONFIG_FILE  "$SYSTEM_CONFIG_FILE"
37
38 /* Define indicating availability of lrint() */
39 #define HAVE_LRINT $HAVE_LRINT
40
41 /* Define indicatin availability of lrintf() */
42 #define HAVE_LRINTF $HAVE_LRINTF
43
44 // serialization
45 #define SERIALIZE_USE_EXPAT $SERIALIZE_USE_EXPAT
46
47 // use a RT-safe message buffer for debug output
48 // useful to disable this when the code aborts/segfaults to
49 // not lose debug output. should be enabled though.
50 #define DEBUG_USE_MESSAGE_BUFFER             1
51 // max message length in the debug messagebuffer
52 #define DEBUG_MAX_MESSAGE_LENGTH          2048
53 // number of messages in the debug messagebuffer (power of two)
54 #define DEBUG_MB_BUFFERS                  1024
55
56 // use an RT thread for reading out the messagebuffer.
57 // can reduce the number of buffer xruns, but not
58 // recommended
59 #define DEBUG_MESSAGE_BUFFER_REALTIME        0
60 #define DEBUG_MESSAGE_BUFFER_REALTIME_PRIO   1
61
62 // When a write can't get the buffer lock, how many times
63 // should it retry, and wait how long between retries?
64 #define DEBUG_MESSAGE_BUFFER_COLLISION_WAIT_NTRIES      2
65 #define DEBUG_MESSAGE_BUFFER_COLLISION_WAIT_NSEC    50000
66
67
68 // support a debug backlog
69 // note that this does not influence non-debug builds
70 #define DEBUG_BACKLOG_SUPPORT                0
71 // number of messages in the backlog buffer (power of two)
72 #define DEBUG_BACKLOG_MB_BUFFERS            64
73
74 // support backtrace debugging
75 // note that this does not influence non-debug builds
76 #define DEBUG_BACKTRACE_SUPPORT              0
77 // max length of backtrace
78 #define DEBUG_MAX_BACKTRACE_LENGTH           8
79 // max amount of function pointers to keep track of
80 #define DEBUG_MAX_BACKTRACE_FUNCTIONS_SEEN  64
81
82 // lock debugging
83 #define DEBUG_LOCK_COLLISION_TRACING         0
84
85 // make this zero to disable the most extreme
86 // debug logging in the critical sections
87 #define DEBUG_EXTREME_ENABLE                 0
88
89 // discovery
90 #define ENABLE_DISCOVERY_CACHE               1
91
92 // watchdog
93 #define WATCHDOG_DEFAULT_CHECK_INTERVAL_USECS   (1000*1000*4)
94 #define WATCHDOG_DEFAULT_RUN_REALTIME           1
95 #define WATCHDOG_DEFAULT_PRIORITY               98
96
97 // threading
98 #define THREAD_MAX_RTPRIO                   98
99 #define THREAD_MIN_RTPRIO                   1
100
101 // time
102
103 // we should be using absolute clock_nanosleep
104 // but on my system it causes a problem on shutdown.
105 #define USE_ABSOLUTE_NANOSLEEP              1
106
107 // 1394 service constants
108 #define IEEE1394SERVICE_USE_CYCLETIMER_DLL                         1
109 #define IEEE1394SERVICE_CYCLETIMER_DLL_UPDATE_INTERVAL_USEC   200000
110 #define IEEE1394SERVICE_CYCLETIMER_DLL_BANDWIDTH_HZ              0.5
111 #define IEEE1394SERVICE_MAX_FIREWIRE_PORTS                         4
112 #define IEEE1394SERVICE_MIN_SPLIT_TIMEOUT_USECS              1000000
113
114 #define IEEE1394SERVICE_CYCLETIMER_HELPER_RUN_REALTIME       1
115 #define IEEE1394SERVICE_CYCLETIMER_HELPER_PRIO               1
116
117 // config rom read wait interval
118 #define IEEE1394SERVICE_CONFIGROM_READ_WAIT_USECS         1000
119
120 // FCP defines
121 #define IEEE1394SERVICE_FCP_MAX_TRIES                       20
122 #define IEEE1394SERVICE_FCP_SLEEP_BETWEEN_FAILURES_USECS  1000
123 #define IEEE1394SERVICE_FCP_POLL_TIMEOUT_MSEC              200
124 #define IEEE1394SERVICE_FCP_RESPONSE_TIMEOUT_USEC      2000000
125
126 // The current version of libiec61883 doesn't seem to calculate
127 // the bandwidth correctly. Defining this to non-zero skips
128 // bandwidth allocation when doing CMP connections.
129 #define IEEE1394SERVICE_SKIP_IEC61883_BANDWIDTH_ALLOCATION   1
130
131 #define MINIMUM_INTERRUPTS_PER_PERIOD                       2U
132
133 // These are the result of a lot of trial and error
134 // due to weirdness in the kernel layer
135 #define MAX_XMIT_PACKET_SIZE                         (2048-16)
136 #define MIN_XMIT_PACKET_SIZE                                72
137 #define MAX_XMIT_NB_BUFFERS                                128
138 #define MAX_RECV_NB_BUFFERS                                 64
139 #define MIN_RECV_PACKET_SIZE                               130
140
141 // the default ISO receive mode.
142 // 0 = auto, 1 = packet-per-buffer, 2 = bufferfill.
143 // 'auto' will automatically choose the mode that is expected
144 // to perform best for the given situation. For large periods
145 // this is 'bufferfill' mode, for small periods this is
146 // 'packet-per-buffer' mode. The 'BUFFERFILL_MODE_THRESHOLD'
147 // defines what a 'large period' is.
148 #define DEFAULT_ISO_RECEIVE_MODE                             0
149
150 // the number of packets required to fill one period from which
151 // the bufferfill mode is to be used
152 #define BUFFERFILL_MODE_THRESHOLD                           64
153
154
155 #define ISOHANDLER_FLUSH_BEFORE_ITERATE                      0
156
157 #define ISOHANDLER_DEATH_DETECT_TIMEOUT_USECS        1000000LL
158
159 #define ISOHANDLER_CHECK_CTR_RECONSTRUCTION                  1
160
161 #define ISOHANDLERMANAGER_MAX_ISO_HANDLERS_PER_PORT         16
162 #define ISOHANDLERMANAGER_MAX_STREAMS_PER_ISOTHREAD         16
163
164 // The best setup is if the receive handlers have lower priority
165 // than the client thread since that ensures that as soon as we
166 // received sufficient frames, the client thread runs.
167 // The transmit thread should have higher priority to ensure that
168 // all available data is flushed to the ISO kernel buffers as
169 // soon as possible
170 // At this moment, the jack backend uses base+5 to init ffado
171 // prio
172 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE                  0
173 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_RECV            -1
174 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_XMIT             1
175
176 // the timeout for ISO activity on any thread
177 // NOTE: don't make this 0
178 #define ISOHANDLERMANAGER_ISO_TASK_WAIT_TIMEOUT_USECS        1000000LL
179
180 // allows to add some processing margin. This shifts the time
181 // at which the buffer is transfer()'ed, making things somewhat
182 // more robust. It should be noted though that shifting the transfer
183 // time to a later time instant also causes the xmit buffer fill to be
184 // lower on average. This can be counteracted by increasing the
185 // STREAMPROCESSORMANAGER_XMIT_PREBUFFER_FRAMES option
186 #define STREAMPROCESSORMANAGER_SIGNAL_DELAY_TICKS           (3072*0)
187
188 // the number of frames that we prebuffer in the 1394 ISO layer
189 // this adds directly to the roundtrip latency
190 #define STREAMPROCESSORMANAGER_XMIT_PREBUFFER_FRAMES         100
191
192 // causes the waitForPeriod() call to wait until sufficient
193 // data is present in the buffer such that a transfer() will
194 // succeed. Normally we wait for the period of time that theoretically
195 // would mean that his is true. However sometimes the kernel hasn't
196 // flushed everything to userspace (or the card hasn't IRQ'd).
197 // the side-effect of this is some jitter in the return timing
198 // whenever this occurs.
199 #define STREAMPROCESSORMANAGER_ALLOW_DELAYED_PERIOD_SIGNAL         1
200
201 // startup control
202 #define STREAMPROCESSORMANAGER_CYCLES_FOR_DRYRUN            40000
203 #define STREAMPROCESSORMANAGER_CYCLES_FOR_STARTUP           200
204 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_XMIT     20
205 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_RECV     0
206 #define STREAMPROCESSORMANAGER_SYNCSTART_TRIES              10
207 #define STREAMPROCESSORMANAGER_SYNC_WAIT_TIME_MSEC          200
208 #define STREAMPROCESSORMANAGER_NB_ALIGN_TRIES               40
209 #define STREAMPROCESSORMANAGER_ALIGN_AVERAGE_TIME_MSEC      400
210
211 #define STREAMPROCESSORMANAGER_DYNAMIC_SYNC_DELAY           0
212
213 // the default bandwidth of the stream processor timestamp DLL when synchronizing (should be fast)
214 #define STREAMPROCESSOR_DLL_FAST_BW_HZ                      5.0
215 // the default bandwidth of the stream processor timestamp DLL when streaming
216 #define STREAMPROCESSOR_DLL_BW_HZ                           0.1
217
218 // -- AMDTP options -- //
219
220 // in ticks
221 // as per AMDTP2.1:
222 // 354.17us + 125us @ 24.576ticks/usec = 11776.08192 ticks
223 #define AMDTP_TRANSMIT_TRANSFER_DELAY   (11776U)
224
225 // the absolute minimum number of cycles we want to transmit
226 // a packet ahead of the presentation time. The nominal time
227 // the packet is transmitted ahead of the presentation time is
228 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
229 // are too late for that, this constant defines how late we can
230 // be.
231 #define AMDTP_MIN_CYCLES_BEFORE_PRESENTATION                1
232
233 // the absolute maximum number of cycles we want to transmit
234 // a packet ahead of the ideal transmit time. The nominal time
235 // the packet is transmitted ahead of the presentation time is
236 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
237 // packets early if we want to. (not completely according to spec)
238 // (for spec compliance you need to specify a value of 0)
239 #define AMDTP_MAX_CYCLES_TO_TRANSMIT_EARLY                  1
240
241 // ensure that the AMDTP SP clips all float values to [-1.0..1.0]
242 #define AMDTP_CLIP_FLOATS                                   1
243
244 // Allow that devices request that the AMDTP transmit SP adds
245 // payload to the NO-DATA packets.
246 #define AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT                  1
247
248 // Default setting for the payload setting if
249 // AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT is enabled. Devices can
250 // explicity override this
251 #define AMDTP_SEND_PAYLOAD_IN_NODATA_XMIT_BY_DEFAULT     true
252
253 // -- MOTU options -- //
254
255 // the transfer delay is substracted from the ideal presentation
256 // time to obtain a corrected presentation time. This values is
257 // then used to stamp the packet and determine the transmission
258 // time instant.
259 #define MOTU_TRANSMIT_TRANSFER_DELAY    (0U)
260
261 // the absolute minimum number of cycles we want to transmit
262 // a packet ahead of the presentation time. The nominal time
263 // the packet is transmitted ahead of the presentation time is
264 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
265 // are too late for that, this constant defines how late we can
266 // be.
267 #define MOTU_MIN_CYCLES_BEFORE_PRESENTATION                0
268
269 // the absolute maximum number of cycles we want to transmit
270 // a packet ahead of the ideal transmit time. The nominal time
271 // the packet is transmitted ahead of the presentation time is
272 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
273 // packets early if we want to.
274 #define MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY                  2
275
276 // ensure that the MOTU tx SP clips all float values to [-1.0..1.0]
277 #define MOTU_CLIP_FLOATS                                   1
278
279 /// The unavoidable device specific hacks
280
281 // Use the information in the music plug instead of that in the
282 // cluster info block for the stream configuration. Should not
283 // be necessary
284 #define AVC_STREAMCONFIG_USE_MUSICPLUG                     0
285
286 #endif // CONFIG_H
Note: See TracBrowser for help on using the browser.