Changeset 2150

Show
Ignore:
Timestamp:
05/15/12 17:17:15 (9 years ago)
Author:
jwoithe
Message:

rme: use the same methodology for calculating the maximum buffer size in the RME receive stream processor as is used in the transmit stream processor. This means that both should be equal for a given configuration, and both will take into account the current bandwidth limit setting (by virtue of referencing the number of channels in use). While not technically required, it's best that both stream processors do the same thing in this regard.

Files:

Legend:

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

    r1983 r2150  
    7777    // FIXME: the upper bounds of the 1x and 2x rates need to account for the 
    7878    //   DDS capability to run fast by 4%. 
    79     if (m_rme_model == Rme::RME_MODEL_FIREFACE800) 
    80         return 8 + (framerate<=48000?784:(framerate<=96000?1200:1200)); 
    81     else 
    82         return 8 + (framerate<=48000?504:(framerate<=96000?840:1000)); 
     79    //if (m_rme_model == Rme::RME_MODEL_FIREFACE800) 
     80    //    return 8 + (framerate<=48000?784:(framerate<=96000?1200:1200)); 
     81    //else 
     82    //    return 8 + (framerate<=48000?504:(framerate<=96000?840:1000)); 
     83 
     84    // Each channel comprises a single 32-bit quadlet.  Note that the return 
     85    // value is in bytes. 
     86    // FIXME: getFramesPerPacket() is fixed by the sample rate class.  It 
     87    // needs to be confirmed that the values in use are still ok even 
     88    // when the DDS is set to run 4% fast (something that's not presently 
     89    // implemented by FFADO, but should be at some point). 
     90    return dev->getFramesPerPacket() * dev->getNumChannels() * 4; 
    8391} 
    8492 
  • trunk/libffado/src/libstreaming/rme/RmeTransmitStreamProcessor.cpp

    r2077 r2150  
    9494RmeTransmitStreamProcessor::getMaxPacketSize() { 
    9595    Rme::Device *dev = static_cast<Rme::Device *>(&m_Parent); 
    96     /* Each channel comprises a single 32-bit quadlet.  Note return value is in bytes. */ 
     96    // Each channel comprises a single 32-bit quadlet.  Note that the return  
     97    // value is in bytes. 
     98    // FIXME: getFramesPerPacket() is fixed by the sample rate class.  It 
     99    // needs to be confirmed that the values in use are still ok even 
     100    // when the DDS is set to run 4% fast (something that's not presently 
     101    // implemented by FFADO, but should be at some point). 
    97102    return dev->getFramesPerPacket() * dev->getNumChannels() * 4; 
    98103}