Changeset 436 for branches

Show
Ignore:
Timestamp:
03/11/07 12:50:16 (17 years ago)
Author:
pieterpalmers
Message:

- fixed verbose level setting
- debugged DICE code, works with EVM

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/streaming-rework/src/bebob/bebob_avdevice.cpp

    r435 r436  
    881881 
    882882void 
    883 AvDevice::showDevice() const 
     883AvDevice::showDevice() 
    884884{ 
    885885    debugOutput(DEBUG_LEVEL_VERBOSE, 
  • branches/streaming-rework/src/bebob/bebob_avdevice.h

    r435 r436  
    7979    bool stopStreamByIndex(int i); 
    8080 
    81     virtual void showDevice() const
     81    virtual void showDevice()
    8282 
    8383    Ieee1394Service& get1394Service() 
  • branches/streaming-rework/src/bounce/bounce_avdevice.cpp

    r435 r436  
    150150 
    151151void 
    152 BounceDevice::showDevice() const 
     152BounceDevice::showDevice() 
    153153{ 
    154154    debugOutput(DEBUG_LEVEL_NORMAL, "\nI am the bouncedevice, the bouncedevice I am...\n" ); 
  • branches/streaming-rework/src/bounce/bounce_avdevice.h

    r435 r436  
    8787    bool stopStreamByIndex(int i); 
    8888     
    89     void showDevice() const
     89    void showDevice()
    9090 
    9191protected: 
  • branches/streaming-rework/src/devicemanager.cpp

    r435 r436  
    7070    , m_1394Service( 0 ) 
    7171    , m_oscServer( NULL ) 
     72    , m_verboseLevel( DEBUG_LEVEL_NORMAL ) 
    7273{ 
    7374    addOption(Util::OptionContainer::Option("slaveMode",false)); 
     
    9091 
    9192    delete m_1394Service; 
     93} 
     94 
     95void 
     96DeviceManager::setVerboseLevel(int l)  
     97{ 
     98    m_verboseLevel=l; 
     99    setDebugLevel(l); 
     100     
     101    if (m_1394Service) m_1394Service->setVerboseLevel(l); 
     102    if (m_oscServer) m_oscServer->setVerboseLevel(l); 
     103    OscNode::setVerboseLevel(l); 
     104     
     105    for ( IAvDeviceVectorIterator it = m_avDevices.begin(); 
     106          it != m_avDevices.end(); 
     107          ++it ) 
     108    { 
     109        (*it)->setVerboseLevel(l); 
     110    } 
    92111} 
    93112 
     
    143162        return false; 
    144163    } 
    145  
     164     
     165    setVerboseLevel(m_verboseLevel); 
    146166    return true; 
    147167} 
    148168 
    149169bool 
    150 DeviceManager::discover( int verboseLevel
     170DeviceManager::discover(
    151171{ 
    152172    bool slaveMode=false; 
     
    159179    } 
    160180 
    161     setDebugLevel( verboseLevel ); 
    162     m_1394Service->setVerbose( verboseLevel ); 
     181    setVerboseLevel(m_verboseLevel); 
    163182 
    164183    for ( IAvDeviceVectorIterator it = m_avDevices.begin(); 
     
    208227                             nodeId ); 
    209228 
    210                 avDevice->setVerboseLevel( verboseLevel ); 
     229                avDevice->setVerboseLevel( m_verboseLevel ); 
    211230                 
    212231                if ( !avDevice->discover() ) { 
     
    231250                } 
    232251                 
    233                 if ( verboseLevel ) { 
     252                if ( m_verboseLevel >= DEBUG_LEVEL_VERBOSE ) { 
    234253                    avDevice->showDevice(); 
    235254                } 
     
    271290                         nodeId ); 
    272291             
    273             avDevice->setVerboseLevel( verboseLevel ); 
     292            avDevice->setVerboseLevel( m_verboseLevel ); 
    274293 
    275294            if ( !avDevice->discover() ) { 
     
    282301                debugError( "setting Id failed\n" ); 
    283302            } 
    284             if ( verboseLevel ) { 
     303            if ( m_verboseLevel >= DEBUG_LEVEL_VERBOSE ) { 
    285304                avDevice->showDevice(); 
    286305            } 
    287              
    288306 
    289307            m_avDevices.push_back( avDevice ); 
  • branches/streaming-rework/src/devicemanager.h

    r435 r436  
    5555    bool deinitialize(); 
    5656 
    57     bool discover( int verboseLevel ); 
     57    bool discover( ); 
    5858 
    5959    bool isValidNode( int node ); 
     
    8080     
    8181    OSC::OscServer*  m_oscServer; 
    82  
     82     
     83// debug stuff 
     84public: 
     85    void setVerboseLevel(int l); 
     86private: 
     87    int m_verboseLevel; 
    8388    DECLARE_DEBUG_MODULE; 
    8489}; 
  • branches/streaming-rework/src/dice/dice_avdevice.cpp

    r433 r436  
    1818 * MA 02111-1307 USA. 
    1919 */ 
    20 #warning DICE support is currently untested 
    2120 
    2221#include "dice/dice_avdevice.h" 
     
    4544static VendorModelEntry supportedDeviceList[] = 
    4645{ 
    47     {0x00000000, 0x0000, "DICE VENDOR", "XXX"}, 
     46    // vendor id, model id, vendor name, model name 
     47    {0x00000166, 0x00000002, "TCAT", "DiceII EVM"}, 
    4848}; 
    4949 
     
    107107DiceAvDevice::discover() 
    108108{ 
    109     unsigned int vendorId = m_configRom->getNodeVendorId(); 
    110     unsigned int modelId = m_configRom->getModelId(); 
     109    unsigned int vendorId = m_pConfigRom->getNodeVendorId(); 
     110    unsigned int modelId = m_pConfigRom->getModelId(); 
    111111 
    112112    for ( unsigned int i = 0; 
     
    171171DiceAvDevice::setSamplingFrequency( ESamplingFrequency samplingFrequency ) 
    172172{ 
     173    debugOutput(DEBUG_LEVEL_VERBOSE, "Setting sample rate: %d\n",  
     174        convertESamplingFrequency(samplingFrequency)); 
     175         
    173176    bool supported=false; 
    174177    fb_quadlet_t select=0x0; 
     
    239242        return false; 
    240243    } 
    241      
     244 
    242245    clockreg = DICE_SET_RATE(clockreg, select); 
    243      
     246 
    244247    if (!writeGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, clockreg)) { 
    245248        debugError("Could not write CLOCK_SELECT register\n"); 
     
    247250    } 
    248251 
     252    // check if the write succeeded 
     253    fb_quadlet_t clockreg_verify; 
     254    if (!readGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, &clockreg_verify)) { 
     255        debugError("Could not read CLOCK_SELECT register\n"); 
     256        return false; 
     257    } 
     258     
     259    if(clockreg != clockreg_verify) { 
     260        debugError("Samplerate register write failed\n"); 
     261        return false; 
     262    } 
     263     
    249264    return true; 
    250265} 
    251266 
    252267void 
    253 DiceAvDevice::showDevice() const 
     268DiceAvDevice::showDevice() 
    254269{ 
     270    fb_quadlet_t tmp_quadlet; 
     271    fb_octlet_t tmp_octlet; 
     272     
    255273    debugOutput(DEBUG_LEVEL_VERBOSE, 
    256274        "%s %s at node %d\n", m_model->vendor_name, m_model->model_name, 
    257275        m_nodeId); 
     276 
     277    debugOutput(DEBUG_LEVEL_VERBOSE," DICE Parameter Space info:\n"); 
     278    debugOutput(DEBUG_LEVEL_VERBOSE,"  Global  : offset=0x%04X size=%04d\n", m_global_reg_offset, m_global_reg_size); 
     279    debugOutput(DEBUG_LEVEL_VERBOSE,"  TX      : offset=0x%04X size=%04d\n", m_tx_reg_offset, m_tx_reg_size); 
     280    debugOutput(DEBUG_LEVEL_VERBOSE,"                nb=%4d size=%04d\n", m_nb_tx, m_tx_size); 
     281    debugOutput(DEBUG_LEVEL_VERBOSE,"  RX      : offset=0x%04X size=%04d\n", m_rx_reg_offset, m_rx_reg_size); 
     282    debugOutput(DEBUG_LEVEL_VERBOSE,"                nb=%4d size=%04d\n", m_nb_rx, m_rx_size); 
     283    debugOutput(DEBUG_LEVEL_VERBOSE,"  UNUSED1 : offset=0x%04X size=%04d\n", m_unused1_reg_offset, m_unused1_reg_size); 
     284    debugOutput(DEBUG_LEVEL_VERBOSE,"  UNUSED2 : offset=0x%04X size=%04d\n", m_unused2_reg_offset, m_unused2_reg_size); 
     285 
     286    debugOutput(DEBUG_LEVEL_VERBOSE," Global param space:\n"); 
     287     
     288    readGlobalRegBlock(DICE_REGISTER_GLOBAL_OWNER, (fb_quadlet_t *)&tmp_octlet,sizeof(fb_octlet_t)); 
     289    debugOutput(DEBUG_LEVEL_VERBOSE,"  Owner            : 0x%016X\n",tmp_octlet); 
     290     
     291    readGlobalReg(DICE_REGISTER_GLOBAL_NOTIFICATION, &tmp_quadlet); 
     292    debugOutput(DEBUG_LEVEL_VERBOSE,"  Notification     : 0x%08X\n",tmp_quadlet); 
     293     
     294    readGlobalReg(DICE_REGISTER_GLOBAL_NOTIFICATION, &tmp_quadlet); 
     295    debugOutput(DEBUG_LEVEL_VERBOSE,"  Nick name        : %s\n",getDeviceNickName().c_str()); 
     296     
     297    readGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, &tmp_quadlet); 
     298    debugOutput(DEBUG_LEVEL_VERBOSE,"  Clock Select     : 0x%02X 0x%02X\n", 
     299        (tmp_quadlet>>8) & 0xFF, tmp_quadlet & 0xFF); 
     300     
     301    readGlobalReg(DICE_REGISTER_GLOBAL_ENABLE, &tmp_quadlet); 
     302    debugOutput(DEBUG_LEVEL_VERBOSE,"  Enable           : %s\n", 
     303        (tmp_quadlet&0x1?"true":"false")); 
     304     
     305    readGlobalReg(DICE_REGISTER_GLOBAL_STATUS, &tmp_quadlet); 
     306    debugOutput(DEBUG_LEVEL_VERBOSE,"  Clock Status     : %s 0x%02X\n", 
     307        (tmp_quadlet&0x1?"locked":"not locked"), (tmp_quadlet>>8) & 0xFF); 
     308     
     309    readGlobalReg(DICE_REGISTER_GLOBAL_EXTENDED_STATUS, &tmp_quadlet); 
     310    debugOutput(DEBUG_LEVEL_VERBOSE,"  Extended Status  : 0x%08X\n",tmp_quadlet); 
     311     
     312    readGlobalReg(DICE_REGISTER_GLOBAL_SAMPLE_RATE, &tmp_quadlet); 
     313    debugOutput(DEBUG_LEVEL_VERBOSE,"  Samplerate       : 0x%08X (%lu)\n",tmp_quadlet,tmp_quadlet); 
     314     
     315    readGlobalReg(DICE_REGISTER_GLOBAL_VERSION, &tmp_quadlet); 
     316    debugOutput(DEBUG_LEVEL_VERBOSE,"  Version          : 0x%08X (%u.%u.%u.%u)\n", 
     317        tmp_quadlet, 
     318        DICE_DRIVER_SPEC_VERSION_NUMBER_GET_A(tmp_quadlet), 
     319        DICE_DRIVER_SPEC_VERSION_NUMBER_GET_B(tmp_quadlet), 
     320        DICE_DRIVER_SPEC_VERSION_NUMBER_GET_C(tmp_quadlet), 
     321        DICE_DRIVER_SPEC_VERSION_NUMBER_GET_D(tmp_quadlet) 
     322        ); 
     323     
     324    readGlobalReg(DICE_REGISTER_GLOBAL_CLOCKCAPABILITIES, &tmp_quadlet); 
     325    debugOutput(DEBUG_LEVEL_VERBOSE,"  Clock caps       : 0x%08X\n",tmp_quadlet & 0x1FFF007F); 
     326 
     327    diceNameVector names=getClockSourceNameString(); 
     328    debugOutput(DEBUG_LEVEL_VERBOSE,"  Clock sources    :\n"); 
     329     
     330    for ( diceNameVectorIterator it = names.begin(); 
     331          it != names.end(); 
     332          ++it ) 
     333    { 
     334        debugOutput(DEBUG_LEVEL_VERBOSE,"    %s\n", (*it).c_str()); 
     335    } 
     336     
     337    debugOutput(DEBUG_LEVEL_VERBOSE," TX param space:\n"); 
     338    debugOutput(DEBUG_LEVEL_VERBOSE,"  Nb of xmit        : %1d\n", m_nb_tx); 
     339    for (unsigned int i=0;i<m_nb_tx;i++) { 
     340        debugOutput(DEBUG_LEVEL_VERBOSE,"  Transmitter %d:\n",i); 
     341         
     342        readTxReg(i, DICE_REGISTER_TX_ISOC_BASE, &tmp_quadlet); 
     343        debugOutput(DEBUG_LEVEL_VERBOSE,"   ISO channel       : %3d\n", tmp_quadlet); 
     344        readTxReg(i, DICE_REGISTER_TX_SPEED_BASE, &tmp_quadlet); 
     345        debugOutput(DEBUG_LEVEL_VERBOSE,"   ISO speed         : %3d\n", tmp_quadlet); 
     346         
     347        readTxReg(i, DICE_REGISTER_TX_NB_AUDIO_BASE, &tmp_quadlet); 
     348        debugOutput(DEBUG_LEVEL_VERBOSE,"   Nb audio channels : %3d\n", tmp_quadlet); 
     349        readTxReg(i, DICE_REGISTER_TX_MIDI_BASE, &tmp_quadlet); 
     350        debugOutput(DEBUG_LEVEL_VERBOSE,"   Nb midi channels  : %3d\n", tmp_quadlet); 
     351         
     352        readTxReg(i, DICE_REGISTER_TX_AC3_CAPABILITIES_BASE, &tmp_quadlet); 
     353        debugOutput(DEBUG_LEVEL_VERBOSE,"   AC3 caps          : 0x%08X\n", tmp_quadlet); 
     354        readTxReg(i, DICE_REGISTER_TX_AC3_ENABLE_BASE, &tmp_quadlet); 
     355        debugOutput(DEBUG_LEVEL_VERBOSE,"   AC3 enable        : 0x%08X\n", tmp_quadlet); 
     356         
     357        diceNameVector channel_names=getTxNameString(i); 
     358        debugOutput(DEBUG_LEVEL_VERBOSE,"   Channel names     :\n"); 
     359        for ( diceNameVectorIterator it = channel_names.begin(); 
     360            it != channel_names.end(); 
     361            ++it ) 
     362        { 
     363            debugOutput(DEBUG_LEVEL_VERBOSE,"     %s\n", (*it).c_str()); 
     364        } 
     365    } 
     366     
     367    debugOutput(DEBUG_LEVEL_VERBOSE," RX param space:\n"); 
     368    debugOutput(DEBUG_LEVEL_VERBOSE,"  Nb of recv        : %1d\n", m_nb_tx); 
     369    for (unsigned int i=0;i<m_nb_rx;i++) { 
     370        debugOutput(DEBUG_LEVEL_VERBOSE,"  Receiver %d:\n",i); 
     371         
     372        readTxReg(i, DICE_REGISTER_RX_ISOC_BASE, &tmp_quadlet); 
     373        debugOutput(DEBUG_LEVEL_VERBOSE,"   ISO channel       : %3d\n", tmp_quadlet); 
     374        readTxReg(i, DICE_REGISTER_RX_SEQ_START_BASE, &tmp_quadlet); 
     375        debugOutput(DEBUG_LEVEL_VERBOSE,"   Sequence start    : %3d\n", tmp_quadlet); 
     376         
     377        readTxReg(i, DICE_REGISTER_RX_NB_AUDIO_BASE, &tmp_quadlet); 
     378        debugOutput(DEBUG_LEVEL_VERBOSE,"   Nb audio channels : %3d\n", tmp_quadlet); 
     379        readTxReg(i, DICE_REGISTER_RX_MIDI_BASE, &tmp_quadlet); 
     380        debugOutput(DEBUG_LEVEL_VERBOSE,"   Nb midi channels  : %3d\n", tmp_quadlet); 
     381         
     382        readTxReg(i, DICE_REGISTER_RX_AC3_CAPABILITIES_BASE, &tmp_quadlet); 
     383        debugOutput(DEBUG_LEVEL_VERBOSE,"   AC3 caps          : 0x%08X\n", tmp_quadlet); 
     384        readTxReg(i, DICE_REGISTER_RX_AC3_ENABLE_BASE, &tmp_quadlet); 
     385        debugOutput(DEBUG_LEVEL_VERBOSE,"   AC3 enable        : 0x%08X\n", tmp_quadlet); 
     386         
     387        diceNameVector channel_names=getRxNameString(i); 
     388        debugOutput(DEBUG_LEVEL_VERBOSE,"   Channel names     :\n"); 
     389        for ( diceNameVectorIterator it = channel_names.begin(); 
     390            it != channel_names.end(); 
     391            ++it ) 
     392        { 
     393            debugOutput(DEBUG_LEVEL_VERBOSE,"     %s\n", (*it).c_str()); 
     394        } 
     395    } 
    258396} 
    259397 
     
    264402// Currently we assume the following. 
    265403//   * Ack/iso gap = 0.05 us 
    266 //   * DATA_PREFIX = 0.16 us 
     404//   * DATA_PREFIX = 0.16 us1 
    267405//   * DATA_END    = 0.26 us 
    268406// These numbers are the worst-case figures given in the ieee1394 
     
    334472        for (unsigned int j=0;j<nb_audio;j++) { 
    335473            diceChannelInfo channelInfo; 
    336             channelInfo.name=names_audio.at(i); 
     474            channelInfo.name=names_audio.at(j); 
    337475            channelInfo.portType=ePT_Analog; 
    338476            channelInfo.streamPosition=j; 
     
    349487        for (unsigned int j=0;j<nb_midi;j++) { 
    350488            diceChannelInfo channelInfo; 
    351             channelInfo.name=names_midi.at(i); 
     489            channelInfo.name=names_midi.at(j); 
    352490            channelInfo.portType=ePT_MIDI; 
    353491            channelInfo.streamPosition=nb_audio; 
     
    421559        for (unsigned int j=0;j<nb_audio;j++) { 
    422560            diceChannelInfo channelInfo; 
    423             channelInfo.name=names_audio.at(i); 
     561            channelInfo.name=names_audio.at(j); 
    424562            channelInfo.portType=ePT_Analog; 
    425563            channelInfo.streamPosition=j; 
     
    436574        for (unsigned int j=0;j<nb_midi;j++) { 
    437575            diceChannelInfo channelInfo; 
    438             channelInfo.name=names_midi.at(i); 
     576            channelInfo.name=names_midi.at(j); 
    439577            channelInfo.portType=ePT_MIDI; 
    440578            channelInfo.streamPosition=nb_audio; 
     
    465603 
    466604    std::ostringstream portname; 
    467     portname << id << "_" << channelInfo->name; 
     605    portname << id; 
     606    if(direction == Streaming::Port::E_Playback) { 
     607        portname << "p"; 
     608    } else { 
     609        portname << "c"; 
     610    } 
     611     
     612    portname << "_" << channelInfo->name; 
    468613 
    469614    Streaming::Port *p=NULL; 
     
    552697    } 
    553698     
    554     fb_nodeaddr_t swap_value = ((0xFFC0) | m_p1394Service->getLocalNodeId()) << 24; 
     699    fb_nodeaddr_t swap_value = ((0xFFC0) | m_p1394Service->getLocalNodeId()); 
     700    swap_value = swap_value << 48; 
    555701    swap_value |= m_notifier->getStart(); 
    556702     
    557     if (!m_p1394Service->lockCompareSwap64(  m_nodeId, addr, DICE_OWNER_NO_OWNER,  
     703    if (!m_p1394Service->lockCompareSwap64(  m_nodeId | 0xFFC0, addr, DICE_OWNER_NO_OWNER,  
    558704                                       swap_value, &result )) { 
    559705        debugWarning("Could not register ourselves as device owner\n"); 
     706    } 
     707     
     708    if (result != DICE_OWNER_NO_OWNER) { 
     709        debugWarning("Could not register ourselves as device owner, unexpected register value: 0x%016llX\n", result); 
    560710    } 
    561711 
     
    584734    } 
    585735     
    586     fb_nodeaddr_t compare_value = ((0xFFC0) | m_p1394Service->getLocalNodeId()) << 24; 
     736    fb_nodeaddr_t compare_value = ((0xFFC0) | m_p1394Service->getLocalNodeId()); 
     737    compare_value <<= 48;  
    587738    compare_value |= m_notifier->getStart(); 
    588739     
    589     if (!m_p1394Service->lockCompareSwap64(  m_nodeId, addr, compare_value,  
     740    if (!m_p1394Service->lockCompareSwap64(  m_nodeId | 0xFFC0, addr, compare_value,  
    590741                                       DICE_OWNER_NO_OWNER, &result )) { 
    591742        debugWarning("Could not unregister ourselves as device owner\n"); 
     
    597748 
    598749    return true; 
     750} 
     751 
     752bool 
     753DiceAvDevice::enableStreaming() { 
     754    return enableIsoStreaming(); 
     755} 
     756 
     757bool 
     758DiceAvDevice::disableStreaming() { 
     759    return disableIsoStreaming(); 
    599760} 
    600761 
     
    8451006DiceAvDevice::getTxNameString(unsigned int i) { 
    8461007    diceNameVector names; 
    847     char namestring[DICE_TX_NAMES_SIZE*4+1]; 
     1008    char namestring[DICE_TX_NAMES_SIZE+1]; 
    8481009     
    8491010    if (!readTxRegBlock(i, DICE_REGISTER_TX_NAMES_BASE,  
    850                         (fb_quadlet_t *)namestring, DICE_TX_NAMES_SIZE*4)) { 
     1011                        (fb_quadlet_t *)namestring, DICE_TX_NAMES_SIZE)) { 
    8511012        debugError("Could not read TX name string \n"); 
    8521013        return names; 
    8531014    } 
    8541015     
    855     namestring[DICE_TX_NAMES_SIZE*4]='\0'; 
     1016    namestring[DICE_TX_NAMES_SIZE]='\0'; 
    8561017    return splitNameString(std::string(namestring)); 
    8571018} 
     
    8601021DiceAvDevice::getRxNameString(unsigned int i) { 
    8611022    diceNameVector names; 
    862     char namestring[DICE_RX_NAMES_SIZE*4+1]; 
     1023    char namestring[DICE_RX_NAMES_SIZE+1]; 
    8631024     
    8641025    if (!readRxRegBlock(i, DICE_REGISTER_RX_NAMES_BASE,  
    865                         (fb_quadlet_t *)namestring, DICE_RX_NAMES_SIZE*4)) { 
     1026                        (fb_quadlet_t *)namestring, DICE_RX_NAMES_SIZE)) { 
    8661027        debugError("Could not read RX name string \n"); 
    8671028        return names; 
    8681029    } 
    8691030     
    870     namestring[DICE_RX_NAMES_SIZE*4]='\0'; 
     1031    namestring[DICE_RX_NAMES_SIZE]='\0'; 
    8711032    return splitNameString(std::string(namestring)); 
    8721033} 
     
    8751036DiceAvDevice::getClockSourceNameString() { 
    8761037    diceNameVector names; 
    877     char namestring[DICE_CLOCKSOURCENAMES_SIZE*4+1]; 
     1038    char namestring[DICE_CLOCKSOURCENAMES_SIZE+1]; 
    8781039     
    8791040    if (!readGlobalRegBlock(DICE_REGISTER_GLOBAL_CLOCKSOURCENAMES,  
    880                         (fb_quadlet_t *)namestring, DICE_CLOCKSOURCENAMES_SIZE*4)) { 
     1041                        (fb_quadlet_t *)namestring, DICE_CLOCKSOURCENAMES_SIZE)) { 
    8811042        debugError("Could not read CLOCKSOURCE name string \n"); 
    8821043        return names; 
    8831044    } 
    8841045     
    885     namestring[DICE_CLOCKSOURCENAMES_SIZE*4]='\0'; 
     1046    namestring[DICE_CLOCKSOURCENAMES_SIZE]='\0'; 
    8861047    return splitNameString(std::string(namestring)); 
    8871048} 
     
    8891050std::string 
    8901051DiceAvDevice::getDeviceNickName() { 
    891     char namestring[DICE_NICK_NAME_SIZE*4+1]; 
     1052    char namestring[DICE_NICK_NAME_SIZE+1]; 
    8921053     
    8931054    if (!readGlobalRegBlock(DICE_REGISTER_GLOBAL_NICK_NAME,  
    894                         (fb_quadlet_t *)namestring, DICE_NICK_NAME_SIZE*4)) { 
     1055                        (fb_quadlet_t *)namestring, DICE_NICK_NAME_SIZE)) { 
    8951056        debugError("Could not read nickname string \n"); 
    8961057        return std::string("(unknown)"); 
    8971058    } 
    8981059     
    899     namestring[DICE_NICK_NAME_SIZE*4]='\0'; 
     1060    namestring[DICE_NICK_NAME_SIZE]='\0'; 
    9001061    return std::string(namestring); 
    9011062} 
     
    9061067 
    9071068    // find the end of the string 
    908     unsigned int end=in.find_first_of("\\\\"); 
     1069    unsigned int end=in.find(string("\\\\")); 
    9091070    // cut the end 
    910     in=in.substr(0,end-2); 
     1071    in=in.substr(0,end); 
    9111072 
    9121073    unsigned int cut; 
    913     while( (cut = in.find_first_of("\\")) != in.npos ) { 
     1074    while( (cut = in.find(string("\\"))) != in.npos ) { 
    9141075        if(cut > 0) { 
    9151076            names.push_back(in.substr(0,cut)); 
     
    9281089DiceAvDevice::initIoFunctions() { 
    9291090 
     1091    // offsets and sizes are returned in quadlets, but we use byte values 
     1092 
    9301093    if(!readReg(DICE_REGISTER_GLOBAL_PAR_SPACE_OFF, &m_global_reg_offset)) { 
    9311094        debugError("Could not initialize m_global_reg_offset\n"); 
    9321095        return false; 
    9331096    } 
     1097    m_global_reg_offset*=4; 
     1098     
    9341099    if(!readReg(DICE_REGISTER_GLOBAL_PAR_SPACE_SZ, &m_global_reg_size)) { 
    9351100        debugError("Could not initialize m_global_reg_size\n"); 
    9361101        return false; 
    9371102    } 
     1103    m_global_reg_size*=4; 
     1104     
    9381105    if(!readReg(DICE_REGISTER_TX_PAR_SPACE_OFF, &m_tx_reg_offset)) { 
    9391106        debugError("Could not initialize m_tx_reg_offset\n"); 
    9401107        return false; 
    9411108    } 
     1109    m_tx_reg_offset*=4; 
     1110     
    9421111    if(!readReg(DICE_REGISTER_TX_PAR_SPACE_SZ, &m_tx_reg_size)) { 
    9431112        debugError("Could not initialize m_tx_reg_size\n"); 
    9441113        return false; 
    9451114    } 
     1115    m_tx_reg_size*=4; 
     1116     
    9461117    if(!readReg(DICE_REGISTER_RX_PAR_SPACE_OFF, &m_rx_reg_offset)) { 
    9471118        debugError("Could not initialize m_rx_reg_offset\n"); 
    9481119        return false; 
    9491120    } 
     1121    m_rx_reg_offset*=4; 
     1122     
    9501123    if(!readReg(DICE_REGISTER_RX_PAR_SPACE_SZ, &m_rx_reg_size)) { 
    9511124        debugError("Could not initialize m_rx_reg_size\n"); 
    9521125        return false; 
    9531126    } 
     1127    m_rx_reg_size*=4; 
     1128     
    9541129    if(!readReg(DICE_REGISTER_UNUSED1_SPACE_OFF, &m_unused1_reg_offset)) { 
    9551130        debugError("Could not initialize m_unused1_reg_offset\n"); 
    9561131        return false; 
    9571132    } 
     1133    m_unused1_reg_offset*=4; 
     1134     
    9581135    if(!readReg(DICE_REGISTER_UNUSED1_SPACE_SZ, &m_unused1_reg_size)) { 
    9591136        debugError("Could not initialize m_unused1_reg_size\n"); 
    9601137        return false; 
    9611138    } 
     1139    m_unused1_reg_size*=4; 
     1140     
    9621141    if(!readReg(DICE_REGISTER_UNUSED2_SPACE_OFF, &m_unused2_reg_offset)) { 
    9631142        debugError("Could not initialize m_unused2_reg_offset\n"); 
    9641143        return false; 
    9651144    } 
     1145    m_unused2_reg_offset*=4; 
     1146     
    9661147    if(!readReg(DICE_REGISTER_UNUSED2_SPACE_SZ, &m_unused2_reg_size)) { 
    9671148        debugError("Could not initialize m_unused2_reg_size\n"); 
    9681149        return false; 
    9691150    } 
     1151    m_unused2_reg_size*=4; 
    9701152 
    9711153    if(!readReg(m_tx_reg_offset + DICE_REGISTER_TX_NB_TX, &m_nb_tx)) { 
     
    9771159        return false; 
    9781160    } 
     1161    m_tx_size*=4; 
     1162     
    9791163    if(!readReg(m_tx_reg_offset + DICE_REGISTER_RX_NB_RX, &m_nb_rx)) { 
    9801164        debugError("Could not initialize m_nb_rx\n"); 
     
    9851169        return false; 
    9861170    } 
     1171    m_rx_size*=4; 
     1172     
     1173    debugOutput(DEBUG_LEVEL_VERBOSE,"DICE Parameter Space info:\n"); 
     1174    debugOutput(DEBUG_LEVEL_VERBOSE," Global  : offset=%04X size=%04d\n", m_global_reg_offset, m_global_reg_size); 
     1175    debugOutput(DEBUG_LEVEL_VERBOSE," TX      : offset=%04X size=%04d\n", m_tx_reg_offset, m_tx_reg_size); 
     1176    debugOutput(DEBUG_LEVEL_VERBOSE,"               nb=%4d size=%04d\n", m_nb_tx, m_tx_size); 
     1177    debugOutput(DEBUG_LEVEL_VERBOSE," RX      : offset=%04X size=%04d\n", m_rx_reg_offset, m_rx_reg_size); 
     1178    debugOutput(DEBUG_LEVEL_VERBOSE,"               nb=%4d size=%04d\n", m_nb_rx, m_rx_size); 
     1179    debugOutput(DEBUG_LEVEL_VERBOSE," UNUSED1 : offset=%04X size=%04d\n", m_unused1_reg_offset, m_unused1_reg_size); 
     1180    debugOutput(DEBUG_LEVEL_VERBOSE," UNUSED2 : offset=%04X size=%04d\n", m_unused2_reg_offset, m_unused2_reg_size); 
    9871181     
    9881182    return true; 
     
    10051199        return false; 
    10061200    } 
     1201     
     1202    *result=ntohl(*result); 
     1203     
    10071204    debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Read result: 0x%08X\n", *result); 
    10081205    
     
    10231220    fb_nodeid_t nodeId=m_nodeId | 0xFFC0; 
    10241221     
    1025     if(!m_p1394Service->write_quadlet( nodeId, addr, data ) ) { 
     1222    if(!m_p1394Service->write_quadlet( nodeId, addr, htonl(data) ) ) { 
    10261223        debugError("Could not write to node 0x%04X addr 0x%012X\n", nodeId, addr); 
    10271224        return false; 
     
    10431240    fb_nodeid_t nodeId=m_nodeId | 0xFFC0; 
    10441241     
    1045     if(!m_p1394Service->read( nodeId, addr, length, data ) ) { 
     1242    if(!m_p1394Service->read( nodeId, addr, length/4, data ) ) { 
    10461243        debugError("Could not read from node 0x%04X addr 0x%012llX\n", nodeId, addr); 
    10471244        return false; 
    10481245    } 
     1246     
     1247    for(unsigned int i=0;i<length/4;i++) { 
     1248        *(data+i)=ntohl(*(data+i)); 
     1249    } 
     1250     
    10491251    return true; 
    10501252} 
     
    10621264    fb_nodeaddr_t addr=DICE_REGISTER_BASE + offset; 
    10631265    fb_nodeid_t nodeId=m_nodeId | 0xFFC0; 
    1064  
    1065     if(!m_p1394Service->write( nodeId, addr, length, data ) ) { 
     1266     
     1267    fb_quadlet_t data_out[length/4]; 
     1268     
     1269    for(unsigned int i=0;i<length/4;i++) { 
     1270        data_out[i]=ntohl(*(data+i)); 
     1271    } 
     1272     
     1273    if(!m_p1394Service->write( nodeId, addr, length/4, data_out ) ) { 
    10661274        debugError("Could not write to node 0x%04X addr 0x%012llX\n", nodeId, addr); 
    10671275        return false; 
    10681276    } 
     1277     
    10691278    return true; 
    10701279} 
     
    11151324    } 
    11161325    // out-of-range check 
    1117     if(offset + length > m_global_reg_size) { 
     1326    if(offset+length > m_global_reg_offset+m_global_reg_size) { 
    11181327        debugError("register offset+length too large: 0x%0llX\n", offset + length); 
    11191328        return DICE_INVALID_OFFSET; 
     
    11741383        return DICE_INVALID_OFFSET; 
    11751384    } 
    1176     if(i >= m_nb_rx) { 
     1385    if(i >= m_nb_tx) { 
    11771386        debugError("TX index out of range\n"); 
    11781387        return DICE_INVALID_OFFSET; 
     
    11821391 
    11831392    // out-of-range check 
    1184     if(offset_tx + length > m_tx_reg_size) { 
     1393    if(offset_tx + length > m_tx_reg_offset+4+m_tx_reg_size*m_nb_tx) { 
    11851394        debugError("register offset+length too large: 0x%0llX\n", offset_tx + length); 
    11861395        return DICE_INVALID_OFFSET; 
     
    12491458 
    12501459    // out-of-range check 
    1251     if(offset_rx + length > m_rx_reg_size) { 
     1460    if(offset_rx + length > m_rx_reg_offset+4+m_rx_reg_size*m_nb_rx) { 
    12521461        debugError("register offset+length too large: 0x%0llX\n", offset_rx + length); 
    12531462        return DICE_INVALID_OFFSET; 
  • branches/streaming-rework/src/dice/dice_avdevice.h

    r433 r436  
    6060    bool discover(); 
    6161 
    62     void showDevice() const
     62    void showDevice()
    6363 
    6464    bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
     
    7575    bool startStreamByIndex(int i); 
    7676    bool stopStreamByIndex(int i); 
    77    
     77     
     78    bool enableStreaming(); 
     79    bool disableStreaming(); 
     80     
    7881protected: 
    79     std::auto_ptr<ConfigRom>( m_configRom ); 
    80     Ieee1394Service* m_p1394Service; 
    81      
    8282    struct VendorModelEntry *m_model; 
    8383     
     
    116116     
    117117    typedef std::vector< std::string > diceNameVector; 
     118    typedef std::vector< std::string >::iterator diceNameVectorIterator; 
    118119    diceNameVector splitNameString(std::string in); 
    119120    diceNameVector getTxNameString(unsigned int i); 
  • branches/streaming-rework/src/dice/dice_defines.h

    r433 r436  
    2020#ifndef DICEDEFINES_H 
    2121#define DICEDEFINES_H 
     22 
     23#define DICE_VER_1_0_4_0 
     24// #define DICE_VER_1_0_7_0 
     25 
    2226 
    2327#define DICE_INVALID_OFFSET                  0xFFFFF00000000000ULL 
     
    7276 
    7377#define DICE_REGISTER_TX_PARAM(size, i, offset) \ 
    74             ( ((i) * (size) * 4ULL) + (offset) ) 
     78            ( ((i) * (size) ) + (offset) ) 
    7579 
    7680//  RX_PAR_SPACE registers 
     
    7882#define DICE_REGISTER_RX_SZ_RX                  0x0004 
    7983 
    80 #define DICE_REGISTER_RX_ISOC_BASE              0x0008 
    81 #define DICE_REGISTER_RX_SEQ_START_BASE         0x000C 
    82 #define DICE_REGISTER_RX_NB_AUDIO_BASE          0x0010 
    83 #define DICE_REGISTER_RX_MIDI_BASE              0x0014 
    84 #define DICE_REGISTER_RX_NAMES_BASE             0x0018 
    85 #define DICE_REGISTER_RX_AC3_CAPABILITIES_BASE  0x0118 
    86 #define DICE_REGISTER_RX_AC3_ENABLE_BASE        0x011C 
     84#ifdef DICE_VER_1_0_4_0 
     85    #define DICE_REGISTER_RX_ISOC_BASE              0x0008 
     86    #define DICE_REGISTER_RX_SEQ_START_BASE         0x0014 
     87    #define DICE_REGISTER_RX_NB_AUDIO_BASE          0x000C 
     88    #define DICE_REGISTER_RX_MIDI_BASE              0x0010 
     89    #define DICE_REGISTER_RX_NAMES_BASE             0x0018 
     90    #define DICE_REGISTER_RX_AC3_CAPABILITIES_BASE  0x0118 
     91    #define DICE_REGISTER_RX_AC3_ENABLE_BASE        0x011C 
     92#endif 
     93 
     94#ifdef DICE_VER_1_0_7_0 
     95    #define DICE_REGISTER_RX_ISOC_BASE              0x0008 
     96    #define DICE_REGISTER_RX_SEQ_START_BASE         0x000C 
     97    #define DICE_REGISTER_RX_NB_AUDIO_BASE          0x0010 
     98    #define DICE_REGISTER_RX_MIDI_BASE              0x0014 
     99    #define DICE_REGISTER_RX_NAMES_BASE             0x0018 
     100    #define DICE_REGISTER_RX_AC3_CAPABILITIES_BASE  0x0118 
     101    #define DICE_REGISTER_RX_AC3_ENABLE_BASE        0x011C 
     102#endif 
    87103 
    88104#define DICE_REGISTER_RX_PARAM(size, i, offset) \ 
    89             ( ((i) * (size) * 4ULL) + (offset) ) 
     105            ( ((i) * (size) ) + (offset) ) 
    90106 
    91107// Register Bitfields 
     
    184200#define DICE_RATE_NONE                  0x0A 
    185201 
    186 #define DICE_RATE_MASK                  0xFFFF0000LU 
     202#define DICE_RATE_MASK                  0x0000FF00LU 
    187203#define DICE_GET_RATE(reg)              (((reg) & DICE_RATE_MASK) >> 8) 
    188204#define DICE_SET_RATE(reg,rate)         (((reg) & ~DICE_RATE_MASK) | (((rate) << 8) & DICE_RATE_MASK) ) 
  • branches/streaming-rework/src/freebob-downloader.cpp

    r413 r436  
    145145    } 
    146146 
    147     service.setVerbose( arguments.verbose > 0 ); 
     147    service.setVerboseLevel( arguments.verbose ); 
    148148    BeBoB::BootloaderManager blMgr( service, node_id ); 
    149149    if ( arguments.force == 1 ) { 
  • branches/streaming-rework/src/freebob-sync.cpp

    r336 r436  
    132132        return -1; 
    133133    } 
    134     if ( !pDeviceManager->discover( arguments.verbose ) ) { 
     134    if ( arguments.verbose ) { 
     135        pDeviceManager->setVerboseLevel(DEBUG_LEVEL_VERBOSE); 
     136    } 
     137    if ( !pDeviceManager->discover( ) ) { 
    135138        debugError( "Could not discover devices\n" ); 
    136139        return -1; 
  • branches/streaming-rework/src/freebob.cpp

    r435 r436  
    103103freebob_discover_devices( freebob_handle_t freebob_handle, int verbose ) 
    104104{ 
    105     return freebob_handle->m_deviceManager->discover(verbose)? 0 : -1; 
     105    if (verbose) { 
     106        freebob_handle->m_deviceManager->setVerboseLevel(DEBUG_LEVEL_VERBOSE); 
     107   } 
     108    return freebob_handle->m_deviceManager->discover()? 0 : -1; 
    106109} 
    107110 
     
    130133    if ( avDevice ) { 
    131134        if ( avDevice->setSamplingFrequency( parseSampleRate( samplerate ) ) ) { 
    132             return freebob_handle->m_deviceManager->discover(0)? 0 : -1; 
     135            return freebob_handle->m_deviceManager->discover()? 0 : -1; 
    133136        } 
    134137    } 
  • branches/streaming-rework/src/freebob_streaming.cpp

    r435 r436  
    8383            return 0; 
    8484    } 
     85     
     86    dev->m_deviceManager->setVerboseLevel(DEBUG_LEVEL_VERBOSE); 
    8587    if ( !dev->m_deviceManager->initialize( dev->options.port ) ) { 
    8688            debugFatal( "Could not initialize device manager\n" ); 
     
    125127     
    126128    // discover the devices on the bus 
    127     if(!dev->m_deviceManager->discover(DEBUG_LEVEL_NORMAL)) { 
     129    if(!dev->m_deviceManager->discover()) { 
    128130            debugFatal("Could not discover devices\n"); 
    129131            delete dev->processorManager; 
     
    254256            } 
    255257        } 
     258 
     259        if (!device->enableStreaming()) { 
     260            debugWarning("Could not enable streaming on device %d!\n",i); 
     261        } 
    256262    } 
    257263 
     
    276282        IAvDevice *device=dev->m_deviceManager->getAvDeviceByIndex(i); 
    277283        assert(device); 
    278              
     284 
     285        if (!device->disableStreaming()) { 
     286            debugWarning("Could not disable streaming on device %d!\n",i); 
     287        } 
     288         
    279289        int j=0; 
    280290        for(j=0; j<device->getStreamCount();j++) { 
  • branches/streaming-rework/src/iavdevice.cpp

    r435 r436  
    7272    m_verboseLevel=l; 
    7373    setDebugLevel(l); 
     74//     m_pConfigRom->setVerboseLevel(l); 
     75    m_p1394Service->setVerboseLevel(l); 
    7476} 
     77 
     78bool 
     79IAvDevice::enableStreaming() { 
     80    return true; 
     81} 
     82 
     83bool 
     84IAvDevice::disableStreaming() { 
     85    return true; 
     86} 
  • branches/streaming-rework/src/iavdevice.h

    r435 r436  
    108108         * device detected, and its configuration. 
    109109         */ 
    110         virtual void showDevice() const = 0; 
     110        virtual void showDevice() = 0; 
    111111 
    112112        /**  
     
    135135         */ 
    136136        virtual bool unlock() = 0; 
     137 
     138    /**  
     139     * @brief Enable streaming on all 'started' streams 
     140     * 
     141     * Enables the ISO streaming on all streams that are 'started' 
     142     * using startStreamByIndex. This is useful to control a 'master enable' 
     143     * function on the device. 
     144     * 
     145     * @return true if successful 
     146     */ 
     147    virtual bool enableStreaming(); 
     148     
     149    /**  
     150     * @brief Disable streaming on all streams 
     151     * 
     152     * Disables ISO streaming on all streams. 
     153     * This is useful to control a 'master enable' 
     154     * function on the device. 
     155     * 
     156     * @return true if successful 
     157     */ 
     158    virtual bool disableStreaming(); 
    137159 
    138160        /**  
  • branches/streaming-rework/src/libieee1394/ieee1394service.cpp

    r429 r436  
    214214} 
    215215 
     216fb_octlet_t 
     217Ieee1394Service::byteSwap_octlet(fb_octlet_t value) { 
     218    #if __BYTE_ORDER == __BIG_ENDIAN 
     219        return value; 
     220    #elif __BYTE_ORDER == __LITTLE_ENDIAN 
     221        fb_octlet_t value_new; 
     222        fb_quadlet_t *in_ptr=reinterpret_cast<fb_quadlet_t *>(&value); 
     223        fb_quadlet_t *out_ptr=reinterpret_cast<fb_quadlet_t *>(&value_new); 
     224        *(out_ptr+1)=htonl(*(in_ptr)); 
     225        *(out_ptr)=htonl(*(in_ptr+1)); 
     226        return value_new; 
     227    #else 
     228        #error Unknown endiannes 
     229    #endif 
     230} 
     231 
    216232bool  
    217233Ieee1394Service::lockCompareSwap64(  fb_nodeid_t nodeId, 
     
    222238{ 
    223239    #ifdef DEBUG 
    224     debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016X\n", 
     240    debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016llX\n", 
    225241                nodeId, addr); 
    226     debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"  if (*(addr)==0x%016llX) *(addr)=0x%016llX\n", 
     242    debugOutput(DEBUG_LEVEL_VERBOSE,"  if (*(addr)==0x%016llX) *(addr)=0x%016llX\n", 
    227243                compare_value, swap_value); 
     244    fb_octlet_t buffer; 
     245    if(!read_octlet( nodeId, addr,&buffer )) { 
     246        debugOutput(DEBUG_LEVEL_VERBOSE,"Could not read owner register\n"); 
     247    } else { 
     248        debugOutput(DEBUG_LEVEL_VERBOSE,"Owner register before = 0x%016llX\n", buffer); 
     249    } 
     250     
     251    buffer=0x123456789ABCDEF0LL; 
     252        debugOutput(DEBUG_LEVEL_VERBOSE,"before byteswap = 0x%016llX\n", buffer); 
     253    buffer=byteSwap_octlet(buffer); 
     254        debugOutput(DEBUG_LEVEL_VERBOSE,"after byteswap = 0x%016llX\n", buffer); 
     255     
     256     
    228257    #endif 
    229  
    230     return raw1394_lock64(m_handle, nodeId, addr, RAW1394_EXTCODE_COMPARE_SWAP, 
    231                           swap_value, compare_value, result) == 0; 
     258     
     259    // do endiannes swapping 
     260    compare_value=byteSwap_octlet(compare_value); 
     261    swap_value=byteSwap_octlet(swap_value); 
     262     
     263    int retval=raw1394_lock64(m_handle, nodeId, addr, RAW1394_EXTCODE_COMPARE_SWAP, 
     264                          swap_value, compare_value, result); 
     265     
     266    #ifdef DEBUG 
     267    if(!read_octlet( nodeId, addr,&buffer )) { 
     268        debugOutput(DEBUG_LEVEL_VERBOSE,"Could not read owner register\n"); 
     269    } else { 
     270        debugOutput(DEBUG_LEVEL_VERBOSE,"Owner register after = 0x%016llX\n", buffer); 
     271    } 
     272    #endif 
     273     
     274    *result=byteSwap_octlet(*result); 
     275     
     276    return (retval == 0); 
    232277} 
    233278 
     
    272317{ 
    273318    avc1394_transaction_block_close( m_handle ); 
    274     return true; 
    275 } 
    276  
    277 bool 
    278 Ieee1394Service::setVerbose( int verboseLevel ) 
    279 { 
    280     setDebugLevel(verboseLevel); 
    281319    return true; 
    282320} 
     
    796834    return ntohl(buffer); 
    797835} 
     836 
     837void 
     838Ieee1394Service::setVerboseLevel(int l)  
     839{ 
     840    setDebugLevel(l); 
     841} 
  • branches/streaming-rework/src/libieee1394/ieee1394service.h

    r424 r436  
    124124     * the content of \ref addr equals \ref compare_with 
    125125     * 
     126     * @note takes care of endiannes 
     127     * 
    126128     * @param nodeId target node ID 
    127129     * @param addr address within target node address space 
     
    147149    raw1394handle_t getHandle() {return m_handle;}; 
    148150 
    149     bool setVerbose( int verboseLevel ); 
    150151    int getVerboseLevel(); 
    151152 
     
    240241    arm_handler_vec_t m_armHandlers; 
    241242     
     243    fb_octlet_t byteSwap_octlet(fb_octlet_t value); 
     244     
     245public: 
     246    void setVerboseLevel(int l); 
     247private: 
    242248    DECLARE_DEBUG_MODULE; 
    243249}; 
  • branches/streaming-rework/src/libosc/OscNode.cpp

    r432 r436  
    6161            delete (*it); 
    6262        } 
     63    } 
     64} 
     65 
     66void 
     67OscNode::setVerboseLevel(int l) { 
     68    setDebugLevel(l); 
     69    for ( OscNodeVectorIterator it = m_ChildNodes.begin(); 
     70      it != m_ChildNodes.end(); 
     71      ++it ) 
     72    { 
     73        (*it)->setVerboseLevel(l); 
    6374    } 
    6475} 
  • branches/streaming-rework/src/libosc/OscNode.h

    r432 r436  
    7979    OscNodeVector m_ChildNodes; 
    8080 
     81public: 
     82    void setVerboseLevel(int l); 
    8183protected: 
    8284    DECLARE_DEBUG_MODULE; 
  • branches/streaming-rework/src/libosc/OscServer.cpp

    r432 r436  
    4949    lo_server_thread_free(m_server); 
    5050    if (m_rootNode) delete m_rootNode; 
     51} 
     52 
     53void 
     54OscServer::setVerboseLevel(int l) { 
     55    setDebugLevel(l); 
     56    if (m_rootNode) m_rootNode->setVerboseLevel(l); 
    5157} 
    5258 
  • branches/streaming-rework/src/libosc/OscServer.h

    r432 r436  
    6464    OscNode * m_rootNode; 
    6565 
    66 protected: 
     66public: 
     67    void setVerboseLevel(int l); 
     68private: 
    6769    DECLARE_DEBUG_MODULE; 
    6870 
  • branches/streaming-rework/src/maudio/maudio_avdevice.cpp

    r426 r436  
    119119 
    120120void 
    121 AvDevice::showDevice() const 
     121AvDevice::showDevice() 
    122122{ 
    123123} 
  • branches/streaming-rework/src/maudio/maudio_avdevice.h

    r435 r436  
    5757    bool discover(); 
    5858     
    59     void showDevice() const
     59    void showDevice()
    6060     
    6161    bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
  • branches/streaming-rework/src/metrichalo/mh_avdevice.cpp

    r426 r436  
    137137 
    138138void 
    139 MHAvDevice::showDevice() const 
     139MHAvDevice::showDevice() 
    140140{ 
    141141    debugOutput(DEBUG_LEVEL_VERBOSE, 
  • branches/streaming-rework/src/metrichalo/mh_avdevice.h

    r435 r436  
    5252    bool discover(); 
    5353 
    54     void showDevice() const
     54    void showDevice()
    5555 
    5656    bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
  • branches/streaming-rework/src/motu/motu_avdevice.cpp

    r428 r436  
    302302 
    303303void 
    304 MotuDevice::showDevice() const 
     304MotuDevice::showDevice() 
    305305{ 
    306306    debugOutput(DEBUG_LEVEL_VERBOSE, 
  • branches/streaming-rework/src/motu/motu_avdevice.h

    r435 r436  
    9999    virtual bool discover(); 
    100100 
    101     virtual void showDevice() const
     101    virtual void showDevice()
    102102 
    103103    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
  • branches/streaming-rework/src/rme/rme_avdevice.cpp

    r426 r436  
    142142 
    143143void 
    144 RmeDevice::showDevice() const 
     144RmeDevice::showDevice() 
    145145{ 
    146146        debugOutput(DEBUG_LEVEL_VERBOSE, 
  • branches/streaming-rework/src/rme/rme_avdevice.h

    r435 r436  
    5353    bool discover(); 
    5454 
    55     void showDevice() const
     55    void showDevice()
    5656 
    5757    bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
  • branches/streaming-rework/src/ser.cpp

    r418 r436  
    1414        return false; 
    1515    } 
    16     if (!devMgr.discover( 0 )) { 
     16     
     17//     devMgr.setVerboseLevel(DEBUG_LEVEL_VERBOSE); 
     18     
     19    if (!devMgr.discover( )) { 
    1720        std::cerr << "could not discover devices" << std::endl; 
    1821        return false; 
  • branches/streaming-rework/tests/test-freebob.cpp

    r435 r436  
    226226            return -1; 
    227227        } 
    228         if ( !m_deviceManager->discover(arguments.verbose) ) { 
     228        if ( arguments.verbose ) { 
     229            m_deviceManager->setVerboseLevel(arguments.verbose); 
     230        } 
     231        if ( !m_deviceManager->discover() ) { 
    229232            fprintf( stderr, "Could not discover devices\n" ); 
    230233            delete m_deviceManager; 
     
    251254            return -1; 
    252255        } 
    253  
    254         if ( !m_deviceManager->discover(arguments.verbose) ) { 
     256        if ( arguments.verbose ) { 
     257            m_deviceManager->setVerboseLevel(arguments.verbose); 
     258        } 
     259        if ( !m_deviceManager->discover() ) { 
    255260            fprintf( stderr, "Could not discover devices\n" ); 
    256261            delete m_deviceManager; 
     
    262267            if ( avDevice ) { 
    263268                if ( avDevice->setSamplingFrequency( parseSampleRate( samplerate ) ) ) { 
    264                     m_deviceManager->discover(arguments.verbose); 
     269                    m_deviceManager->discover(); 
    265270                } else { 
    266271                    fprintf( stderr, "Could not set samplerate\n" ); 
     
    313318            return -1; 
    314319        } 
    315  
    316         if ( !m_deviceManager->discover(arguments.verbose) ) { 
     320        if ( arguments.verbose ) { 
     321            m_deviceManager->setVerboseLevel(arguments.verbose); 
     322        } 
     323        if ( !m_deviceManager->discover() ) { 
    317324            fprintf( stderr, "Could not discover devices\n" ); 
    318325            delete m_deviceManager; 
  • branches/streaming-rework/tests/test-mixer.cpp

    r434 r436  
    4848    fbCmd.setVerbose( bVerbose ); 
    4949    if (bVerbose) { 
    50         ieee1394service.setVerbose( DEBUG_LEVEL_VERY_VERBOSE ); 
     50        ieee1394service.setVerboseLevel( DEBUG_LEVEL_VERY_VERBOSE ); 
    5151    } 
    5252     
  • branches/streaming-rework/tests/test-volume.cpp

    r420 r436  
    4040 
    4141    fbCmd.setVerbose( bVerbose ); 
    42     ieee1394service.setVerbose( bVerbose ); 
     42    if (bVerbose) { 
     43        ieee1394service.setVerboseLevel( DEBUG_LEVEL_VERBOSE ); 
     44    } 
    4345 
    4446    if ( !fbCmd.fire() ) { 
     
    6870 
    6971    fbCmd.setVerbose( bVerbose ); 
    70     ieee1394service.setVerbose( bVerbose ); 
     72    if (bVerbose) { 
     73        ieee1394service.setVerboseLevel( DEBUG_LEVEL_VERBOSE ); 
     74    } 
    7175 
    7276    bool bStatus = fbCmd.fire();