Changeset 795

Show
Ignore:
Timestamp:
01/01/08 09:27:10 (13 years ago)
Author:
ppalmers
Message:

small bugfixes + debug print changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/ffado.cpp

    r791 r795  
    233233    periods++; 
    234234    if(periods>periods_print) { 
    235         debugOutputShort(DEBUG_LEVEL_VERBOSE, "\nffado_streaming_wait\n"); 
    236         debugOutputShort(DEBUG_LEVEL_VERBOSE, "============================================\n"); 
    237         debugOutputShort(DEBUG_LEVEL_VERBOSE, "Xruns: %d\n", xruns); 
    238         debugOutputShort(DEBUG_LEVEL_VERBOSE, "============================================\n"); 
     235        debugOutputShort(DEBUG_LEVEL_NORMAL, "\nffado_streaming_wait\n"); 
     236        debugOutputShort(DEBUG_LEVEL_NORMAL, "============================================\n"); 
     237        debugOutputShort(DEBUG_LEVEL_NORMAL, "Xruns: %d\n", xruns); 
     238        debugOutputShort(DEBUG_LEVEL_NORMAL, "============================================\n"); 
    239239        dev->m_deviceManager->showStreamingInfo(); 
    240         debugOutputShort(DEBUG_LEVEL_VERBOSE, "\n"); 
     240        debugOutputShort(DEBUG_LEVEL_NORMAL, "\n"); 
    241241        periods_print+=100; 
    242242    } 
  • trunk/libffado/src/libieee1394/IsoHandlerManager.h

    r776 r795  
    3434#include <vector> 
    3535 
    36 #define THREAD_PER_ISOHANDLER 
     36//#define THREAD_PER_ISOHANDLER 
    3737 
    3838#define FFADO_MAX_ISO_HANDLERS_PER_PORT 16 
  • trunk/libffado/src/libstreaming/generic/StreamProcessor.cpp

    r791 r795  
    16101610StreamProcessor::dumpInfo() 
    16111611{ 
    1612     debugOutputShort( DEBUG_LEVEL_NORMAL, " StreamProcessor %p information\n", this); 
     1612    debugOutputShort( DEBUG_LEVEL_NORMAL, " StreamProcessor %p:\n", this); 
    16131613    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Port, Channel  : %d, %d\n", m_1394service.getPort(), m_channel); 
    1614     debugOutputShort( DEBUG_LEVEL_NORMAL, "  StreamProcessor info:\n"); 
    16151614    uint64_t now = m_1394service.getCycleTimerTicks(); 
    16161615    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Now                   : %011llu (%03us %04uc %04ut)\n", 
     
    16191618                        (unsigned int)TICKS_TO_CYCLES(now), 
    16201619                        (unsigned int)TICKS_TO_OFFSET(now)); 
    1621     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Xruns                 : %s\n", (m_in_xrun ? "True":"False")); 
    1622     debugOutputShort( DEBUG_LEVEL_NORMAL, "  State                 : %s\n", ePSToString(m_state)); 
    1623     debugOutputShort( DEBUG_LEVEL_NORMAL, "   Next state           : %s\n", ePSToString(m_next_state)); 
    1624     debugOutputShort( DEBUG_LEVEL_NORMAL, "    transition at       : %u\n", m_cycle_to_switch_state); 
     1620    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Xrun?                 : %s\n", (m_in_xrun ? "True":"False")); 
     1621    if (m_state == m_next_state) { 
     1622        debugOutputShort( DEBUG_LEVEL_NORMAL, "  State                 : %s\n",  
     1623                                            ePSToString(m_state)); 
     1624    } else { 
     1625        debugOutputShort( DEBUG_LEVEL_NORMAL, "  State                 : %s (Next: %s)\n",  
     1626                                              ePSToString(m_state), ePSToString(m_next_state)); 
     1627        debugOutputShort( DEBUG_LEVEL_NORMAL, "    transition at       : %u\n", m_cycle_to_switch_state); 
     1628    } 
    16251629    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Buffer                : %p\n", m_data_buffer); 
    1626     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Nominal framerate     : %u\n", m_StreamProcessorManager.getNominalRate()); 
    1627     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Device framerate      : Sync: %f, Buffer %f\n", 
    1628         24576000.0/m_StreamProcessorManager.getSyncSource().m_data_buffer->getRate(), 
    1629         24576000.0/m_data_buffer->getRate() 
    1630         ); 
    1631  
     1630    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Framerate             : Nominal: %u, Sync: %f, Buffer %f\n", 
     1631                                          m_StreamProcessorManager.getNominalRate(), 
     1632                                          24576000.0/m_StreamProcessorManager.getSyncSource().m_data_buffer->getRate(), 
     1633                                          24576000.0/m_data_buffer->getRate()); 
     1634    float d = getSyncDelay(); 
     1635    debugOutputShort(DEBUG_LEVEL_NORMAL, "  Sync delay             : %f ticks (%f frames, %f cy)\n", 
     1636                                         d, d/getTicksPerFrame(), 
     1637                                         d/((float)TICKS_PER_CYCLE)); 
    16321638    m_data_buffer->dumpInfo(); 
    16331639} 
  • trunk/libffado/src/libstreaming/StreamProcessorManager.cpp

    r791 r795  
    742742            ready = ((*it)->canClientTransferFrames(m_period)); 
    743743            ready_for_transfer &= ready; 
    744             if (!ready) (*it)->flush(); 
    745744            xrun_occurred |= (*it)->xrunOccurred(); 
    746745        } 
     
    749748            ++it ) { 
    750749            ready = ((*it)->canClientTransferFrames(m_period)); 
    751             ready_for_transfer &= ready; 
    752             if (!ready) (*it)->flush(); 
     750            //ready_for_transfer &= ready; 
    753751            xrun_occurred |= (*it)->xrunOccurred(); 
    754752        } 
  • trunk/libffado/src/libutil/TimestampedBuffer.cpp

    r790 r795  
    12391239#endif 
    12401240 
    1241     debugOutputShort( DEBUG_LEVEL_NORMAL, "  TimestampedBuffer (%p) info:\n",this); 
    1242     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Frame counter         : %d\n", m_framecounter); 
    1243     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Events in buffer      : %d\n", getBufferFill()); 
    1244     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Buffer head timestamp : "TIMESTAMP_FORMAT_SPEC"\n",ts_head); 
    1245     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Buffer tail timestamp : "TIMESTAMP_FORMAT_SPEC"\n",m_buffer_tail_timestamp); 
    1246     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Next tail timestamp   : "TIMESTAMP_FORMAT_SPEC"\n",m_buffer_next_tail_timestamp); 
    1247     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Head - Tail           : "TIMESTAMP_FORMAT_SPEC"\n",diff); 
    1248     debugOutputShort( DEBUG_LEVEL_NORMAL, "  rate                  : %f (%f)\n",m_dll_e2,m_dll_e2/m_update_period); 
     1241    debugOutputShort( DEBUG_LEVEL_NORMAL, "  TimestampedBuffer (%p): %04d frames, %04d events\n", 
     1242                                          this, m_framecounter, getBufferFill()); 
     1243    debugOutputShort( DEBUG_LEVEL_NORMAL, "   Timestamps           : head: "TIMESTAMP_FORMAT_SPEC", Tail: "TIMESTAMP_FORMAT_SPEC", Next tail: "TIMESTAMP_FORMAT_SPEC"\n", 
     1244                                          ts_head, m_buffer_tail_timestamp, m_buffer_next_tail_timestamp); 
     1245    debugOutputShort( DEBUG_LEVEL_NORMAL, "    Head - Tail         : "TIMESTAMP_FORMAT_SPEC"\n", diff); 
     1246    debugOutputShort( DEBUG_LEVEL_NORMAL, "   DLL Rate             : %f (%f)\n", m_dll_e2, m_dll_e2/m_update_period); 
    12491247} 
    12501248 
  • trunk/libffado/tests/test-ffado.cpp

    r742 r795  
    6868struct arguments 
    6969{ 
    70     short silent; 
    71     short verbose; 
    72     int  port; 
    73     int  node_id; 
    74     int  node_id_set; 
     70    short    silent; 
     71    long int verbose; 
     72    long int port; 
     73    long int node_id; 
     74    long int node_id_set; 
    7575    char* args[2]; 
    7676}; 
     
    185185    arguments.args[1]     = ""; 
    186186 
    187     setDebugLevel(arguments.verbose); 
    188  
    189187    // Parse our arguments; every option seen by `parse_opt' will 
    190188    // be reflected in `arguments'. 
     
    195193 
    196194    printf("verbose level = %d\n", arguments.verbose); 
     195    setDebugLevel(arguments.verbose); 
    197196 
    198197    printf( "Using ffado library version: %s\n\n", ffado_get_version() );