root/branches/libffado-2.0/config.h.in

Revision 1279, 9.1 kB (checked in by ppalmers, 13 years ago)

use 1 cycle advance transmit (seems to make saffire operation more robust)

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-$REVISION"
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-$REVISION"
22
23 /* Define to the version of the cace. */
24 #define CACHE_VERSION "$VERSION-$REVISION"
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 /* Define indicating availability of lrint() */
35 #define HAVE_LRINT $HAVE_LRINT
36
37 /* Define indicatin availability of lrintf() */
38 #define HAVE_LRINTF $HAVE_LRINTF
39
40 // serialization
41 #define SERIALIZE_USE_EXPAT $SERIALIZE_USE_EXPAT
42
43 // use a RT-safe message buffer for debug output
44 // useful to disable this when the code aborts/segfaults to
45 // not lose debug output. should be enabled though.
46 #define DEBUG_USE_MESSAGE_BUFFER             1
47 // max message length in the debug messagebuffer
48 #define DEBUG_MAX_MESSAGE_LENGTH           512
49 // number of messages in the debug messagebuffer (power of two)
50 #define DEBUG_MB_BUFFERS                  1024
51
52 // use an RT thread for reading out the messagebuffer.
53 // can reduce the number of buffer xruns, but not
54 // recommended
55 #define DEBUG_MESSAGE_BUFFER_REALTIME        0
56 #define DEBUG_MESSAGE_BUFFER_REALTIME_PRIO   1
57
58 // When a write can't get the buffer lock, how many times
59 // should it retry, and wait how long between retries?
60 #define DEBUG_MESSAGE_BUFFER_COLLISION_WAIT_NTRIES      2
61 #define DEBUG_MESSAGE_BUFFER_COLLISION_WAIT_NSEC    50000
62
63
64 // support a debug backlog
65 // note that this does not influence non-debug builds
66 #define DEBUG_BACKLOG_SUPPORT                0
67 // number of messages in the backlog buffer (power of two)
68 #define DEBUG_BACKLOG_MB_BUFFERS            64
69
70 // support backtrace debugging
71 // note that this does not influence non-debug builds
72 #define DEBUG_BACKTRACE_SUPPORT              0
73 // max length of backtrace
74 #define DEBUG_MAX_BACKTRACE_LENGTH           8
75 // max amount of function pointers to keep track of
76 #define DEBUG_MAX_BACKTRACE_FUNCTIONS_SEEN  64
77
78 // lock debugging
79 #define DEBUG_LOCK_COLLISION_TRACING         0
80
81 // make this zero to disable the most extreme
82 // debug logging in the critical sections
83 #define DEBUG_EXTREME_ENABLE                 0
84
85 // discovery
86 #define ENABLE_DISCOVERY_CACHE               1
87
88 // watchdog
89 #define WATCHDOG_DEFAULT_CHECK_INTERVAL_USECS   (1000*1000*4)
90 #define WATCHDOG_DEFAULT_RUN_REALTIME           1
91 #define WATCHDOG_DEFAULT_PRIORITY               98
92
93 // threading
94 #define THREAD_MAX_RTPRIO                   98
95 #define THREAD_MIN_RTPRIO                   1
96
97 // time
98
99 // we should be using absolute clock_nanosleep
100 // but on my system it causes a problem on shutdown.
101 #define USE_ABSOLUTE_NANOSLEEP              1
102
103 // 1394 service constants
104 #define IEEE1394SERVICE_USE_CYCLETIMER_DLL                         1
105 #define IEEE1394SERVICE_CYCLETIMER_DLL_UPDATE_INTERVAL_USEC   200000
106 #define IEEE1394SERVICE_MAX_FIREWIRE_PORTS                         4
107
108 #define IEEE1394SERVICE_CYCLETIMER_HELPER_RUN_REALTIME       1
109 #define IEEE1394SERVICE_CYCLETIMER_HELPER_PRIO_INCREASE    -10
110
111 // config rom read wait interval
112 #define IEEE1394SERVICE_CONFIGROM_READ_WAIT_USECS         1000
113
114
115 // The current version of libiec61883 doesn't seem to calculate
116 // the bandwidth correctly. Defining this to non-zero skips
117 // bandwidth allocation when doing CMP connections.
118 #define IEEE1394SERVICE_SKIP_IEC61883_BANDWIDTH_ALLOCATION   1
119
120 #define MINIMUM_INTERRUPTS_PER_PERIOD                       2U
121
122 // These are the result of a lot of trial and error
123 // due to weirdness in the kernel layer
124 #define MAX_XMIT_PACKET_SIZE                         (2048-16)
125 #define MAX_XMIT_NB_BUFFERS                                200
126
127 #define ISOHANDLER_FLUSH_BEFORE_ITERATE                      0
128
129 #define ISOHANDLER_DEATH_DETECT_TIMEOUT_USECS        1000000LL
130
131 #define ISOHANDLER_CHECK_CTR_RECONSTRUCTION                  0
132
133 #define ISOHANDLERMANAGER_MAX_ISO_HANDLERS_PER_PORT         16
134 #define ISOHANDLERMANAGER_MAX_STREAMS_PER_ISOTHREAD         16
135
136 // The best setup is if the receive handlers have lower priority
137 // than the client thread since that ensures that as soon as we
138 // received sufficient frames, the client thread runs.
139 // The transmit thread should have higher priority to ensure that
140 // all available data is flushed to the ISO kernel buffers as
141 // soon as possible
142 // At this moment, the jack backend uses base+5 to init ffado
143 // prio
144 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE                  0
145 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_RECV            -6
146 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_XMIT             1
147
148 // the timeout for ISO activity on any thread
149 // NOTE: don't make this 0
150 #define ISOHANDLERMANAGER_ISO_TASK_WAIT_TIMEOUT_USECS        1000000LL
151
152 // allows to add some processing margin. This shifts the time
153 // at which the buffer is transfer()'ed, making things somewhat
154 // more robust. It should be noted though that shifting the transfer
155 // time to a later time instant also causes the xmit buffer fill to be
156 // lower on average.
157 #define STREAMPROCESSORMANAGER_SIGNAL_DELAY_TICKS           (3072*6)
158
159 // startup control
160 #define STREAMPROCESSORMANAGER_CYCLES_FOR_DRYRUN            40000
161 #define STREAMPROCESSORMANAGER_CYCLES_FOR_STARTUP           200
162 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_XMIT     20
163 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_RECV     0
164 #define STREAMPROCESSORMANAGER_SYNCSTART_TRIES              10
165 #define STREAMPROCESSORMANAGER_SYNC_WAIT_TIME_MSEC          200
166 #define STREAMPROCESSORMANAGER_ALIGN_AVERAGE_TIME_MSEC      400
167 #define STREAMPROCESSORMANAGER_NB_ALIGN_TRIES               40
168
169 #define STREAMPROCESSORMANAGER_DYNAMIC_SYNC_DELAY           0
170
171 // FIXME: note that it will probably be better to use a DLL bandwidth that is
172 //        dependant on the sample rate
173 #define TIMESTAMPEDBUFFER_DLL_BANDWIDTH                     (0.01)
174
175 // -- AMDTP options -- //
176
177 // in ticks
178 // as per AMDTP2.1:
179 // 354.17us + 125us @ 24.576ticks/usec = 11776.08192 ticks
180 #define AMDTP_TRANSMIT_TRANSFER_DELAY   (11776U)
181
182 // the absolute minimum number of cycles we want to transmit
183 // a packet ahead of the presentation time. The nominal time
184 // the packet is transmitted ahead of the presentation time is
185 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
186 // are too late for that, this constant defines how late we can
187 // be.
188 #define AMDTP_MIN_CYCLES_BEFORE_PRESENTATION                1
189
190 // the absolute maximum number of cycles we want to transmit
191 // a packet ahead of the ideal transmit time. The nominal time
192 // the packet is transmitted ahead of the presentation time is
193 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
194 // packets early if we want to. (not completely according to spec)
195 // (for spec compliance you need to specify a value of 0)
196 #define AMDTP_MAX_CYCLES_TO_TRANSMIT_EARLY                  1
197
198 // ensure that the AMDTP SP clips all float values to [-1.0..1.0]
199 #define AMDTP_CLIP_FLOATS                                   1
200
201 // Allow that devices request that the AMDTP transmit SP adds
202 // payload to the NO-DATA packets.
203 #define AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT                  1
204
205 // Default setting for the payload setting if
206 // AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT is enabled. Devices can
207 // explicity override this
208 #define AMDTP_SEND_PAYLOAD_IN_NODATA_XMIT_BY_DEFAULT     true
209
210 // -- MOTU options -- //
211
212 // the transfer delay is substracted from the ideal presentation
213 // time to obtain a corrected presentation time. This values is
214 // then used to stamp the packet and determine the transmission
215 // time instant.
216 #define MOTU_TRANSMIT_TRANSFER_DELAY    (0U)
217
218 // the absolute minimum number of cycles we want to transmit
219 // a packet ahead of the presentation time. The nominal time
220 // the packet is transmitted ahead of the presentation time is
221 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
222 // are too late for that, this constant defines how late we can
223 // be.
224 #define MOTU_MIN_CYCLES_BEFORE_PRESENTATION                0
225
226 // the absolute maximum number of cycles we want to transmit
227 // a packet ahead of the ideal transmit time. The nominal time
228 // the packet is transmitted ahead of the presentation time is
229 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
230 // packets early if we want to.
231 #define MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY                  2
232
233 // ensure that the MOTU tx SP clips all float values to [-1.0..1.0]
234 #define MOTU_CLIP_FLOATS                                   1
235
236 /// The unavoidable device specific hacks
237
238 // Use the information in the music plug instead of that in the
239 // cluster info block for the stream configuration. Should not
240 // be necessary
241 #define AVC_STREAMCONFIG_USE_MUSICPLUG                     0
242
243 #endif // CONFIG_H
Note: See TracBrowser for help on using the browser.