Changeset 1722

Show
Ignore:
Timestamp:
11/22/09 09:05:16 (13 years ago)
Author:
ppalmers
Message:

fix format warnings for extreme debugging

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/bebob/bebob_avdevice.cpp

    r1720 r1722  
    724724 
    725725    char* configId; 
    726     asprintf(&configId, "%016lx", getConfigurationId() ); 
     726    asprintf(&configId, "%016"PRIx64"", getConfigurationId() ); 
    727727    if ( !configId ) { 
    728728        debugError( "could not create id string\n" ); 
     
    800800    // come up with an unique file name for the current settings 
    801801    char* configId; 
    802     asprintf(&configId, "%016lx", BeBoB::AvDevice::getConfigurationId() ); 
     802    asprintf(&configId, "%016"PRIx64"", BeBoB::AvDevice::getConfigurationId() ); 
    803803    if ( !configId ) { 
    804804        debugError( "Could not create id string\n" ); 
  • branches/libffado-2.0/src/bebob/bebob_avplug.cpp

    r1720 r1722  
    583583        { 
    584584            debugError( "number of output plugs (%d) disagree with " 
    585                         "number of elements in plug address vector (%lu)\n", 
     585                        "number of elements in plug address vector (%zd)\n", 
    586586                        infoType->m_plugOutput->m_nrOfOutputPlugs, 
    587587                        infoType->m_plugOutput->m_outputPlugAddresses.size()); 
  • branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp

    r1720 r1722  
    154154    bytes_read = fread( &m_bcd_version, 1, sizeof( fb_quadlet_t ), m_file ); 
    155155    if ( bytes_read != sizeof( fb_quadlet_t ) ) { 
    156         debugError( "parse: %lu bytes read at position %d failed\n", 
     156        debugError( "parse: %zd bytes read at position %d failed\n", 
    157157                    sizeof( fb_quadlet_t ), 
    158158                    BCDFileVersionOffset ); 
     
    245245    size_t bytes_read = std::fread( q, 1, sizeof( *q ), m_file ); 
    246246    if ( bytes_read  != sizeof( *q ) ) { 
    247         debugError( "read: %lu byte read failed at position 0x%08x\n", 
     247        debugError( "read: %zd byte read failed at position 0x%08x\n", 
    248248                    sizeof( *q ),  addr ); 
    249249        return false; 
     
    263263    size_t bytes_read = std::fread( o, 1, sizeof( *o ), m_file ); 
    264264    if ( bytes_read  != sizeof( *o ) ) { 
    265         debugError( "read: %lu byte read failed at position 0x%08x\n", 
     265        debugError( "read: %zd byte read failed at position 0x%08x\n", 
    266266                    sizeof( *o ), addr ); 
    267267        return false; 
     
    281281    size_t bytes_read = std::fread( b, 1, len, m_file ); 
    282282    if ( bytes_read  != len ) { 
    283         debugError( "read: %lu byte read failed at position 0x%08x\n", 
     283        debugError( "read: %zd byte read failed at position 0x%08x\n", 
    284284                    len, addr ); 
    285285        return false; 
  • branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp

    r1720 r1722  
    6969    if(m_cmd_time_interval && (m_earliest_next_cmd_time > now)) { 
    7070        ffado_microsecs_t wait = m_earliest_next_cmd_time - now; 
    71         debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %lu\n", wait ); 
     71        debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %"PRIu64"\n", wait ); 
    7272        Util::SystemTimeSource::SleepUsecRelative(wait); 
    7373    } 
     
    9494    if(m_cmd_time_interval && (m_earliest_next_cmd_time > now)) { 
    9595        ffado_microsecs_t wait = m_earliest_next_cmd_time - now; 
    96         debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %lu\n", wait ); 
     96        debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %"PRIu64"\n", wait ); 
    9797        Util::SystemTimeSource::SleepUsecRelative(wait); 
    9898    } 
     
    169169 
    170170    if(!get1394Service().write_quadlet( nodeId, addr, CondSwapToBus32(data) ) ) { 
    171         debugError("Could not write to node 0x%04X addr 0x%012lX\n", nodeId, addr); 
     171        debugError("Could not write to node 0x%04X addr 0x%012"PRIX64"\n", nodeId, addr); 
    172172        return false; 
    173173    } 
     
    185185 
    186186    if(!get1394Service().read_quadlet( nodeId, addr, &result ) ) { 
    187         debugError("Could not read from node 0x%04X addr 0x%012lX\n", nodeId, addr); 
     187        debugError("Could not read from node 0x%04X addr 0x%012"PRIX64"\n", nodeId, addr); 
    188188        return false; 
    189189    } 
     
    385385RegisterControl::setValue(uint64_t addr, uint64_t v) 
    386386{ 
    387     debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for addr %lu to %lu\n", 
     387    debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for addr %"PRIu64" to %"PRIu64"\n", 
    388388                                     addr, v); 
    389389 
     
    403403        return 0; 
    404404    } else { 
    405         debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %lu = %u\n",  
     405        debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %"PRIu64" = %u\n",  
    406406                                         addr, val); 
    407407        return val; 
  • branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp

    r1720 r1722  
    4848    if(config.getValueForDeviceSetting(getConfigRom().getNodeVendorId(), getConfigRom().getModelId(), "cmd_interval_time", delaytime)) { 
    4949        m_cmd_time_interval = delaytime; 
    50         debugOutput( DEBUG_LEVEL_VERBOSE, "Setting command interval time to %lu\n", 
     50        debugOutput( DEBUG_LEVEL_VERBOSE, "Setting command interval time to %"PRIu64"\n", 
    5151                     m_cmd_time_interval ); 
    5252    } else { 
    5353        m_cmd_time_interval = 10000; 
    54         debugOutput( DEBUG_LEVEL_VERBOSE, "No command interval time setting found, defaulting to %lu\n", 
     54        debugOutput( DEBUG_LEVEL_VERBOSE, "No command interval time setting found, defaulting to %"PRIu64"\n", 
    5555                     m_cmd_time_interval ); 
    5656    } 
  • branches/libffado-2.0/src/debugmodule/debugmodule.cpp

    r1721 r1722  
    186186    int chars_written=0; 
    187187    int retval=0; 
    188     retval = snprintf(msg, MB_BUFFERSIZE, "%011lu: %s (%s)[%4u] %s: ",  
     188    retval = snprintf(msg, MB_BUFFERSIZE, "%011"PRIu64": %s (%s)[%4u] %s: ",  
    189189                      ts_usec, getPreSequence( level ), 
    190190                      fname,  line,  function ); 
  • branches/libffado-2.0/src/DeviceStringParser.cpp

    r1720 r1722  
    203203        case eGUID: 
    204204            retval = m_guid && (m_guid == x.m_guid); 
    205             debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "eGUID 0x%016lX == 0x%016lX? %d\n", 
     205            debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "eGUID 0x%016"PRIX64" == 0x%016"PRIX64"? %d\n", 
    206206                        m_guid, x.m_guid, retval); 
    207207            return retval; 
     
    225225        case eGUID: 
    226226            debugOutput(DEBUG_LEVEL_INFO, "type: eGUID\n"); 
    227             debugOutput(DEBUG_LEVEL_INFO, " GUID: %016lX\n", m_guid); 
     227            debugOutput(DEBUG_LEVEL_INFO, " GUID: %016"PRIX64"\n", m_guid); 
    228228            break; 
    229229        case eInvalid: 
  • branches/libffado-2.0/src/fbtypes.h

    r1292 r1722  
    2525#define FBTYPES_H 
    2626 
     27#define __STDC_FORMAT_MACROS 
     28#include <inttypes.h> 
     29 
    2730#include <libraw1394/raw1394.h> 
    2831 
     
    3538typedef nodeaddr_t  fb_nodeaddr_t; 
    3639 
     40#define FORMAT_FB_OCTLET_T      "0x%016" PRIX64 
     41#define FORMAT_FB_NODEID_T      "0x%016" PRIX64 
     42#define FORMAT_FB_NODEADDR_T    "0x%016" PRIX64 
     43 
    3744class DeviceManager; 
    3845 
  • branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp

    r1720 r1722  
    127127    debugOutput(DEBUG_LEVEL_NORMAL, "EFC HW CAPS info:\n"); 
    128128    debugOutput(DEBUG_LEVEL_NORMAL, " Flags   : 0x%08X\n", m_flags); 
    129     debugOutput(DEBUG_LEVEL_NORMAL, " GUID    : %016lX\n", m_guid); 
     129    debugOutput(DEBUG_LEVEL_NORMAL, " GUID    : %016"PRIX64"\n", m_guid); 
    130130    debugOutput(DEBUG_LEVEL_NORMAL, " HwType  : 0x%08X\n", m_type); 
    131131    debugOutput(DEBUG_LEVEL_NORMAL, " Version : %u\n", m_version); 
  • branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp

    r1720 r1722  
    255255 
    256256    if (len != h.size_quads*4) { 
    257         debugWarning("size not correct: got %lu, should be %d according to data\n", len, h.size_quads*4); 
     257        debugWarning("size not correct: got %zd, should be %d according to data\n", len, h.size_quads*4); 
    258258    } 
    259259 
  • branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp

    r1721 r1722  
    255255         
    256256        debugOutput(DEBUG_LEVEL_VERBOSE, 
    257                     " copying %u bytes to internal buffer offset %lu\n",  
     257                    " copying %u bytes to internal buffer offset %zd\n",  
    258258                    readDescCmd.m_data_length, bytes_read); 
    259259         
  • branches/libffado-2.0/src/libavc/general/avc_plug.cpp

    r1566 r1722  
    13441344            return string("Output"); 
    13451345        default: 
    1346         case eAPT_Unknown: 
    13471346            return string("Unknown"); 
    13481347    } 
  • branches/libffado-2.0/src/libcontrol/Element.cpp

    r1720 r1722  
    302302{ 
    303303    Util::MutexLockHelper lock(getLock()); 
    304     debugOutput( DEBUG_LEVEL_NORMAL, "Container %s (%lu Elements)\n", 
     304    debugOutput( DEBUG_LEVEL_NORMAL, "Container %s (%zd Elements)\n", 
    305305        getName().c_str(), m_Children.size()); 
    306306 
  • branches/libffado-2.0/src/libieee1394/configrom.cpp

    r1720 r1722  
    484484{ 
    485485    debugOutput( DEBUG_LEVEL_VERBOSE,  
    486                  "Checking for updated node id for device with GUID 0x%016lX...\n", 
     486                 "Checking for updated node id for device with GUID 0x%016"PRIX64"...\n", 
    487487                 getGuid()); 
    488488 
     
    515515 
    516516        debugOutput( DEBUG_LEVEL_VERBOSE, 
    517                         " Node has GUID 0x%016lX\n", 
     517                        " Node has GUID 0x%016"PRIX64"\n", 
    518518                        guid); 
    519519 
     
    522522            if ( nodeId != getNodeId() ) { 
    523523                debugOutput( DEBUG_LEVEL_VERBOSE, 
    524                              "Device with GUID 0x%016lX changed node id " 
     524                             "Device with GUID 0x%016"PRIX64" changed node id " 
    525525                             "from %d to %d\n", 
    526526                             getGuid(), 
     
    530530            } else { 
    531531                debugOutput( DEBUG_LEVEL_VERBOSE, 
    532                              "Device with GUID 0x%016lX kept node id %d\n", 
     532                             "Device with GUID 0x%016"PRIX64" kept node id %d\n", 
    533533                             getGuid(), 
    534534                             getNodeId()); 
     
    547547 
    548548    debugOutput( DEBUG_LEVEL_VERBOSE, 
    549                  "Device with GUID 0x%016lX could not be found on " 
     549                 "Device with GUID 0x%016"PRIX64" could not be found on " 
    550550                 "the bus anymore (removed?)\n", 
    551551                 getGuid() ); 
     
    560560    debugOutput(DEBUG_LEVEL_NORMAL, "Config ROM\n" ); 
    561561    debugOutput(DEBUG_LEVEL_NORMAL, "\tCurrent Node Id:\t%d\n",       getNodeId() ); 
    562     debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016lX\n",       getGuid()); 
     562    debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016"PRIX64"\n",       getGuid()); 
    563563    debugOutput(DEBUG_LEVEL_NORMAL, "\tVendor Name:\t\t%s\n",         getVendorName().c_str() ); 
    564564    debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Name:\t\t%s\n",          getModelName().c_str() ); 
     
    581581    printMessage("Config ROM\n" ); 
    582582    printMessage("\tCurrent Node Id:\t%d\n",       getNodeId() ); 
    583     printMessage("\tGUID:\t\t\t0x%016lX\n",       getGuid()); 
     583    printMessage("\tGUID:\t\t\t0x%016"PRIX64"\n",       getGuid()); 
    584584    printMessage("\tVendor Name:\t\t%s\n",         getVendorName().c_str() ); 
    585585    printMessage("\tModel Name:\t\t%s\n",          getModelName().c_str() ); 
  • branches/libffado-2.0/src/libieee1394/cycletimer.h

    r1720 r1722  
    9595#ifdef DEBUG 
    9696        if (x >= TICKS_PER_SECOND * 128L) { 
    97             debugWarning("insufficient wrapping: %lu\n",x); 
     97            debugWarning("insufficient wrapping: %"PRIu64"\n",x); 
    9898        } 
    9999#endif 
     
    118118#ifdef DEBUG 
    119119        if (x < 0) { 
    120             debugWarning("insufficient wrapping: %ld\n",x); 
     120            debugWarning("insufficient wrapping: %"PRId64"\n",x); 
    121121        } 
    122122#endif 
     
    145145#ifdef DEBUG 
    146146        if (x >= (int64_t)(TICKS_PER_SECOND * 128L)) { 
    147             debugWarning("insufficient wrapping (max): %lu\n",x); 
     147            debugWarning("insufficient wrapping (max): %"PRIu64"\n",x); 
    148148        } 
    149149        if (x < 0) { 
    150             debugWarning("insufficient wrapping (min): %ld\n",x); 
     150            debugWarning("insufficient wrapping (min): %"PRId64"\n",x); 
    151151        } 
    152152#endif 
     
    249249    if(diff > max || diff < -max) { 
    250250        debugWarning("difference does not make any sense\n"); 
    251         debugWarning("diff=%ld max=%ld\n", diff, max); 
     251        debugWarning("diff=%"PRId64" max=%"PRId64"\n", diff, max); 
    252252         
    253253    } 
     
    302302    uint64_t timestamp; 
    303303 
    304     debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%04llX CY=%u CTR=%08llX\n", 
     304    debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%"PRIX64" CY=%u CTR=%08"PRIX64"\n", 
    305305                       syt_timestamp, rcv_cycle, ctr_now); 
    306306 
     
    313313    int diff_cycles = diffCycles(cc_cycles, rcv_cycle); 
    314314    if (diff_cycles<0) { 
    315         debugWarning("current cycle timer not ahead of receive cycle: rcv: %u / cc: %lu (%d)\n", 
     315        debugWarning("current cycle timer not ahead of receive cycle: rcv: %u / cc: %"PRIu64" (%d)\n", 
    316316                        rcv_cycle, cc_cycles, diff_cycles); 
    317317    } 
     
    351351    } else { 
    352352        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    353                            "Detected wraparound: %d + %d = %d\n", 
     353                           "Detected wraparound: %u + %"PRId64" = %"PRId64"\n", 
    354354                           rcv_cycle, delta_cycles, new_cycles); 
    355355 
     
    372372        if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { 
    373373            debugWarning("back-converted timestamp not equal to SYT\n"); 
    374             debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", 
     374            debugWarning("TS=%011"PRIu64" TSC=%08"PRIX64" SYT=%04"PRIX64"\n", 
    375375                  timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); 
    376376        } 
     
    391391    uint64_t timestamp; 
    392392 
    393     debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%04llX RCV_CTR=%08X\n", 
     393    debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%04"PRIX64" RCV_CTR=%08X\n", 
    394394                       syt_timestamp, rcv_ctr); 
    395395 
     
    433433        if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { 
    434434            debugWarning("back-converted timestamp not equal to SYT\n"); 
    435             debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", 
     435            debugWarning("TS=%011"PRIu64" TSC=%08"PRIX64" SYT=%04"PRIX64"\n", 
    436436                  timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); 
    437437        } 
     
    457457    uint64_t timestamp; 
    458458 
    459     debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%08llX CY=%04X CTR=%08llX\n", 
     459    debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%08"PRIX64" CY=%04X CTR=%08"PRIX64"\n", 
    460460                       syt_timestamp, xmt_cycle, ctr_now); 
    461461 
     
    467467    int diff_cycles = diffCycles(xmt_cycle, cc_cycles); 
    468468    if (diff_cycles<0) { 
    469         debugWarning("xmit cycle not ahead of current cycle: xmt: %u / cc: %lu (%d)\n", 
     469        debugWarning("xmit cycle not ahead of current cycle: xmt: %u / cc: %"PRIu64" (%d)\n", 
    470470                        xmt_cycle, cc_cycles, diff_cycles); 
    471471    } 
     
    505505    } else { 
    506506        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    507                            "Detected wraparound: %d + %d = %d\n", 
     507                           "Detected wraparound: %u + %"PRId64" = %"PRId64"\n", 
    508508                           xmt_cycle, delta_cycles, new_cycles); 
    509509 
     
    526526        if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { 
    527527            debugWarning("back-converted timestamp not equal to SYT\n"); 
    528             debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", 
     528            debugWarning("TS=%011"PRIu64" TSC=%08"PRIX64" SYT=%04"PRIX64"\n", 
    529529                  timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); 
    530530        } 
  • branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp

    r1721 r1722  
    164164                        m_cycle_timer_prev, maxtries2); 
    165165        } 
    166         debugOutput( DEBUG_LEVEL_VERBOSE, " read : CTR: %11u, local: %17lu\n", 
     166        debugOutput( DEBUG_LEVEL_VERBOSE, " read : CTR: %11u, local: %17"PRIu64"\n", 
    167167                            m_cycle_timer_prev, local_time); 
    168168        debugOutput(DEBUG_LEVEL_VERBOSE, 
    169                            "  ctr   : 0x%08X %11lu (%03us %04ucy %04uticks)\n", 
     169                           "  ctr   : 0x%08X %11"PRIu64" (%03us %04ucy %04uticks)\n", 
    170170                           (uint32_t)m_cycle_timer_prev, (uint64_t)CYCLE_TIMER_TO_TICKS(m_cycle_timer_prev), 
    171171                           (unsigned int)CYCLE_TIMER_GET_SECS( m_cycle_timer_prev ), 
     
    291291    cycle_timer_ticks = CYCLE_TIMER_TO_TICKS(cycle_timer); 
    292292 
    293     debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11u, local: %17lu\n", 
     293    debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11u, local: %17"PRIu64"\n", 
    294294                        cycle_timer, local_time); 
    295295    debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    296                        "  ctr   : 0x%08X %11lu (%03us %04ucy %04uticks)\n", 
     296                       "  ctr   : 0x%08X %11"PRIu64" (%03us %04ucy %04uticks)\n", 
    297297                       (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, 
    298298                       (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), 
     
    351351        ffado_microsecs_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs(); 
    352352        int sleep_time = m_sleep_until - now; 
    353         debugOutput( DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) Sleep until %ld/%f (now: %ld, diff=%d) ...\n", 
     353        debugOutput( DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) Sleep until %"PRId64"/%f (now: %"PRId64", diff=%d) ...\n", 
    354354                    this, m_sleep_until, m_next_time_usecs, now, sleep_time); 
    355355        #endif 
     
    390390        if(not_good) { 
    391391            debugOutput(DEBUG_LEVEL_VERBOSE,  
    392                         "(%p) have to retry CTR read, diff unrealistic: diff: %ld, max: +/- %u (try: %d) %ld\n",  
     392                        "(%p) have to retry CTR read, diff unrealistic: diff: %"PRId64", max: +/- %u (try: %d) %"PRId64"\n",  
    393393                        this, err_ticks, 1*TICKS_PER_CYCLE, ntries, expected_ticks); 
    394394            // sleep half a cycle to make sure the hardware moved on 
     
    419419    } 
    420420 
    421     debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11u, local: %17lu\n", 
     421    debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11u, local: %17"PRIu64"\n", 
    422422                        cycle_timer, local_time); 
    423423    debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 
    424                        "  ctr   : 0x%08X %11lu (%03us %04ucy %04uticks)\n", 
     424                       "  ctr   : 0x%08X %11"PRIu64" (%03us %04ucy %04uticks)\n", 
    425425                       (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, 
    426426                       (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), 
     
    436436    } else if (diff_ticks > m_ticks_per_update * 20) { 
    437437        debugOutput(DEBUG_LEVEL_VERBOSE, 
    438                     "re-init dll due to too large tick diff: %ld >> %f\n", 
     438                    "re-init dll due to too large tick diff: %"PRId64" >> %f\n", 
    439439                    diff_ticks, (float)(m_ticks_per_update * 20)); 
    440440        if(!initDLL()) { 
     
    462462            diff_ticks_corr = diff_ticks - ticks_late; 
    463463            debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 
    464                                "diff_ticks_corr=%d, diff_ticks = %ld, ticks_late = %ld\n", 
     464                               "diff_ticks_corr=%"PRId64", diff_ticks = %"PRId64", ticks_late = %"PRId64"\n", 
    465465                               diff_ticks_corr, diff_ticks, ticks_late); 
    466466        } else { 
     
    473473        // makes no sense if not running realtime 
    474474        if(m_realtime && usecs_late > 1000) { 
    475             debugOutput(DEBUG_LEVEL_VERBOSE, "Rather late wakeup: %ld usecs\n", usecs_late); 
     475            debugOutput(DEBUG_LEVEL_VERBOSE, "Rather late wakeup: %"PRId64" usecs\n", usecs_late); 
    476476        } 
    477477        #endif 
     
    526526 
    527527        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE,  
    528                            " usecs: current: %f next: %f usecs_late=%d ticks_late=%ld\n", 
     528                           " usecs: current: %f next: %f usecs_late=%"PRId64" ticks_late=%"PRId64"\n", 
    529529                           m_current_time_usecs, m_next_time_usecs, usecs_late, ticks_late); 
    530530        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    531                            " ticks: current: %f next: %f diff=%d\n", 
     531                           " ticks: current: %f next: %f diff=%"PRId64"\n", 
    532532                           m_current_time_ticks, m_next_time_ticks, diff_ticks); 
    533533        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    534                            " ticks: current: %011lu (%03us %04ucy %04uticks)\n", 
     534                           " ticks: current: %011"PRIu64" (%03us %04ucy %04uticks)\n", 
    535535                           (uint64_t)m_current_time_ticks, 
    536536                           (unsigned int)TICKS_TO_SECS( (uint64_t)m_current_time_ticks ), 
     
    538538                           (unsigned int)TICKS_TO_OFFSET( (uint64_t)m_current_time_ticks ) ); 
    539539        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    540                            " ticks: next   : %011lu (%03us %04ucy %04uticks)\n", 
     540                           " ticks: next   : %011"PRIu64" (%03us %04ucy %04uticks)\n", 
    541541                           (uint64_t)m_next_time_ticks, 
    542542                           (unsigned int)TICKS_TO_SECS( (uint64_t)m_next_time_ticks ), 
     
    545545 
    546546        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    547                            " state: local: %11lu, dll_e2: %f, rate: %f\n", 
     547                           " state: local: %11"PRIu64", dll_e2: %f, rate: %f\n", 
    548548                           local_time, m_dll_e2, getRate()); 
    549549    } 
     
    589589    } 
    590590    int32_t ctr_diff = cycle_timer_ticks-dll_time; 
    591     debugOutput(DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) CTR DIFF: HW %010lu - DLL %010u = %010d (%s)\n",  
     591    debugOutput(DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) CTR DIFF: HW %010"PRIu64" - DLL %010u = %010d (%s)\n",  
    592592                this, cycle_timer_ticks, dll_time, ctr_diff, (ctr_diff>0?"lag":"lead")); 
    593593#endif 
     
    792792        if (diffTicks(cycle_timer_ticks, m_cycle_timer_ticks_prev) < 0) { 
    793793            debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 
    794                         "non-monotonic CTR (try %02d): %lu -> %lu\n", 
     794                        "non-monotonic CTR (try %02d): %"PRIu64" -> %"PRIu64"\n", 
    795795                        maxtries, m_cycle_timer_ticks_prev, cycle_timer_ticks); 
    796796            debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 
     
    798798                        m_cycle_timer_prev, *cycle_timer); 
    799799            debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 
    800                         " current: %011lu (%03us %04ucy %04uticks)\n", 
     800                        " current: %011"PRIu64" (%03us %04ucy %04uticks)\n", 
    801801                        cycle_timer_ticks, 
    802802                        (unsigned int)TICKS_TO_SECS( cycle_timer_ticks ), 
     
    804804                        (unsigned int)TICKS_TO_OFFSET( cycle_timer_ticks ) ); 
    805805            debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 
    806                         " prev   : %011lu (%03us %04ucy %04uticks)\n", 
     806                        " prev   : %011"PRIu64" (%03us %04ucy %04uticks)\n", 
    807807                        m_cycle_timer_ticks_prev, 
    808808                        (unsigned int)TICKS_TO_SECS( m_cycle_timer_ticks_prev ), 
  • branches/libffado-2.0/src/libieee1394/ieee1394service.cpp

    r1721 r1722  
    509509        #ifdef DEBUG 
    510510        debugOutput(DEBUG_LEVEL_VERY_VERBOSE, 
    511             "read: node 0x%hX, addr = 0x%016lX, length = %lu\n", 
     511            "read: node 0x%hX, addr = 0x%016"PRIX64", length = %zd\n", 
    512512            nodeId, addr, length); 
    513513        printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, buffer ); 
     
    518518        #ifdef DEBUG 
    519519        debugOutput(DEBUG_LEVEL_NORMAL, 
    520                     "raw1394_read failed: node 0x%hX, addr = 0x%016lX, length = %lu\n", 
     520                    "raw1394_read failed: node 0x%hX, addr = 0x%016"PRIX64", length = %zd\n", 
    521521                    nodeId, addr, length); 
    522522        #endif 
     
    564564 
    565565    #ifdef DEBUG 
    566     debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016lX, length = %lu\n", 
     566    debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016"PRIX64", length = %zd\n", 
    567567                nodeId, addr, length); 
    568568    printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, data ); 
     
    601601    } 
    602602    #ifdef DEBUG 
    603     debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016lX\n", 
     603    debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016"PRIX64"\n", 
    604604                nodeId, addr); 
    605     debugOutput(DEBUG_LEVEL_VERBOSE,"  if (*(addr)==0x%016lX) *(addr)=0x%016lX\n", 
     605    debugOutput(DEBUG_LEVEL_VERBOSE,"  if (*(addr)==0x%016"PRIX64") *(addr)=0x%016"PRIX64"\n", 
    606606                compare_value, swap_value); 
    607607    fb_octlet_t buffer; 
     
    609609        debugWarning("Could not read register\n"); 
    610610    } else { 
    611         debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016lX\n", buffer); 
     611        debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016"PRIX64"\n", buffer); 
    612612    } 
    613613    #endif 
     
    633633        debugWarning("Could not read register\n"); 
    634634    } else { 
    635         debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016lX\n", buffer); 
     635        debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016"PRIX64"\n", buffer); 
    636636    } 
    637637    #endif 
     
    827827    fb_quadlet_t *data_quads = (fb_quadlet_t *)data; 
    828828    #ifdef DEBUG 
    829     debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = %lu bytes\n", 
     829    debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = %zd bytes\n", 
    830830                nodeid, response, length); 
    831831    printBuffer(DEBUG_LEVEL_VERY_VERBOSE, (length+3)/4, data_quads ); 
     
    13811381    debugOutput( DEBUG_LEVEL_VERBOSE, " CycleTimerHelper: %p, IsoManager: %p, WatchDog: %p\n", 
    13821382                 m_pCTRHelper, m_pIsoManager, m_pWatchdog ); 
    1383     debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011lu (%03us %04ucy %04uticks)\n", 
     1383    debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011"PRIu64" (%03us %04ucy %04uticks)\n", 
    13841384                ctr, 
    13851385                (unsigned int)TICKS_TO_SECS( ctr ), 
  • branches/libffado-2.0/src/libieee1394/IsoHandler.cpp

    r1721 r1722  
    397397    if((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) { 
    398398        debugWarning("reconstructed CTR counter discrepancy\n"); 
    399         debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", 
    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         debugWarning(" diffcy = %ld \n", diff_cycles); 
     399        debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %"PRId64"\n", 
     400                     cycle, pkt_ctr_ref, pkt_ctr,  
     401                     now, m_last_now, now_secs_ref,  
     402                     (long int)CYCLE_TIMER_GET_SECS(now), 
     403                     (long int)CYCLE_TIMER_GET_SECS(m_last_now), 
     404                     tmp); 
     405        debugWarning(" diffcy = %"PRId64" \n", diff_cycles); 
    402406    } 
    403407    #endif 
     
    490494        if(((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) && (m_packets > m_buf_packets)) { 
    491495            debugWarning("reconstructed CTR counter discrepancy\n"); 
    492             debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", 
    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             debugWarning(" diffcy = %ld \n", diff_cycles); 
     496            debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %"PRId64"\n", 
     497                        cycle, pkt_ctr_ref, pkt_ctr, 
     498                         now, m_last_now, now_secs_ref,  
     499                         (long int)CYCLE_TIMER_GET_SECS(now), 
     500                         (long int)CYCLE_TIMER_GET_SECS(m_last_now),  
     501                         tmp); 
     502            debugWarning(" diffcy = %"PRId64" \n", diff_cycles); 
    495503        } 
    496504        #endif 
  • branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp

    r1721 r1722  
    331331 
    332332        debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 
    333                            "(%p, %s) check handler %d: diff = %ld, max = %lld, now: %08lX, last: %08lX\n", 
     333                           "(%p, %s) check handler %d: diff = %"PRId64", max = %"PRId64", now: %08X, last: %08X\n", 
    334334                           this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"),  
    335335                           i, measured_diff_ticks, max_diff_ticks, ctr_at_poll_return, last_packet_seen); 
    336336        if(measured_diff_ticks > max_diff_ticks) { 
    337             debugFatal("(%p, %s) Handler died: now: %08X, last: %08X, diff: %ld (max: %ld)\n", 
     337            debugFatal("(%p, %s) Handler died: now: %08X, last: %08X, diff: %"PRId64" (max: %"PRId64")\n", 
    338338                       this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"), 
    339339                       ctr_at_poll_return, last_packet_seen, measured_diff_ticks, max_diff_ticks); 
     
    416416            debugError("(%p) sem_timedwait error (result=%d errno=EINVAL)\n",  
    417417                        this, result); 
    418             debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n",  
    419                        this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 
     418            debugError("(%p) timeout_nsec=%lld ts.sec=%"PRId64" ts.nsec=%"PRId64"\n",  
     419                       this, m_activity_wait_timeout_nsec,  
     420                       (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); 
    420421            return eAR_Error; 
    421422        } else { 
    422423            debugError("(%p) sem_timedwait error (result=%d errno=%d)\n",  
    423424                        this, result, errno); 
    424             debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n",  
    425                        this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 
     425            debugError("(%p) timeout_nsec=%lld ts.sec=%"PRId64" ts.nsec=%"PRId64"\n",  
     426                       this, m_activity_wait_timeout_nsec, 
     427                       (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); 
    426428            return eAR_Error; 
    427429        } 
     
    888890 
    889891    m_StreamProcessors.push_back(stream); 
    890     debugOutput( DEBUG_LEVEL_VERBOSE, " %lu streams, %lu handlers registered\n", 
     892    debugOutput( DEBUG_LEVEL_VERBOSE, " %zd streams, %zd handlers registered\n", 
    891893                                      m_StreamProcessors.size(), m_IsoHandlers.size()); 
    892894    return true; 
  • branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp

    r1721 r1722  
    148148    if(isRunning()) { 
    149149        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    150                            "STMP: %luticks | syt_interval=%d, tpf=%f\n", 
     150                           "STMP: %"PRIu64"ticks | syt_interval=%d, tpf=%f\n", 
    151151                           m_last_timestamp, m_syt_interval, getTicksPerFrame()); 
    152152/*        debugOutput(DEBUG_LEVEL_NORMAL, 
    153                            "STMP: %12lu ticks | delta_t: %5ld | bufferfill: %5d\n", 
     153                           "STMP: %12"PRIu64" ticks | delta_t: %5"PRId64" | bufferfill: %5d\n", 
    154154                           m_last_timestamp, now_t-last_t, m_data_buffer->getBufferFill());*/ 
    155155    } 
  • branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp

    r1721 r1722  
    9595 
    9696    debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, 
    97                         "Try for cycle %d\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr) ); 
     97                        "Try for cycle %d\n", (int) CYCLE_TIMER_GET_CYCLES(pkt_ctr) ); 
    9898    // check whether the packet buffer has packets for us to send. 
    9999    // the base timestamp is the one of the next sample in the buffer 
     
    141141        { 
    142142            debugOutput( DEBUG_LEVEL_NORMAL, 
    143                          "Insufficient frames (P): N=%02d, CY=%04lu, TC=%04u, CUT=%04d\n", 
    144                          fc, CYCLE_TIMER_GET_CYCLES(pkt_ctr),  
     143                         "Insufficient frames (P): N=%02d, CY=%04d, TC=%04u, CUT=%04d\n", 
     144                         fc, (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr),  
    145145                         transmit_at_cycle, cycles_until_transmit ); 
    146146            // we are too late 
     
    153153 
    154154            debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 
    155                                "Insufficient frames (NP): N=%02d, CY=%04u, TC=%04u, CUT=%04d, NOW=%04d\n", 
    156                                fc, CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     155                               "Insufficient frames (NP): N=%02d, CY=%04d, TC=%04u, CUT=%04d, NOW=%04d\n", 
     156                               fc, (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
    157157                               transmit_at_cycle, cycles_until_transmit, now_cycle ); 
    158158            #endif 
     
    200200            // we are too late 
    201201            debugOutput(DEBUG_LEVEL_VERBOSE, 
    202                         "Too late: CY=%04lu, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", 
    203                         CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     202                        "Too late: CY=%04d, TC=%04u, CUT=%04d, TSP=%011"PRIu64" (%04u)\n", 
     203                        (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
    204204                        transmit_at_cycle, cycles_until_transmit, 
    205205                        presentation_time, (unsigned int)TICKS_TO_CYCLES(presentation_time) ); 
     
    229229            // for timestamp tracing 
    230230            debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    231                                "XMIT PKT: TSP= %011lu (%04u) (%04u) (%04u)\n", 
     231                               "XMIT PKT: TSP= %011"PRIu64" (%04u) (%04u) (%04u)\n", 
    232232                               presentation_time, 
    233233                               (unsigned int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     
    239239        { 
    240240            debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    241                                "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", 
    242                                CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     241                               "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRId64" (%04u)\n", 
     242                               (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
    243243                               transmit_at_cycle, cycles_until_transmit, 
    244244                               transmit_at_time, (unsigned int)TICKS_TO_CYCLES(transmit_at_time), 
     
    248248            { 
    249249                debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    250                                    "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", 
    251                                    CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     250                                   "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRId64"(%04u)\n", 
     251                                   (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
    252252                                   transmit_at_cycle, cycles_until_transmit, 
    253253                                   transmit_at_time, (unsigned int)TICKS_TO_CYCLES(transmit_at_time), 
     
    269269    { 
    270270        debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 
    271                            "XMIT DATA: TSP= %011lu (%04u)\n", 
     271                           "XMIT DATA: TSP= %011"PRIu64" (%04u)\n", 
    272272                           m_last_timestamp, 
    273273                           (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); 
     
    301301    struct iec61883_packet *packet = ( struct iec61883_packet * ) data; 
    302302    debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 
    303                        "XMIT SILENT (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", 
    304                        CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, 
     303                       "XMIT SILENT (cy %04d): TSP=%011"PRIu64" (%04u)\n", 
     304                       (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, 
    305305                       (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); 
    306306 
     
    338338    struct iec61883_packet *packet = ( struct iec61883_packet * ) data; 
    339339    debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 
    340                        "XMIT EMPTY (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", 
    341                        CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, 
     340                       "XMIT EMPTY (cy %04d): TSP=%011"PRIu64" (%04u)\n", 
     341                       (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, 
    342342                       (unsigned int)TICKS_TO_CYCLES(m_last_timestamp) ); 
    343343    packet->sid = m_local_node_id; 
  • branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp

    r1721 r1722  
    378378        if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { 
    379379            int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); 
    380             debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); 
     380            debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %"PRId64"\n", tsp_diff); 
    381381            double tsp_diff_d = tsp_diff; 
    382382            double fs_syt = 1.0/tsp_diff_d; 
     
    399399                if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { 
    400400                    debugOutput(DEBUG_LEVEL_VERBOSE, 
    401                                 "cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 
    402                                 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
     401                                "cy %04d rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", 
     402                                (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    403403                                m_last_timestamp, diff, ticks_per_packet); 
    404404                    // !!!HACK!!! FIXME: this is the result of a failure in wrapping/unwrapping somewhere 
     
    410410                    diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 
    411411                    if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 
    412                         debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 
    413                                     CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
     412                        debugWarning("cy %04d rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", 
     413                                    (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    414414                                    m_last_timestamp, diff, ticks_per_packet); 
    415415                        debugWarning("HACK: fixed by adding one second of ticks. This is a bug being run-time fixed.\n"); 
     
    420420                        diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); 
    421421                        if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { 
    422                             debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 
    423                                         CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
     422                            debugWarning("cy %04d rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", 
     423                                        (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    424424                                        m_last_timestamp, diff, ticks_per_packet); 
    425425                            debugWarning("HACK: fixed by subtracing one second of ticks. This is a bug being run-time fixed.\n"); 
     
    429429                } 
    430430                debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    431                                 "%04u %011lu %011lu %d %d\n", 
    432                                 CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     431                                "%04u %011"PRIu64" %011"PRIu64" %d %d\n", 
     432                                (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
    433433                                m_last_timestamp2, m_last_timestamp,  
    434434                                diff, ticks_per_packet); 
     
    437437 
    438438        debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    439                           "RECV: CY=%04u TS=%011lu\n", 
    440                           CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
     439                          "RECV: CY=%04u TS=%011"PRIu64"\n", 
     440                          (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
    441441                          m_last_timestamp); 
    442442 
     
    606606        if (result == eCRV_Packet) { 
    607607            debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    608                                "XMIT SILENT: CY=%04u TS=%011lu\n", 
    609                                CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); 
     608                               "XMIT SILENT: CY=%04u TS=%011"PRIu64"\n", 
     609                               (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); 
    610610 
    611611            // assumed not to xrun 
     
    657657        if (result == eCRV_Packet || result == eCRV_Defer) { 
    658658            debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 
    659                                "XMIT: CY=%04u TS=%011lu\n", 
    660                                CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); 
     659                               "XMIT: CY=%04u TS=%011"PRIu64"\n", 
     660                               (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); 
    661661 
    662662            // valid packet timestamp 
     
    694694            if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { 
    695695                int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); 
    696                 debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); 
     696                debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %"PRId64"\n", tsp_diff); 
    697697                double tsp_diff_d = tsp_diff; 
    698698                double fs_syt = 1.0/tsp_diff_d; 
     
    703703                debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)\n", 
    704704                           fs_nom, fs_syt, fs_diff, fs_diff_norm); 
    705 //                 debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011lu, m_last_timestamp2: %011lu\n", 
     705//                 debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011"PRIu64", m_last_timestamp2: %011"PRIu64"\n", 
    706706//                            fs_diff, m_last_timestamp, m_last_timestamp2); 
    707707                if (fs_diff_norm > 0.01 || fs_diff_norm < -0.01) { 
     
    716716                if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { 
    717717                    debugOutput(DEBUG_LEVEL_VERBOSE, 
    718                                 "cy %04ld, rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 
    719                                 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
     718                                "cy %04d, rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", 
     719                                (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    720720                                m_last_timestamp, diff, ticks_per_packet); 
    721721                } 
    722722                debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    723                                 "%04ld %011lu %011lu %d %d\n", 
    724                                 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
     723                                "%04d %011"PRIu64" %011"PRIu64" %d %d\n", 
     724                                (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, 
    725725                                m_last_timestamp, diff, ticks_per_packet); 
    726726            } 
     
    757757            goto send_empty_packet; 
    758758        } else if (result == eCRV_Again) { 
    759             debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle %ld\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr)); 
     759            debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle %d\n", (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr)); 
    760760            if(m_state != m_next_state) { 
    761761                debugOutput(DEBUG_LEVEL_VERBOSE, "Should update state from %s to %s\n", 
     
    792792    debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 
    793793                       "XMIT EMPTY: CY=%04u\n", 
    794                        CYCLE_TIMER_GET_CYCLES(pkt_ctr)); 
     794                       (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr)); 
    795795 
    796796    generateEmptyPacketHeader(data, length, tag, sy, pkt_ctr); 
     
    809809    bool result; 
    810810    debugOutputExtreme( DEBUG_LEVEL_VERBOSE, 
    811                         "(%p, %s) getFrames(%d, %11lu)\n", 
     811                        "(%p, %s) getFrames(%d, %11"PRIu64")\n", 
    812812                        this, getTypeString(), nbframes, ts); 
    813813    assert( getType() == ePT_Receive ); 
     
    840840    lag_frames = (((float)lag_ticks) / srate); 
    841841    debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    842                        "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", 
     842                       "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %"PRId64", %"PRIu64", %d\n", 
    843843                       this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); 
    844844    if (lag_frames >= 1.0) { 
    845845        // the stream lags 
    846         debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags  with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", 
     846        debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags  with %6d ticks = %10.5f frames (rate=%10.5f), %"PRId64", %"PRIu64", %d\n", 
    847847                      this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); 
    848848    } else if (lag_frames <= -1.0) { 
    849849        // the stream leads 
    850         debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", 
     850        debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %"PRId64", %"PRIu64", %d\n", 
    851851                      this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); 
    852852    } 
     
    862862{ 
    863863    debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, 
    864                        "stream (%p): dry run %d frames (@ ts=%ld)\n", 
     864                       "stream (%p): dry run %d frames (@ ts=%"PRId64")\n", 
    865865                       this, nbframes, ts); 
    866866    // dry run on this side means that we put silence in all enabled ports 
     
    873873{ 
    874874    bool result; 
    875     debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %ld)\n", nbframes, ts); 
     875    debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %"PRId64")\n", nbframes, ts); 
    876876    result = m_data_buffer->dropFrames(nbframes); 
    877877    SIGNAL_ACTIVITY_ISO_RECV; 
     
    883883    bool result; 
    884884    debugOutputExtreme( DEBUG_LEVEL_VERBOSE, 
    885                         "(%p, %s) putFrames(%d, %11lu)\n", 
     885                        "(%p, %s) putFrames(%d, %11"PRIu64")\n", 
    886886                        this, getTypeString(), nbframes, ts); 
    887887    assert( getType() == ePT_Transmit ); 
     
    896896{ 
    897897    debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 
    898                        "StreamProcessor::putFramesWet(%d, %lu)\n", 
     898                       "StreamProcessor::putFramesWet(%d, %"PRIu64")\n", 
    899899                       nbframes, ts); 
    900900    // transfer the data 
    901901    m_data_buffer->blockProcessWriteFrames(nbframes, ts); 
    902902    debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 
    903                        " New timestamp: %lu\n", ts); 
     903                       " New timestamp: %"PRIu64"\n", ts); 
    904904    return true; // FIXME: what about failure? 
    905905} 
     
    909909{ 
    910910    debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, 
    911                        "StreamProcessor::putFramesDry(%d, %lu)\n", 
     911                       "StreamProcessor::putFramesDry(%d, %"PRIu64")\n", 
    912912                       nbframes, ts); 
    913913    // do nothing 
     
    919919{ 
    920920    debugOutput(DEBUG_LEVEL_VERY_VERBOSE, 
    921                        "StreamProcessor::putSilenceFrames(%d, %lu)\n", 
     921                       "StreamProcessor::putSilenceFrames(%d, %"PRIu64")\n", 
    922922                       nbframes, ts); 
    923923 
     
    10701070    // make the scratch buffer one period of frames long 
    10711071    m_scratch_buffer_size_bytes = m_StreamProcessorManager.getPeriodSize() * getEventsPerFrame() * getEventSize(); 
    1072     debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of %ld quadlets\n", m_scratch_buffer_size_bytes); 
     1072    debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of %zd quadlets\n", m_scratch_buffer_size_bytes); 
    10731073    if(m_scratch_buffer) delete[] m_scratch_buffer; 
    10741074    m_scratch_buffer = new byte_t[m_scratch_buffer_size_bytes]; 
     
    11591159    #ifdef DEBUG 
    11601160    uint64_t now = m_1394service.getCycleTimerTicks(); 
    1161     debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011lu (%03us %04uc %04ut)\n", 
     1161    debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011"PRIu64" (%03us %04uc %04ut)\n", 
    11621162                          now, 
    11631163                          (unsigned int)TICKS_TO_SECS(now), 
    11641164                          (unsigned int)TICKS_TO_CYCLES(now), 
    11651165                          (unsigned int)TICKS_TO_OFFSET(now)); 
    1166     debugOutput(DEBUG_LEVEL_VERBOSE,"  Start at              : %011lu (%03us %04uc %04ut)\n", 
     1166    debugOutput(DEBUG_LEVEL_VERBOSE,"  Start at              : %011"PRIu64" (%03us %04uc %04ut)\n", 
    11671167                          tx, 
    11681168                          (unsigned int)TICKS_TO_SECS(tx), 
     
    12051205    #ifdef DEBUG 
    12061206    uint64_t now = m_1394service.getCycleTimerTicks(); 
    1207     debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011lu (%03us %04uc %04ut)\n", 
     1207    debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011"PRIu64" (%03us %04uc %04ut)\n", 
    12081208                          now, 
    12091209                          (unsigned int)TICKS_TO_SECS(now), 
    12101210                          (unsigned int)TICKS_TO_CYCLES(now), 
    12111211                          (unsigned int)TICKS_TO_OFFSET(now)); 
    1212     debugOutput(DEBUG_LEVEL_VERBOSE,"  Start at              : %011lu (%03us %04uc %04ut)\n", 
     1212    debugOutput(DEBUG_LEVEL_VERBOSE,"  Start at              : %011"PRIu64" (%03us %04uc %04ut)\n", 
    12131213                          tx, 
    12141214                          (unsigned int)TICKS_TO_SECS(tx), 
     
    12291229    #ifdef DEBUG 
    12301230    uint64_t now = m_1394service.getCycleTimerTicks(); 
    1231     debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011lu (%03us %04uc %04ut)\n", 
     1231    debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011"PRIu64" (%03us %04uc %04ut)\n", 
    12321232                          now, 
    12331233                          (unsigned int)TICKS_TO_SECS(now), 
    12341234                          (unsigned int)TICKS_TO_CYCLES(now), 
    12351235                          (unsigned int)TICKS_TO_OFFSET(now)); 
    1236     debugOutput(DEBUG_LEVEL_VERBOSE,"  Stop at              : %011lu (%03us %04uc %04ut)\n", 
     1236    debugOutput(DEBUG_LEVEL_VERBOSE,"  Stop at              : %011"PRIu64" (%03us %04uc %04ut)\n", 
    12371237                          tx, 
    12381238                          (unsigned int)TICKS_TO_SECS(tx), 
     
    12541254    #ifdef DEBUG 
    12551255    uint64_t now = m_1394service.getCycleTimerTicks(); 
    1256     debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011lu (%03us %04uc %04ut)\n", 
     1256    debugOutput(DEBUG_LEVEL_VERBOSE,"  Now                   : %011"PRIu64" (%03us %04uc %04ut)\n", 
    12571257                          now, 
    12581258                          (unsigned int)TICKS_TO_SECS(now), 
    12591259                          (unsigned int)TICKS_TO_CYCLES(now), 
    12601260                          (unsigned int)TICKS_TO_OFFSET(now)); 
    1261     debugOutput(DEBUG_LEVEL_VERBOSE,"  Stop at              : %011lu (%03us %04uc %04ut)\n", 
     1261    debugOutput(DEBUG_LEVEL_VERBOSE,"  Stop at              : %011"PRIu64" (%03us %04uc %04ut)\n", 
    12621262                          tx, 
    12631263                          (unsigned int)TICKS_TO_SECS(tx), 
     
    19011901    } 
    19021902    uint64_t now = m_1394service.getCycleTimerTicks(); 
    1903     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Now                   : %011lu (%03us %04uc %04ut)\n", 
     1903    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Now                   : %011"PRIu64" (%03us %04uc %04ut)\n", 
    19041904                        now, 
    19051905                        (unsigned int)TICKS_TO_SECS(now), 
  • branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp

    r1721 r1722  
    182182    #ifdef DEBUG 
    183183    if(isRunning()) { 
    184         debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %luticks | tpf=%f\n", 
     184        debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %"PRIu64"ticks | tpf=%f\n", 
    185185            m_last_timestamp, getTicksPerFrame()); 
    186186    } 
  • branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp

    r1721 r1722  
    197197            // we are too late 
    198198            debugOutput(DEBUG_LEVEL_VERBOSE, 
    199                         "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", 
     199                        "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011"PRIu64" (%04u)\n", 
    200200                        cycle, 
    201201                        transmit_at_cycle, cycles_until_transmit, 
     
    232232        { 
    233233            debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, 
    234                         "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", 
     234                        "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRIu64" (%04u)\n", 
    235235                        cycle, 
    236236                        transmit_at_cycle, cycles_until_transmit, 
     
    241241            { 
    242242                debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, 
    243                             "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", 
     243                            "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRIu64" (%04u)\n", 
    244244                            cycle, 
    245245                            transmit_at_cycle, cycles_until_transmit, 
     
    289289    uint32_t pkt_ctr ) 
    290290{ 
    291     debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04lu, TSP=%011lu (%04u)\n", 
    292                 CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp,  
     291    debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04d, TSP=%011"PRIu64" (%04u)\n", 
     292                (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp,  
    293293                ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); 
    294294 
     
    318318    unsigned int cycle = CYCLE_TIMER_GET_CYCLES(pkt_ctr); 
    319319 
    320     debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011lu (%04u)\n", 
     320    debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011"PRIu64" (%04u)\n", 
    321321                 cycle, m_last_timestamp, 
    322322                 ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); 
  • branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp

    r1721 r1722  
    192192            debugError("(%p) sem_[timed]wait error (result=%d errno=EINVAL)\n",  
    193193                        this, result); 
    194             debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n",  
    195                        this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 
     194            debugError("(%p) timeout_nsec=%"PRId64" ts.sec=%"PRId64" ts.nsec=%"PRId64"\n",  
     195                       this, m_activity_wait_timeout_nsec, 
     196                       (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); 
    196197            return eAR_Error; 
    197198        } else { 
    198199            debugError("(%p) sem_[timed]wait error (result=%d errno=%d)\n",  
    199200                        this, result, errno); 
    200             debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n",  
    201                        this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); 
     201            debugError("(%p) timeout_nsec=%"PRId64" ts.sec=%"PRId64" ts.nsec=%"PRId64"\n",  
     202                       this, m_activity_wait_timeout_nsec,  
     203                       (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); 
    202204            return eAR_Error; 
    203205        } 
     
    540542        #ifdef DEBUG 
    541543        int64_t now = Util::SystemTimeSource::getCurrentTime(); 
    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        debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR  pred: %"PRId64", syncdelay: %"PRId64", diff: %"PRId64"\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); 
     545        debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT  pred: %"PRId64", now: %"PRId64", wait: %"PRId64"\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); 
    544546        #endif 
    545547     
     
    549551        #ifdef DEBUG 
    550552        now = Util::SystemTimeSource::getCurrentTime(); 
    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 ); 
     553        debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %"PRId64", now: %"PRId64", excess: %"PRId64"\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); 
    552554        #endif 
    553555    } 
     
    570572    // figure out where we are now 
    571573    uint64_t time_of_first_sample = m_SyncSource->getTimeAtPeriod(); 
    572     debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011lu (%03us %04uc %04ut)...\n",  
     574    debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011"PRIu64" (%03us %04uc %04ut)...\n",  
    573575        time_of_first_sample, 
    574576        (unsigned int)TICKS_TO_SECS(time_of_first_sample), 
     
    587589    time_of_first_sample = addTicks(time_of_first_sample, 
    588590                                    time_for_startup_ticks); 
    589     debugOutput( DEBUG_LEVEL_VERBOSE, "  add %d frames (%011lu ticks)...\n",  
     591    debugOutput( DEBUG_LEVEL_VERBOSE, "  add %d frames (%011"PRIu64" ticks)...\n",  
    590592        time_for_startup_frames, time_for_startup_ticks); 
    591593 
    592     debugOutput( DEBUG_LEVEL_VERBOSE, "  => first sample at TS=%011lu (%03us %04uc %04ut)...\n",  
     594    debugOutput( DEBUG_LEVEL_VERBOSE, "  => first sample at TS=%011"PRIu64" (%03us %04uc %04ut)...\n",  
    593595        time_of_first_sample, 
    594596        (unsigned int)TICKS_TO_SECS(time_of_first_sample), 
     
    603605    uint64_t time_to_start_recv = substractTicks(time_of_first_sample, 
    604606                                                 prestart_cycles_for_recv * TICKS_PER_CYCLE); 
    605     debugOutput( DEBUG_LEVEL_VERBOSE, "  => xmit starts at  TS=%011lu (%03us %04uc %04ut)...\n",  
     607    debugOutput( DEBUG_LEVEL_VERBOSE, "  => xmit starts at  TS=%011"PRIu64" (%03us %04uc %04ut)...\n",  
    606608        time_to_start_xmit, 
    607609        (unsigned int)TICKS_TO_SECS(time_to_start_xmit), 
    608610        (unsigned int)TICKS_TO_CYCLES(time_to_start_xmit), 
    609611        (unsigned int)TICKS_TO_OFFSET(time_to_start_xmit)); 
    610     debugOutput( DEBUG_LEVEL_VERBOSE, "  => recv starts at  TS=%011lu (%03us %04uc %04ut)...\n",  
     612    debugOutput( DEBUG_LEVEL_VERBOSE, "  => recv starts at  TS=%011"PRIu64" (%03us %04uc %04ut)...\n",  
    611613        time_to_start_recv, 
    612614        (unsigned int)TICKS_TO_SECS(time_to_start_recv), 
     
    660662        signed int fc; 
    661663        (*it)->getBufferHeadTimestamp ( &ts, &fc ); 
    662         debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010ld => head TS %010lu, fc=%d...\n", 
     664        debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010"PRId64" => head TS %010"PRIu64", fc=%d...\n", 
    663665                    time_of_first_sample, (uint64_t)ts, fc); 
    664666    } 
     
    690692    } 
    691693    if(!m_SyncSource->scheduleStartRunning(time_to_start_sync)) { 
    692         debugError("m_SyncSource->scheduleStartRunning(%11lu) failed\n", time_to_start_sync); 
     694        debugError("m_SyncSource->scheduleStartRunning(%11"PRIu64") failed\n", time_to_start_sync); 
    693695        return false; 
    694696    } 
     
    700702        if(*it != m_SyncSource) { 
    701703            if(!(*it)->scheduleStartRunning(time_to_start_recv)) { 
    702                 debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_recv); 
     704                debugError("%p->scheduleStartRunning(%11"PRIu64") failed\n", *it, time_to_start_recv); 
    703705                return false; 
    704706            } 
     
    710712        if(*it != m_SyncSource) { 
    711713            if(!(*it)->scheduleStartRunning(time_to_start_xmit)) { 
    712                 debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_xmit); 
     714                debugError("%p->scheduleStartRunning(%11"PRIu64") failed\n", *it, time_to_start_xmit); 
    713715                return false; 
    714716            } 
     
    743745    #endif 
    744746 
    745     debugOutput( DEBUG_LEVEL_VERBOSE, "  initial time of transfer %010ld, rate %f...\n", 
     747    debugOutput( DEBUG_LEVEL_VERBOSE, "  initial time of transfer %010"PRId64", rate %f...\n", 
    746748                m_time_of_transfer, rate); 
    747749 
     
    762764 
    763765    int64_t transmit_tail_timestamp = addTicks(m_time_of_transfer, delay_in_ticks); 
    764     debugOutput( DEBUG_LEVEL_VERBOSE, "  preset transmit tail TS %010ld, rate %f...\n", 
     766    debugOutput( DEBUG_LEVEL_VERBOSE, "  preset transmit tail TS %010"PRId64", rate %f...\n", 
    765767                transmit_tail_timestamp, rate); 
    766768 
     
    773775        signed int fc; 
    774776        (*it)->getBufferHeadTimestamp ( &ts, &fc ); 
    775         debugOutput( DEBUG_LEVEL_VERBOSE, "   => transmit head TS %010ld, fc=%d...\n", 
     777        debugOutput( DEBUG_LEVEL_VERBOSE, "   => transmit head TS %010"PRId64", fc=%d...\n", 
    776778                    (uint64_t)ts, fc); 
    777779    } 
     
    830832                StreamProcessor *s = m_ReceiveProcessors.at(i); 
    831833                diff = diffTicks(m_SyncSource->getTimeAtPeriod(), s->getTimeAtPeriod()); 
    832                 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "  offset between SyncSP %p and SP %p is %ld ticks...\n",  
     834                debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "  offset between SyncSP %p and SP %p is %"PRId64" ticks...\n",  
    833835                    m_SyncSource, s, diff); 
    834836                if ( nb_sync_runs == periods_per_align_try ) { 
     
    850852            diff_between_streams[i] /= periods_per_align_try; 
    851853            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 %ld ticks, %d frames...\n",  
     854            debugOutput( DEBUG_LEVEL_VERBOSE, "   avg offset between SyncSP %p and SP %p is %"PRId64" ticks, %d frames...\n",  
    853855                m_SyncSource, s, diff_between_streams[i], diff_between_streams_frames[i]); 
    854856 
     
    11001102    #ifdef DEBUG 
    11011103    int64_t now = Util::SystemTimeSource::getCurrentTime(); 
    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    debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR  pred: %"PRId64", syncdelay: %"PRId64", diff: %"PRId64"\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); 
     1105    debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT  pred: %"PRId64", now: %"PRId64", wait: %"PRId64"\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); 
    11041106    #endif 
    11051107 
     
    11091111    #ifdef DEBUG 
    11101112    now = Util::SystemTimeSource::getCurrentTime(); 
    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 ); 
     1113    debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %"PRId64", now: %"PRId64", excess: %"PRId64"\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); 
    11121114    #endif 
    11131115 
     
    12391241    // so 50 ticks = 10%, which is a rather large jitter value. 
    12401242    if(diff-ticks_per_period > 50 || diff-ticks_per_period < -50) { 
    1241         debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", 
     1243        debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", 
    12421244                                            m_time_of_transfer2, m_time_of_transfer, diff, ticks_per_period); 
    12431245    } 
     
    12461248 
    12471249    debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 
    1248                         "transfer period %d at %lu ticks...\n", 
     1250                        "transfer period %d at %"PRIu64" ticks...\n", 
    12491251                        m_nbperiods, m_time_of_transfer); 
    12501252 
     
    12621264    } 
    12631265    debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE,  
    1264                         "XF at %011lu ticks, RBF=%d, XBF=%d, SUM=%d...\n", 
     1266                        "XF at %011"PRIu64" ticks, RBF=%d, XBF=%d, SUM=%d...\n", 
    12651267                        m_time_of_transfer, rcv_bf, xmt_bf, rcv_bf+xmt_bf); 
    12661268 
     
    13351337    if(m_SyncSource == NULL) return false; 
    13361338    debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, 
    1337         "transfer(%d) at TS=%011lu (%03us %04uc %04ut)...\n",  
     1339        "transfer(%d) at TS=%011"PRIu64" (%03us %04uc %04ut)...\n",  
    13381340        t, m_time_of_transfer, 
    13391341        (unsigned int)TICKS_TO_SECS(m_time_of_transfer), 
     
    13491351                ++it ) { 
    13501352            if(!(*it)->getFrames(m_period, m_time_of_transfer)) { 
    1351                     debugWarning("could not getFrames(%u, %11lu) from stream processor (%p)\n", 
     1353                    debugWarning("could not getFrames(%u, %11"PRIu64") from stream processor (%p)\n", 
    13521354                            m_period, m_time_of_transfer,*it); 
    13531355                retval &= false; // buffer underrun 
     
    13721374 
    13731375            if(!(*it)->putFrames(m_period, transmit_timestamp)) { 
    1374                 debugWarning("could not putFrames(%u,%lu) to stream processor (%p)\n", 
     1376                debugWarning("could not putFrames(%u,%"PRIu64") to stream processor (%p)\n", 
    13751377                        m_period, transmit_timestamp, *it); 
    13761378                retval &= false; // buffer underrun 
     
    14131415    if(m_SyncSource == NULL) return false; 
    14141416    debugOutput( DEBUG_LEVEL_VERY_VERBOSE, 
    1415         "transferSilence(%d) at TS=%011lu (%03us %04uc %04ut)...\n",  
     1417        "transferSilence(%d) at TS=%011"PRIu64" (%03us %04uc %04ut)...\n",  
    14161418        t, m_time_of_transfer, 
    14171419        (unsigned int)TICKS_TO_SECS(m_time_of_transfer), 
     
    14271429                ++it ) { 
    14281430            if(!(*it)->dropFrames(m_period, m_time_of_transfer)) { 
    1429                     debugWarning("could not dropFrames(%u, %11lu) from stream processor (%p)\n", 
     1431                    debugWarning("could not dropFrames(%u, %11"PRIu64") from stream processor (%p)\n", 
    14301432                            m_period, m_time_of_transfer,*it); 
    14311433                retval &= false; // buffer underrun 
     
    14501452 
    14511453            if(!(*it)->putSilenceFrames(m_period, transmit_timestamp)) { 
    1452                 debugWarning("could not putSilenceFrames(%u,%lu) to stream processor (%p)\n", 
     1454                debugWarning("could not putSilenceFrames(%u,%"PRIu64") to stream processor (%p)\n", 
    14531455                        m_period, transmit_timestamp, *it); 
    14541456                retval &= false; // buffer underrun 
     
    16231625        #ifdef DEBUG 
    16241626        if(idx >= (int)m_CapturePorts_shadow.size()) { 
    1625             debugError("Capture port %d out of range (%lu)\n", idx, m_CapturePorts_shadow.size()); 
     1627            debugError("Capture port %d out of range (%zd)\n", idx, m_CapturePorts_shadow.size()); 
    16261628            return NULL; 
    16271629        } 
     
    16311633        #ifdef DEBUG 
    16321634        if(idx >= (int)m_PlaybackPorts_shadow.size()) { 
    1633             debugError("Playback port %d out of range (%lu)\n", idx, m_PlaybackPorts_shadow.size()); 
     1635            debugError("Playback port %d out of range (%zd)\n", idx, m_PlaybackPorts_shadow.size()); 
    16341636            return NULL; 
    16351637        } 
  • branches/libffado-2.0/src/libutil/Configuration.cpp

    r1721 r1722  
    190190            int64_t i = s; 
    191191            debugOutput(DEBUG_LEVEL_NORMAL, 
    192                         "  %s%s = %ld (0x%016lX)\n", 
     192                        "  %s%s = %"PRId64" (0x%016"PRIX64")\n", 
    193193                        prefix.c_str(), s.getName(), i, i); 
    194194        } 
     
    259259        if(t == Setting::TypeInt64) { 
    260260            ref = *s; 
    261             debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value %ld\n", path.c_str(), ref); 
     261            debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value %"PRId64"\n", path.c_str(), ref); 
    262262            return true; 
    263263        } else { 
  • branches/libffado-2.0/src/libutil/serialize_expat.cpp

    r1721 r1722  
    117117            Xml::Node& n = pNode->add( Xml::Node(tokens[tokens.size() - 1].c_str(), NULL) ); 
    118118            char* valstr; 
    119             asprintf( &valstr, "%ld", value ); 
     119            asprintf( &valstr, "%"PRId64"", value ); 
    120120            n.set_child_text( valstr ); 
    121121            free( valstr ); 
  • branches/libffado-2.0/src/libutil/StreamStatistics.cpp

    r1721 r1722  
    5555void StreamStatistics::dumpInfo() { 
    5656    debugOutputShort( DEBUG_LEVEL_VERBOSE,  
    57                       "--- Stats for %s: min=%d avg=%f max=%ld cnt=%ld sum=%ld\n", 
     57                      "--- Stats for %s: min=%d avg=%f max=%"PRId64" cnt=%"PRId64" sum=%"PRId64"\n", 
    5858                      m_name.c_str(), m_min, m_average, m_max, m_count, m_sum); 
    5959    debugOutputShort( DEBUG_LEVEL_VERBOSE, "    Signal stats\n"); 
  • branches/libffado-2.0/src/libutil/SystemTimeSource.cpp

    r1721 r1722  
    5555    ts.tv_nsec = (wake_at_usec % (1000000LL)) * 1000LL; 
    5656    debugOutputExtreme(DEBUG_LEVEL_VERBOSE, 
    57                 "clock_nanosleep until %ld sec, %lld nanosec\n", 
    58                 (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); 
     57                       "clock_nanosleep until %"PRId64" sec, %"PRId64" nanosec\n", 
     58                       (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); 
    5959    int err = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL); 
    6060    if(err) { 
  • branches/libffado-2.0/src/libutil/Time.h

    r864 r1722  
    2525#define __Time__ 
    2626 
     27#define __STDC_FORMAT_MACROS 
    2728#include <inttypes.h> 
    2829 
     
    3435 */ 
    3536typedef uint64_t ffado_microsecs_t; 
     37#define PRI_FFADO_MICROSECS_T PRIu64 
    3638 
    3739static inline void SleepRelativeUsec(ffado_microsecs_t usec) { 
  • branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp

    r1721 r1722  
    505505        if (written < write_size) 
    506506        { 
    507             debugWarning("ringbuffer full, %u, %lu\n", write_size, written); 
     507            debugWarning("ringbuffer full, %u, %zd\n", write_size, written); 
    508508            return false; 
    509509        } 
     
    534534    if (written < write_size) 
    535535    { 
    536         debugWarning("ringbuffer full, request: %u, actual: %lu\n", write_size, written); 
     536        debugWarning("ringbuffer full, request: %u, actual: %zd\n", write_size, written); 
    537537        return false; 
    538538    } 
     
    645645 
    646646        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: %lu, bytes2write: %u \n", 
     647            debugError("Event buffer overrun in buffer %p, fill: %zd, bytes2write: %u \n", 
    648648                       this, ffado_ringbuffer_read_space(m_event_buffer), bytes2write); 
    649649            debugShowBackLog(); 
  • branches/libffado-2.0/support/firmware/fireworks-downloader.cpp

    r1721 r1722  
    2323 */ 
    2424 
     25#include "fbtypes.h" 
    2526#include "downloader.h" 
    2627 
     
    213214 
    214215    if (node_id < 0) { 
    215         printMessage("Could not find device with GUID 0x%016lX\n", guid); 
     216        printMessage("Could not find device with GUID 0x%016"PRIX64"\n", guid); 
    216217        return -1; 
    217218    } 
  • branches/libffado-2.0/tests/streaming/teststreaming3.cpp

    r1721 r1722  
    264264    } 
    265265 
    266     debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); 
     266    debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %d\n", (int)arguments.verbose); 
    267267    setDebugLevel(arguments.verbose); 
    268268 
  • branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp

    r1720 r1722  
    188188    } 
    189189 
    190     debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %ld...\n", arguments.port); 
     190    debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %d...\n", (int) arguments.port); 
    191191    do 
    192192    { 
     
    225225    } 
    226226 
    227     debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%ld)...\n", arguments.rtprio); 
     227    debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%d)...\n", (int)arguments.rtprio); 
    228228    set_realtime_priority(arguments.rtprio); 
    229229 
  • branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp

    r1721 r1722  
    232232    } 
    233233 
    234     debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); 
     234    debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %d\n", (int) arguments.verbose); 
    235235    setDebugLevel(arguments.verbose); 
    236236 
     
    243243    } 
    244244 
    245     debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %ld...\n", arguments.port); 
     245    debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %d...\n", (int)arguments.port); 
    246246    do 
    247247    { 
     
    270270    raw1394_set_bus_reset_handler(handle, myResetHandler); 
    271271 
    272     debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%ld)...\n", arguments.rtprio); 
     272    debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%d)...\n", (int)arguments.rtprio); 
    273273    set_realtime_priority(arguments.rtprio); 
    274274 
  • branches/libffado-2.0/tests/test-ffado.cpp

    r1721 r1722  
    351351 
    352352            int devices_on_bus = m_deviceManager->getNbDevices(); 
    353             printf("  port = %ld, devices_on_bus = %d\n", arguments.port, devices_on_bus); 
     353            printf("  port = %d, devices_on_bus = %d\n", (int)arguments.port, devices_on_bus); 
    354354 
    355355            for(i=0;i<devices_on_bus;i++) { 
     
    443443        service.setVerboseLevel(arguments.verbose); 
    444444        if ( !service.initialize( arguments.port ) ) { 
    445             printf("Could not initialize IEEE 1394 service on port %ld\n", arguments.port); 
     445            printf("Could not initialize IEEE 1394 service on port %d\n", (int)arguments.port); 
    446446            return exitfunction(-1); 
    447447        } 
     
    455455         
    456456        if (!service.setSplitTimeoutUsecs(nodeid, usecs)) { 
    457             printf("Failed to set SPLIT_TIMEOUT to %u for node %X on port %ld\n", 
    458                    usecs, nodeid, arguments.port); 
     457            printf("Failed to set SPLIT_TIMEOUT to %u for node %X on port %d\n", 
     458                   usecs, nodeid, (int)arguments.port); 
    459459            return exitfunction(-1); 
    460460        } 
     
    466466        service.setVerboseLevel(arguments.verbose); 
    467467        if ( !service.initialize( arguments.port ) ) { 
    468             printf("Could not initialize IEEE 1394 service on port %ld\n", arguments.port); 
     468            printf("Could not initialize IEEE 1394 service on port %d\n", (int)arguments.port); 
    469469            return exitfunction(-1); 
    470470        } 
     
    478478        int usecs = service.getSplitTimeoutUsecs(nodeid); 
    479479        if (usecs < 0) { 
    480             printf("Failed to get SPLIT_TIMEOUT for node %X on port %ld\n", 
    481                    nodeid, arguments.port); 
    482             return exitfunction(-1); 
    483         } 
    484         printf("SPLIT_TIMEOUT for node %X on port %ld is %u\n", 
    485                nodeid, arguments.port, usecs); 
     480            printf("Failed to get SPLIT_TIMEOUT for node %X on port %d\n", 
     481                   nodeid, (int)arguments.port); 
     482            return exitfunction(-1); 
     483        } 
     484        printf("SPLIT_TIMEOUT for node %X on port %d is %u\n", 
     485               nodeid, (int)arguments.port, usecs); 
    486486 
    487487        return exitfunction(0); 
     
    511511        uint64_t result_rcv = sytRecvToFullTicks(syt_timestamp, rcv_cycle, ctr_now); 
    512512        uint64_t result_xmt = sytXmitToFullTicks(syt_timestamp, rcv_cycle, ctr_now); 
    513         printf("RCV: 0x%010lX %010lu  XMT: 0x%010lX %010lu CTR: %010lu\n", 
     513        printf("RCV: 0x%010"PRIX64" %010"PRIu64"  XMT: 0x%010"PRIX64" %010"PRIu64" CTR: %010"PRIu64"\n", 
    514514               result_rcv, result_rcv, result_xmt, result_xmt, CYCLE_TIMER_TO_TICKS(ctr_now)); 
    515515