Changeset 1688
- Timestamp:
- 10/15/09 06:55:37 (14 years ago)
- Files:
-
- trunk/libffado/src/libstreaming/rme/RmeReceiveStreamProcessor.cpp (modified) (2 diffs)
- trunk/libffado/src/rme/fireface_hw.cpp (modified) (4 diffs)
- trunk/libffado/src/rme/rme_avdevice.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libstreaming/rme/RmeReceiveStreamProcessor.cpp
r1684 r1688 106 106 uint32_t pkt_ctr) 107 107 { 108 // For testing 109 debugOutput(DEBUG_LEVEL_VERBOSE, "data packet header\n"); 110 108 111 if (length > 8) { 109 112 // The iso data blocks from the RMEs comprise 24-bit audio … … 163 166 } 164 167 #endif 168 169 // For testing 170 debugOutput(DEBUG_LEVEL_VERBOSE, "data packet data\n"); 165 171 166 172 if(m_data_buffer->writeFrames(n_events, (char *)data, m_last_timestamp)) { trunk/libffado/src/rme/fireface_hw.cpp
r1671 r1688 648 648 { 649 649 // tx_channel is the ISO channel the PC will transmit on. 650 quadlet_t buf[ 4];650 quadlet_t buf[5]; 651 651 fb_nodeaddr_t addr; 652 652 unsigned int size; 653 654 debugOutput(DEBUG_LEVEL_VERBOSE, "*** stream init: %d, %d, %d\n", 655 sample_rate, num_channels, tx_channel); 653 656 654 657 buf[0] = sample_rate; … … 683 686 config_lock(); 684 687 if (not(hardware_is_streaming())) { 688 debugOutput(DEBUG_LEVEL_VERBOSE,"*** starting: listen=%d, num_ch=%d\n", listen_channel, num_channels); 685 689 if (m_rme_model == RME_MODEL_FIREFACE400) { 686 690 addr = RME_FF400_STREAM_START_REG; … … 693 697 694 698 ret = writeRegister(addr, data); 695 if (ret != 0) {699 if (ret == 0) { 696 700 dev_config->is_streaming = 1; 697 701 } … … 721 725 722 726 ret = writeBlock(addr, buf, size); 723 if (ret != 0) {727 if (ret == 0) { 724 728 dev_config->is_streaming = 0; 725 729 } trunk/libffado/src/rme/rme_avdevice.cpp
r1684 r1688 567 567 // rx channel is also allocated for the FF400. The FF800 chooses 568 568 // the rx channel to be used but does not handle the bus-level 569 // channel/bandwidth allocation /569 // channel/bandwidth allocation. 570 570 if (iso_tx_channel < 0) { 571 571 iso_tx_channel = get1394Service().allocateIsoChannelGeneric(bandwidth); … … 623 623 m_rme_model, event_size); 624 624 m_receiveProcessor->setVerboseLevel(getDebugLevel()); 625 if (!m_receiveProcessor ) {625 if (!m_receiveProcessor->init()) { 626 626 debugFatal("Could not initialize receive processor!\n"); 627 627 return false; … … 634 634 } 635 635 636 636 637 // Add ports to the processor - TODO 637 638 std::string id=std::string("dev?"); … … 648 649 int 649 650 Device::getStreamCount() { 650 return 0; // one receive, one transmit 651 // Only rx implemented at present 652 return 1; // one receive, one transmit 651 653 } 652 654 653 655 Streaming::StreamProcessor * 654 656 Device::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 } 655 665 return NULL; 656 666 } … … 663 673 // (unconditionally flagging them as being successful). 664 674 if (i == 0) { 675 m_receiveProcessor->setChannel(iso_rx_channel); 676 // m_transmitProcessor->setChannel(iso_tx_channel); 665 677 if (hardware_start_streaming(iso_rx_channel) != 0) 666 678 return false;