Changeset 436
- Timestamp:
- 03/11/07 12:50:16 (16 years ago)
- Files:
-
- branches/streaming-rework/src/bebob/bebob_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/bebob/bebob_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/bounce/bounce_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/bounce/bounce_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/devicemanager.cpp (modified) (8 diffs)
- branches/streaming-rework/src/devicemanager.h (modified) (2 diffs)
- branches/streaming-rework/src/dice/dice_avdevice.cpp (modified) (31 diffs)
- branches/streaming-rework/src/dice/dice_avdevice.h (modified) (3 diffs)
- branches/streaming-rework/src/dice/dice_defines.h (modified) (4 diffs)
- branches/streaming-rework/src/freebob-downloader.cpp (modified) (1 diff)
- branches/streaming-rework/src/freebob-sync.cpp (modified) (1 diff)
- branches/streaming-rework/src/freebob.cpp (modified) (2 diffs)
- branches/streaming-rework/src/freebob_streaming.cpp (modified) (4 diffs)
- branches/streaming-rework/src/iavdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/iavdevice.h (modified) (2 diffs)
- branches/streaming-rework/src/libieee1394/ieee1394service.cpp (modified) (4 diffs)
- branches/streaming-rework/src/libieee1394/ieee1394service.h (modified) (3 diffs)
- branches/streaming-rework/src/libosc/OscNode.cpp (modified) (1 diff)
- branches/streaming-rework/src/libosc/OscNode.h (modified) (1 diff)
- branches/streaming-rework/src/libosc/OscServer.cpp (modified) (1 diff)
- branches/streaming-rework/src/libosc/OscServer.h (modified) (1 diff)
- branches/streaming-rework/src/maudio/maudio_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/maudio/maudio_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/metrichalo/mh_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/metrichalo/mh_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/motu/motu_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/motu/motu_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/rme/rme_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/rme/rme_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/ser.cpp (modified) (1 diff)
- branches/streaming-rework/tests/test-freebob.cpp (modified) (4 diffs)
- branches/streaming-rework/tests/test-mixer.cpp (modified) (1 diff)
- branches/streaming-rework/tests/test-volume.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/streaming-rework/src/bebob/bebob_avdevice.cpp
r435 r436 881 881 882 882 void 883 AvDevice::showDevice() const883 AvDevice::showDevice() 884 884 { 885 885 debugOutput(DEBUG_LEVEL_VERBOSE, branches/streaming-rework/src/bebob/bebob_avdevice.h
r435 r436 79 79 bool stopStreamByIndex(int i); 80 80 81 virtual void showDevice() const;81 virtual void showDevice(); 82 82 83 83 Ieee1394Service& get1394Service() branches/streaming-rework/src/bounce/bounce_avdevice.cpp
r435 r436 150 150 151 151 void 152 BounceDevice::showDevice() const152 BounceDevice::showDevice() 153 153 { 154 154 debugOutput(DEBUG_LEVEL_NORMAL, "\nI am the bouncedevice, the bouncedevice I am...\n" ); branches/streaming-rework/src/bounce/bounce_avdevice.h
r435 r436 87 87 bool stopStreamByIndex(int i); 88 88 89 void showDevice() const;89 void showDevice(); 90 90 91 91 protected: branches/streaming-rework/src/devicemanager.cpp
r435 r436 70 70 , m_1394Service( 0 ) 71 71 , m_oscServer( NULL ) 72 , m_verboseLevel( DEBUG_LEVEL_NORMAL ) 72 73 { 73 74 addOption(Util::OptionContainer::Option("slaveMode",false)); … … 90 91 91 92 delete m_1394Service; 93 } 94 95 void 96 DeviceManager::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 } 92 111 } 93 112 … … 143 162 return false; 144 163 } 145 164 165 setVerboseLevel(m_verboseLevel); 146 166 return true; 147 167 } 148 168 149 169 bool 150 DeviceManager::discover( int verboseLevel)170 DeviceManager::discover( ) 151 171 { 152 172 bool slaveMode=false; … … 159 179 } 160 180 161 setDebugLevel( verboseLevel ); 162 m_1394Service->setVerbose( verboseLevel ); 181 setVerboseLevel(m_verboseLevel); 163 182 164 183 for ( IAvDeviceVectorIterator it = m_avDevices.begin(); … … 208 227 nodeId ); 209 228 210 avDevice->setVerboseLevel( verboseLevel );229 avDevice->setVerboseLevel( m_verboseLevel ); 211 230 212 231 if ( !avDevice->discover() ) { … … 231 250 } 232 251 233 if ( verboseLevel) {252 if ( m_verboseLevel >= DEBUG_LEVEL_VERBOSE ) { 234 253 avDevice->showDevice(); 235 254 } … … 271 290 nodeId ); 272 291 273 avDevice->setVerboseLevel( verboseLevel );292 avDevice->setVerboseLevel( m_verboseLevel ); 274 293 275 294 if ( !avDevice->discover() ) { … … 282 301 debugError( "setting Id failed\n" ); 283 302 } 284 if ( verboseLevel) {303 if ( m_verboseLevel >= DEBUG_LEVEL_VERBOSE ) { 285 304 avDevice->showDevice(); 286 305 } 287 288 306 289 307 m_avDevices.push_back( avDevice ); branches/streaming-rework/src/devicemanager.h
r435 r436 55 55 bool deinitialize(); 56 56 57 bool discover( int verboseLevel);57 bool discover( ); 58 58 59 59 bool isValidNode( int node ); … … 80 80 81 81 OSC::OscServer* m_oscServer; 82 82 83 // debug stuff 84 public: 85 void setVerboseLevel(int l); 86 private: 87 int m_verboseLevel; 83 88 DECLARE_DEBUG_MODULE; 84 89 }; branches/streaming-rework/src/dice/dice_avdevice.cpp
r433 r436 18 18 * MA 02111-1307 USA. 19 19 */ 20 #warning DICE support is currently untested21 20 22 21 #include "dice/dice_avdevice.h" … … 45 44 static VendorModelEntry supportedDeviceList[] = 46 45 { 47 {0x00000000, 0x0000, "DICE VENDOR", "XXX"}, 46 // vendor id, model id, vendor name, model name 47 {0x00000166, 0x00000002, "TCAT", "DiceII EVM"}, 48 48 }; 49 49 … … 107 107 DiceAvDevice::discover() 108 108 { 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(); 111 111 112 112 for ( unsigned int i = 0; … … 171 171 DiceAvDevice::setSamplingFrequency( ESamplingFrequency samplingFrequency ) 172 172 { 173 debugOutput(DEBUG_LEVEL_VERBOSE, "Setting sample rate: %d\n", 174 convertESamplingFrequency(samplingFrequency)); 175 173 176 bool supported=false; 174 177 fb_quadlet_t select=0x0; … … 239 242 return false; 240 243 } 241 244 242 245 clockreg = DICE_SET_RATE(clockreg, select); 243 246 244 247 if (!writeGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, clockreg)) { 245 248 debugError("Could not write CLOCK_SELECT register\n"); … … 247 250 } 248 251 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 249 264 return true; 250 265 } 251 266 252 267 void 253 DiceAvDevice::showDevice() const268 DiceAvDevice::showDevice() 254 269 { 270 fb_quadlet_t tmp_quadlet; 271 fb_octlet_t tmp_octlet; 272 255 273 debugOutput(DEBUG_LEVEL_VERBOSE, 256 274 "%s %s at node %d\n", m_model->vendor_name, m_model->model_name, 257 275 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 } 258 396 } 259 397 … … 264 402 // Currently we assume the following. 265 403 // * Ack/iso gap = 0.05 us 266 // * DATA_PREFIX = 0.16 us 404 // * DATA_PREFIX = 0.16 us1 267 405 // * DATA_END = 0.26 us 268 406 // These numbers are the worst-case figures given in the ieee1394 … … 334 472 for (unsigned int j=0;j<nb_audio;j++) { 335 473 diceChannelInfo channelInfo; 336 channelInfo.name=names_audio.at( i);474 channelInfo.name=names_audio.at(j); 337 475 channelInfo.portType=ePT_Analog; 338 476 channelInfo.streamPosition=j; … … 349 487 for (unsigned int j=0;j<nb_midi;j++) { 350 488 diceChannelInfo channelInfo; 351 channelInfo.name=names_midi.at( i);489 channelInfo.name=names_midi.at(j); 352 490 channelInfo.portType=ePT_MIDI; 353 491 channelInfo.streamPosition=nb_audio; … … 421 559 for (unsigned int j=0;j<nb_audio;j++) { 422 560 diceChannelInfo channelInfo; 423 channelInfo.name=names_audio.at( i);561 channelInfo.name=names_audio.at(j); 424 562 channelInfo.portType=ePT_Analog; 425 563 channelInfo.streamPosition=j; … … 436 574 for (unsigned int j=0;j<nb_midi;j++) { 437 575 diceChannelInfo channelInfo; 438 channelInfo.name=names_midi.at( i);576 channelInfo.name=names_midi.at(j); 439 577 channelInfo.portType=ePT_MIDI; 440 578 channelInfo.streamPosition=nb_audio; … … 465 603 466 604 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; 468 613 469 614 Streaming::Port *p=NULL; … … 552 697 } 553 698 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; 555 701 swap_value |= m_notifier->getStart(); 556 702 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, 558 704 swap_value, &result )) { 559 705 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); 560 710 } 561 711 … … 584 734 } 585 735 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; 587 738 compare_value |= m_notifier->getStart(); 588 739 589 if (!m_p1394Service->lockCompareSwap64( m_nodeId , addr, compare_value,740 if (!m_p1394Service->lockCompareSwap64( m_nodeId | 0xFFC0, addr, compare_value, 590 741 DICE_OWNER_NO_OWNER, &result )) { 591 742 debugWarning("Could not unregister ourselves as device owner\n"); … … 597 748 598 749 return true; 750 } 751 752 bool 753 DiceAvDevice::enableStreaming() { 754 return enableIsoStreaming(); 755 } 756 757 bool 758 DiceAvDevice::disableStreaming() { 759 return disableIsoStreaming(); 599 760 } 600 761 … … 845 1006 DiceAvDevice::getTxNameString(unsigned int i) { 846 1007 diceNameVector names; 847 char namestring[DICE_TX_NAMES_SIZE *4+1];1008 char namestring[DICE_TX_NAMES_SIZE+1]; 848 1009 849 1010 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)) { 851 1012 debugError("Could not read TX name string \n"); 852 1013 return names; 853 1014 } 854 1015 855 namestring[DICE_TX_NAMES_SIZE *4]='\0';1016 namestring[DICE_TX_NAMES_SIZE]='\0'; 856 1017 return splitNameString(std::string(namestring)); 857 1018 } … … 860 1021 DiceAvDevice::getRxNameString(unsigned int i) { 861 1022 diceNameVector names; 862 char namestring[DICE_RX_NAMES_SIZE *4+1];1023 char namestring[DICE_RX_NAMES_SIZE+1]; 863 1024 864 1025 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)) { 866 1027 debugError("Could not read RX name string \n"); 867 1028 return names; 868 1029 } 869 1030 870 namestring[DICE_RX_NAMES_SIZE *4]='\0';1031 namestring[DICE_RX_NAMES_SIZE]='\0'; 871 1032 return splitNameString(std::string(namestring)); 872 1033 } … … 875 1036 DiceAvDevice::getClockSourceNameString() { 876 1037 diceNameVector names; 877 char namestring[DICE_CLOCKSOURCENAMES_SIZE *4+1];1038 char namestring[DICE_CLOCKSOURCENAMES_SIZE+1]; 878 1039 879 1040 if (!readGlobalRegBlock(DICE_REGISTER_GLOBAL_CLOCKSOURCENAMES, 880 (fb_quadlet_t *)namestring, DICE_CLOCKSOURCENAMES_SIZE *4)) {1041 (fb_quadlet_t *)namestring, DICE_CLOCKSOURCENAMES_SIZE)) { 881 1042 debugError("Could not read CLOCKSOURCE name string \n"); 882 1043 return names; 883 1044 } 884 1045 885 namestring[DICE_CLOCKSOURCENAMES_SIZE *4]='\0';1046 namestring[DICE_CLOCKSOURCENAMES_SIZE]='\0'; 886 1047 return splitNameString(std::string(namestring)); 887 1048 } … … 889 1050 std::string 890 1051 DiceAvDevice::getDeviceNickName() { 891 char namestring[DICE_NICK_NAME_SIZE *4+1];1052 char namestring[DICE_NICK_NAME_SIZE+1]; 892 1053 893 1054 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)) { 895 1056 debugError("Could not read nickname string \n"); 896 1057 return std::string("(unknown)"); 897 1058 } 898 1059 899 namestring[DICE_NICK_NAME_SIZE *4]='\0';1060 namestring[DICE_NICK_NAME_SIZE]='\0'; 900 1061 return std::string(namestring); 901 1062 } … … 906 1067 907 1068 // find the end of the string 908 unsigned int end=in.find _first_of("\\\\");1069 unsigned int end=in.find(string("\\\\")); 909 1070 // cut the end 910 in=in.substr(0,end -2);1071 in=in.substr(0,end); 911 1072 912 1073 unsigned int cut; 913 while( (cut = in.find _first_of("\\")) != in.npos ) {1074 while( (cut = in.find(string("\\"))) != in.npos ) { 914 1075 if(cut > 0) { 915 1076 names.push_back(in.substr(0,cut)); … … 928 1089 DiceAvDevice::initIoFunctions() { 929 1090 1091 // offsets and sizes are returned in quadlets, but we use byte values 1092 930 1093 if(!readReg(DICE_REGISTER_GLOBAL_PAR_SPACE_OFF, &m_global_reg_offset)) { 931 1094 debugError("Could not initialize m_global_reg_offset\n"); 932 1095 return false; 933 1096 } 1097 m_global_reg_offset*=4; 1098 934 1099 if(!readReg(DICE_REGISTER_GLOBAL_PAR_SPACE_SZ, &m_global_reg_size)) { 935 1100 debugError("Could not initialize m_global_reg_size\n"); 936 1101 return false; 937 1102 } 1103 m_global_reg_size*=4; 1104 938 1105 if(!readReg(DICE_REGISTER_TX_PAR_SPACE_OFF, &m_tx_reg_offset)) { 939 1106 debugError("Could not initialize m_tx_reg_offset\n"); 940 1107 return false; 941 1108 } 1109 m_tx_reg_offset*=4; 1110 942 1111 if(!readReg(DICE_REGISTER_TX_PAR_SPACE_SZ, &m_tx_reg_size)) { 943 1112 debugError("Could not initialize m_tx_reg_size\n"); 944 1113 return false; 945 1114 } 1115 m_tx_reg_size*=4; 1116 946 1117 if(!readReg(DICE_REGISTER_RX_PAR_SPACE_OFF, &m_rx_reg_offset)) { 947 1118 debugError("Could not initialize m_rx_reg_offset\n"); 948 1119 return false; 949 1120 } 1121 m_rx_reg_offset*=4; 1122 950 1123 if(!readReg(DICE_REGISTER_RX_PAR_SPACE_SZ, &m_rx_reg_size)) { 951 1124 debugError("Could not initialize m_rx_reg_size\n"); 952 1125 return false; 953 1126 } 1127 m_rx_reg_size*=4; 1128 954 1129 if(!readReg(DICE_REGISTER_UNUSED1_SPACE_OFF, &m_unused1_reg_offset)) { 955 1130 debugError("Could not initialize m_unused1_reg_offset\n"); 956 1131 return false; 957 1132 } 1133 m_unused1_reg_offset*=4; 1134 958 1135 if(!readReg(DICE_REGISTER_UNUSED1_SPACE_SZ, &m_unused1_reg_size)) { 959 1136 debugError("Could not initialize m_unused1_reg_size\n"); 960 1137 return false; 961 1138 } 1139 m_unused1_reg_size*=4; 1140 962 1141 if(!readReg(DICE_REGISTER_UNUSED2_SPACE_OFF, &m_unused2_reg_offset)) { 963 1142 debugError("Could not initialize m_unused2_reg_offset\n"); 964 1143 return false; 965 1144 } 1145 m_unused2_reg_offset*=4; 1146 966 1147 if(!readReg(DICE_REGISTER_UNUSED2_SPACE_SZ, &m_unused2_reg_size)) { 967 1148 debugError("Could not initialize m_unused2_reg_size\n"); 968 1149 return false; 969 1150 } 1151 m_unused2_reg_size*=4; 970 1152 971 1153 if(!readReg(m_tx_reg_offset + DICE_REGISTER_TX_NB_TX, &m_nb_tx)) { … … 977 1159 return false; 978 1160 } 1161 m_tx_size*=4; 1162 979 1163 if(!readReg(m_tx_reg_offset + DICE_REGISTER_RX_NB_RX, &m_nb_rx)) { 980 1164 debugError("Could not initialize m_nb_rx\n"); … … 985 1169 return false; 986 1170 } 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); 987 1181 988 1182 return true; … … 1005 1199 return false; 1006 1200 } 1201 1202 *result=ntohl(*result); 1203 1007 1204 debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Read result: 0x%08X\n", *result); 1008 1205 … … 1023 1220 fb_nodeid_t nodeId=m_nodeId | 0xFFC0; 1024 1221 1025 if(!m_p1394Service->write_quadlet( nodeId, addr, data) ) {1222 if(!m_p1394Service->write_quadlet( nodeId, addr, htonl(data) ) ) { 1026 1223 debugError("Could not write to node 0x%04X addr 0x%012X\n", nodeId, addr); 1027 1224 return false; … … 1043 1240 fb_nodeid_t nodeId=m_nodeId | 0xFFC0; 1044 1241 1045 if(!m_p1394Service->read( nodeId, addr, length , data ) ) {1242 if(!m_p1394Service->read( nodeId, addr, length/4, data ) ) { 1046 1243 debugError("Could not read from node 0x%04X addr 0x%012llX\n", nodeId, addr); 1047 1244 return false; 1048 1245 } 1246 1247 for(unsigned int i=0;i<length/4;i++) { 1248 *(data+i)=ntohl(*(data+i)); 1249 } 1250 1049 1251 return true; 1050 1252 } … … 1062 1264 fb_nodeaddr_t addr=DICE_REGISTER_BASE + offset; 1063 1265 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 ) ) { 1066 1274 debugError("Could not write to node 0x%04X addr 0x%012llX\n", nodeId, addr); 1067 1275 return false; 1068 1276 } 1277 1069 1278 return true; 1070 1279 } … … 1115 1324 } 1116 1325 // out-of-range check 1117 if(offset + length >m_global_reg_size) {1326 if(offset+length > m_global_reg_offset+m_global_reg_size) { 1118 1327 debugError("register offset+length too large: 0x%0llX\n", offset + length); 1119 1328 return DICE_INVALID_OFFSET; … … 1174 1383 return DICE_INVALID_OFFSET; 1175 1384 } 1176 if(i >= m_nb_ rx) {1385 if(i >= m_nb_tx) { 1177 1386 debugError("TX index out of range\n"); 1178 1387 return DICE_INVALID_OFFSET; … … 1182 1391 1183 1392 // 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) { 1185 1394 debugError("register offset+length too large: 0x%0llX\n", offset_tx + length); 1186 1395 return DICE_INVALID_OFFSET; … … 1249 1458 1250 1459 // 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) { 1252 1461 debugError("register offset+length too large: 0x%0llX\n", offset_rx + length); 1253 1462 return DICE_INVALID_OFFSET; branches/streaming-rework/src/dice/dice_avdevice.h
r433 r436 60 60 bool discover(); 61 61 62 void showDevice() const;62 void showDevice(); 63 63 64 64 bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); … … 75 75 bool startStreamByIndex(int i); 76 76 bool stopStreamByIndex(int i); 77 77 78 bool enableStreaming(); 79 bool disableStreaming(); 80 78 81 protected: 79 std::auto_ptr<ConfigRom>( m_configRom );80 Ieee1394Service* m_p1394Service;81 82 82 struct VendorModelEntry *m_model; 83 83 … … 116 116 117 117 typedef std::vector< std::string > diceNameVector; 118 typedef std::vector< std::string >::iterator diceNameVectorIterator; 118 119 diceNameVector splitNameString(std::string in); 119 120 diceNameVector getTxNameString(unsigned int i); branches/streaming-rework/src/dice/dice_defines.h
r433 r436 20 20 #ifndef DICEDEFINES_H 21 21 #define DICEDEFINES_H 22 23 #define DICE_VER_1_0_4_0 24 // #define DICE_VER_1_0_7_0 25 22 26 23 27 #define DICE_INVALID_OFFSET 0xFFFFF00000000000ULL … … 72 76 73 77 #define DICE_REGISTER_TX_PARAM(size, i, offset) \ 74 ( ((i) * (size) * 4ULL) + (offset) )78 ( ((i) * (size) ) + (offset) ) 75 79 76 80 // RX_PAR_SPACE registers … … 78 82 #define DICE_REGISTER_RX_SZ_RX 0x0004 79 83 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 87 103 88 104 #define DICE_REGISTER_RX_PARAM(size, i, offset) \ 89 ( ((i) * (size) * 4ULL) + (offset) )105 ( ((i) * (size) ) + (offset) ) 90 106 91 107 // Register Bitfields … … 184 200 #define DICE_RATE_NONE 0x0A 185 201 186 #define DICE_RATE_MASK 0x FFFF0000LU202 #define DICE_RATE_MASK 0x0000FF00LU 187 203 #define DICE_GET_RATE(reg) (((reg) & DICE_RATE_MASK) >> 8) 188 204 #define DICE_SET_RATE(reg,rate) (((reg) & ~DICE_RATE_MASK) | (((rate) << 8) & DICE_RATE_MASK) ) branches/streaming-rework/src/freebob-downloader.cpp
r413 r436 145 145 } 146 146 147 service.setVerbose ( arguments.verbose > 0);147 service.setVerboseLevel( arguments.verbose ); 148 148 BeBoB::BootloaderManager blMgr( service, node_id ); 149 149 if ( arguments.force == 1 ) { branches/streaming-rework/src/freebob-sync.cpp
r336 r436 132 132 return -1; 133 133 } 134 if ( !pDeviceManager->discover( arguments.verbose ) ) { 134 if ( arguments.verbose ) { 135 pDeviceManager->setVerboseLevel(DEBUG_LEVEL_VERBOSE); 136 } 137 if ( !pDeviceManager->discover( ) ) { 135 138 debugError( "Could not discover devices\n" ); 136 139 return -1; branches/streaming-rework/src/freebob.cpp
r435 r436 103 103 freebob_discover_devices( freebob_handle_t freebob_handle, int verbose ) 104 104 { 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; 106 109 } 107 110 … … 130 133 if ( avDevice ) { 131 134 if ( avDevice->setSamplingFrequency( parseSampleRate( samplerate ) ) ) { 132 return freebob_handle->m_deviceManager->discover( 0)? 0 : -1;135 return freebob_handle->m_deviceManager->discover()? 0 : -1; 133 136 } 134 137 } branches/streaming-rework/src/freebob_streaming.cpp
r435 r436 83 83 return 0; 84 84 } 85 86 dev->m_deviceManager->setVerboseLevel(DEBUG_LEVEL_VERBOSE); 85 87 if ( !dev->m_deviceManager->initialize( dev->options.port ) ) { 86 88 debugFatal( "Could not initialize device manager\n" ); … … 125 127 126 128 // discover the devices on the bus 127 if(!dev->m_deviceManager->discover( DEBUG_LEVEL_NORMAL)) {129 if(!dev->m_deviceManager->discover()) { 128 130 debugFatal("Could not discover devices\n"); 129 131 delete dev->processorManager; … … 254 256 } 255 257 } 258 259 if (!device->enableStreaming()) { 260 debugWarning("Could not enable streaming on device %d!\n",i); 261 } 256 262 } 257 263 … … 276 282 IAvDevice *device=dev->m_deviceManager->getAvDeviceByIndex(i); 277 283 assert(device); 278 284 285 if (!device->disableStreaming()) { 286 debugWarning("Could not disable streaming on device %d!\n",i); 287 } 288 279 289 int j=0; 280 290 for(j=0; j<device->getStreamCount();j++) { branches/streaming-rework/src/iavdevice.cpp
r435 r436 72 72 m_verboseLevel=l; 73 73 setDebugLevel(l); 74 // m_pConfigRom->setVerboseLevel(l); 75 m_p1394Service->setVerboseLevel(l); 74 76 } 77 78 bool 79 IAvDevice::enableStreaming() { 80 return true; 81 } 82 83 bool 84 IAvDevice::disableStreaming() { 85 return true; 86 } branches/streaming-rework/src/iavdevice.h
r435 r436 108 108 * device detected, and its configuration. 109 109 */ 110 virtual void showDevice() const= 0;110 virtual void showDevice() = 0; 111 111 112 112 /** … … 135 135 */ 136 136 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(); 137 159 138 160 /** branches/streaming-rework/src/libieee1394/ieee1394service.cpp
r429 r436 214 214 } 215 215 216 fb_octlet_t 217 Ieee1394Service::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 216 232 bool 217 233 Ieee1394Service::lockCompareSwap64( fb_nodeid_t nodeId, … … 222 238 { 223 239 #ifdef DEBUG 224 debugOutput(DEBUG_LEVEL_VER Y_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016X\n",240 debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016llX\n", 225 241 nodeId, addr); 226 debugOutput(DEBUG_LEVEL_VER Y_VERBOSE," if (*(addr)==0x%016llX) *(addr)=0x%016llX\n",242 debugOutput(DEBUG_LEVEL_VERBOSE," if (*(addr)==0x%016llX) *(addr)=0x%016llX\n", 227 243 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 228 257 #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); 232 277 } 233 278 … … 272 317 { 273 318 avc1394_transaction_block_close( m_handle ); 274 return true;275 }276 277 bool278 Ieee1394Service::setVerbose( int verboseLevel )279 {280 setDebugLevel(verboseLevel);281 319 return true; 282 320 } … … 796 834 return ntohl(buffer); 797 835 } 836 837 void 838 Ieee1394Service::setVerboseLevel(int l) 839 { 840 setDebugLevel(l); 841 } branches/streaming-rework/src/libieee1394/ieee1394service.h
r424 r436 124 124 * the content of \ref addr equals \ref compare_with 125 125 * 126 * @note takes care of endiannes 127 * 126 128 * @param nodeId target node ID 127 129 * @param addr address within target node address space … … 147 149 raw1394handle_t getHandle() {return m_handle;}; 148 150 149 bool setVerbose( int verboseLevel );150 151 int getVerboseLevel(); 151 152 … … 240 241 arm_handler_vec_t m_armHandlers; 241 242 243 fb_octlet_t byteSwap_octlet(fb_octlet_t value); 244 245 public: 246 void setVerboseLevel(int l); 247 private: 242 248 DECLARE_DEBUG_MODULE; 243 249 }; branches/streaming-rework/src/libosc/OscNode.cpp
r432 r436 61 61 delete (*it); 62 62 } 63 } 64 } 65 66 void 67 OscNode::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); 63 74 } 64 75 } branches/streaming-rework/src/libosc/OscNode.h
r432 r436 79 79 OscNodeVector m_ChildNodes; 80 80 81 public: 82 void setVerboseLevel(int l); 81 83 protected: 82 84 DECLARE_DEBUG_MODULE; branches/streaming-rework/src/libosc/OscServer.cpp
r432 r436 49 49 lo_server_thread_free(m_server); 50 50 if (m_rootNode) delete m_rootNode; 51 } 52 53 void 54 OscServer::setVerboseLevel(int l) { 55 setDebugLevel(l); 56 if (m_rootNode) m_rootNode->setVerboseLevel(l); 51 57 } 52 58 branches/streaming-rework/src/libosc/OscServer.h
r432 r436 64 64 OscNode * m_rootNode; 65 65 66 protected: 66 public: 67 void setVerboseLevel(int l); 68 private: 67 69 DECLARE_DEBUG_MODULE; 68 70 branches/streaming-rework/src/maudio/maudio_avdevice.cpp
r426 r436 119 119 120 120 void 121 AvDevice::showDevice() const121 AvDevice::showDevice() 122 122 { 123 123 } branches/streaming-rework/src/maudio/maudio_avdevice.h
r435 r436 57 57 bool discover(); 58 58 59 void showDevice() const;59 void showDevice(); 60 60 61 61 bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); branches/streaming-rework/src/metrichalo/mh_avdevice.cpp
r426 r436 137 137 138 138 void 139 MHAvDevice::showDevice() const139 MHAvDevice::showDevice() 140 140 { 141 141 debugOutput(DEBUG_LEVEL_VERBOSE, branches/streaming-rework/src/metrichalo/mh_avdevice.h
r435 r436 52 52 bool discover(); 53 53 54 void showDevice() const;54 void showDevice(); 55 55 56 56 bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); branches/streaming-rework/src/motu/motu_avdevice.cpp
r428 r436 302 302 303 303 void 304 MotuDevice::showDevice() const304 MotuDevice::showDevice() 305 305 { 306 306 debugOutput(DEBUG_LEVEL_VERBOSE, branches/streaming-rework/src/motu/motu_avdevice.h
r435 r436 99 99 virtual bool discover(); 100 100 101 virtual void showDevice() const;101 virtual void showDevice(); 102 102 103 103 virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); branches/streaming-rework/src/rme/rme_avdevice.cpp
r426 r436 142 142 143 143 void 144 RmeDevice::showDevice() const144 RmeDevice::showDevice() 145 145 { 146 146 debugOutput(DEBUG_LEVEL_VERBOSE, branches/streaming-rework/src/rme/rme_avdevice.h
r435 r436 53 53 bool discover(); 54 54 55 void showDevice() const;55 void showDevice(); 56 56 57 57 bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); branches/streaming-rework/src/ser.cpp
r418 r436 14 14 return false; 15 15 } 16 if (!devMgr.discover( 0 )) { 16 17 // devMgr.setVerboseLevel(DEBUG_LEVEL_VERBOSE); 18 19 if (!devMgr.discover( )) { 17 20 std::cerr << "could not discover devices" << std::endl; 18 21 return false; branches/streaming-rework/tests/test-freebob.cpp
r435 r436 226 226 return -1; 227 227 } 228 if ( !m_deviceManager->discover(arguments.verbose) ) { 228 if ( arguments.verbose ) { 229 m_deviceManager->setVerboseLevel(arguments.verbose); 230 } 231 if ( !m_deviceManager->discover() ) { 229 232 fprintf( stderr, "Could not discover devices\n" ); 230 233 delete m_deviceManager; … … 251 254 return -1; 252 255 } 253 254 if ( !m_deviceManager->discover(arguments.verbose) ) { 256 if ( arguments.verbose ) { 257 m_deviceManager->setVerboseLevel(arguments.verbose); 258 } 259 if ( !m_deviceManager->discover() ) { 255 260 fprintf( stderr, "Could not discover devices\n" ); 256 261 delete m_deviceManager; … … 262 267 if ( avDevice ) { 263 268 if ( avDevice->setSamplingFrequency( parseSampleRate( samplerate ) ) ) { 264 m_deviceManager->discover( arguments.verbose);269 m_deviceManager->discover(); 265 270 } else { 266 271 fprintf( stderr, "Could not set samplerate\n" ); … … 313 318 return -1; 314 319 } 315 316 if ( !m_deviceManager->discover(arguments.verbose) ) { 320 if ( arguments.verbose ) { 321 m_deviceManager->setVerboseLevel(arguments.verbose); 322 } 323 if ( !m_deviceManager->discover() ) { 317 324 fprintf( stderr, "Could not discover devices\n" ); 318 325 delete m_deviceManager; branches/streaming-rework/tests/test-mixer.cpp
r434 r436 48 48 fbCmd.setVerbose( bVerbose ); 49 49 if (bVerbose) { 50 ieee1394service.setVerbose ( DEBUG_LEVEL_VERY_VERBOSE );50 ieee1394service.setVerboseLevel( DEBUG_LEVEL_VERY_VERBOSE ); 51 51 } 52 52 branches/streaming-rework/tests/test-volume.cpp
r420 r436 40 40 41 41 fbCmd.setVerbose( bVerbose ); 42 ieee1394service.setVerbose( bVerbose ); 42 if (bVerbose) { 43 ieee1394service.setVerboseLevel( DEBUG_LEVEL_VERBOSE ); 44 } 43 45 44 46 if ( !fbCmd.fire() ) { … … 68 70 69 71 fbCmd.setVerbose( bVerbose ); 70 ieee1394service.setVerbose( bVerbose ); 72 if (bVerbose) { 73 ieee1394service.setVerboseLevel( DEBUG_LEVEL_VERBOSE ); 74 } 71 75 72 76 bool bStatus = fbCmd.fire();