Changeset 1021

Show
Ignore:
Timestamp:
04/24/08 10:23:02 (13 years ago)
Author:
ppalmers
Message:

Allow to disable sending payload on no-data packets though config.h.in. The DICE-II devices cannot cope with them.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/config.h.in

    r1013 r1021  
    150150#define AMDTP_CLIP_FLOATS                                   1 
    151151 
     152// Allow that devices request that the AMDTP transmit SP adds 
     153// payload to the NO-DATA packets. Normally this should not be 
     154// necessary, and it even breaks some devices (DICE-II based). 
     155#define AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT                  0 
     156 
     157// Default setting for the payload setting if 
     158// AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT is enabled. Devices can 
     159// explicity override this 
     160#define AMDTP_SEND_PAYLOAD_IN_NODATA_XMIT_BY_DEFAULT    false 
     161 
    152162// -- MOTU options -- // 
    153163 
  • trunk/libffado/SConstruct

    r967 r1021  
    2525 
    2626FFADO_API_VERSION="8" 
    27 FFADO_VERSION="1.999.17
     27FFADO_VERSION="1.999.18
    2828 
    2929import os 
  • trunk/libffado/src/dice/dice_avdevice.cpp

    r1004 r1021  
    782782        } 
    783783 
     784#if AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT 
     785        // the DICE-II cannot handle payload in the NO-DATA packets. 
     786        // the other DICE chips don't need payload. Therefore 
     787        // we disable it. 
     788        p->sendPayloadForNoDataPackets(false); 
     789#endif 
     790 
    784791        // add audio ports to the processor 
    785792        for (unsigned int j=0;j<nb_audio;j++) { 
  • trunk/libffado/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp

    r1001 r1021  
    5050        , m_nb_audio_ports( 0 ) 
    5151        , m_nb_midi_ports( 0 ) 
     52#if AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT 
     53        , m_send_nodata_payload ( AMDTP_SEND_PAYLOAD_IN_NODATA_XMIT_BY_DEFAULT ) 
     54#endif 
    5255{} 
    5356 
     
    365368    struct iec61883_packet *packet, unsigned int* length ) 
    366369{ 
    367  
    368370    // no-data packets have syt=0xFFFF 
    369     // and have the usual amount of events as dummy data (?) 
     371    // and (can) have the usual amount of events as dummy data 
     372    // DBC is not increased 
    370373    packet->fdf = IEC61883_FDF_NODATA; 
    371374    packet->syt = 0xffff; 
    372375 
    373     // FIXME: either make this a setting or choose 
    374     bool send_payload=true; 
    375     if ( send_payload ) 
    376     { 
    377         // this means no-data packets with payload (DICE doesn't like that) 
     376#if AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT 
     377    if ( m_send_nodata_payload ) 
     378    { // no-data packets with payload (NOTE: DICE-II doesn't like that) 
    378379        *length = 2*sizeof ( quadlet_t ) + m_syt_interval * m_dimension * sizeof ( quadlet_t ); 
    379380        return m_syt_interval; 
    380     } 
    381     else 
    382     { 
    383         // dbc is not incremented 
    384         // this means no-data packets without payload 
     381    } else { // no-data packets without payload 
    385382        *length = 2*sizeof ( quadlet_t ); 
    386383        return 0; 
    387384    } 
     385#else 
     386    // no-data packets without payload 
     387    *length = 2*sizeof ( quadlet_t ); 
     388    return 0; 
     389#endif 
    388390} 
    389391 
  • trunk/libffado/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.h

    r864 r1021  
    100100    virtual bool prepareChild(); 
    101101 
     102#if AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT 
     103public: 
     104    void sendPayloadForNoDataPackets(bool b) {m_send_nodata_payload = b;}; 
     105#endif 
     106 
    102107public: 
    103108    virtual unsigned int getEventSize() 
     
    136141    unsigned int m_dbc; 
    137142 
     143#if AMDTP_ALLOW_PAYLOAD_IN_NODATA_XMIT 
     144private: 
     145    bool m_send_nodata_payload; 
     146#endif 
     147 
    138148private: // local port caching for performance 
    139149    struct _MBLA_port_cache {