root/trunk/libffado/config.h.in

Revision 1673, 9.8 kB (checked in by jwoithe, 12 years ago)

RME: include new RME configuration defines in config.h.in rather than in the local generated copy of config.h as was accidently done initially.

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                                 64
74 #define MIN_RECV_PACKET_SIZE                               130
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.
120 #define STREAMPROCESSORMANAGER_SIGNAL_DELAY_TICKS           (3072*0)
121
122 // causes the waitForPeriod() call to wait until sufficient
123 // data is present in the buffer such that a transfer() will
124 // succeed. Normally we wait for the period of time that theoretically
125 // would mean that his is true. However sometimes the kernel hasn't
126 // flushed everything to userspace (or the card hasn't IRQ'd).
127 // the side-effect of this is some jitter in the return timing
128 // whenever this occurs.
129 #define STREAMPROCESSORMANAGER_ALLOW_DELAYED_PERIOD_SIGNAL         1
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_NB_ALIGN_TRIES               40
139 #define STREAMPROCESSORMANAGER_ALIGN_AVERAGE_TIME_MSEC      400
140
141 #define STREAMPROCESSORMANAGER_DYNAMIC_SYNC_DELAY           0
142
143 // the default bandwidth of the stream processor timestamp DLL when synchronizing (should be fast)
144 #define STREAMPROCESSOR_DLL_FAST_BW_HZ                      5.0
145 // the default bandwidth of the stream processor timestamp DLL when streaming
146 #define STREAMPROCESSOR_DLL_BW_HZ                           0.1
147
148 // -- AMDTP options -- //
149
150 // in ticks
151 // as per AMDTP2.1:
152 // 354.17us + 125us @ 24.576ticks/usec = 11776.08192 ticks
153 #define AMDTP_TRANSMIT_TRANSFER_DELAY   (11776U)
154
155 // the absolute minimum number of cycles we want to transmit
156 // a packet ahead of the presentation time. The nominal time
157 // the packet is transmitted ahead of the presentation time is
158 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
159 // are too late for that, this constant defines how late we can
160 // be.
161 #define AMDTP_MIN_CYCLES_BEFORE_PRESENTATION                1
162
163 // the absolute maximum number of cycles we want to transmit
164 // a packet ahead of the ideal transmit time. The nominal time
165 // the packet is transmitted ahead of the presentation time is
166 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
167 // packets early if we want to. (not completely according to spec)
168 // (for spec compliance you need to specify a value of 0)
169 #define AMDTP_MAX_CYCLES_TO_TRANSMIT_EARLY                  1
170
171 // ensure that the AMDTP SP clips all float values to [-1.0..1.0]
172 #define AMDTP_CLIP_FLOATS                                   1
173
174 // Allow that devices request that the AMDTP transmit SP adds
175 // payload to the NO-DATA packets.
176 #define AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT                  1
177
178 // Default setting for the payload setting if
179 // AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT is enabled. Devices can
180 // explicity override this
181 #define AMDTP_SEND_PAYLOAD_IN_NODATA_XMIT_BY_DEFAULT     true
182
183 // -- MOTU options -- //
184
185 // the transfer delay is substracted from the ideal presentation
186 // time to obtain a corrected presentation time. This values is
187 // then used to stamp the packet and determine the transmission
188 // time instant.
189 #define MOTU_TRANSMIT_TRANSFER_DELAY    (0U)
190
191 // the absolute minimum number of cycles we want to transmit
192 // a packet ahead of the presentation time. The nominal time
193 // the packet is transmitted ahead of the presentation time is
194 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
195 // are too late for that, this constant defines how late we can
196 // be.
197 #define MOTU_MIN_CYCLES_BEFORE_PRESENTATION                0
198
199 // the absolute maximum number of cycles we want to transmit
200 // a packet ahead of the ideal transmit time. The nominal time
201 // the packet is transmitted ahead of the presentation time is
202 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
203 // packets early if we want to.
204 #define MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY                  2
205
206 // ensure that the MOTU tx SP clips all float values to [-1.0..1.0]
207 #define MOTU_CLIP_FLOATS                                   1
208
209 // -- RME options -- //
210
211 // the transfer delay is substracted from the ideal presentation
212 // time to obtain a corrected presentation time. This values is
213 // then used to stamp the packet and determine the transmission
214 // time instant.
215 #define RME_TRANSMIT_TRANSFER_DELAY    (0U)
216
217 // the absolute minimum number of cycles we want to transmit
218 // a packet ahead of the presentation time. The nominal time
219 // the packet is transmitted ahead of the presentation time is
220 // given by RME_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
221 // are too late for that, this constant defines how late we can
222 // be.
223 #define RME_MIN_CYCLES_BEFORE_PRESENTATION                0
224
225 // the absolute maximum number of cycles we want to transmit
226 // a packet ahead of the ideal transmit time. The nominal time
227 // the packet is transmitted ahead of the presentation time is
228 // given by RME_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
229 // packets early if we want to.
230 #define RME_MAX_CYCLES_TO_TRANSMIT_EARLY                  2
231
232 // ensure that the RME tx SP clips all float values to [-1.0..1.0]
233 #define RME_CLIP_FLOATS                                   1
234
235 /// The unavoidable device specific hacks
236
237 // Use the information in the music plug instead of that in the
238 // cluster info block for the stream configuration. Should not
239 // be necessary
240 #define AVC_STREAMCONFIG_USE_MUSICPLUG                     0
241
242 #endif // CONFIG_H
Note: See TracBrowser for help on using the browser.