Changeset 1688 for trunk

Show
Ignore:
Timestamp:
10/15/09 06:55:37 (14 years ago)
Author:
jwoithe
Message:

RME: more work on the streaming system.

Files:

Legend:

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

    r1684 r1688  
    106106                                                uint32_t pkt_ctr) 
    107107{ 
     108// For testing 
     109debugOutput(DEBUG_LEVEL_VERBOSE, "data packet header\n"); 
     110 
    108111    if (length > 8) { 
    109112        // The iso data blocks from the RMEs comprise 24-bit audio 
     
    163166    } 
    164167    #endif 
     168 
     169// For testing 
     170debugOutput(DEBUG_LEVEL_VERBOSE, "data packet data\n"); 
    165171 
    166172    if(m_data_buffer->writeFrames(n_events, (char *)data, m_last_timestamp)) { 
  • trunk/libffado/src/rme/fireface_hw.cpp

    r1671 r1688  
    648648{ 
    649649    // tx_channel is the ISO channel the PC will transmit on. 
    650     quadlet_t buf[4]; 
     650    quadlet_t buf[5]; 
    651651    fb_nodeaddr_t addr; 
    652652    unsigned int size; 
     653 
     654debugOutput(DEBUG_LEVEL_VERBOSE, "*** stream init: %d, %d, %d\n", 
     655  sample_rate, num_channels, tx_channel); 
    653656 
    654657    buf[0] = sample_rate; 
     
    683686    config_lock(); 
    684687    if (not(hardware_is_streaming())) { 
     688debugOutput(DEBUG_LEVEL_VERBOSE,"*** starting: listen=%d, num_ch=%d\n", listen_channel, num_channels); 
    685689        if (m_rme_model == RME_MODEL_FIREFACE400) { 
    686690            addr = RME_FF400_STREAM_START_REG; 
     
    693697 
    694698        ret = writeRegister(addr, data); 
    695         if (ret != 0) { 
     699        if (ret == 0) { 
    696700            dev_config->is_streaming = 1; 
    697701        } 
     
    721725 
    722726        ret = writeBlock(addr, buf, size); 
    723         if (ret != 0) { 
     727        if (ret == 0) { 
    724728            dev_config->is_streaming = 0; 
    725729        } 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r1684 r1688  
    567567    // rx channel is also allocated for the FF400.  The FF800 chooses 
    568568    // the rx channel to be used but does not handle the bus-level 
    569     // channel/bandwidth allocation/ 
     569    // channel/bandwidth allocation. 
    570570    if (iso_tx_channel < 0) { 
    571571        iso_tx_channel = get1394Service().allocateIsoChannelGeneric(bandwidth); 
     
    623623      m_rme_model, event_size); 
    624624    m_receiveProcessor->setVerboseLevel(getDebugLevel()); 
    625     if (!m_receiveProcessor) { 
     625    if (!m_receiveProcessor->init()) { 
    626626        debugFatal("Could not initialize receive processor!\n"); 
    627627        return false; 
     
    634634    } 
    635635 
     636 
    636637    // Add ports to the processor - TODO 
    637638    std::string id=std::string("dev?"); 
     
    648649int 
    649650Device::getStreamCount() { 
    650         return 0; // one receive, one transmit 
     651// Only rx implemented at present 
     652        return 1; // one receive, one transmit 
    651653} 
    652654 
    653655Streaming::StreamProcessor * 
    654656Device::getStreamProcessorByIndex(int i) { 
     657    switch (i) { 
     658        case 0: 
     659            return m_receiveProcessor; 
     660        case 1: 
     661            return m_transmitProcessor; 
     662        default: 
     663            debugWarning("Invalid stream index %d\n", i); 
     664    } 
    655665    return NULL; 
    656666} 
     
    663673    // (unconditionally flagging them as being successful). 
    664674    if (i == 0) { 
     675        m_receiveProcessor->setChannel(iso_rx_channel); 
     676        // m_transmitProcessor->setChannel(iso_tx_channel); 
    665677        if (hardware_start_streaming(iso_rx_channel) != 0) 
    666678            return false;