Changeset 1866

Show
Ignore:
Timestamp:
07/10/10 06:42:33 (2 years ago)
Author:
jwoithe
Message:

RME: yet more streaming experiments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libstreaming/rme/RmeTransmitStreamProcessor.cpp

    r1865 r1866  
    311311{ 
    312312static signed int cx = 0; 
     313static signed int has_dryrun = 0; 
     314static signed int has_run = 0; 
     315 
    313316    debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04u, TSP=%011llu (%04u)\n", 
    314317                CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp,  
     
    327330    // until data is received, we therefore need to send some data during 
    328331    // the dry running state in order to kick the process into gear. 
    329     if (isDryRunning()) { 
     332    // 
     333    // Non-empty "empty" packets are not desired during the dry-running 
     334    // state encountered during closedown, however, so take steps to ensure 
     335    // they are only sent during the startup sequence.  This logic is 
     336    // presently a quick and dirty hack and will be revisited in due course 
     337    // once a final control method has been established. 
     338    if (has_run==0 && isDryRunning()) { 
    330339//        unsigned int cycle = CYCLE_TIMER_GET_CYCLES(pkt_ctr); 
    331340RmeReceiveStreamProcessor *rxsp = static_cast<Rme::Device *> 
     
    338347        *length = getMaxPacketSize(); 
    339348  cx++; 
     349  has_dryrun = 1; 
    340350} else 
    341351  cx=0; 
    342352debugOutput(DEBUG_LEVEL_VERBOSE, "  txsize=%d\n", *length); 
    343353    } 
     354 
     355if (!isDryRunning() && has_dryrun==1) 
     356  has_run=1; 
    344357 
    345358//    m_tx_dbc += fillNoDataPacketHeader ( (quadlet_t *)data, length );