root/trunk/libffado/config.h.in

Revision 1498, 8.5 kB (checked in by ppalmers, 12 years ago)

Merge all changes from 2.0 branch into trunk (since r1361). This _should_ contain all forward merges done in the mean time. At this moment in time both branches should be in sync.

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_MAX_FIREWIRE_PORTS                         4
46 #define IEEE1394SERVICE_MIN_SPLIT_TIMEOUT_USECS              1000000
47
48 #define IEEE1394SERVICE_CYCLETIMER_HELPER_RUN_REALTIME       1
49 #define IEEE1394SERVICE_CYCLETIMER_HELPER_PRIO               1
50
51 // config rom read wait interval
52 #define IEEE1394SERVICE_CONFIGROM_READ_WAIT_USECS         1000
53
54 // FCP defines
55 #define IEEE1394SERVICE_FCP_MAX_TRIES                       20
56 #define IEEE1394SERVICE_FCP_SLEEP_BETWEEN_FAILURES_USECS  1000
57 #define IEEE1394SERVICE_FCP_POLL_TIMEOUT_MSEC              200
58 #define IEEE1394SERVICE_FCP_RESPONSE_TIMEOUT_USEC      2000000
59
60 // The current version of libiec61883 doesn't seem to calculate
61 // the bandwidth correctly. Defining this to non-zero skips
62 // bandwidth allocation when doing CMP connections.
63 #define IEEE1394SERVICE_SKIP_IEC61883_BANDWIDTH_ALLOCATION   1
64
65 #define MINIMUM_INTERRUPTS_PER_PERIOD                       2U
66
67 // These are the result of a lot of trial and error
68 // due to weirdness in the kernel layer
69 #define MAX_XMIT_PACKET_SIZE                         (2048-16)
70 #define MIN_XMIT_PACKET_SIZE                                72
71 #define MAX_XMIT_NB_BUFFERS                                128
72 #define MAX_RECV_NB_BUFFERS                                 64
73 #define MIN_RECV_PACKET_SIZE                               130
74
75 // the default ISO receive mode.
76 // 0 = auto, 1 = packet-per-buffer, 2 = bufferfill.
77 // 'auto' will automatically choose the mode that is expected
78 // to perform best for the given situation. For large periods
79 // this is 'bufferfill' mode, for small periods this is
80 // 'packet-per-buffer' mode. The 'BUFFERFILL_MODE_THRESHOLD'
81 // defines what a 'large period' is.
82 #define DEFAULT_ISO_RECEIVE_MODE                             0
83
84 // the number of packets required to fill one period from which
85 // the bufferfill mode is to be used
86 #define BUFFERFILL_MODE_THRESHOLD                           64
87
88
89 #define ISOHANDLER_FLUSH_BEFORE_ITERATE                      0
90
91 #define ISOHANDLER_DEATH_DETECT_TIMEOUT_USECS        1000000LL
92
93 #define ISOHANDLER_CHECK_CTR_RECONSTRUCTION                  1
94
95 #define ISOHANDLERMANAGER_MAX_ISO_HANDLERS_PER_PORT         16
96 #define ISOHANDLERMANAGER_MAX_STREAMS_PER_ISOTHREAD         16
97
98 // The best setup is if the receive handlers have lower priority
99 // than the client thread since that ensures that as soon as we
100 // received sufficient frames, the client thread runs.
101 // The transmit thread should have higher priority to ensure that
102 // all available data is flushed to the ISO kernel buffers as
103 // soon as possible
104 // At this moment, the jack backend uses base+5 to init ffado
105 // prio
106 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE                  0
107 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_RECV            -1
108 #define ISOHANDLERMANAGER_ISO_PRIO_INCREASE_XMIT             1
109
110 // the timeout for ISO activity on any thread
111 // NOTE: don't make this 0
112 #define ISOHANDLERMANAGER_ISO_TASK_WAIT_TIMEOUT_USECS        1000000LL
113
114 // allows to add some processing margin. This shifts the time
115 // at which the buffer is transfer()'ed, making things somewhat
116 // more robust. It should be noted though that shifting the transfer
117 // time to a later time instant also causes the xmit buffer fill to be
118 // lower on average.
119 #define STREAMPROCESSORMANAGER_SIGNAL_DELAY_TICKS           (3072*0)
120
121 // causes the waitForPeriod() call to wait until sufficient
122 // data is present in the buffer such that a transfer() will
123 // succeed. Normally we wait for the period of time that theoretically
124 // would mean that his is true. However sometimes the kernel hasn't
125 // flushed everything to userspace (or the card hasn't IRQ'd).
126 // the side-effect of this is some jitter in the return timing
127 // whenever this occurs.
128 #define STREAMPROCESSORMANAGER_ALLOW_DELAYED_PERIOD_SIGNAL         1
129
130 // startup control
131 #define STREAMPROCESSORMANAGER_CYCLES_FOR_DRYRUN            40000
132 #define STREAMPROCESSORMANAGER_CYCLES_FOR_STARTUP           200
133 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_XMIT     20
134 #define STREAMPROCESSORMANAGER_PRESTART_CYCLES_FOR_RECV     0
135 #define STREAMPROCESSORMANAGER_SYNCSTART_TRIES              10
136 #define STREAMPROCESSORMANAGER_SYNC_WAIT_TIME_MSEC          200
137 #define STREAMPROCESSORMANAGER_NB_ALIGN_TRIES               40
138 #define STREAMPROCESSORMANAGER_ALIGN_AVERAGE_TIME_MSEC      400
139
140 #define STREAMPROCESSORMANAGER_DYNAMIC_SYNC_DELAY           0
141
142 // FIXME: note that it will probably be better to use a DLL bandwidth that is
143 //        dependant on the sample rate
144 #define TIMESTAMPEDBUFFER_DLL_BANDWIDTH                     (0.01)
145
146 // -- AMDTP options -- //
147
148 // in ticks
149 // as per AMDTP2.1:
150 // 354.17us + 125us @ 24.576ticks/usec = 11776.08192 ticks
151 #define AMDTP_TRANSMIT_TRANSFER_DELAY   (11776U)
152
153 // the absolute minimum number of cycles we want to transmit
154 // a packet ahead of the presentation time. The nominal time
155 // the packet is transmitted ahead of the presentation time is
156 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
157 // are too late for that, this constant defines how late we can
158 // be.
159 #define AMDTP_MIN_CYCLES_BEFORE_PRESENTATION                1
160
161 // the absolute maximum number of cycles we want to transmit
162 // a packet ahead of the ideal transmit time. The nominal time
163 // the packet is transmitted ahead of the presentation time is
164 // given by AMDTP_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
165 // packets early if we want to. (not completely according to spec)
166 // (for spec compliance you need to specify a value of 0)
167 #define AMDTP_MAX_CYCLES_TO_TRANSMIT_EARLY                  1
168
169 // ensure that the AMDTP SP clips all float values to [-1.0..1.0]
170 #define AMDTP_CLIP_FLOATS                                   1
171
172 // Allow that devices request that the AMDTP transmit SP adds
173 // payload to the NO-DATA packets.
174 #define AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT                  1
175
176 // Default setting for the payload setting if
177 // AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT is enabled. Devices can
178 // explicity override this
179 #define AMDTP_SEND_PAYLOAD_IN_NODATA_XMIT_BY_DEFAULT     true
180
181 // -- MOTU options -- //
182
183 // the transfer delay is substracted from the ideal presentation
184 // time to obtain a corrected presentation time. This values is
185 // then used to stamp the packet and determine the transmission
186 // time instant.
187 #define MOTU_TRANSMIT_TRANSFER_DELAY    (0U)
188
189 // the absolute minimum number of cycles we want to transmit
190 // a packet ahead of the presentation time. The nominal time
191 // the packet is transmitted ahead of the presentation time is
192 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we
193 // are too late for that, this constant defines how late we can
194 // be.
195 #define MOTU_MIN_CYCLES_BEFORE_PRESENTATION                0
196
197 // the absolute maximum number of cycles we want to transmit
198 // a packet ahead of the ideal transmit time. The nominal time
199 // the packet is transmitted ahead of the presentation time is
200 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send
201 // packets early if we want to.
202 #define MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY                  2
203
204 // ensure that the MOTU tx SP clips all float values to [-1.0..1.0]
205 #define MOTU_CLIP_FLOATS                                   1
206
207 /// The unavoidable device specific hacks
208
209 // Use the information in the music plug instead of that in the
210 // cluster info block for the stream configuration. Should not
211 // be necessary
212 #define AVC_STREAMCONFIG_USE_MUSICPLUG                     0
213
214 #endif // CONFIG_H
Note: See TracBrowser for help on using the browser.