Index: /trunk/libffado/src/genericavc/avc_avdevice.cpp =================================================================== --- /trunk/libffado/src/genericavc/avc_avdevice.cpp (revision 587) +++ /trunk/libffado/src/genericavc/avc_avdevice.cpp (revision 589) @@ -48,5 +48,5 @@ namespace GenericAVC { -IMPL_DEBUG_MODULE( AvDevice, AvDevice, DEBUG_LEVEL_NORMAL ); +IMPL_DEBUG_MODULE( AvDevice, AvDevice, DEBUG_LEVEL_VERBOSE ); // to define the supported devices @@ -103,25 +103,4 @@ AvDevice::discover() { - unsigned int vendorId = m_pConfigRom->getNodeVendorId(); - unsigned int modelId = m_pConfigRom->getModelId(); - - for ( unsigned int i = 0; - i < ( sizeof( supportedDeviceList )/sizeof( VendorModelEntry ) ); - ++i ) - { - if ( ( supportedDeviceList[i].vendor_id == vendorId ) - && ( supportedDeviceList[i].model_id == modelId ) - ) - { - m_model = &(supportedDeviceList[i]); - } - } - - if (m_model == NULL) { - return false; - } - debugOutput( DEBUG_LEVEL_VERBOSE, "found %s %s\n", - m_model->vendor_name, m_model->model_name); - if ( !Unit::discover() ) { debugError( "Could not discover unit\n" ); Index: /trunk/libffado/src/fireworks/fireworks_device.h =================================================================== --- /trunk/libffado/src/fireworks/fireworks_device.h (revision 587) +++ /trunk/libffado/src/fireworks/fireworks_device.h (revision 589) @@ -44,4 +44,5 @@ static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, std::auto_ptr( configRom )); + virtual bool discover(); virtual void showDevice(); Index: /trunk/libffado/src/fireworks/fireworks_device.cpp =================================================================== --- /trunk/libffado/src/fireworks/fireworks_device.cpp (revision 587) +++ /trunk/libffado/src/fireworks/fireworks_device.cpp (revision 589) @@ -79,4 +79,36 @@ } +bool +Device::discover() +{ + unsigned int vendorId = m_pConfigRom->getNodeVendorId(); + unsigned int modelId = m_pConfigRom->getModelId(); + + for ( unsigned int i = 0; + i < ( sizeof( supportedDeviceList )/sizeof( GenericAVC::VendorModelEntry ) ); + ++i ) + { + if ( ( supportedDeviceList[i].vendor_id == vendorId ) + && ( supportedDeviceList[i].model_id == modelId ) + ) + { + m_model = &(supportedDeviceList[i]); + } + } + + if (m_model == NULL) { + return false; + } + debugOutput( DEBUG_LEVEL_VERBOSE, "found %s %s\n", + m_model->vendor_name, m_model->model_name); + + if ( !GenericAVC::AvDevice::discover() ) { + debugError( "Could not discover GenericAVC::AvDevice\n" ); + return false; + } + + return true; +} + FFADODevice * Device::createDevice( Ieee1394Service& ieee1394Service,