Changeset 905
- Timestamp:
- 03/06/08 01:05:31 (13 years ago)
- Files:
-
- trunk/libffado/config.h.in (modified) (2 diffs)
- trunk/libffado/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/config.h.in
r904 r905 86 86 #define TIMESTAMPEDBUFFER_DLL_BANDWIDTH (0.01) 87 87 88 // -- AMDTP options -- // 89 88 90 // in ticks 89 91 // as per AMDTP2.1: … … 110 112 #define AMDTP_CLIP_FLOATS 1 111 113 114 // -- MOTU options -- // 112 115 116 // the transfer delay is substracted from the ideal presentation 117 // time to obtain a corrected presentation time. This values is 118 // then used to stamp the packet and determine the transmission 119 // time instant. 113 120 #define MOTU_TRANSMIT_TRANSFER_DELAY (11776U) 114 121 122 // the absolute minimum number of cycles we want to transmit 123 // a packet ahead of the presentation time. The nominal time 124 // the packet is transmitted ahead of the presentation time is 125 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we 126 // are too late for that, this constant defines how late we can 127 // be. 128 #define MOTU_MIN_CYCLES_BEFORE_PRESENTATION 1 129 130 // the absolute maximum number of cycles we want to transmit 131 // a packet ahead of the ideal transmit time. The nominal time 132 // the packet is transmitted ahead of the presentation time is 133 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send 134 // packets early if we want to. 135 #define MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY 6 136 115 137 #endif // CONFIG_H trunk/libffado/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp
r873 r905 100 100 int cycles_until_transmit; 101 101 102 // FIXME: should become a define103 // the absolute minimum number of cycles we want to transmit104 // a packet ahead of the presentation time. The nominal time105 // the packet is transmitted ahead of the presentation time is106 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but in case we107 // are too late for that, this constant defines how late we can108 // be.109 const int min_cycles_before_presentation = 1;110 // FIXME: should become a define111 // the absolute maximum number of cycles we want to transmit112 // a packet ahead of the ideal transmit time. The nominal time113 // the packet is transmitted ahead of the presentation time is114 // given by MOTU_TRANSMIT_TRANSFER_DELAY (in ticks), but we can send115 // packets early if we want to. (not completely according to spec)116 const int max_cycles_to_transmit_early = 2;117 118 102 debugOutput ( DEBUG_LEVEL_ULTRA_VERBOSE, "Try for cycle %d\n", cycle ); 119 103 // check whether the packet buffer has packets for us to send. … … 168 152 // we can still postpone the queueing of the packets 169 153 // if we are far enough ahead of the presentation time 170 if ( cycles_until_presentation <= min_cycles_before_presentation)154 if ( cycles_until_presentation <= MOTU_MIN_CYCLES_BEFORE_PRESENTATION ) 171 155 { 172 156 debugOutput ( DEBUG_LEVEL_VERBOSE, … … 217 201 // NOTE: dangerous since the device has no way of reporting that it didn't get 218 202 // this packet on time. 219 if(cycles_until_presentation >= min_cycles_before_presentation)203 if(cycles_until_presentation >= MOTU_MIN_CYCLES_BEFORE_PRESENTATION) 220 204 { 221 205 // we are not that late and can still try to transmit the packet … … 230 214 } 231 215 } 232 else if(cycles_until_transmit <= max_cycles_to_transmit_early)216 else if(cycles_until_transmit <= MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY) 233 217 { 234 218 // it's time send the packet … … 247 231 presentation_time, ( unsigned int ) TICKS_TO_CYCLES ( presentation_time ) ); 248 232 #ifdef DEBUG 249 if ( cycles_until_transmit > max_cycles_to_transmit_early+ 1 )233 if ( cycles_until_transmit > MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY + 1 ) 250 234 { 251 235 debugOutput ( DEBUG_LEVEL_VERY_VERBOSE,