Changeset 1868

Show
Ignore:
Timestamp:
07/15/10 07:20:13 (2 years ago)
Author:
jwoithe
Message:

RME: more work to stabilise streaming startup.
RME: delete the tx/rx stream processors when the RME device object is destroyed (fixes several iso handler related issues at shutdown).

Files:

Legend:

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

    r1866 r1868  
    340340RmeReceiveStreamProcessor *rxsp = static_cast<Rme::Device *> 
    341341  (&m_Parent)->getRxSP(); 
     342#if 0 
    342343debugOutput(DEBUG_LEVEL_VERBOSE, "tx timestamp: %lld, ct=%08x (%03ld,%04ld,%04ld)\n", 
    343344  m_last_timestamp, pkt_ctr, CYCLE_TIMER_GET_SECS(pkt_ctr), CYCLE_TIMER_GET_CYCLES(pkt_ctr), CYCLE_TIMER_GET_OFFSET(pkt_ctr)); 
    344345debugOutput(DEBUG_LEVEL_VERBOSE, "  hw tx: 0x%08x\n", rxsp->n_hw_tx_buffer_samples); 
     346#endif 
    345347//if (rxsp->n_hw_tx_buffer_samples < 0x38) 
    346 if (cx < 7) { 
     348has_dryrun = 1; 
     349if (rxsp->n_hw_tx_buffer_samples == -1) { 
     350  // Effectively delay a bit before starting to send packets 
     351  if (cx > 255) { 
     352    *length = getMaxPacketSize(); 
     353  } 
     354  cx++; 
     355} else { 
     356  if (cx < 7) { 
    347357        *length = getMaxPacketSize(); 
    348   cx++; 
    349   has_dryrun = 1; 
    350 } else 
    351   cx=0; 
    352 debugOutput(DEBUG_LEVEL_VERBOSE, "  txsize=%d\n", *length); 
     358    cx++; 
     359  } else 
     360    cx=0; 
     361
     362//debugOutput(DEBUG_LEVEL_VERBOSE, "  txsize=%d\n", *length); 
    353363    } 
    354364 
  • trunk/libffado/src/rme/fireface_hw.cpp

    r1851 r1868  
    746746    } 
    747747 
     748/* 
    748749{signed int i; 
    749750  printf("addr %016llx\n", addr); 
     
    756757readRegister(0xfffff000040cLL); 
    757758readRegister(0xfffff000040cLL); 
    758  
     759*/ 
    759760    return writeBlock(addr, buf, size); 
     761 
     762//  i = writeBlock(addr, buf, size); 
     763//  get_hardware_streaming_status(buf, 4); 
     764//printf(" - 0x%08x 0x%08x 0x%08x 0x%08x\n", 
     765//  buf[0], buf[1], buf[2], buf[3]); 
     766//  return i; 
    760767} 
    761768 
     
    781788        } 
    782789 
    783 readRegister(0x801c0000LL); 
     790//readRegister(0x801c0000LL); 
    784791 
    785792printf("start 0x%016llx data: %08x\n", addr, data); 
    786793        ret = writeRegister(addr, data); 
     794printf("  ret=%d\n", ret); 
    787795        if (ret == 0) { 
    788796            dev_config->is_streaming = 1; 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r1850 r1868  
    101101Device::~Device() 
    102102{ 
     103    delete m_receiveProcessor; 
     104    delete m_transmitProcessor; 
     105 
    103106    if (iso_tx_channel>=0 && !get1394Service().freeIsoChannel(iso_tx_channel)) { 
    104107        debugOutput(DEBUG_LEVEL_VERBOSE, "Could not free tx iso channel %d\n", iso_tx_channel);