root/trunk/libffado/config.h.in

Revision 1081, 8.4 kB (checked in by ppalmers, 13 years ago)

work around clock_nanosleep issue (related to ticket #97)

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