Changeset 1847
- Timestamp:
- 06/07/10 07:37:38 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libstreaming/rme/RmeReceiveStreamProcessor.cpp
r1749 r1847 73 73 RmeReceiveStreamProcessor::getMaxPacketSize() { 74 74 int framerate = m_Parent.getDeviceManager().getStreamProcessorManager().getNominalRate(); 75 // FIXME: the additional 8 bytes is not needed. 76 // FIXME: the upper bounds of the 1x and 2x rates need to account for the 77 // DDS capability to run fast by 4%. 75 78 if (m_rme_model == Rme::RME_MODEL_FIREFACE800) 76 79 return 8 + (framerate<=48000?784:(framerate<=96000?1200:1200)); … … 107 110 { 108 111 // For testing 109 debugOutput(DEBUG_LEVEL_VERBOSE, "data packet header \n");112 debugOutput(DEBUG_LEVEL_VERBOSE, "data packet header, len=%d\n", length); 110 113 111 114 if (length > 8) { … … 129 132 // value of the cycle timer as the "last timestamp". In practice 130 133 // there a fixed offset that we'll have to include eventually. 131 m_last_timestamp = CYCLE_TIMER_TO_TICKS(m_Parent.get1394Service().getCycleTimer()); 132 134 uint32_t ct = m_Parent.get1394Service().getCycleTimer(); 135 // m_last_timestamp = CYCLE_TIMER_TO_TICKS(ctm_Parent.get1394Service().getCycleTimer()); 136 m_last_timestamp = CYCLE_TIMER_TO_TICKS(ct); 137 debugOutput(DEBUG_LEVEL_VERBOSE, " timestamp: %lld, ct=%08x (%03ld,%04ld,%04ld)\n", m_last_timestamp, ct, 138 CYCLE_TIMER_GET_SECS(ct), CYCLE_TIMER_GET_CYCLES(ct), CYCLE_TIMER_GET_OFFSET(ct)); 133 139 return eCRV_OK; 134 140 } else { … … 151 157 RmeReceiveStreamProcessor::processPacketData(unsigned char *data, unsigned int length) { 152 158 // m_event_size should never be zero 153 unsigned int n_events = (length-8)/ m_event_size;159 unsigned int n_events = length / m_event_size; 154 160 155 161 // we have to keep in mind that there are also … … 168 174 169 175 // For testing 170 debugOutput(DEBUG_LEVEL_VERBOSE, "data packet data \n");176 debugOutput(DEBUG_LEVEL_VERBOSE, "data packet data, length=%d, ev_size=%d, n_events=%d\n", length, m_event_size, n_events); 171 177 172 178 if(m_data_buffer->writeFrames(n_events, (char *)data, m_last_timestamp)) { trunk/libffado/src/rme/rme_avdevice.cpp
r1813 r1847 645 645 config.getValueForDeviceSetting(getConfigRom().getNodeVendorId(), getConfigRom().getModelId(), "xmit_sp_dll_bw", xmit_sp_dll_bw); 646 646 647 // Calculate the event size. Each audio channel is allocated 4 bytes in 648 // the data stream. 649 /* FIXME: this will still require fine-tuning, but it's a start */ 650 signed int event_size = num_channels * 4; 651 647 652 // Set up receive stream processor, initialise it and set DLL bw 648 // TODO: set event_size properly; the value below is just a placeholder.649 signed int event_size = 0x1000;650 #warning event_size needs setting up651 653 m_receiveProcessor = new Streaming::RmeReceiveStreamProcessor(*this, 652 654 m_rme_model, event_size);
