root/trunk/libffado/config.h.in

Revision 1074, 8.3 kB (checked in by ppalmers, 13 years ago)

implement debug lock tracing

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