Changeset 1721
- Timestamp:
- 11/22/09 07:26:31 (13 years ago)
- Files:
-
- branches/libffado-2.0/src/debugmodule/debugmodule.cpp (modified) (1 diff)
- branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp (modified) (1 diff)
- branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp (modified) (9 diffs)
- branches/libffado-2.0/src/libieee1394/ieee1394service.cpp (modified) (11 diffs)
- branches/libffado-2.0/src/libieee1394/IsoHandler.cpp (modified) (2 diffs)
- branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp (modified) (5 diffs)
- branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp (modified) (1 diff)
- branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp (modified) (8 diffs)
- branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp (modified) (26 diffs)
- branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp (modified) (1 diff)
- branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp (modified) (5 diffs)
- branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp (modified) (29 diffs)
- branches/libffado-2.0/src/libutil/Configuration.cpp (modified) (3 diffs)
- branches/libffado-2.0/src/libutil/PosixThread.cpp (modified) (3 diffs)
- branches/libffado-2.0/src/libutil/serialize_expat.cpp (modified) (1 diff)
- branches/libffado-2.0/src/libutil/serialize_libxml.cpp (modified) (2 diffs)
- branches/libffado-2.0/src/libutil/StreamStatistics.cpp (modified) (1 diff)
- branches/libffado-2.0/src/libutil/SystemTimeSource.cpp (modified) (1 diff)
- branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp (modified) (3 diffs)
- branches/libffado-2.0/support/firmware/fireworks-downloader.cpp (modified) (1 diff)
- branches/libffado-2.0/tests/streaming/teststreaming3.cpp (modified) (1 diff)
- branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp (modified) (3 diffs)
- branches/libffado-2.0/tests/test-ffado.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libffado-2.0/src/debugmodule/debugmodule.cpp
r1720 r1721 186 186 int chars_written=0; 187 187 int retval=0; 188 retval = snprintf(msg, MB_BUFFERSIZE, "%011lu: %s (%s)[%4 d] %s: ",188 retval = snprintf(msg, MB_BUFFERSIZE, "%011lu: %s (%s)[%4u] %s: ", 189 189 ts_usec, getPreSequence( level ), 190 190 fname, line, function ); branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp
r1720 r1721 249 249 // copy the payload 250 250 251 if (bytes_read +readDescCmd.m_data_length>m_descriptor_length) {251 if (bytes_read + readDescCmd.m_data_length > m_descriptor_length) { 252 252 debugWarning("Device returned too much data, truncating\n"); 253 253 readDescCmd.m_data_length=m_descriptor_length-bytes_read; 254 254 } 255 255 256 debugOutput(DEBUG_LEVEL_VERBOSE, " copying %u bytes to internal buffer offset %lu\n",readDescCmd.m_data_length, bytes_read); 256 debugOutput(DEBUG_LEVEL_VERBOSE, 257 " copying %u bytes to internal buffer offset %lu\n", 258 readDescCmd.m_data_length, bytes_read); 257 259 258 260 memcpy(m_data+bytes_read,readDescCmd.m_data, readDescCmd.m_data_length); branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp
r1720 r1721 291 291 cycle_timer_ticks = CYCLE_TIMER_TO_TICKS(cycle_timer); 292 292 293 debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11 lu, local: %17llu\n",293 debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11u, local: %17lu\n", 294 294 cycle_timer, local_time); 295 295 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 296 " ctr : 0x%08X %11l lu (%03us %04ucy %04uticks)\n",296 " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", 297 297 (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, 298 298 (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), … … 409 409 // // simulate a random scheduling delay between (0-10ms) 410 410 // ffado_microsecs_t tmp = Util::SystemTimeSource::SleepUsecRandom(10000); 411 // debugOutput( DEBUG_LEVEL_VERBOSE, " (%p) random sleep of % lu usecs...\n", this, tmp);411 // debugOutput( DEBUG_LEVEL_VERBOSE, " (%p) random sleep of %u usecs...\n", this, tmp); 412 412 413 413 if(m_unhandled_busreset) { … … 419 419 } 420 420 421 debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11 lu, local: %17llu\n",421 debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11u, local: %17lu\n", 422 422 cycle_timer, local_time); 423 423 debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 424 " ctr : 0x%08X %11l lu (%03us %04ucy %04uticks)\n",424 " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", 425 425 (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, 426 426 (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), … … 462 462 diff_ticks_corr = diff_ticks - ticks_late; 463 463 debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 464 "diff_ticks_corr=% ld, diff_ticks = %ld, ticks_late = %ld\n",464 "diff_ticks_corr=%d, diff_ticks = %ld, ticks_late = %ld\n", 465 465 diff_ticks_corr, diff_ticks, ticks_late); 466 466 } else { … … 526 526 527 527 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 528 " usecs: current: %f next: %f usecs_late=% ld ticks_late=%ld\n",528 " usecs: current: %f next: %f usecs_late=%d ticks_late=%ld\n", 529 529 m_current_time_usecs, m_next_time_usecs, usecs_late, ticks_late); 530 530 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 531 " ticks: current: %f next: %f diff=% ld\n",531 " ticks: current: %f next: %f diff=%d\n", 532 532 m_current_time_ticks, m_next_time_ticks, diff_ticks); 533 533 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 534 " ticks: current: %011l lu (%03us %04ucy %04uticks)\n",534 " ticks: current: %011lu (%03us %04ucy %04uticks)\n", 535 535 (uint64_t)m_current_time_ticks, 536 536 (unsigned int)TICKS_TO_SECS( (uint64_t)m_current_time_ticks ), … … 538 538 (unsigned int)TICKS_TO_OFFSET( (uint64_t)m_current_time_ticks ) ); 539 539 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 540 " ticks: next : %011l lu (%03us %04ucy %04uticks)\n",540 " ticks: next : %011lu (%03us %04ucy %04uticks)\n", 541 541 (uint64_t)m_next_time_ticks, 542 542 (unsigned int)TICKS_TO_SECS( (uint64_t)m_next_time_ticks ), … … 545 545 546 546 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 547 " state: local: %11l lu, dll_e2: %f, rate: %f\n",547 " state: local: %11lu, dll_e2: %f, rate: %f\n", 548 548 local_time, m_dll_e2, getRate()); 549 549 } … … 625 625 if (y_step_in_ticks_int > 0) { 626 626 retval = addTicks(offset_in_ticks_int, y_step_in_ticks_int); 627 /* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int > 0: % ld, time_diff: %f, rate: %f, retval: %lu\n",627 /* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int > 0: %d, time_diff: %f, rate: %f, retval: %u\n", 628 628 y_step_in_ticks_int, time_diff, my_vars.rate, retval);*/ 629 629 } else { … … 631 631 632 632 // this can happen if the update thread was woken up earlier than it should have been 633 /* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int <= 0: % ld, time_diff: %f, rate: %f, retval: %lu\n",633 /* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int <= 0: %d, time_diff: %f, rate: %f, retval: %u\n", 634 634 y_step_in_ticks_int, time_diff, my_vars.rate, retval);*/ 635 635 } branches/libffado-2.0/src/libieee1394/ieee1394service.cpp
r1571 r1721 509 509 #ifdef DEBUG 510 510 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, 511 "read: node 0x%hX, addr = 0x%016l lX, length = %u\n",511 "read: node 0x%hX, addr = 0x%016lX, length = %lu\n", 512 512 nodeId, addr, length); 513 513 printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, buffer ); … … 518 518 #ifdef DEBUG 519 519 debugOutput(DEBUG_LEVEL_NORMAL, 520 "raw1394_read failed: node 0x%hX, addr = 0x%016l lX, length = %u\n",520 "raw1394_read failed: node 0x%hX, addr = 0x%016lX, length = %lu\n", 521 521 nodeId, addr, length); 522 522 #endif … … 564 564 565 565 #ifdef DEBUG 566 debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016l lX, length = %d\n",566 debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016lX, length = %lu\n", 567 567 nodeId, addr, length); 568 568 printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, data ); … … 601 601 } 602 602 #ifdef DEBUG 603 debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016l lX\n",603 debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016lX\n", 604 604 nodeId, addr); 605 debugOutput(DEBUG_LEVEL_VERBOSE," if (*(addr)==0x%016l lX) *(addr)=0x%016llX\n",605 debugOutput(DEBUG_LEVEL_VERBOSE," if (*(addr)==0x%016lX) *(addr)=0x%016lX\n", 606 606 compare_value, swap_value); 607 607 fb_octlet_t buffer; … … 609 609 debugWarning("Could not read register\n"); 610 610 } else { 611 debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016l lX\n", buffer);611 debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016lX\n", buffer); 612 612 } 613 613 #endif … … 633 633 debugWarning("Could not read register\n"); 634 634 } else { 635 debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016l lX\n", buffer);635 debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016lX\n", buffer); 636 636 } 637 637 #endif … … 827 827 fb_quadlet_t *data_quads = (fb_quadlet_t *)data; 828 828 #ifdef DEBUG 829 debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = % dbytes\n",829 debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = %lu bytes\n", 830 830 nodeid, response, length); 831 831 printBuffer(DEBUG_LEVEL_VERY_VERBOSE, (length+3)/4, data_quads ); … … 857 857 } else if(FCP_MASK_SUBUNIT_AND_OPCODE(first_quadlet) 858 858 != FCP_MASK_SUBUNIT_AND_OPCODE(CondSwapFromBus32(m_fcp_block.request[0]))) { 859 debugOutput(DEBUG_LEVEL_VERBOSE, "FCP response not for this request: %08 lX != %08lX\n",859 debugOutput(DEBUG_LEVEL_VERBOSE, "FCP response not for this request: %08X != %08X\n", 860 860 FCP_MASK_SUBUNIT_AND_OPCODE(first_quadlet), 861 861 FCP_MASK_SUBUNIT_AND_OPCODE(CondSwapFromBus32(m_fcp_block.request[0]))); … … 921 921 return 0; 922 922 } 923 debugOutput(DEBUG_LEVEL_VERBOSE, " READ HI: 0x%08 lX\n", split_timeout_hi);923 debugOutput(DEBUG_LEVEL_VERBOSE, " READ HI: 0x%08X\n", split_timeout_hi); 924 924 925 925 if(!readNoLock( 0xffc0 | nodeId, CSR_REGISTER_BASE + CSR_SPLIT_TIMEOUT_LO, 1, … … 928 928 return 0; 929 929 } 930 debugOutput(DEBUG_LEVEL_VERBOSE, " READ LO: 0x%08 lX\n", split_timeout_low);930 debugOutput(DEBUG_LEVEL_VERBOSE, " READ LO: 0x%08X\n", split_timeout_low); 931 931 932 932 split_timeout_hi = CondSwapFromBus32(split_timeout_hi); … … 1381 1381 debugOutput( DEBUG_LEVEL_VERBOSE, " CycleTimerHelper: %p, IsoManager: %p, WatchDog: %p\n", 1382 1382 m_pCTRHelper, m_pIsoManager, m_pWatchdog ); 1383 debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011l lu (%03us %04ucy %04uticks)\n",1383 debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011lu (%03us %04ucy %04uticks)\n", 1384 1384 ctr, 1385 1385 (unsigned int)TICKS_TO_SECS( ctr ), branches/libffado-2.0/src/libieee1394/IsoHandler.cpp
r1561 r1721 397 397 if((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) { 398 398 debugWarning("reconstructed CTR counter discrepancy\n"); 399 debugWarning(" ingredients: %X, % lX, %lX, %lX, %lX, %ld, %ld, %ld, %lld\n",399 debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", 400 400 cycle, pkt_ctr_ref, pkt_ctr, now, m_last_now, now_secs_ref, CYCLE_TIMER_GET_SECS(now), CYCLE_TIMER_GET_SECS(m_last_now), tmp); 401 401 debugWarning(" diffcy = %ld \n", diff_cycles); … … 490 490 if(((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) && (m_packets > m_buf_packets)) { 491 491 debugWarning("reconstructed CTR counter discrepancy\n"); 492 debugWarning(" ingredients: %X, % lX, %lX, %lX, %lX, %ld, %ld, %ld, %lld\n",492 debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", 493 493 cycle, pkt_ctr_ref, pkt_ctr, now, m_last_now, now_secs_ref, CYCLE_TIMER_GET_SECS(now), CYCLE_TIMER_GET_SECS(m_last_now), tmp); 494 494 debugWarning(" diffcy = %ld \n", diff_cycles); branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp
r1536 r1721 113 113 114 114 if (!h->handleBusReset()) { 115 debugWarning("Failed to handle busreset on %p\n" );115 debugWarning("Failed to handle busreset on %p\n", h); 116 116 retval = false; 117 117 } … … 331 331 332 332 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 333 "(%p, %s) check handler %d: diff = %l ld, max = %lld, now: %08lX, last: %08lX\n",333 "(%p, %s) check handler %d: diff = %ld, max = %lld, now: %08lX, last: %08lX\n", 334 334 this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"), 335 335 i, measured_diff_ticks, max_diff_ticks, ctr_at_poll_return, last_packet_seen); 336 336 if(measured_diff_ticks > max_diff_ticks) { 337 debugFatal("(%p, %s) Handler died: now: %08 lX, last: %08lX, diff: %lld (max: %lld)\n",337 debugFatal("(%p, %s) Handler died: now: %08X, last: %08X, diff: %ld (max: %ld)\n", 338 338 this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"), 339 339 ctr_at_poll_return, last_packet_seen, measured_diff_ticks, max_diff_ticks); … … 416 416 debugError("(%p) sem_timedwait error (result=%d errno=EINVAL)\n", 417 417 this, result); 418 debugError("(%p) timeout_nsec=%lld ts.sec=% d ts.nsec=%lld\n",418 debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n", 419 419 this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 420 420 return eAR_Error; … … 422 422 debugError("(%p) sem_timedwait error (result=%d errno=%d)\n", 423 423 this, result, errno); 424 debugError("(%p) timeout_nsec=%lld ts.sec=% d ts.nsec=%lld\n",424 debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n", 425 425 this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 426 426 return eAR_Error; … … 888 888 889 889 m_StreamProcessors.push_back(stream); 890 debugOutput( DEBUG_LEVEL_VERBOSE, " % d streams, %dhandlers registered\n",890 debugOutput( DEBUG_LEVEL_VERBOSE, " %lu streams, %lu handlers registered\n", 891 891 m_StreamProcessors.size(), m_IsoHandlers.size()); 892 892 return true; branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp
r1544 r1721 148 148 if(isRunning()) { 149 149 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 150 "STMP: %l luticks | syt_interval=%d, tpf=%f\n",150 "STMP: %luticks | syt_interval=%d, tpf=%f\n", 151 151 m_last_timestamp, m_syt_interval, getTicksPerFrame()); 152 152 /* debugOutput(DEBUG_LEVEL_NORMAL, 153 "STMP: %12l lu ticks | delta_t: %5lld | bufferfill: %5d\n",153 "STMP: %12lu ticks | delta_t: %5ld | bufferfill: %5d\n", 154 154 m_last_timestamp, now_t-last_t, m_data_buffer->getBufferFill());*/ 155 155 } branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp
r1546 r1721 141 141 { 142 142 debugOutput( DEBUG_LEVEL_NORMAL, 143 "Insufficient frames (P): N=%02d, CY=%04 u, TC=%04u, CUT=%04d\n",143 "Insufficient frames (P): N=%02d, CY=%04lu, TC=%04u, CUT=%04d\n", 144 144 fc, CYCLE_TIMER_GET_CYCLES(pkt_ctr), 145 145 transmit_at_cycle, cycles_until_transmit ); … … 200 200 // we are too late 201 201 debugOutput(DEBUG_LEVEL_VERBOSE, 202 "Too late: CY=%04 u, TC=%04u, CUT=%04d, TSP=%011llu (%04u)\n",202 "Too late: CY=%04lu, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", 203 203 CYCLE_TIMER_GET_CYCLES(pkt_ctr), 204 204 transmit_at_cycle, cycles_until_transmit, … … 229 229 // for timestamp tracing 230 230 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 231 "XMIT PKT: TSP= %011l lu (%04u) (%04u) (%04u)\n",231 "XMIT PKT: TSP= %011lu (%04u) (%04u) (%04u)\n", 232 232 presentation_time, 233 233 (unsigned int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), … … 239 239 { 240 240 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 241 "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011l lu (%04u), TSP=%011llu (%04u)\n",241 "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", 242 242 CYCLE_TIMER_GET_CYCLES(pkt_ctr), 243 243 transmit_at_cycle, cycles_until_transmit, … … 248 248 { 249 249 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 250 "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011l lu (%04u), TSP=%011llu (%04u)\n",250 "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", 251 251 CYCLE_TIMER_GET_CYCLES(pkt_ctr), 252 252 transmit_at_cycle, cycles_until_transmit, … … 269 269 { 270 270 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 271 "XMIT DATA: TSP= %011l lu (%04u)\n",271 "XMIT DATA: TSP= %011lu (%04u)\n", 272 272 m_last_timestamp, 273 273 (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); … … 301 301 struct iec61883_packet *packet = ( struct iec61883_packet * ) data; 302 302 debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 303 "XMIT SILENT (cy %04d): CY=%04u, TSP=%011l lu (%04u)\n",303 "XMIT SILENT (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", 304 304 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, 305 305 (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); … … 338 338 struct iec61883_packet *packet = ( struct iec61883_packet * ) data; 339 339 debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 340 "XMIT EMPTY (cy %04d): CY=%04u, TSP=%011l lu (%04u)\n",340 "XMIT EMPTY (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", 341 341 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, 342 342 (unsigned int)TICKS_TO_CYCLES(m_last_timestamp) ); branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp
r1536 r1721 378 378 if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { 379 379 int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); 380 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %l ld\n", tsp_diff);380 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); 381 381 double tsp_diff_d = tsp_diff; 382 382 double fs_syt = 1.0/tsp_diff_d; … … 399 399 if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { 400 400 debugOutput(DEBUG_LEVEL_VERBOSE, 401 "cy %04 u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n",401 "cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 402 402 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 403 403 m_last_timestamp, diff, ticks_per_packet); … … 410 410 diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 411 411 if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 412 debugWarning("cy %04 u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n",412 debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 413 413 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 414 414 m_last_timestamp, diff, ticks_per_packet); … … 420 420 diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 421 421 if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 422 debugWarning("cy %04 u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n",422 debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 423 423 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 424 424 m_last_timestamp, diff, ticks_per_packet); … … 429 429 } 430 430 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 431 "%04u %011l lu %011llu %d %d\n",431 "%04u %011lu %011lu %d %d\n", 432 432 CYCLE_TIMER_GET_CYCLES(pkt_ctr), 433 433 m_last_timestamp2, m_last_timestamp, … … 437 437 438 438 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 439 "RECV: CY=%04u TS=%011l lu\n",439 "RECV: CY=%04u TS=%011lu\n", 440 440 CYCLE_TIMER_GET_CYCLES(pkt_ctr), 441 441 m_last_timestamp); … … 606 606 if (result == eCRV_Packet) { 607 607 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 608 "XMIT SILENT: CY=%04u TS=%011l lu\n",608 "XMIT SILENT: CY=%04u TS=%011lu\n", 609 609 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); 610 610 … … 657 657 if (result == eCRV_Packet || result == eCRV_Defer) { 658 658 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 659 "XMIT: CY=%04u TS=%011l lu\n",659 "XMIT: CY=%04u TS=%011lu\n", 660 660 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); 661 661 … … 694 694 if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { 695 695 int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); 696 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %l ld\n", tsp_diff);696 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); 697 697 double tsp_diff_d = tsp_diff; 698 698 double fs_syt = 1.0/tsp_diff_d; … … 703 703 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)\n", 704 704 fs_nom, fs_syt, fs_diff, fs_diff_norm); 705 // debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011l lu, m_last_timestamp2: %011llu\n",705 // debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011lu, m_last_timestamp2: %011lu\n", 706 706 // fs_diff, m_last_timestamp, m_last_timestamp2); 707 707 if (fs_diff_norm > 0.01 || fs_diff_norm < -0.01) { … … 716 716 if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { 717 717 debugOutput(DEBUG_LEVEL_VERBOSE, 718 "cy %04 d, rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n",718 "cy %04ld, rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 719 719 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 720 720 m_last_timestamp, diff, ticks_per_packet); 721 721 } 722 722 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 723 "%04 d %011llu %011llu %d %d\n",723 "%04ld %011lu %011lu %d %d\n", 724 724 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 725 725 m_last_timestamp, diff, ticks_per_packet); … … 757 757 goto send_empty_packet; 758 758 } else if (result == eCRV_Again) { 759 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle % d\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr));759 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle %ld\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr)); 760 760 if(m_state != m_next_state) { 761 761 debugOutput(DEBUG_LEVEL_VERBOSE, "Should update state from %s to %s\n", … … 809 809 bool result; 810 810 debugOutputExtreme( DEBUG_LEVEL_VERBOSE, 811 "(%p, %s) getFrames(%d, %11l lu)\n",811 "(%p, %s) getFrames(%d, %11lu)\n", 812 812 this, getTypeString(), nbframes, ts); 813 813 assert( getType() == ePT_Receive ); … … 840 840 lag_frames = (((float)lag_ticks) / srate); 841 841 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 842 "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %l ld, %llu, %d\n",842 "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", 843 843 this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); 844 844 if (lag_frames >= 1.0) { 845 845 // the stream lags 846 debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags with %6d ticks = %10.5f frames (rate=%10.5f), %l ld, %llu, %d\n",846 debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", 847 847 this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); 848 848 } else if (lag_frames <= -1.0) { 849 849 // the stream leads 850 debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %l ld, %llu, %d\n",850 debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", 851 851 this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); 852 852 } … … 862 862 { 863 863 debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 864 "stream (%p): dry run %d frames (@ ts=%l ld)\n",864 "stream (%p): dry run %d frames (@ ts=%ld)\n", 865 865 this, nbframes, ts); 866 866 // dry run on this side means that we put silence in all enabled ports … … 873 873 { 874 874 bool result; 875 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %l ld)\n", nbframes, ts);875 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %ld)\n", nbframes, ts); 876 876 result = m_data_buffer->dropFrames(nbframes); 877 877 SIGNAL_ACTIVITY_ISO_RECV; … … 883 883 bool result; 884 884 debugOutputExtreme( DEBUG_LEVEL_VERBOSE, 885 "(%p, %s) putFrames(%d, %11l lu)\n",885 "(%p, %s) putFrames(%d, %11lu)\n", 886 886 this, getTypeString(), nbframes, ts); 887 887 assert( getType() == ePT_Transmit ); … … 896 896 { 897 897 debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 898 "StreamProcessor::putFramesWet(%d, %l lu)\n",898 "StreamProcessor::putFramesWet(%d, %lu)\n", 899 899 nbframes, ts); 900 900 // transfer the data 901 901 m_data_buffer->blockProcessWriteFrames(nbframes, ts); 902 902 debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 903 " New timestamp: %l lu\n", ts);903 " New timestamp: %lu\n", ts); 904 904 return true; // FIXME: what about failure? 905 905 } … … 909 909 { 910 910 debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 911 "StreamProcessor::putFramesDry(%d, %l lu)\n",911 "StreamProcessor::putFramesDry(%d, %lu)\n", 912 912 nbframes, ts); 913 913 // do nothing … … 919 919 { 920 920 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, 921 "StreamProcessor::putSilenceFrames(%d, %l lu)\n",921 "StreamProcessor::putSilenceFrames(%d, %lu)\n", 922 922 nbframes, ts); 923 923 … … 1070 1070 // make the scratch buffer one period of frames long 1071 1071 m_scratch_buffer_size_bytes = m_StreamProcessorManager.getPeriodSize() * getEventsPerFrame() * getEventSize(); 1072 debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of % d quadlets\n");1072 debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of %ld quadlets\n", m_scratch_buffer_size_bytes); 1073 1073 if(m_scratch_buffer) delete[] m_scratch_buffer; 1074 1074 m_scratch_buffer = new byte_t[m_scratch_buffer_size_bytes]; … … 1159 1159 #ifdef DEBUG 1160 1160 uint64_t now = m_1394service.getCycleTimerTicks(); 1161 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011l lu (%03us %04uc %04ut)\n",1161 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", 1162 1162 now, 1163 1163 (unsigned int)TICKS_TO_SECS(now), 1164 1164 (unsigned int)TICKS_TO_CYCLES(now), 1165 1165 (unsigned int)TICKS_TO_OFFSET(now)); 1166 debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011l lu (%03us %04uc %04ut)\n",1166 debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011lu (%03us %04uc %04ut)\n", 1167 1167 tx, 1168 1168 (unsigned int)TICKS_TO_SECS(tx), … … 1205 1205 #ifdef DEBUG 1206 1206 uint64_t now = m_1394service.getCycleTimerTicks(); 1207 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011l lu (%03us %04uc %04ut)\n",1207 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", 1208 1208 now, 1209 1209 (unsigned int)TICKS_TO_SECS(now), 1210 1210 (unsigned int)TICKS_TO_CYCLES(now), 1211 1211 (unsigned int)TICKS_TO_OFFSET(now)); 1212 debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011l lu (%03us %04uc %04ut)\n",1212 debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011lu (%03us %04uc %04ut)\n", 1213 1213 tx, 1214 1214 (unsigned int)TICKS_TO_SECS(tx), … … 1229 1229 #ifdef DEBUG 1230 1230 uint64_t now = m_1394service.getCycleTimerTicks(); 1231 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011l lu (%03us %04uc %04ut)\n",1231 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", 1232 1232 now, 1233 1233 (unsigned int)TICKS_TO_SECS(now), 1234 1234 (unsigned int)TICKS_TO_CYCLES(now), 1235 1235 (unsigned int)TICKS_TO_OFFSET(now)); 1236 debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011l lu (%03us %04uc %04ut)\n",1236 debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011lu (%03us %04uc %04ut)\n", 1237 1237 tx, 1238 1238 (unsigned int)TICKS_TO_SECS(tx), … … 1254 1254 #ifdef DEBUG 1255 1255 uint64_t now = m_1394service.getCycleTimerTicks(); 1256 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011l lu (%03us %04uc %04ut)\n",1256 debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", 1257 1257 now, 1258 1258 (unsigned int)TICKS_TO_SECS(now), 1259 1259 (unsigned int)TICKS_TO_CYCLES(now), 1260 1260 (unsigned int)TICKS_TO_OFFSET(now)); 1261 debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011l lu (%03us %04uc %04ut)\n",1261 debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011lu (%03us %04uc %04ut)\n", 1262 1262 tx, 1263 1263 (unsigned int)TICKS_TO_SECS(tx), … … 1901 1901 } 1902 1902 uint64_t now = m_1394service.getCycleTimerTicks(); 1903 debugOutputShort( DEBUG_LEVEL_NORMAL, " Now : %011l lu (%03us %04uc %04ut)\n",1903 debugOutputShort( DEBUG_LEVEL_NORMAL, " Now : %011lu (%03us %04uc %04ut)\n", 1904 1904 now, 1905 1905 (unsigned int)TICKS_TO_SECS(now), branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp
r1488 r1721 182 182 #ifdef DEBUG 183 183 if(isRunning()) { 184 debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %l luticks | tpf=%f\n",184 debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %luticks | tpf=%f\n", 185 185 m_last_timestamp, getTicksPerFrame()); 186 186 } branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp
r1489 r1721 197 197 // we are too late 198 198 debugOutput(DEBUG_LEVEL_VERBOSE, 199 "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011l lu (%04u)\n",199 "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", 200 200 cycle, 201 201 transmit_at_cycle, cycles_until_transmit, … … 232 232 { 233 233 debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, 234 "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011l lu (%04u), TSP=%011llu (%04u)\n",234 "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", 235 235 cycle, 236 236 transmit_at_cycle, cycles_until_transmit, … … 241 241 { 242 242 debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, 243 "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011l lu (%04u), TSP=%011llu (%04u)\n",243 "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", 244 244 cycle, 245 245 transmit_at_cycle, cycles_until_transmit, … … 289 289 uint32_t pkt_ctr ) 290 290 { 291 debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04 u, TSP=%011llu (%04u)\n",291 debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04lu, TSP=%011lu (%04u)\n", 292 292 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, 293 293 ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); … … 318 318 unsigned int cycle = CYCLE_TIMER_GET_CYCLES(pkt_ctr); 319 319 320 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011l lu (%04u)\n",320 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011lu (%04u)\n", 321 321 cycle, m_last_timestamp, 322 322 ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp
r1544 r1721 192 192 debugError("(%p) sem_[timed]wait error (result=%d errno=EINVAL)\n", 193 193 this, result); 194 debugError("(%p) timeout_nsec=%l ld ts.sec=%d ts.nsec=%lld\n",194 debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n", 195 195 this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 196 196 return eAR_Error; … … 198 198 debugError("(%p) sem_[timed]wait error (result=%d errno=%d)\n", 199 199 this, result, errno); 200 debugError("(%p) timeout_nsec=%l ld ts.sec=%d ts.nsec=%lld\n",200 debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n", 201 201 this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 202 202 return eAR_Error; … … 540 540 #ifdef DEBUG 541 541 int64_t now = Util::SystemTimeSource::getCurrentTime(); 542 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %l ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period );543 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %l ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now );542 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); 543 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); 544 544 #endif 545 545 … … 549 549 #ifdef DEBUG 550 550 now = Util::SystemTimeSource::getCurrentTime(); 551 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %l ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer );551 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); 552 552 #endif 553 553 } … … 570 570 // figure out where we are now 571 571 uint64_t time_of_first_sample = m_SyncSource->getTimeAtPeriod(); 572 debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011l lu (%03us %04uc %04ut)...\n",572 debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011lu (%03us %04uc %04ut)...\n", 573 573 time_of_first_sample, 574 574 (unsigned int)TICKS_TO_SECS(time_of_first_sample), … … 587 587 time_of_first_sample = addTicks(time_of_first_sample, 588 588 time_for_startup_ticks); 589 debugOutput( DEBUG_LEVEL_VERBOSE, " add %d frames (%011l lu ticks)...\n",589 debugOutput( DEBUG_LEVEL_VERBOSE, " add %d frames (%011lu ticks)...\n", 590 590 time_for_startup_frames, time_for_startup_ticks); 591 591 592 debugOutput( DEBUG_LEVEL_VERBOSE, " => first sample at TS=%011l lu (%03us %04uc %04ut)...\n",592 debugOutput( DEBUG_LEVEL_VERBOSE, " => first sample at TS=%011lu (%03us %04uc %04ut)...\n", 593 593 time_of_first_sample, 594 594 (unsigned int)TICKS_TO_SECS(time_of_first_sample), … … 603 603 uint64_t time_to_start_recv = substractTicks(time_of_first_sample, 604 604 prestart_cycles_for_recv * TICKS_PER_CYCLE); 605 debugOutput( DEBUG_LEVEL_VERBOSE, " => xmit starts at TS=%011l lu (%03us %04uc %04ut)...\n",605 debugOutput( DEBUG_LEVEL_VERBOSE, " => xmit starts at TS=%011lu (%03us %04uc %04ut)...\n", 606 606 time_to_start_xmit, 607 607 (unsigned int)TICKS_TO_SECS(time_to_start_xmit), 608 608 (unsigned int)TICKS_TO_CYCLES(time_to_start_xmit), 609 609 (unsigned int)TICKS_TO_OFFSET(time_to_start_xmit)); 610 debugOutput( DEBUG_LEVEL_VERBOSE, " => recv starts at TS=%011l lu (%03us %04uc %04ut)...\n",610 debugOutput( DEBUG_LEVEL_VERBOSE, " => recv starts at TS=%011lu (%03us %04uc %04ut)...\n", 611 611 time_to_start_recv, 612 612 (unsigned int)TICKS_TO_SECS(time_to_start_recv), … … 660 660 signed int fc; 661 661 (*it)->getBufferHeadTimestamp ( &ts, &fc ); 662 debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010l ld => head TS %010lld, fc=%d...\n",662 debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010ld => head TS %010lu, fc=%d...\n", 663 663 time_of_first_sample, (uint64_t)ts, fc); 664 664 } … … 690 690 } 691 691 if(!m_SyncSource->scheduleStartRunning(time_to_start_sync)) { 692 debugError("m_SyncSource->scheduleStartRunning(%11l lu) failed\n", time_to_start_sync);692 debugError("m_SyncSource->scheduleStartRunning(%11lu) failed\n", time_to_start_sync); 693 693 return false; 694 694 } … … 700 700 if(*it != m_SyncSource) { 701 701 if(!(*it)->scheduleStartRunning(time_to_start_recv)) { 702 debugError("%p->scheduleStartRunning(%11l lu) failed\n", *it, time_to_start_recv);702 debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_recv); 703 703 return false; 704 704 } … … 710 710 if(*it != m_SyncSource) { 711 711 if(!(*it)->scheduleStartRunning(time_to_start_xmit)) { 712 debugError("%p->scheduleStartRunning(%11l lu) failed\n", *it, time_to_start_xmit);712 debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_xmit); 713 713 return false; 714 714 } … … 743 743 #endif 744 744 745 debugOutput( DEBUG_LEVEL_VERBOSE, " initial time of transfer %010l ld, rate %f...\n",745 debugOutput( DEBUG_LEVEL_VERBOSE, " initial time of transfer %010ld, rate %f...\n", 746 746 m_time_of_transfer, rate); 747 747 … … 762 762 763 763 int64_t transmit_tail_timestamp = addTicks(m_time_of_transfer, delay_in_ticks); 764 debugOutput( DEBUG_LEVEL_VERBOSE, " preset transmit tail TS %010l ld, rate %f...\n",764 debugOutput( DEBUG_LEVEL_VERBOSE, " preset transmit tail TS %010ld, rate %f...\n", 765 765 transmit_tail_timestamp, rate); 766 766 … … 773 773 signed int fc; 774 774 (*it)->getBufferHeadTimestamp ( &ts, &fc ); 775 debugOutput( DEBUG_LEVEL_VERBOSE, " => transmit head TS %010l ld, fc=%d...\n",775 debugOutput( DEBUG_LEVEL_VERBOSE, " => transmit head TS %010ld, fc=%d...\n", 776 776 (uint64_t)ts, fc); 777 777 } … … 830 830 StreamProcessor *s = m_ReceiveProcessors.at(i); 831 831 diff = diffTicks(m_SyncSource->getTimeAtPeriod(), s->getTimeAtPeriod()); 832 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " offset between SyncSP %p and SP %p is %l ld ticks...\n",832 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " offset between SyncSP %p and SP %p is %ld ticks...\n", 833 833 m_SyncSource, s, diff); 834 834 if ( nb_sync_runs == periods_per_align_try ) { … … 850 850 diff_between_streams[i] /= periods_per_align_try; 851 851 diff_between_streams_frames[i] = (int)roundf(diff_between_streams[i] / s->getTicksPerFrame()); 852 debugOutput( DEBUG_LEVEL_VERBOSE, " avg offset between SyncSP %p and SP %p is %l ld ticks, %d frames...\n",852 debugOutput( DEBUG_LEVEL_VERBOSE, " avg offset between SyncSP %p and SP %p is %ld ticks, %d frames...\n", 853 853 m_SyncSource, s, diff_between_streams[i], diff_between_streams_frames[i]); 854 854 … … 1100 1100 #ifdef DEBUG 1101 1101 int64_t now = Util::SystemTimeSource::getCurrentTime(); 1102 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %l ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period );1103 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %l ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now );1102 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); 1103 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); 1104 1104 #endif 1105 1105 … … 1109 1109 #ifdef DEBUG 1110 1110 now = Util::SystemTimeSource::getCurrentTime(); 1111 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %l ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer );1111 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); 1112 1112 #endif 1113 1113 … … 1239 1239 // so 50 ticks = 10%, which is a rather large jitter value. 1240 1240 if(diff-ticks_per_period > 50 || diff-ticks_per_period < -50) { 1241 debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011l lu => TS=%011llu (%d, nom %d)\n",1241 debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 1242 1242 m_time_of_transfer2, m_time_of_transfer, diff, ticks_per_period); 1243 1243 } … … 1246 1246 1247 1247 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 1248 "transfer period %d at %l lu ticks...\n",1248 "transfer period %d at %lu ticks...\n", 1249 1249 m_nbperiods, m_time_of_transfer); 1250 1250 … … 1262 1262 } 1263 1263 debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, 1264 "XF at %011l lu ticks, RBF=%d, XBF=%d, SUM=%d...\n",1264 "XF at %011lu ticks, RBF=%d, XBF=%d, SUM=%d...\n", 1265 1265 m_time_of_transfer, rcv_bf, xmt_bf, rcv_bf+xmt_bf); 1266 1266 … … 1335 1335 if(m_SyncSource == NULL) return false; 1336 1336 debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, 1337 "transfer(%d) at TS=%011l lu (%03us %04uc %04ut)...\n",1337 "transfer(%d) at TS=%011lu (%03us %04uc %04ut)...\n", 1338 1338 t, m_time_of_transfer, 1339 1339 (unsigned int)TICKS_TO_SECS(m_time_of_transfer), … … 1349 1349 ++it ) { 1350 1350 if(!(*it)->getFrames(m_period, m_time_of_transfer)) { 1351 debugWarning("could not getFrames(%u, %11l lu) from stream processor (%p)\n",1351 debugWarning("could not getFrames(%u, %11lu) from stream processor (%p)\n", 1352 1352 m_period, m_time_of_transfer,*it); 1353 1353 retval &= false; // buffer underrun … … 1372 1372 1373 1373 if(!(*it)->putFrames(m_period, transmit_timestamp)) { 1374 debugWarning("could not putFrames(%u,%l lu) to stream processor (%p)\n",1374 debugWarning("could not putFrames(%u,%lu) to stream processor (%p)\n", 1375 1375 m_period, transmit_timestamp, *it); 1376 1376 retval &= false; // buffer underrun … … 1413 1413 if(m_SyncSource == NULL) return false; 1414 1414 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 1415 "transferSilence(%d) at TS=%011l lu (%03us %04uc %04ut)...\n",1415 "transferSilence(%d) at TS=%011lu (%03us %04uc %04ut)...\n", 1416 1416 t, m_time_of_transfer, 1417 1417 (unsigned int)TICKS_TO_SECS(m_time_of_transfer), … … 1427 1427 ++it ) { 1428 1428 if(!(*it)->dropFrames(m_period, m_time_of_transfer)) { 1429 debugWarning("could not dropFrames(%u, %11l lu) from stream processor (%p)\n",1429 debugWarning("could not dropFrames(%u, %11lu) from stream processor (%p)\n", 1430 1430 m_period, m_time_of_transfer,*it); 1431 1431 retval &= false; // buffer underrun … … 1450 1450 1451 1451 if(!(*it)->putSilenceFrames(m_period, transmit_timestamp)) { 1452 debugWarning("could not putSilenceFrames(%u,%l lu) to stream processor (%p)\n",1452 debugWarning("could not putSilenceFrames(%u,%lu) to stream processor (%p)\n", 1453 1453 m_period, transmit_timestamp, *it); 1454 1454 retval &= false; // buffer underrun … … 1623 1623 #ifdef DEBUG 1624 1624 if(idx >= (int)m_CapturePorts_shadow.size()) { 1625 debugError("Capture port %d out of range (% d)\n", idx, m_CapturePorts_shadow.size());1625 debugError("Capture port %d out of range (%lu)\n", idx, m_CapturePorts_shadow.size()); 1626 1626 return NULL; 1627 1627 } … … 1631 1631 #ifdef DEBUG 1632 1632 if(idx >= (int)m_PlaybackPorts_shadow.size()) { 1633 debugError("Playback port %d out of range (% d)\n", idx, m_PlaybackPorts_shadow.size());1633 debugError("Playback port %d out of range (%lu)\n", idx, m_PlaybackPorts_shadow.size()); 1634 1634 return NULL; 1635 1635 } branches/libffado-2.0/src/libutil/Configuration.cpp
r1566 r1721 182 182 int32_t i = s; 183 183 debugOutput(DEBUG_LEVEL_NORMAL, 184 " %s%s = % ld (0x%08lX)\n",184 " %s%s = %d (0x%08X)\n", 185 185 prefix.c_str(), s.getName(), i, i); 186 186 } … … 190 190 int64_t i = s; 191 191 debugOutput(DEBUG_LEVEL_NORMAL, 192 " %s%s = %l ld (0x%016llX)\n",192 " %s%s = %ld (0x%016lX)\n", 193 193 prefix.c_str(), s.getName(), i, i); 194 194 } … … 259 259 if(t == Setting::TypeInt64) { 260 260 ref = *s; 261 debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value % d\n", path.c_str(), ref);261 debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value %ld\n", path.c_str(), ref); 262 262 return true; 263 263 } else { branches/libffado-2.0/src/libutil/PosixThread.cpp
r1432 r1721 142 142 if ((res = pthread_create(&fThread, &attributes, ThreadHandler, this))) { 143 143 debugError("Cannot create realtime thread (%d: %s)\n", res, strerror(res)); 144 debugError(" priority: %d %s\n", fPriority);144 debugError(" priority: %d\n", fPriority); 145 145 return -1; 146 146 } … … 162 162 { 163 163 if (fThread) { // If thread has been started 164 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Kill %p (thread: %p)\n", m_id.c_str(), this, fThread);164 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Kill %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); 165 165 void* status; 166 166 pthread_cancel(fThread); 167 167 pthread_join(fThread, &status); 168 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Killed %p (thread: %p)\n", m_id.c_str(), this, fThread);168 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Killed %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); 169 169 return 0; 170 170 } else { … … 176 176 { 177 177 if (fThread) { // If thread has been started 178 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stop %p (thread: %p)\n", m_id.c_str(), this, fThread);178 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stop %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); 179 179 void* status; 180 180 fRunning = false; // Request for the thread to stop 181 181 pthread_join(fThread, &status); 182 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stopped %p (thread: %p)\n", m_id.c_str(), this, fThread);182 debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stopped %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); 183 183 return 0; 184 184 } else { branches/libffado-2.0/src/libutil/serialize_expat.cpp
r1154 r1721 117 117 Xml::Node& n = pNode->add( Xml::Node(tokens[tokens.size() - 1].c_str(), NULL) ); 118 118 char* valstr; 119 asprintf( &valstr, "%l ld", value );119 asprintf( &valstr, "%ld", value ); 120 120 n.set_child_text( valstr ); 121 121 free( valstr ); branches/libffado-2.0/src/libutil/serialize_libxml.cpp
r1566 r1721 89 89 90 90 { 91 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "write %s = % d\n",91 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "write %s = %lld\n", 92 92 strMemberName.c_str(), value ); 93 93 … … 266 266 value = strtoll( pElement->get_child_text()->get_content().c_str(), 267 267 &tail, 0 ); 268 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "found %s = % d\n",268 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "found %s = %lld\n", 269 269 strMemberName.c_str(), value ); 270 270 return true; branches/libffado-2.0/src/libutil/StreamStatistics.cpp
r864 r1721 55 55 void StreamStatistics::dumpInfo() { 56 56 debugOutputShort( DEBUG_LEVEL_VERBOSE, 57 "--- Stats for %s: min=% ld avg=%f max=%ld cnt=%ld sum=%ld\n",57 "--- Stats for %s: min=%d avg=%f max=%ld cnt=%ld sum=%ld\n", 58 58 m_name.c_str(), m_min, m_average, m_max, m_count, m_sum); 59 59 debugOutputShort( DEBUG_LEVEL_VERBOSE, " Signal stats\n"); branches/libffado-2.0/src/libutil/SystemTimeSource.cpp
r1165 r1721 55 55 ts.tv_nsec = (wake_at_usec % (1000000LL)) * 1000LL; 56 56 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 57 "clock_nanosleep until %l ld sec, %lld nanosec\n",57 "clock_nanosleep until %ld sec, %lld nanosec\n", 58 58 (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); 59 59 int err = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL); branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp
r1536 r1721 505 505 if (written < write_size) 506 506 { 507 debugWarning("ringbuffer full, %u, % u\n", write_size, written);507 debugWarning("ringbuffer full, %u, %lu\n", write_size, written); 508 508 return false; 509 509 } … … 534 534 if (written < write_size) 535 535 { 536 debugWarning("ringbuffer full, request: %u, actual: % u\n", write_size, written);536 debugWarning("ringbuffer full, request: %u, actual: %lu\n", write_size, written); 537 537 return false; 538 538 } … … 645 645 646 646 if(vec[0].len + vec[1].len < m_process_block_size) { // this indicates a full event buffer 647 debugError("Event buffer overrun in buffer %p, fill: % u, bytes2write: %u \n",647 debugError("Event buffer overrun in buffer %p, fill: %lu, bytes2write: %u \n", 648 648 this, ffado_ringbuffer_read_space(m_event_buffer), bytes2write); 649 649 debugShowBackLog(); branches/libffado-2.0/support/firmware/fireworks-downloader.cpp
r1454 r1721 213 213 214 214 if (node_id < 0) { 215 printMessage("Could not find device with GUID 0x%016l lX\n", guid);215 printMessage("Could not find device with GUID 0x%016lX\n", guid); 216 216 return -1; 217 217 } branches/libffado-2.0/tests/streaming/teststreaming3.cpp
r1566 r1721 264 264 } 265 265 266 debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = % d\n", arguments.verbose);266 debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); 267 267 setDebugLevel(arguments.verbose); 268 268 branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp
r1146 r1721 232 232 } 233 233 234 debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = % d\n", arguments.verbose);234 debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); 235 235 setDebugLevel(arguments.verbose); 236 236 … … 243 243 } 244 244 245 debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port % d...\n", arguments.port);245 debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %ld...\n", arguments.port); 246 246 do 247 247 { … … 270 270 raw1394_set_bus_reset_handler(handle, myResetHandler); 271 271 272 debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (% d)...\n", arguments.rtprio);272 debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%ld)...\n", arguments.rtprio); 273 273 set_realtime_priority(arguments.rtprio); 274 274 branches/libffado-2.0/tests/test-ffado.cpp
r1461 r1721 511 511 uint64_t result_rcv = sytRecvToFullTicks(syt_timestamp, rcv_cycle, ctr_now); 512 512 uint64_t result_xmt = sytXmitToFullTicks(syt_timestamp, rcv_cycle, ctr_now); 513 printf("RCV: 0x%010l lX %010llu XMT: 0x%010llX %010llu CTR: %010llu\n",513 printf("RCV: 0x%010lX %010lu XMT: 0x%010lX %010lu CTR: %010lu\n", 514 514 result_rcv, result_rcv, result_xmt, result_xmt, CYCLE_TIMER_TO_TICKS(ctr_now)); 515 515