Changeset 791
- Timestamp:
- 12/31/07 06:41:19 (16 years ago)
- Files:
-
- trunk/libffado/SConstruct (modified) (1 diff)
- trunk/libffado/src/ffado.cpp (modified) (1 diff)
- trunk/libffado/src/libieee1394/IsoHandler.cpp (modified) (3 diffs)
- trunk/libffado/src/libieee1394/IsoHandlerManager.cpp (modified) (2 diffs)
- trunk/libffado/src/libstreaming/generic/StreamProcessor.cpp (modified) (3 diffs)
- trunk/libffado/src/libstreaming/StreamProcessorManager.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/SConstruct
r781 r791 319 319 320 320 env['PACKAGE'] = "libffado" 321 env['VERSION'] = "1.999.1 0"321 env['VERSION'] = "1.999.11" 322 322 env['LIBVERSION'] = "1.0.0" 323 323 trunk/libffado/src/ffado.cpp
r750 r791 245 245 return dev->options.period_size; 246 246 } else { 247 debugWarning("XRUN"); 247 248 xruns++; 248 249 return -1; trunk/libffado/src/libieee1394/IsoHandler.cpp
r790 r791 214 214 } 215 215 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "(%c %p) poll took %lldus, iterate took %lldus\n", 216 ( this->getType()==eHT_Receive?'R':'X'), this,216 (getType()==eHT_Receive?'R':'X'), this, 217 217 poll_exit-poll_enter, iter_exit-iter_enter); 218 218 #else … … 220 220 // so poll'ing is not really necessary 221 221 bool result = iterate(); 222 usleep(125);222 //usleep(125); 223 223 return result; 224 224 #endif … … 228 228 bool 229 229 IsoHandler::iterate() { 230 flush(); 230 231 if(raw1394_loop_iterate(m_handle)) { 231 232 debugOutput( DEBUG_LEVEL_VERBOSE, trunk/libffado/src/libieee1394/IsoHandlerManager.cpp
r784 r791 368 368 } 369 369 370 unsigned int irq_interval = packets_per_period / MINIMUM_INTERRUPTS_PER_PERIOD; 371 if(irq_interval <= 0) irq_interval=1; 372 370 //unsigned int irq_interval = packets_per_period / MINIMUM_INTERRUPTS_PER_PERIOD; 371 //if(irq_interval <= 0) irq_interval=1; 372 unsigned int irq_interval=2; // this is not the HW IRQ interval 373 373 374 // the receive buffer size doesn't matter for the latency, 374 375 // but it has a minimal value in order for libraw to operate correctly (300) … … 423 424 } 424 425 425 unsigned int irq_interval = packets_per_period / MINIMUM_INTERRUPTS_PER_PERIOD; 426 if(irq_interval <= 0) irq_interval=1; 426 // unsigned int irq_interval = packets_per_period / MINIMUM_INTERRUPTS_PER_PERIOD; 427 // if(irq_interval <= 0) irq_interval=1; 428 unsigned int irq_interval=2; // this is not the HW IRQ interval 427 429 428 430 // the SP specifies how many packets to ISO-buffer trunk/libffado/src/libstreaming/generic/StreamProcessor.cpp
r783 r791 117 117 118 118 // only queue a part (80%) of the theoretical max in order not to have too much 'not ready' cycles 119 packets_to_prebuffer = (packets_to_prebuffer * 8000) / 10000;119 packets_to_prebuffer = (packets_to_prebuffer * 7000) / 10000; 120 120 121 121 return packets_to_prebuffer; … … 620 620 } 621 621 } 622 // return RAW1394_ISO_AGAIN; 623 generateSilentPacketHeader(data, length, tag, sy, cycle, dropped_cycles, max_length); 624 generateSilentPacketData(data, length, tag, sy, cycle, dropped_cycles, max_length); 625 return RAW1394_ISO_DEFER; 622 usleep(125); // only when using thread-per-handler 623 return RAW1394_ISO_AGAIN; 624 // generateSilentPacketHeader(data, length, tag, sy, cycle, dropped_cycles, max_length); 625 // generateSilentPacketData(data, length, tag, sy, cycle, dropped_cycles, max_length); 626 // return RAW1394_ISO_DEFER; 626 627 } else { 627 628 debugError("Invalid return value: %d\n", result); … … 1284 1285 } 1285 1286 break; 1287 case ePS_WaitingForStreamEnable: // when xrunning at startup 1288 result &= m_data_buffer->clearBuffer(); 1289 m_data_buffer->setTransparent(true); 1290 break; 1286 1291 case ePS_WaitingForStreamDisable: 1287 result &= m_data_buffer->clearBuffer(); // FIXME: don't like the reset() name1292 result &= m_data_buffer->clearBuffer(); 1288 1293 m_data_buffer->setTransparent(true); 1289 1294 break; trunk/libffado/src/libstreaming/StreamProcessorManager.cpp
r790 r791 465 465 while(nb_sync_runs) { 466 466 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " check (%d)...\n", nb_sync_runs); 467 waitForPeriod(); 467 if(!waitForPeriod()) { 468 debugWarning("xrun while aligning streams...\n"); 469 return false; 470 }; 468 471 469 472 i = 0; … … 541 544 it != m_ReceiveProcessors.end(); 542 545 ++it ) { 543 if(!(*it)->scheduleStopRunning(-1)) { 544 debugError("%p->scheduleStopRunning(-1) failed\n", *it); 545 return false; 546 if((*it)->isRunning()) { 547 if(!(*it)->scheduleStopRunning(-1)) { 548 debugError("%p->scheduleStopRunning(-1) failed\n", *it); 549 return false; 550 } 546 551 } 547 552 } … … 549 554 it != m_TransmitProcessors.end(); 550 555 ++it ) { 551 if(!(*it)->scheduleStopRunning(-1)) { 552 debugError("%p->scheduleStopRunning(-1) failed\n", *it); 553 return false; 556 if((*it)->isRunning()) { 557 if(!(*it)->scheduleStopRunning(-1)) { 558 debugError("%p->scheduleStopRunning(-1) failed\n", *it); 559 return false; 560 } 554 561 } 555 562 } … … 754 761 m_SyncSource->setSyncDelay(d); 755 762 d = m_SyncSource->getSyncDelay(); 756 debugOutput(DEBUG_LEVEL_VERBOSE, "Increased the Sync delay to: %d\n", d); 763 debugOutput(DEBUG_LEVEL_VERBOSE, "Increased the Sync delay to: %d ticks (%f frames, %f cy)\n", 764 d, ((float)d)/m_SyncSource->getTicksPerFrame(), 765 ((float)d)/((float)TICKS_PER_CYCLE)); 757 766 758 767 #ifdef DEBUG