Changeset 1268

Show
Ignore:
Timestamp:
07/01/08 04:08:38 (13 years ago)
Author:
ppalmers
Message:

reset transmit buffer rate DLL since one of the reasons for clearing it is an xrun, which can have the side effect of confusing the dll big time. this can lead to xrun recovery failure due to a bad prediction of the first presentation time.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp

    r1235 r1268  
    194194        { 
    195195            // we are too late 
    196             debugOutput(DEBUG_LEVEL_VERY_VERBOSE, 
     196            debugOutput(DEBUG_LEVEL_VERBOSE, 
    197197                        "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011llu (%04u)\n", 
    198198                        CYCLE_TIMER_GET_CYCLES(pkt_ctr), 
  • branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp

    r1235 r1268  
    289289 * 
    290290 * Resets the TimestampedBuffer, clearing the buffers and counters. 
    291  * (not true yet: Also resets the DLL to the nominal values.) 
     291 * Also resets the DLL to the nominal values. 
    292292 * 
    293293 * \note when this is called, you should make sure that the buffer 
     
    300300    ffado_ringbuffer_reset(m_event_buffer); 
    301301    resetFrameCounter(); 
     302 
     303    m_current_rate = m_nominal_rate; 
     304    m_dll_e2=m_nominal_rate * (float)m_update_period; 
     305    // this will init the internal timestamps to a sensible value 
     306    setBufferTailTimestamp(m_buffer_tail_timestamp); 
     307 
    302308    return true; 
    303309}