Changeset 589 for trunk

Show
Ignore:
Timestamp:
08/29/07 08:26:18 (17 years ago)
Author:
ppalmers
Message:

small discovery fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/fireworks/fireworks_device.cpp

    r587 r589  
    7979} 
    8080 
     81bool 
     82Device::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 
    81113FFADODevice * 
    82114Device::createDevice( Ieee1394Service& ieee1394Service, 
  • trunk/libffado/src/fireworks/fireworks_device.h

    r587 r589  
    4444    static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 
    4545                                        std::auto_ptr<ConfigRom>( configRom )); 
     46    virtual bool discover(); 
    4647 
    4748    virtual void showDevice(); 
  • trunk/libffado/src/genericavc/avc_avdevice.cpp

    r587 r589  
    4848namespace GenericAVC { 
    4949 
    50 IMPL_DEBUG_MODULE( AvDevice, AvDevice, DEBUG_LEVEL_NORMAL ); 
     50IMPL_DEBUG_MODULE( AvDevice, AvDevice, DEBUG_LEVEL_VERBOSE ); 
    5151 
    5252// to define the supported devices 
     
    103103AvDevice::discover() 
    104104{ 
    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  
    126105    if ( !Unit::discover() ) { 
    127106        debugError( "Could not discover unit\n" );