Changeset 583 for trunk/libffado
- Timestamp:
- 08/29/07 02:19:04 (16 years ago)
- Files:
-
- trunk/libffado/src/bebob/bebob_avdevice.cpp (modified) (5 diffs)
- trunk/libffado/src/bebob/bebob_avdevice.h (modified) (2 diffs)
- trunk/libffado/src/bounce/bounce_avdevice.cpp (modified) (8 diffs)
- trunk/libffado/src/bounce/bounce_avdevice.h (modified) (1 diff)
- trunk/libffado/src/bounce/bounce_slave_avdevice.cpp (modified) (4 diffs)
- trunk/libffado/src/bounce/bounce_slave_avdevice.h (modified) (1 diff)
- trunk/libffado/src/devicemanager.cpp (modified) (9 diffs)
- trunk/libffado/src/dice/dice_avdevice.cpp (modified) (11 diffs)
- trunk/libffado/src/dice/dice_avdevice.h (modified) (1 diff)
- trunk/libffado/src/ffadodevice.cpp (modified) (2 diffs)
- trunk/libffado/src/ffadodevice.h (modified) (4 diffs)
- trunk/libffado/src/genericavc/avc_avdevice.cpp (modified) (2 diffs)
- trunk/libffado/src/genericavc/avc_avdevice.h (modified) (1 diff)
- trunk/libffado/src/maudio/maudio_avdevice.cpp (modified) (2 diffs)
- trunk/libffado/src/maudio/maudio_avdevice.h (modified) (1 diff)
- trunk/libffado/src/metrichalo/mh_avdevice.cpp (modified) (3 diffs)
- trunk/libffado/src/metrichalo/mh_avdevice.h (modified) (1 diff)
- trunk/libffado/src/motu/motu_avdevice.cpp (modified) (6 diffs)
- trunk/libffado/src/motu/motu_avdevice.h (modified) (1 diff)
- trunk/libffado/src/rme/rme_avdevice.cpp (modified) (3 diffs)
- trunk/libffado/src/rme/rme_avdevice.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/bebob/bebob_avdevice.cpp
r580 r583 82 82 }; 83 83 84 AvDevice::AvDevice( std::auto_ptr< ConfigRom >( configRom ), 85 Ieee1394Service& ieee1394service, 86 int nodeId ) 87 : GenericAVC::AvDevice( configRom, ieee1394service, nodeId ) 84 AvDevice::AvDevice( Ieee1394Service& ieee1394service, 85 std::auto_ptr< ConfigRom >( configRom ) ) 86 : GenericAVC::AvDevice( ieee1394service, configRom ) 88 87 , m_Mixer ( NULL ) 89 88 { 90 89 debugOutput( DEBUG_LEVEL_VERBOSE, "Created BeBoB::AvDevice (NodeID %d)\n", 91 nodeId);90 configRom->getNodeId() ); 92 91 } 93 92 … … 171 170 } 172 171 172 FFADODevice * 173 AvDevice::createDevice( Ieee1394Service& ieee1394Service, 174 std::auto_ptr<ConfigRom>( configRom )) 175 { 176 return new AvDevice(ieee1394Service, configRom ); 177 } 178 173 179 bool 174 180 AvDevice::discover() … … 240 246 ExtendedStreamFormatCmd extStreamFormatCmd( *m_p1394Service ); 241 247 UnitPlugAddress unitPlugAddress( UnitPlugAddress::ePT_PCR, 242 m_nodeId);248 getNodeId() ); 243 249 extStreamFormatCmd.setPlugAddress( PlugAddress( PlugAddress::ePD_Input, 244 250 PlugAddress::ePAM_Unit, 245 251 unitPlugAddress ) ); 246 252 247 extStreamFormatCmd.setNodeId( m_nodeId);253 extStreamFormatCmd.setNodeId( getNodeId() ); 248 254 extStreamFormatCmd.setCommandType( AVCCommand::eCT_Status ); 249 255 extStreamFormatCmd.setVerbose( true ); … … 274 280 ExtendedPlugInfoCmd extPlugInfoCmd( *m_p1394Service ); 275 281 UnitPlugAddress unitPlugAddress( UnitPlugAddress::ePT_PCR, 276 m_nodeId);282 getNodeId() ); 277 283 extPlugInfoCmd.setPlugAddress( PlugAddress( ePlugDirection, 278 284 PlugAddress::ePAM_Unit, 279 285 unitPlugAddress ) ); 280 extPlugInfoCmd.setNodeId( m_nodeId);286 extPlugInfoCmd.setNodeId( getNodeId() ); 281 287 extPlugInfoCmd.setCommandType( AVCCommand::eCT_Status ); 282 288 extPlugInfoCmd.setVerbose( true ); … … 311 317 signalUnitAddr.m_plugId = 0x01; 312 318 signalSourceCmd.setSignalDestination( signalUnitAddr ); 313 signalSourceCmd.setNodeId( m_nodeId);319 signalSourceCmd.setNodeId( getNodeId() ); 314 320 signalSourceCmd.setSubunitType( eST_Unit ); 315 321 signalSourceCmd.setSubunitId( 0xff ); trunk/libffado/src/bebob/bebob_avdevice.h
r580 r583 58 58 class AvDevice : public GenericAVC::AvDevice { 59 59 public: 60 AvDevice( std::auto_ptr<ConfigRom>( configRom ), 61 Ieee1394Service& ieee1394Service, 62 int nodeId ); 60 AvDevice( Ieee1394Service& ieee1394Service, 61 std::auto_ptr<ConfigRom>( configRom )); 63 62 virtual ~AvDevice(); 64 63 … … 67 66 virtual bool saveCache(); 68 67 virtual bool discover(); 68 69 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 70 std::auto_ptr<ConfigRom>( configRom )); 69 71 70 72 virtual AVC::Subunit* createSubunit(AVC::Unit& unit, trunk/libffado/src/bounce/bounce_avdevice.cpp
r554 r583 52 52 }; 53 53 54 BounceDevice::BounceDevice( std::auto_ptr< ConfigRom >( configRom ), 55 Ieee1394Service& ieee1394service, 56 int nodeId ) 57 : FFADODevice( configRom, ieee1394service, nodeId ) 54 BounceDevice::BounceDevice( Ieee1394Service& ieee1394Service, 55 std::auto_ptr<ConfigRom>( configRom )) 56 : FFADODevice( ieee1394Service, configRom ) 58 57 , m_samplerate (44100) 59 58 , m_model( NULL ) … … 61 60 { 62 61 debugOutput( DEBUG_LEVEL_VERBOSE, "Created Bounce::BounceDevice (NodeID %d)\n", 63 nodeId);62 configRom->getNodeId() ); 64 63 addOption(Util::OptionContainer::Option("snoopMode",false)); 65 64 } … … 97 96 } 98 97 98 FFADODevice * 99 BounceDevice::createDevice( Ieee1394Service& ieee1394Service, 100 std::auto_ptr<ConfigRom>( configRom )) 101 { 102 return new BounceDevice(ieee1394Service, configRom ); 103 } 104 99 105 bool 100 106 BounceDevice::discover() 101 107 { 102 108 debugOutput( DEBUG_LEVEL_VERBOSE, "discovering BounceDevice (NodeID %d)\n", 103 m_nodeId);109 getNodeId() ); 104 110 105 111 // unsigned int vendorId = m_pConfigRom->getNodeVendorId(); … … 165 171 debugOutput(DEBUG_LEVEL_NORMAL, "Vendor Name : %s\n", m_model->vendor_name); 166 172 debugOutput(DEBUG_LEVEL_NORMAL, "Model Name : %s\n", m_model->model_name); 167 debugOutput(DEBUG_LEVEL_NORMAL, "Node : %d\n", m_nodeId);173 debugOutput(DEBUG_LEVEL_NORMAL, "Node : %d\n", getNodeId()); 168 174 debugOutput(DEBUG_LEVEL_NORMAL, "GUID : 0x%016llX\n", m_pConfigRom->getGuid()); 169 175 debugOutput(DEBUG_LEVEL_NORMAL, "\n" ); … … 525 531 526 532 fb_nodeaddr_t addr=BOUNCE_REGISTER_BASE + offset; 527 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;533 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 528 534 529 535 if(!m_p1394Service->read_quadlet( nodeId, addr, result ) ) { … … 547 553 548 554 fb_nodeaddr_t addr=BOUNCE_REGISTER_BASE + offset; 549 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;555 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 550 556 551 557 if(!m_p1394Service->write_quadlet( nodeId, addr, data ) ) { … … 567 573 568 574 fb_nodeaddr_t addr=BOUNCE_REGISTER_BASE + offset; 569 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;575 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 570 576 571 577 if(!m_p1394Service->read( nodeId, addr, length, data ) ) { … … 587 593 588 594 fb_nodeaddr_t addr=BOUNCE_REGISTER_BASE + offset; 589 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;595 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 590 596 591 597 if(!m_p1394Service->write( nodeId, addr, length, data ) ) { trunk/libffado/src/bounce/bounce_avdevice.h
r554 r583 69 69 class BounceNotifier; 70 70 public: 71 BounceDevice( std::auto_ptr<ConfigRom>( configRom ), 72 Ieee1394Service& ieee1394Service, 73 int nodeId ); 71 BounceDevice( Ieee1394Service& ieee1394Service, 72 std::auto_ptr<ConfigRom>( configRom )); 74 73 virtual ~BounceDevice(); 75 74 76 75 static bool probe( ConfigRom& configRom ); 76 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 77 std::auto_ptr<ConfigRom>( configRom )); 77 78 static int getConfigurationId( ); 78 79 virtual bool discover(); trunk/libffado/src/bounce/bounce_slave_avdevice.cpp
r445 r583 41 41 }; 42 42 43 BounceSlaveDevice::BounceSlaveDevice( std::auto_ptr< ConfigRom >( configRom ), 44 Ieee1394Service& ieee1394service ) 45 : BounceDevice( configRom, 46 ieee1394service, 47 ieee1394service.getLocalNodeId() ) 43 BounceSlaveDevice::BounceSlaveDevice( Ieee1394Service& ieee1394Service, 44 std::auto_ptr<ConfigRom>( configRom )) 45 : BounceDevice( ieee1394Service, configRom ) 48 46 { 49 47 addOption(Util::OptionContainer::Option("isoTimeoutSecs",(int64_t)120)); … … 59 57 // we are always capable of constructing a slave device 60 58 return true; 59 } 60 61 FFADODevice * 62 BounceSlaveDevice::createDevice( Ieee1394Service& ieee1394Service, 63 std::auto_ptr<ConfigRom>( configRom )) 64 { 65 return new BounceSlaveDevice(ieee1394Service, configRom ); 61 66 } 62 67 … … 104 109 // This should be handled more carefuly. 105 110 debugError( "Could not reread config rom from device (node id %d).\n", 106 m_nodeId);111 getNodeId() ); 107 112 return false; 108 113 } … … 119 124 BounceSlaveDevice::lock() { 120 125 debugOutput(DEBUG_LEVEL_VERBOSE, "Locking %s %s at node %d\n", 121 m_model->vendor_name, m_model->model_name, m_nodeId);126 m_model->vendor_name, m_model->model_name, getNodeId()); 122 127 123 128 // get a notifier to handle device notifications trunk/libffado/src/bounce/bounce_slave_avdevice.h
r445 r583 45 45 public: 46 46 47 BounceSlaveDevice( std::auto_ptr<ConfigRom>( configRom ),48 Ieee1394Service& ieee1394Service);47 BounceSlaveDevice( Ieee1394Service& ieee1394Service, 48 std::auto_ptr<ConfigRom>( configRom )); 49 49 virtual ~BounceSlaveDevice(); 50 50 51 51 static bool probe( ConfigRom& configRom ); 52 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 53 std::auto_ptr<ConfigRom>( configRom )); 52 54 bool discover(); 53 55 bool prepare(); trunk/libffado/src/devicemanager.cpp
r581 r583 330 330 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying BeBoB...\n" ); 331 331 if ( BeBoB::AvDevice::probe( *configRom.get() ) ) { 332 return new BeBoB::AvDevice( configRom, *m_1394Service, id);332 return BeBoB::AvDevice::createDevice( *m_1394Service, configRom ); 333 333 } 334 334 #endif … … 337 337 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Generic AV/C...\n" ); 338 338 if ( GenericAVC::AvDevice::probe( *configRom.get() ) ) { 339 return new GenericAVC::AvDevice( configRom, *m_1394Service, id);339 return GenericAVC::AvDevice::createDevice( *m_1394Service, configRom ); 340 340 } 341 341 #endif … … 344 344 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying M-Audio...\n" ); 345 345 if ( MAudio::AvDevice::probe( *configRom.get() ) ) { 346 return new MAudio::AvDevice( configRom, *m_1394Service, id);346 return MAudio::AvDevice::createDevice( *m_1394Service, configRom ); 347 347 } 348 348 #endif … … 351 351 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Motu...\n" ); 352 352 if ( Motu::MotuDevice::probe( *configRom.get() ) ) { 353 return new Motu::MotuDevice( configRom, *m_1394Service, id);353 return Motu::MotuDevice::createDevice( *m_1394Service, configRom ); 354 354 } 355 355 #endif … … 358 358 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Dice...\n" ); 359 359 if ( Dice::DiceAvDevice::probe( *configRom.get() ) ) { 360 return new Dice::DiceAvDevice( configRom, *m_1394Service, id);360 return Dice::DiceAvDevice::createDevice( *m_1394Service, configRom ); 361 361 } 362 362 #endif … … 365 365 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Metric Halo...\n" ); 366 366 if ( MetricHalo::MHAvDevice::probe( *configRom.get() ) ) { 367 return new MetricHalo::MHAvDevice( configRom, *m_1394Service, id);367 return MetricHalo::MHAvDevice::createDevice( *m_1394Service, configRom ); 368 368 } 369 369 #endif … … 372 372 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying RME...\n" ); 373 373 if ( Rme::RmeDevice::probe( *configRom.get() ) ) { 374 return new Rme::RmeDevice( configRom, *m_1394Service, id);374 return Rme::RmeDevice::createDevice( *m_1394Service, configRom ); 375 375 } 376 376 #endif … … 379 379 debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Bounce...\n" ); 380 380 if ( Bounce::BounceDevice::probe( *configRom.get() ) ) { 381 return new Bounce::BounceDevice( configRom, *m_1394Service, id);381 return Bounce::BounceDevice::createDevice( *m_1394Service, configRom ); 382 382 } 383 383 #endif … … 392 392 #ifdef ENABLE_BOUNCE 393 393 if ( Bounce::BounceSlaveDevice::probe( *configRom.get() ) ) { 394 return new Bounce::BounceSlaveDevice( configRom, *m_1394Service);394 return Bounce::BounceSlaveDevice::createDevice( *m_1394Service, configRom ); 395 395 } 396 396 #endif trunk/libffado/src/dice/dice_avdevice.cpp
r554 r583 51 51 }; 52 52 53 DiceAvDevice::DiceAvDevice( std::auto_ptr< ConfigRom >( configRom ), 54 Ieee1394Service& ieee1394service, 55 int nodeId ) 56 : FFADODevice( configRom, ieee1394service, nodeId ) 53 DiceAvDevice::DiceAvDevice( Ieee1394Service& ieee1394Service, 54 std::auto_ptr<ConfigRom>( configRom )) 55 : FFADODevice( ieee1394Service, configRom ) 57 56 , m_model( NULL ) 58 57 , m_global_reg_offset (0xFFFFFFFFLU) … … 73 72 { 74 73 debugOutput( DEBUG_LEVEL_VERBOSE, "Created Dice::DiceAvDevice (NodeID %d)\n", 75 nodeId);74 configRom->getNodeId() ); 76 75 77 76 } … … 105 104 106 105 return false; 106 } 107 108 FFADODevice * 109 DiceAvDevice::createDevice( Ieee1394Service& ieee1394Service, 110 std::auto_ptr<ConfigRom>( configRom )) 111 { 112 return new DiceAvDevice(ieee1394Service, configRom ); 107 113 } 108 114 … … 282 288 debugOutput(DEBUG_LEVEL_VERBOSE, 283 289 "%s %s at node %d\n", m_model->vendor_name, m_model->model_name, 284 m_nodeId);290 getNodeId()); 285 291 286 292 debugOutput(DEBUG_LEVEL_VERBOSE," DICE Parameter Space info:\n"); … … 666 672 667 673 debugOutput(DEBUG_LEVEL_VERBOSE, "Locking %s %s at node %d\n", 668 m_model->vendor_name, m_model->model_name, m_nodeId);674 m_model->vendor_name, m_model->model_name, getNodeId()); 669 675 670 676 // get a notifier to handle device notifications … … 710 716 swap_value |= m_notifier->getStart(); 711 717 712 if (!m_p1394Service->lockCompareSwap64( m_nodeId| 0xFFC0, addr, DICE_OWNER_NO_OWNER,718 if (!m_p1394Service->lockCompareSwap64( getNodeId() | 0xFFC0, addr, DICE_OWNER_NO_OWNER, 713 719 swap_value, &result )) { 714 720 debugWarning("Could not register ourselves as device owner\n"); … … 747 753 compare_value |= m_notifier->getStart(); 748 754 749 if (!m_p1394Service->lockCompareSwap64( m_nodeId| 0xFFC0, addr, compare_value,755 if (!m_p1394Service->lockCompareSwap64( getNodeId() | 0xFFC0, addr, compare_value, 750 756 DICE_OWNER_NO_OWNER, &result )) { 751 757 debugWarning("Could not unregister ourselves as device owner\n"); … … 1202 1208 1203 1209 fb_nodeaddr_t addr=DICE_REGISTER_BASE + offset; 1204 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;1210 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 1205 1211 1206 1212 if(!m_p1394Service->read_quadlet( nodeId, addr, result ) ) { … … 1227 1233 1228 1234 fb_nodeaddr_t addr=DICE_REGISTER_BASE + offset; 1229 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;1235 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 1230 1236 1231 1237 if(!m_p1394Service->write_quadlet( nodeId, addr, htonl(data) ) ) { … … 1247 1253 1248 1254 fb_nodeaddr_t addr=DICE_REGISTER_BASE + offset; 1249 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;1255 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 1250 1256 1251 1257 if(!m_p1394Service->read( nodeId, addr, length/4, data ) ) { … … 1272 1278 1273 1279 fb_nodeaddr_t addr=DICE_REGISTER_BASE + offset; 1274 fb_nodeid_t nodeId= m_nodeId| 0xFFC0;1280 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 1275 1281 1276 1282 fb_quadlet_t data_out[length/4]; trunk/libffado/src/dice/dice_avdevice.h
r554 r583 56 56 class DiceNotifier; 57 57 public: 58 DiceAvDevice( std::auto_ptr<ConfigRom>( configRom ), 59 Ieee1394Service& ieee1394Service, 60 int nodeId); 58 DiceAvDevice( Ieee1394Service& ieee1394Service, 59 std::auto_ptr<ConfigRom>( configRom )); 61 60 ~DiceAvDevice(); 62 61 63 62 static bool probe( ConfigRom& configRom ); 63 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 64 std::auto_ptr<ConfigRom>( configRom )); 65 virtual bool discover(); 66 64 67 static int getConfigurationId( ); 65 virtual bool discover();66 68 67 69 virtual void showDevice(); trunk/libffado/src/ffadodevice.cpp
r581 r583 35 35 IMPL_DEBUG_MODULE( FFADODevice, FFADODevice, DEBUG_LEVEL_NORMAL ); 36 36 37 FFADODevice::FFADODevice( std::auto_ptr< ConfigRom >( configRom ), 38 Ieee1394Service& ieee1394service, 39 int nodeId ) 37 FFADODevice::FFADODevice( Ieee1394Service& ieee1394Service, 38 std::auto_ptr<ConfigRom>( configRom )) 40 39 : Control::Container() 41 40 , m_pConfigRom( configRom ) 42 , m_p1394Service( &ieee1394service ) 43 , m_nodeId ( nodeId ) 41 , m_p1394Service( &ieee1394Service ) 44 42 { 45 43 addOption(Util::OptionContainer::Option("id",std::string("dev?"))); 46 44 47 45 std::ostringstream nodestr; 48 nodestr << "node" << nodeId; 46 nodestr << "node" << m_pConfigRom->getNodeId(); 47 49 48 // setOscBase(nodestr.str()); 50 ConfigRom& c = getConfigRom(); 49 // ConfigRom& c = getConfigRom(); 50 // addChildOscNode(&c); 51 } 51 52 52 // addChildOscNode(&c); 53 FFADODevice * 54 FFADODevice::createDevice( Ieee1394Service& , 55 std::auto_ptr<ConfigRom>( x )) 56 { 57 // re-implement this!! 58 assert(0); 59 return NULL; 53 60 } 54 61 … … 57 64 { 58 65 return getConfigRom().getGuidString(); 66 } 67 68 int 69 FFADODevice::getNodeId() 70 { 71 return getConfigRom().getNodeId(); 59 72 } 60 73 trunk/libffado/src/ffadodevice.h
r581 r583 48 48 { 49 49 public: 50 FFADODevice( std::auto_ptr< ConfigRom >( configRom ), 51 Ieee1394Service& ieee1394service, 52 int nodeId ); 50 FFADODevice( Ieee1394Service& ieee1394service, 51 std::auto_ptr< ConfigRom >( configRom ) ); 53 52 54 53 virtual ~FFADODevice() {}; … … 97 96 98 97 /** 98 * @brief This is called by the DeviceManager to create an instance of the device 99 * 100 * This function enables the FFADODevice to return a subclass of itself should that 101 * be needed. If we don't do this we'd need to know about the subclasses in the 102 * devicemanager, whilst now we don't. 103 * 104 * The function should return an instance of either the class itself or a subclass 105 * of itself. 106 * 107 * This should be overridden in any subclass. 108 * 109 * @return a new instance of the AvDevice type, NULL when unsuccessful 110 */ 111 static FFADODevice * createDevice( Ieee1394Service& , 112 std::auto_ptr<ConfigRom>( x )); 113 114 /** 99 115 * @brief This is called by the DeviceManager to discover & configure the device 100 116 * … … 286 302 * @return the node id 287 303 */ 288 int getNodeId() { return m_nodeId;};304 int getNodeId(); 289 305 290 306 // the Control::Container functions … … 297 313 std::auto_ptr<ConfigRom>( m_pConfigRom ); 298 314 Ieee1394Service* m_p1394Service; 299 int m_nodeId;300 315 301 316 DECLARE_DEBUG_MODULE; trunk/libffado/src/genericavc/avc_avdevice.cpp
r560 r583 56 56 }; 57 57 58 AvDevice::AvDevice( std::auto_ptr< ConfigRom >( configRom ), 59 Ieee1394Service& ieee1394service, 60 int nodeId ) 61 : FFADODevice( configRom, ieee1394service, nodeId ) 58 AvDevice::AvDevice( Ieee1394Service& ieee1394Service, 59 std::auto_ptr<ConfigRom>( configRom )) 60 : FFADODevice( ieee1394Service, configRom ) 62 61 , m_model( NULL ) 63 62 64 63 { 65 64 debugOutput( DEBUG_LEVEL_VERBOSE, "Created GenericAVC::AvDevice (NodeID %d)\n", 66 nodeId);65 configRom->getNodeId() ); 67 66 addOption(Util::OptionContainer::Option("snoopMode",false)); 68 67 } … … 92 91 93 92 return false; 93 } 94 95 FFADODevice * 96 AvDevice::createDevice( Ieee1394Service& ieee1394Service, 97 std::auto_ptr<ConfigRom>( configRom )) 98 { 99 return new AvDevice(ieee1394Service, configRom ); 94 100 } 95 101 trunk/libffado/src/genericavc/avc_avdevice.h
r557 r583 47 47 class AvDevice : public FFADODevice, public AVC::Unit { 48 48 public: 49 AvDevice( std::auto_ptr<ConfigRom>( configRom ), 50 Ieee1394Service& ieee1394Service, 51 int nodeId ); 49 AvDevice( Ieee1394Service& ieee1394Service, 50 std::auto_ptr<ConfigRom>( configRom )); 52 51 virtual ~AvDevice(); 53 52 54 53 static bool probe( ConfigRom& configRom ); 55 54 virtual bool discover(); 55 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 56 std::auto_ptr<ConfigRom>( configRom )); 56 57 57 58 virtual void setVerboseLevel(int l); trunk/libffado/src/maudio/maudio_avdevice.cpp
r554 r583 40 40 namespace MAudio { 41 41 42 AvDevice::AvDevice( std::auto_ptr< ConfigRom >( configRom ), 43 Ieee1394Service& ieee1394service, 44 int iNodeId ) 45 : BeBoB::AvDevice( configRom, 46 ieee1394service, 47 iNodeId ) 42 AvDevice::AvDevice( Ieee1394Service& ieee1394Service, 43 std::auto_ptr<ConfigRom>( configRom )) 44 : BeBoB::AvDevice( ieee1394Service, configRom) 48 45 , m_model ( NULL ) 49 46 { 50 47 debugOutput( DEBUG_LEVEL_VERBOSE, "Created MAudio::AvDevice (NodeID %d)\n", 51 iNodeId);48 configRom->getNodeId() ); 52 49 } 53 50 … … 82 79 } 83 80 return false; 81 } 82 83 FFADODevice * 84 AvDevice::createDevice( Ieee1394Service& ieee1394Service, 85 std::auto_ptr<ConfigRom>( configRom )) 86 { 87 return new AvDevice(ieee1394Service, configRom ); 84 88 } 85 89 trunk/libffado/src/maudio/maudio_avdevice.h
r554 r583 53 53 class AvDevice : public BeBoB::AvDevice { 54 54 public: 55 AvDevice( std::auto_ptr<ConfigRom>( configRom ), 56 Ieee1394Service& ieee1394Service, 57 int nodeId ); 55 AvDevice( Ieee1394Service& ieee1394Service, 56 std::auto_ptr<ConfigRom>( configRom )); 58 57 virtual ~AvDevice(); 59 58 60 59 static bool probe( ConfigRom& configRom ); 61 static int getConfigurationId( ); 60 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 61 std::auto_ptr<ConfigRom>( configRom )); 62 62 virtual bool discover(); 63 63 64 static int getConfigurationId( ); 65 64 66 virtual void showDevice(); 65 67 trunk/libffado/src/metrichalo/mh_avdevice.cpp
r554 r583 50 50 }; 51 51 52 MHAvDevice::MHAvDevice( std::auto_ptr< ConfigRom >( configRom ), 53 Ieee1394Service& ieee1394service, 54 int nodeId ) 55 : FFADODevice( configRom, ieee1394service, nodeId ) 52 MHAvDevice::MHAvDevice( Ieee1394Service& ieee1394Service, 53 std::auto_ptr<ConfigRom>( configRom )) 54 : FFADODevice( ieee1394Service, configRom ) 56 55 , m_model( NULL ) 57 56 58 57 { 59 58 debugOutput( DEBUG_LEVEL_VERBOSE, "Created MetricHalo::MHAvDevice (NodeID %d)\n", 60 nodeId);59 configRom->getNodeId() ); 61 60 } 62 61 … … 85 84 86 85 return false; 86 } 87 88 FFADODevice * 89 MHAvDevice::createDevice( Ieee1394Service& ieee1394Service, 90 std::auto_ptr<ConfigRom>( configRom )) 91 { 92 return new MHAvDevice(ieee1394Service, configRom ); 87 93 } 88 94 … … 149 155 debugOutput(DEBUG_LEVEL_VERBOSE, 150 156 "%s %s at node %d\n", m_model->vendor_name, m_model->model_name, 151 m_nodeId);157 getNodeId()); 152 158 } 153 159 trunk/libffado/src/metrichalo/mh_avdevice.h
r554 r583 47 47 class MHAvDevice : public FFADODevice { 48 48 public: 49 MHAvDevice( std::auto_ptr<ConfigRom>( configRom ), 50 Ieee1394Service& ieee1394Service, 51 int nodeId ); 49 MHAvDevice( Ieee1394Service& ieee1394Service, 50 std::auto_ptr<ConfigRom>( configRom )); 52 51 virtual ~MHAvDevice(); 53 52 54 53 static bool probe( ConfigRom& configRom ); 54 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 55 std::auto_ptr<ConfigRom>( configRom )); 55 56 static int getConfigurationId(); 56 57 virtual bool discover(); trunk/libffado/src/motu/motu_avdevice.cpp
r554 r583 56 56 }; 57 57 58 MotuDevice::MotuDevice( std::auto_ptr< ConfigRom >( configRom ), 59 Ieee1394Service& ieee1394service, 60 int nodeId) 61 : FFADODevice( configRom, ieee1394service, nodeId ) 58 MotuDevice::MotuDevice( Ieee1394Service& ieee1394Service, 59 std::auto_ptr<ConfigRom>( configRom )) 60 : FFADODevice( ieee1394Service, configRom ) 62 61 , m_motu_model( MOTUFW_MODEL_NONE ) 63 62 , m_iso_recv_channel ( -1 ) … … 69 68 { 70 69 debugOutput( DEBUG_LEVEL_VERBOSE, "Created Motu::MotuDevice (NodeID %d)\n", 71 nodeId);70 configRom->getNodeId() ); 72 71 73 72 } … … 109 108 110 109 return false; 110 } 111 112 FFADODevice * 113 MotuDevice::createDevice( Ieee1394Service& ieee1394Service, 114 std::auto_ptr<ConfigRom>( configRom )) 115 { 116 return new MotuDevice(ieee1394Service, configRom ); 111 117 } 112 118 … … 316 322 debugOutput(DEBUG_LEVEL_VERBOSE, 317 323 "%s %s at node %d\n", m_model->vendor_name, m_model->model_name, 318 m_nodeId);324 getNodeId()); 319 325 } 320 326 … … 866 872 quadlet = 0; 867 873 // Note: 1394Service::read() expects a physical ID, not the node id 868 if (m_p1394Service->read(0xffc0 | m_nodeId, MOTUFW_BASE_ADDR+reg, 1, &quadlet) < 0) {874 if (m_p1394Service->read(0xffc0 | getNodeId(), MOTUFW_BASE_ADDR+reg, 1, &quadlet) < 0) { 869 875 debugError("Error doing motu read from register 0x%06x\n",reg); 870 876 } … … 882 888 883 889 // Note: 1394Service::write() expects a physical ID, not the node id 884 if (m_p1394Service->write(0xffc0 | m_nodeId, MOTUFW_BASE_ADDR+reg, 1, &data) < 0) {890 if (m_p1394Service->write(0xffc0 | getNodeId(), MOTUFW_BASE_ADDR+reg, 1, &data) < 0) { 885 891 err = 1; 886 892 debugError("Error doing motu write to register 0x%06x\n",reg); trunk/libffado/src/motu/motu_avdevice.h
r554 r583 94 94 public: 95 95 96 MotuDevice( std::auto_ptr<ConfigRom>( configRom ), 97 Ieee1394Service& ieee1394Service, 98 int nodeId ); 96 MotuDevice( Ieee1394Service& ieee1394Service, 97 std::auto_ptr<ConfigRom>( configRom )); 99 98 virtual ~MotuDevice(); 100 99 101 100 static bool probe( ConfigRom& configRom ); 101 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 102 std::auto_ptr<ConfigRom>( configRom )); 102 103 static int getConfigurationId( ); 103 104 virtual bool discover(); trunk/libffado/src/rme/rme_avdevice.cpp
r554 r583 50 50 }; 51 51 52 RmeDevice::RmeDevice( std::auto_ptr< ConfigRom >( configRom ), 53 Ieee1394Service& ieee1394service, 54 int nodeId ) 55 : FFADODevice( configRom, ieee1394service, nodeId ) 52 RmeDevice::RmeDevice( Ieee1394Service& ieee1394Service, 53 std::auto_ptr<ConfigRom>( configRom )) 54 : FFADODevice( ieee1394Service, configRom ) 56 55 , m_model( NULL ) 57 56 { 58 57 debugOutput( DEBUG_LEVEL_VERBOSE, "Created Rme::RmeDevice (NodeID %d)\n", 59 nodeId);58 configRom->getNodeId() ); 60 59 } 61 60 … … 84 83 85 84 return false; 85 } 86 87 FFADODevice * 88 RmeDevice::createDevice( Ieee1394Service& ieee1394Service, 89 std::auto_ptr<ConfigRom>( configRom )) 90 { 91 return new RmeDevice(ieee1394Service, configRom ); 86 92 } 87 93 … … 156 162 debugOutput(DEBUG_LEVEL_VERBOSE, 157 163 "%s %s at node %d\n", m_model->vendor_name, m_model->model_name, 158 m_nodeId);164 getNodeId()); 159 165 } 160 166 trunk/libffado/src/rme/rme_avdevice.h
r554 r583 49 49 public: 50 50 51 RmeDevice( std::auto_ptr<ConfigRom>( configRom ), 52 Ieee1394Service& ieee1394Service, 53 int nodeId ); 51 RmeDevice( Ieee1394Service& ieee1394Service, 52 std::auto_ptr<ConfigRom>( configRom )); 54 53 virtual ~RmeDevice(); 55 54 56 55 static bool probe( ConfigRom& configRom ); 56 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 57 std::auto_ptr<ConfigRom>( configRom )); 57 58 static int getConfigurationId( ); 58 59 virtual bool discover();