root/trunk/libffado/config.h.in

Revision 1809, 10.1 kB (checked in by arnonym, 14 years ago)

Catch up with things on my todo list:

I am told this fixes the two-channel devices of weiss.ch. And it doesn't seem to break my saffire, so lets wait for the crowd to find errors from this change...

Line 
1 /* config.h.in. */
2 #ifndef CONFIG_H
3 #define CONFIG_H
4
5 #define BINDIR "$BINDIR"
6 #define LIBDIR "$LIBDIR"
7 #define SHAREDIR "$SHAREDIR"
8
9 /* configuration file locations */
10 #define USER_CONFIG_FILE    "$USER_CONFIG_FILE"
11 #define SYSTEM_CONFIG_FILE  "$SYSTEM_CONFIG_FILE"
12
13 /* Define indicating availability of lrint() */
14 #define HAVE_LRINT $HAVE_LRINT
15
16 /* Define indicatin availability of lrintf() */
17 #define HAVE_LRINTF $HAVE_LRINTF
18
19 // serialization
20 #define SERIALIZE_USE_EXPAT $SERIALIZE_USE_EXPAT
21
22 #define CACHEDIR "$CACHEDIR"
23
24 // discovery
25 #define ENABLE_DISCOVERY_CACHE               1
26
27 // watchdog
28 #define WATCHDOG_DEFAULT_CHECK_INTERVAL_USECS   (1000*1000*4)
29 #define WATCHDOG_DEFAULT_RUN_REALTIME           1
30 #define WATCHDOG_DEFAULT_PRIORITY               98
31
32 // threading
33 #define THREAD_MAX_RTPRIO                   98
34 #define THREAD_MIN_RTPRIO                   1
35
36 // time
37
38 // we should be using absolute clock_nanosleep
39 // but on my system it causes a problem on shutdown.
40 #define USE_ABSOLUTE_NANOSLEEP              1
41
42 // 1394 service constants
43 #define IEEE1394SERVICE_USE_CYCLETIMER_DLL                         1
44 #define IEEE1394SERVICE_CYCLETIMER_DLL_UPDATE_INTERVAL_USEC   200000
45 #define IEEE1394SERVICE_CYCLETIMER_DLL_BANDWIDTH_HZ              0.5
46 #define IEEE1394SERVICE_MAX_FIREWIRE_PORTS                         4
47 #define IEEE1394SERVICE_MIN_SPLIT_TIMEOUT_USECS              1000000
48
49 #define IEEE1394SERVICE_CYCLETIMER_HELPER_RUN_REALTIME       1
50 #define IEEE1394SERVICE_CYCLETIMER_HELPER_PRIO               1
51
52 // config rom read wait interval
53 #define IEEE1394SERVICE_CONFIGROM_READ_WAIT_USECS         1000
54
55 // FCP defines
56 #define IEEE1394SERVICE_FCP_MAX_TRIES                        2
57 #define IEEE1394SERVICE_FCP_SLEEP_BETWEEN_FAILURES_USECS  1000
58 #define IEEE1394SERVICE_FCP_POLL_TIMEOUT_MSEC              200
59 #define IEEE1394SERVICE_FCP_RESPONSE_TIMEOUT_USEC       200000
60
61 // The current version of libiec61883 doesn't seem to calculate
62 // the bandwidth correctly. Defining this to non-zero skips
63 // bandwidth allocation when doing CMP connections.
64 #define IEEE1394SERVICE_SKIP_IEC61883_BANDWIDTH_ALLOCATION   1
65
66 #define MINIMUM_INTERRUPTS_PER_PERIOD                       2U
67
68 // These are the result of a lot of trial and error
69 // due to weirdness in the kernel layer
70 #define MAX_XMIT_PACKET_SIZE                         (2048-16)
71 #define MIN_XMIT_PACKET_SIZE                                72
72 #define MAX_XMIT_NB_BUFFERS                                128
73 #define MAX_RECV_NB_BUFFERS                                128
74 #define MIN_RECV_PACKET_SIZE                                72
75
76 // the default ISO receive mode.
77 // 0 = auto, 1 = packet-per-buffer, 2 = bufferfill.
78 // 'auto' will automatically choose the mode that is expected
79 // to perform best for the given situation. For large periods
80 // this is 'bufferfill' mode, for small periods this is
81 // 'packet-per-buffer' mode. The 'BUFFERFILL_MODE_THRESHOLD'
82 // defines what a 'large period' is.
83 #define DEFAULT_ISO_RECEIVE_MODE                             0
84
85 // the number of packets required to fill one period from which
86 // the bufferfill mode is to be used
87 #define BUFFERFILL_MODE_THRESHOLD                           64
88
89
90 #define ISOHANDLER_FLUSH_BEFORE_ITERATE                      0
91
92 #define ISOHANDLER_DEATH_DETECT_TIMEOUT_USECS        1000000LL
93
94 #define ISOHANDLER_CHECK_CTR_RECONSTRUCTION                  1
95
96 #define ISOHANDLERMANAGER_MAX_ISO_HANDLERS_PER_PORT         16
97 #define ISOHANDLERMANAGER_MAX_STREAMS_PER_ISOTHREAD         16
98
99 // The best setup is if the receive handlers have lower priority
100 // than the client thread since that ensures that as soon as we
101 // received sufficient frames, the client thread runs.
102 // The transmit thread should have higher priority to ensure that
103 // all available data is flushed to the ISO kernel buffers as
104 // soon as possible
105 // At this moment, the jack backend uses base+5 to init ffado
106 // prio
107 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE                  0
108 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_RECV            -1
109 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_XMIT             1
110
111 // the timeout for ISO activity on any thread
112 // NOTE: don't make this 0
113 #define ISOHANDLERMANAGER_ISO_TASK_WAIT_TIMEOUT_USECS        1000000LL
114
115 // allows to add some processing margin. This shifts the time
116 // at which the buffer is transfer()'ed, making things somewhat
117 // more robust. It should be noted though that shifting the transfer
118 // time to a later time instant also causes the xmit buffer fill to be
119 // lower on average. This can be counteracted by increasing the
120 // STREAMPROCESSORMANAGER_XMIT_PREBUFFER_FRAMES option
121 #define STREAMPROCESSORMANAGER_SIGNAL_DELAY_TICKS           (3072*0)
122
123 // the number of frames that we prebuffer in the 1394 ISO layer
124 // this adds directly to the roundtrip latency
125 #define STREAMPROCESSORMANAGER_XMIT_PREBUFFER_FRAMES         100
126
127 // causes the waitForPeriod() call to wait until sufficient
128 // data is present in the buffer such that a transfer() will
129 // succeed. Normally we wait for the period of time that theoretically
130 // would mean that his is true. However sometimes the kernel hasn't
131 // flushed everything to userspace (or the card hasn't IRQ'd).
132 // the side-effect of this is some jitter in the return timing
133 // whenever this occurs.
134 #define STREAMPROCESSORMANAGER_ALLOW_DELAYED_PERIOD_SIGNAL         1
135
136 // startup control
137 #define STREAMPROCESSORMANAGER_CYCLES_FOR_DRYRUN            40000
138 #define STREAMPROCESSORMANAGER_CYCLES_FOR_STARTUP           200
139 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_XMIT     20
140 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_RECV     0
141 #define STREAMPROCESSORMANAGER_SYNCSTART_TRIES              10
142 #define STREAMPROCESSORMANAGER_SYNC_WAIT_TIME_MSEC          200
143 #define STREAMPROCESSORMANAGER_NB_ALIGN_TRIES               40
144 #define STREAMPROCESSORMANAGER_ALIGN_AVERAGE_TIME_MSEC      400
145
146 #define STREAMPROCESSORMANAGER_DYNAMIC_SYNC_DELAY           0
147
148 // the default bandwidth of the stream processor timestamp DLL when synchronizing (should be fast)
149 #define STREAMPROCESSOR_DLL_FAST_BW_HZ                      5.0
150 // the default bandwidth of the stream processor timestamp DLL when streaming
151 #define STREAMPROCESSOR_DLL_BW_HZ                           0.1
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 0)
174 #define AMDTP_MAX_CYCLES_TO_TRANSMIT_EARLY                  1
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    (0U)
195
196 // the absolute minimum number of cycles we want to transmit
197 // a packet ahead of the presentation time. The nominal time
198 // the packet is transmitted ahead of the presentation time is
199 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
200 // are too late for that, this constant defines how late we can
201 // be.
202 #define MOTU_MIN_CYCLES_BEFORE_PRESENTATION                0
203
204 // the absolute maximum number of cycles we want to transmit
205 // a packet ahead of the ideal transmit time. The nominal time
206 // the packet is transmitted ahead of the presentation time is
207 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
208 // packets early if we want to.
209 #define MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY                  2
210
211 // ensure that the MOTU tx SP clips all float values to [-1.0..1.0]
212 #define MOTU_CLIP_FLOATS                                   1
213
214 // -- RME options -- //
215
216 // the transfer delay is substracted from the ideal presentation
217 // time to obtain a corrected presentation time. This values is
218 // then used to stamp the packet and determine the transmission
219 // time instant.
220 #define RME_TRANSMIT_TRANSFER_DELAY    (0U)
221
222 // the absolute minimum number of cycles we want to transmit
223 // a packet ahead of the presentation time. The nominal time
224 // the packet is transmitted ahead of the presentation time is
225 // given by RME_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
226 // are too late for that, this constant defines how late we can
227 // be.
228 #define RME_MIN_CYCLES_BEFORE_PRESENTATION                0
229
230 // the absolute maximum number of cycles we want to transmit
231 // a packet ahead of the ideal transmit time. The nominal time
232 // the packet is transmitted ahead of the presentation time is
233 // given by RME_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
234 // packets early if we want to.
235 #define RME_MAX_CYCLES_TO_TRANSMIT_EARLY                  2
236
237 // ensure that the RME tx SP clips all float values to [-1.0..1.0]
238 #define RME_CLIP_FLOATS                                   1
239
240 /// The unavoidable device specific hacks
241
242 // Use the information in the music plug instead of that in the
243 // cluster info block for the stream configuration. Should not
244 // be necessary
245 #define AVC_STREAMCONFIG_USE_MUSICPLUG                     0
246
247 #endif // CONFIG_H
Note: See TracBrowser for help on using the browser.