root/trunk/libffado/config.h.in

Revision 1348, 7.5 kB (checked in by ppalmers, 12 years ago)

merge 2.0 branch changes to trunk. svn merge -r 1337:HEAD svn+ssh://ffadosvn@ffado.org/ffado/branches/libffado-2.0

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