Changeset 589
- Timestamp:
- 08/29/07 08:26:18 (16 years ago)
- Files:
-
- trunk/libffado/src/fireworks/fireworks_device.cpp (modified) (1 diff)
- trunk/libffado/src/fireworks/fireworks_device.h (modified) (1 diff)
- trunk/libffado/src/genericavc/avc_avdevice.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/fireworks/fireworks_device.cpp
r587 r589 79 79 } 80 80 81 bool 82 Device::discover() 83 { 84 unsigned int vendorId = m_pConfigRom->getNodeVendorId(); 85 unsigned int modelId = m_pConfigRom->getModelId(); 86 87 for ( unsigned int i = 0; 88 i < ( sizeof( supportedDeviceList )/sizeof( GenericAVC::VendorModelEntry ) ); 89 ++i ) 90 { 91 if ( ( supportedDeviceList[i].vendor_id == vendorId ) 92 && ( supportedDeviceList[i].model_id == modelId ) 93 ) 94 { 95 m_model = &(supportedDeviceList[i]); 96 } 97 } 98 99 if (m_model == NULL) { 100 return false; 101 } 102 debugOutput( DEBUG_LEVEL_VERBOSE, "found %s %s\n", 103 m_model->vendor_name, m_model->model_name); 104 105 if ( !GenericAVC::AvDevice::discover() ) { 106 debugError( "Could not discover GenericAVC::AvDevice\n" ); 107 return false; 108 } 109 110 return true; 111 } 112 81 113 FFADODevice * 82 114 Device::createDevice( Ieee1394Service& ieee1394Service, trunk/libffado/src/fireworks/fireworks_device.h
r587 r589 44 44 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 45 45 std::auto_ptr<ConfigRom>( configRom )); 46 virtual bool discover(); 46 47 47 48 virtual void showDevice(); trunk/libffado/src/genericavc/avc_avdevice.cpp
r587 r589 48 48 namespace GenericAVC { 49 49 50 IMPL_DEBUG_MODULE( AvDevice, AvDevice, DEBUG_LEVEL_ NORMAL);50 IMPL_DEBUG_MODULE( AvDevice, AvDevice, DEBUG_LEVEL_VERBOSE ); 51 51 52 52 // to define the supported devices … … 103 103 AvDevice::discover() 104 104 { 105 unsigned int vendorId = m_pConfigRom->getNodeVendorId();106 unsigned int modelId = m_pConfigRom->getModelId();107 108 for ( unsigned int i = 0;109 i < ( sizeof( supportedDeviceList )/sizeof( VendorModelEntry ) );110 ++i )111 {112 if ( ( supportedDeviceList[i].vendor_id == vendorId )113 && ( supportedDeviceList[i].model_id == modelId )114 )115 {116 m_model = &(supportedDeviceList[i]);117 }118 }119 120 if (m_model == NULL) {121 return false;122 }123 debugOutput( DEBUG_LEVEL_VERBOSE, "found %s %s\n",124 m_model->vendor_name, m_model->model_name);125 126 105 if ( !Unit::discover() ) { 127 106 debugError( "Could not discover unit\n" );