Changeset 1993

Show
Ignore:
Timestamp:
09/04/11 05:03:42 (9 years ago)
Author:
jwoithe
Message:

rme: clean up debug output by replacing "temporary" printf() calls with debugOutput(). Remove unnecessary register reads used during early stages of development.

Files:

Legend:

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

    r1983 r1993  
    305305  quadlet_t *sample = (quadlet_t *)data + 6; 
    306306if (dpy==0) { 
    307   fprintf(stderr, "ticks per frame: %d %d %d (len=%d)\n", int_tpf, n_events, m_event_size, *length); 
     307  debugOutput(DEBUG_LEVEL_NORMAL, "ticks per frame: %d %d %d (len=%d)\n", int_tpf, n_events, m_event_size, *length); 
    308308} 
    309309if (++dpy == 8000) 
  • trunk/libffado/src/rme/fireface_flash.cpp

    r1609 r1993  
    306306signed int i; 
    307307  i = readBlock(RME_FF_STATUS_REG0, buf, 4); 
    308   fprintf(stderr, "Status read: %d\n", i); 
    309   for (i=0; i<4; i++) 
    310     fprintf(stderr,"0x%08x ", buf[i]); 
    311   fprintf(stderr,"\n"); 
     308  debugOutput(DEBUG_LEVEL_NORMAL, "Status read: %d: 0x%08x 0x%08x 0x%08x 0x%08x\n", i, 
     309    buf[0], buf[1], buf[2], buf[3]); 
    312310} 
    313311 
  • trunk/libffado/src/rme/fireface_hw.cpp

    r1992 r1993  
    6363    signed int n_channels = (m_rme_model==RME_MODEL_FIREFACE400)? 
    6464                   RME_FF400_MAX_CHANNELS:RME_FF800_MAX_CHANNELS; 
    65     signed int i; 
    6665 
    6766    // Initialises the device's settings structure to a known state and then 
     
    113112        } 
    114113 
    115 readRegister(0xfffff0000410LL); 
    116  
    117114        if (ret==0) { 
    118115            signed freq = dev_config->software_freq; 
     
    123120        } 
    124121 
    125 for (i=0;i<9;i++) 
    126   readRegister(0xfffff0000410LL); 
    127 readRegister(0x801c0000LL); 
    128  
    129122        if (m_rme_model == RME_MODEL_FIREFACE400) { 
    130123            signed int i; 
     
    134127        } 
    135128 
    136 for (i=0;i<7;i++) { 
    137   set_hardware_ampgain(FF400_AMPGAIN_MIC1,0); 
    138   set_hardware_ampgain(FF400_AMPGAIN_MIC2,0); 
    139 } 
    140 readRegister(0xfffff0000404LL); 
    141 readRegister(0x801c0000LL); 
    142 readRegister(0xfffff0000410LL); 
    143 readRegister(0x801c0000LL); 
    144 readRegister(0xfffff0000410LL); 
    145 readRegister(0xfffff000040cLL); 
    146 readRegister(0xfffff000040cLL); 
    147  
    148129        // Matrix mixer settings 
    149130        for (dest=0; dest<n_channels; dest++) { 
    150131            for (src=0; src<n_channels; src++) { 
    151132                set_hardware_mixergain(RME_FF_MM_INPUT, src, dest, 0); 
    152 readRegister(0xfffff0000410LL); 
    153133            } 
    154134            for (src=0; src<n_channels; src++) { 
    155135                set_hardware_mixergain(RME_FF_MM_PLAYBACK, src, dest,  
    156136                  src==dest?0x8000:0); 
    157 readRegister(0xfffff0000410LL); 
    158137            } 
    159138        } 
    160139        for (src=0; src<n_channels; src++) { 
    161140            set_hardware_mixergain(RME_FF_MM_OUTPUT, src, 0, 0x8000); 
    162 readRegister(0xfffff0000410LL); 
    163141        } 
    164142 
     
    771749        } 
    772750 
    773 printf("start 0x%016llx data: %08x\n", addr, data); 
     751debugOutput(DEBUG_LEVEL_VERBOSE, "start 0x%016llx data: %08x\n", addr, data); 
    774752        ret = writeRegister(addr, data); 
    775 printf("  ret=%d\n", ret); 
     753debugOutput(DEBUG_LEVEL_VERBOSE, "  ret=%d\n", ret); 
    776754        if (ret == 0) { 
    777755            dev_config->is_streaming = 1; 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r1980 r1993  
    600600                break; 
    601601            } 
    602 
    603 signed int j; 
    604 printf("init stat: "); 
    605 for (j=0;j<4;j++){ 
    606   printf("%08x ", stat[j]); 
    607 
    608 printf("\n"); 
    609 
     602 
     603// FIXME: this can probably go once the driver matures. 
     604debugOutput(DEBUG_LEVEL_NORMAL, "init stat: %08x %08x %08x %08x\n", 
     605  stat[0], stat[1], stat[2], stat[3]); 
     606 
    610607            if (m_rme_model == RME_MODEL_FIREFACE400) { 
    611608                iso_rx_channel = get1394Service().allocateIsoChannelGeneric(bandwidth); 
     
    861858    } 
    862859 
    863 #if 0 
    864     // Just add a few ports for initial testing 
    865     snprintf(name, sizeof(name), "%s_%s_%s", id.c_str(), mode_str, "port_0"); 
    866     addPort(s_processor, name, direction, 0, 0); 
    867     snprintf(name, sizeof(name), "%s_%s_%s", id.c_str(), mode_str, "port_1"); 
    868     addPort(s_processor, name, direction, 4, 0); 
    869     snprintf(name, sizeof(name), "%s_%s_%s", id.c_str(), mode_str, "port_6"); 
    870     addPort(s_processor, name, direction, 24, 0); 
    871     snprintf(name, sizeof(name), "%s_%s_%s", id.c_str(), mode_str, "port_7"); 
    872     addPort(s_processor, name, direction, 28, 0); 
    873 #endif 
    874  
    875860    return true; 
    876861}