Changeset 1194 for branches

Show
Ignore:
Timestamp:
05/19/08 23:54:16 (15 years ago)
Author:
jwoithe
Message:

* MOTU: remove test tone for 2.0 branch.
* MOTU: in 2.0 branch, remove commented-out code related to ongoing debugging.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp

    r1136 r1194  
    102102MotuReceiveStreamProcessor::prepareChild() { 
    103103    debugOutput( DEBUG_LEVEL_VERBOSE, "Preparing (%p)...\n", this); 
    104  
    105     // prepare the framerate estimate 
    106     // FIXME: not needed anymore? 
    107     //m_ticks_per_frame = (TICKS_PER_SECOND*1.0) / ((float)m_Parent.getDeviceManager().getStreamProcessorManager().getNominalRate()); 
    108  
    109104    return true; 
    110105} 
  • branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp

    r1168 r1194  
    3838#include <assert.h> 
    3939 
    40 // Set to 1 to enable the generation of a 1 kHz test tone in analog output 1.  Even with 
    41 // this defined to 1 the test tone will now only be produced if run with a non-zero  
    42 // debug level. 
    43 #define TESTTONE 1 
    44  
    45 #if TESTTONE 
    46 #include <math.h> 
    47 #endif 
    48  
    4940/* Provide more intuitive access to GCC's branch predition built-ins */ 
    5041#define likely(x)   __builtin_expect((x),1) 
     
    279270        float ticks_per_frame = m_Parent.getDeviceManager().getStreamProcessorManager().getSyncSource().getTicksPerFrame(); 
    280271 
    281 #if TESTTONE 
    282     /* Now things are beginning to stabilise, make things easier for others by only playing 
    283      * the test tone when run with a non-zero debug level. 
    284      */ 
    285     if (getDebugLevel() > 0) { 
    286         // FIXME: remove this hacked in 1 kHz test signal to 
    287         // analog-1 when testing is complete. 
    288         signed int i, int_tpf = lrintf(ticks_per_frame); 
    289         unsigned char *sample = data+8+16; 
    290         for (i=0; i<n_events; i++, sample+=m_event_size) { 
    291             static signed int a_cx = 0; 
    292             // Each sample is 3 bytes with MSB in lowest address (ie:  
    293             // network byte order).  After byte order swap, the 24-bit 
    294             // MSB is in the second byte of val. 
    295             signed int val = CondSwapToBus32(lrintf(0x7fffff*sin((1000.0*2.0*M_PI/24576000.0)*a_cx))); 
    296             memcpy(sample,((char *)&val)+1,3); 
    297             if ((a_cx+=int_tpf) >= 24576000) { 
    298                 a_cx -= 24576000; 
    299             } 
    300         } 
    301     } 
    302 #endif 
    303  
    304 //fprintf(stderr,"tx: %d/%d\n", 
    305 //  TICKS_TO_CYCLES(fullTicksToSph(m_last_timestamp)), 
    306 //  TICKS_TO_OFFSET(fullTicksToSph(m_last_timestamp))); 
    307         // Set up each frames's SPH. 
    308 //fprintf(stderr,"tpf=%f\n", ticks_per_frame); 
    309272        for (int i=0; i < n_events; i++, quadlet += dbs) { 
    310273            int64_t ts_frame = addTicks(m_last_timestamp, (unsigned int)lrintf(i * ticks_per_frame)); 
    311274            *quadlet = CondSwapToBus32(fullTicksToSph(ts_frame)); 
    312 //fprintf(stderr,"tx: %d/%d\n", 
    313 //  CYCLE_TIMER_GET_CYCLES(fullTicksToSph(ts_frame)), 
    314 //  CYCLE_TIMER_GET_OFFSET(fullTicksToSph(ts_frame))); 
    315275        } 
    316276