Changeset 516

Show
Ignore:
Timestamp:
08/10/07 12:07:16 (17 years ago)
Author:
wagi
Message:

- some de/serialing bugs found and fixed
- caching enabled for bebob devices

(finally online again! big thanks to my free wireless internet provider. s/he is finally back from
her/his holiday :)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/bebob/bebob_avdevice.cpp

    r488 r516  
    792792 
    793793int 
    794 AvDevice::getSamplingFrequency( ) { 
     794AvDevice::getSamplingFrequency( ) 
     795
    795796    AvPlug* inputPlug = getPlugById( m_pcrPlugs, AvPlug::eAPD_Input, 0 ); 
    796797    if ( !inputPlug ) { 
     
    814815 
    815816int 
    816 AvDevice::getConfigurationIdSampleRate(
    817 { 
    818     ExtendedStreamFormatCmd extStreamFormatCmd( *m_p1394Service ); 
     817AvDevice::getConfigurationIdSampleRate( Ieee1394Service& ieee1394Service, int nodeId
     818{ 
     819    ExtendedStreamFormatCmd extStreamFormatCmd( ieee1394Service ); 
    819820    UnitPlugAddress unitPlugAddress( UnitPlugAddress::ePT_PCR, 
    820                                      m_nodeId ); 
     821                                     nodeId ); 
    821822    extStreamFormatCmd.setPlugAddress( PlugAddress( PlugAddress::ePD_Input, 
    822823                                                    PlugAddress::ePAM_Unit, 
    823824                                                    unitPlugAddress ) ); 
    824825 
    825     extStreamFormatCmd.setNodeId( m_nodeId ); 
     826    extStreamFormatCmd.setNodeId( nodeId ); 
    826827    extStreamFormatCmd.setCommandType( AVCCommand::eCT_Status ); 
    827828    extStreamFormatCmd.setVerbose( true ); 
     
    848849 
    849850int 
    850 AvDevice::getConfigurationIdNumberOfChannel( PlugAddress::EPlugDirection ePlugDirection ) 
    851 
    852     ExtendedPlugInfoCmd extPlugInfoCmd( *m_p1394Service ); 
     851AvDevice::getConfigurationIdNumberOfChannel( Ieee1394Service& ieee1394Service, 
     852                                             int nodeId, 
     853                                             PlugAddress::EPlugDirection ePlugDirection ) 
     854
     855    ExtendedPlugInfoCmd extPlugInfoCmd( ieee1394Service ); 
    853856    UnitPlugAddress unitPlugAddress( UnitPlugAddress::ePT_PCR, 
    854                                      m_nodeId ); 
     857                                     nodeId ); 
    855858    extPlugInfoCmd.setPlugAddress( PlugAddress( ePlugDirection, 
    856859                                                PlugAddress::ePAM_Unit, 
    857860                                                unitPlugAddress ) ); 
    858     extPlugInfoCmd.setNodeId( m_nodeId ); 
     861    extPlugInfoCmd.setNodeId( nodeId ); 
    859862    extPlugInfoCmd.setCommandType( AVCCommand::eCT_Status ); 
    860863    extPlugInfoCmd.setVerbose( true ); 
     
    883886 
    884887int 
    885 AvDevice::getConfigurationIdSyncMode() 
    886 
    887     SignalSourceCmd signalSourceCmd( *m_p1394Service ); 
     888AvDevice::getConfigurationIdSyncMode( Ieee1394Service& ieee1394Service, 
     889                                      int nodeId ) 
     890
     891    SignalSourceCmd signalSourceCmd( ieee1394Service ); 
    888892    SignalUnitAddress signalUnitAddr; 
    889893    signalUnitAddr.m_plugId = 0x01; 
    890894    signalSourceCmd.setSignalDestination( signalUnitAddr ); 
    891     signalSourceCmd.setNodeId( m_nodeId ); 
     895    signalSourceCmd.setNodeId( nodeId ); 
    892896    signalSourceCmd.setSubunitType( AVCCommand::eST_Unit  ); 
    893897    signalSourceCmd.setSubunitId( 0xff ); 
     
    919923 
    920924int 
    921 AvDevice::getConfigurationId(
     925AvDevice::getConfigurationId( Ieee1394Service& ieee1394Service, int nodeId
    922926{ 
    923927    // create a unique configuration id. 
    924928    int id = 0; 
    925     id = getConfigurationIdSampleRate(); 
    926     id |= ( getConfigurationIdNumberOfChannel( PlugAddress::ePD_Input ) 
    927             + getConfigurationIdNumberOfChannel( PlugAddress::ePD_Output ) ) << 8; 
    928     id |= getConfigurationIdSyncMode() << 16; 
     929    id = getConfigurationIdSampleRate( ieee1394Service, nodeId ); 
     930    id |= ( getConfigurationIdNumberOfChannel( ieee1394Service, nodeId, PlugAddress::ePD_Input ) 
     931            + getConfigurationIdNumberOfChannel( ieee1394Service, nodeId, PlugAddress::ePD_Output ) ) << 8; 
     932    id |= getConfigurationIdSyncMode( ieee1394Service, nodeId ) << 16; 
    929933 
    930934    return id; 
     
    15261530        Glib::ustring description; 
    15271531 
    1528         result  = deser.read( strstrm.str() + "m_source", sourceId ); 
    1529         result &= deser.read( strstrm.str() + "m_destination", destinationId ); 
    1530         result &= deser.read( strstrm.str() + "m_description", description ); 
     1532        if ( deser.isExisting( strstrm.str() + "m_source" ) ) { 
     1533            result  = deser.read( strstrm.str() + "m_source", sourceId ); 
     1534            result &= deser.read( strstrm.str() + "m_destination", destinationId ); 
     1535            result &= deser.read( strstrm.str() + "m_description", description ); 
     1536        } else { 
     1537            result = false; 
     1538        } 
    15311539 
    15321540        if ( result ) { 
     
    16001608                       Ieee1394Service& ieee1394Service ) 
    16011609{ 
    1602  
    16031610    ConfigRom *configRom = 
    16041611        ConfigRom::deserialize( basePath + "m_pConfigRom/", deser, ieee1394Service ); 
  • trunk/libffado/src/bebob/bebob_avdevice.h

    r488 r516  
    6969 
    7070    static bool probe( ConfigRom& configRom ); 
     71    static int getConfigurationId( Ieee1394Service& ieee1394Service, int nodeId ); 
    7172    virtual bool discover(); 
    7273 
    7374    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    7475    virtual int getSamplingFrequency( ); 
    75     virtual int getConfigurationId( ); 
    7676 
    7777    virtual int getStreamCount(); 
     
    174174                                           AvDevice& avDevice, 
    175175                                           SyncInfoVector& vec ); 
    176     int getConfigurationIdSampleRate(); 
    177     int getConfigurationIdNumberOfChannel( PlugAddress::EPlugDirection ePlugDirection ); 
    178     int getConfigurationIdSyncMode(); 
     176    static int getConfigurationIdSampleRate( Ieee1394Service& ieee1394service, int nodeId ); 
     177    static int getConfigurationIdNumberOfChannel( Ieee1394Service& ieee1394service,  
     178                                                  int nodeId, 
     179                                                  PlugAddress::EPlugDirection ePlugDirection ); 
     180    static int getConfigurationIdSyncMode( Ieee1394Service& ieee1394service, 
     181                                           int nodeId ); 
    179182 
    180183protected: 
  • trunk/libffado/src/bebob/bebob_avdevice_subunit.cpp

    r451 r516  
    211211    bool result; 
    212212    AVCCommand::ESubunitType sbType; 
     213 
     214    if ( !deser.isExisting( basePath + "m_sbType" ) ) { 
     215        return 0; 
     216    } 
     217 
    213218    result  = deser.read( basePath + "m_sbType", sbType ); 
    214219 
     
    271276{ 
    272277    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering Audio Subunit...\n"); 
    273      
     278 
    274279    if ( !AvDeviceSubunit::discover() ) { 
    275280        return false; 
     
    347352#ifdef DEBUG 
    348353    if (getDebugLevel() >= DEBUG_LEVEL_NORMAL) { 
    349      
     354 
    350355        for ( FunctionBlockVector::iterator it = m_functions.begin(); 
    351356            it != m_functions.end(); 
  • trunk/libffado/src/bebob/bebob_avplug.cpp

    r447 r516  
    17131713                     AvPlugManager& plugManager ) 
    17141714{ 
     1715    if ( !deser.isExisting( basePath + "m_subunitType" ) ) { 
     1716        return 0; 
     1717    } 
     1718 
    17151719    AvPlug* pPlug = new AvPlug; 
    17161720    if ( !pPlug ) { 
     
    19811985                    strstrm << plug->getFunctionBlockType(); 
    19821986            } 
    1983              
     1987 
    19841988            if ( plug->getPlugDirection() == AvPlug::eAPD_Input ) { 
    19851989                printf( "\t\"(%d) %s\" -> \"(%s, ID %d)\"\n", 
     
    22132217                               AvDevice& avDevice ) 
    22142218{ 
     2219    if ( !deser.isExisting( basePath + "m_srcPlug" ) ) { 
     2220        return 0; 
     2221    } 
     2222 
    22152223    AvPlugConnection* pConnection = new AvPlugConnection; 
    22162224    if ( !pConnection ) { 
  • trunk/libffado/src/bebob/bebob_functionblock.cpp

    r451 r516  
    188188        strstrm << basePath << i; 
    189189 
    190         result &= deser.read( strstrm.str(), plugId ); 
    191         BeBoB::AvPlug* pPlug = avDevice.getPlugManager().getPlug( plugId ); 
    192  
    193         if ( pPlug ) { 
    194             vec.push_back( pPlug ); 
    195             i++; 
     190        if ( deser.isExisting( strstrm.str() ) ) { 
     191            result &= deser.read( strstrm.str(), plugId ); 
     192            BeBoB::AvPlug* pPlug = avDevice.getPlugManager().getPlug( plugId ); 
     193 
     194            if ( result && pPlug ) { 
     195                vec.push_back( pPlug ); 
     196                i++; 
     197            } else { 
     198                bFinished = true; 
     199            } 
    196200        } else { 
    197201            bFinished = true; 
  • trunk/libffado/src/bounce/bounce_avdevice.h

    r479 r516  
    7575 
    7676    static bool probe( ConfigRom& configRom ); 
     77    static int getConfigurationId( ); 
    7778    virtual bool discover(); 
    7879 
    7980    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    8081    virtual int getSamplingFrequency( ); 
    81     virtual int getConfigurationId( ); 
    8282 
    8383    virtual bool prepare(); 
  • trunk/libffado/src/devicemanager.cpp

    r490 r516  
    216216                // such this case and we can safely skip it. But it might 
    217217                // be there is a real software problem on our side. 
    218                 // This should be handled more carefuly. 
     218                // This should be handlede more carefuly. 
    219219                debugOutput( DEBUG_LEVEL_NORMAL, 
    220220                             "Could not read config rom from device (node id %d). " 
     
    224224            } 
    225225 
    226             IAvDevice* avDevice = getDriverForDevice( configRom, 
    227                                                       nodeId ); 
     226            bool isFromCache = false; 
     227            IAvDevice* avDevice = loadFromCache( *configRom ); 
     228            if ( avDevice ) { 
     229                debugOutput( DEBUG_LEVEL_VERBOSE, "could load from cache\n" ); 
     230                isFromCache = true; 
     231            } else { 
     232                avDevice = getDriverForDevice( configRom, nodeId ); 
     233            } 
     234 
    228235            if ( avDevice ) { 
    229236                debugOutput( DEBUG_LEVEL_NORMAL, 
    230                              "discover: driver found for device %d\n", 
     237                             "driver found for device %d\n", 
    231238                             nodeId ); 
    232239 
    233240                avDevice->setVerboseLevel( m_verboseLevel ); 
    234241 
    235                 if ( !avDevice->discover() ) { 
    236                     debugError( "discover: could not discover device\n" ); 
    237                     delete avDevice; 
    238                     continue; 
     242                if ( !isFromCache ) { 
     243                    if ( !avDevice->discover() ) { 
     244                        debugError( "could not discover device\n" ); 
     245                        delete avDevice; 
     246                        continue; 
     247                    } 
    239248                } 
    240249 
     
    256265                if ( m_verboseLevel >= DEBUG_LEVEL_VERBOSE ) { 
    257266                    avDevice->showDevice(); 
     267                } 
     268 
     269                if ( !isFromCache ) { 
     270                    if ( !saveCache( avDevice ) ) { 
     271                        debugWarning( "Could not create cached version of AVC model\n" ); 
     272                    } 
    258273                } 
    259274 
     
    291306        if ( avDevice ) { 
    292307            debugOutput( DEBUG_LEVEL_NORMAL, 
    293                          "discover: driver found for device %d\n", 
     308                         "driver found for device %d\n", 
    294309                         nodeId ); 
    295310 
     
    297312 
    298313            if ( !avDevice->discover() ) { 
    299                 debugError( "discover: could not discover device\n" ); 
     314                debugError( "could not discover device\n" ); 
    300315                delete avDevice; 
    301316                return false; 
     
    542557 
    543558    char* configId; 
    544     asprintf(&configId, "%08x", pBeBoBDevice->getConfigurationId() ); 
     559    asprintf(&configId, "%08x", BeBoB::AvDevice::getConfigurationId( *m_1394Service, 
     560                                                                     pAvDevice->getNodeId() ) ); 
    545561    if ( !configId ) { 
    546562        debugError( "Could not create id string\n" ); 
     
    552568 
    553569    Util::XMLSerialize ser( sFileName ); 
    554     return pBeBoBDevice->serialize( "/", ser ); 
    555 
    556  
    557 bool 
    558 DeviceManager::loadCache( Glib::ustring cachePath ) 
    559 
    560     for ( fb_nodeid_t nodeId = 0; 
    561           nodeId < m_1394Service->getNodeCount(); 
    562           ++nodeId ) 
    563     { 
    564         ConfigRom* pConfigRom  =  new ConfigRom( *m_1394Service, nodeId ); 
    565         if ( !pConfigRom->initialize() ) { 
    566             // \todo If a PHY on the bus is in power safe mode then 
    567             // the config rom is missing. So this might be just 
    568             // such this case and we can safely skip it. But it might 
    569             // be there is a real software problem on our side. 
    570             // This should be handled more carefuly. 
    571             debugOutput( DEBUG_LEVEL_NORMAL, 
    572                          "Could not read config rom from device (node id %d). " 
    573                          "Skip device discovering for this node\n", 
    574                          nodeId ); 
    575             delete pConfigRom; 
    576             continue; 
    577         } 
    578  
    579         Glib::ustring sFileName = getCachePath() + pConfigRom->getGuidString() + ".xml"; 
    580  
    581         if ( access( sFileName.c_str(),  R_OK ) == 0 ) { 
    582             debugOutput( DEBUG_LEVEL_NORMAL, "load from %s\n", sFileName.c_str() ); 
    583             Util::XMLDeserialize deser( sFileName ); 
    584  
    585             BeBoB::AvDevice* pBeBoBDevice = BeBoB::AvDevice::deserialize( "/", deser, *m_1394Service ); 
    586             if ( pBeBoBDevice ) { 
    587                 debugOutput( DEBUG_LEVEL_NORMAL, "loadCache: could create valid bebob driver from %s\n", sFileName.c_str() ); 
    588                 pBeBoBDevice->getConfigRom().setNodeId( pConfigRom->getNodeId() ); 
    589                 m_avDevices.push_back( pBeBoBDevice ); 
    590             } 
    591         } 
    592  
    593         // throw away this config rom instance, the deserialize code has created it's own from 
    594         // the cache. 
    595         delete pConfigRom; 
    596     } 
    597  
    598     return true; 
    599 
     570    return pBeBoBDevice->serialize( "", ser ); 
     571
     572 
     573IAvDevice* 
     574DeviceManager::loadFromCache( const ConfigRom& configRom ) 
     575
     576    Glib::ustring sDevicePath = getCachePath() + configRom.getGuidString(); 
     577    char* configId; 
     578    asprintf(&configId, "%08x", 
     579    BeBoB::AvDevice::getConfigurationId(*m_1394Service, 
     580    configRom.getNodeId()) ); 
     581    if ( !configId ) { 
     582        debugError( "could not create id string\n" ); 
     583        return false; 
     584    } 
     585    Glib::ustring sFileName = sDevicePath + "/" + configId + ".xml"; 
     586    free( configId ); 
     587    debugOutput( DEBUG_LEVEL_NORMAL, "filename %s\n", sFileName.c_str() ); 
     588 
     589    Util::XMLDeserialize deser( sFileName, m_verboseLevel ); 
     590 
     591    BeBoB::AvDevice* pBeBoBDevice = BeBoB::AvDevice::deserialize( "", 
     592                                                                  deser, 
     593                                                                  *m_1394Service ); 
     594    if ( pBeBoBDevice ) { 
     595        debugOutput( DEBUG_LEVEL_NORMAL, "could create valid bebob driver from %s\n", sFileName.c_str() ); 
     596        pBeBoBDevice->getConfigRom().setNodeId( configRom.getNodeId() ); 
     597    } 
     598 
     599    return pBeBoBDevice; 
     600
     601 
  • trunk/libffado/src/devicemanager.h

    r478 r516  
    7070 
    7171    bool buildCache(); 
    72     bool loadCache( Glib::ustring cachePath = "" ); 
     72    IAvDevice* loadFromCache( const ConfigRom& configRom ); 
    7373 
    7474    Streaming::StreamProcessor *getSyncSource(); 
  • trunk/libffado/src/dice/dice_avdevice.h

    r479 r516  
    6262 
    6363    static bool probe( ConfigRom& configRom ); 
     64    static int getConfigurationId( ); 
    6465    virtual bool discover(); 
    6566 
     
    6869    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    6970    virtual int getSamplingFrequency( ); 
    70     virtual int getConfigurationId( ); 
    7171 
    7272    virtual int getStreamCount(); 
  • trunk/libffado/src/iavdevice.h

    r479 r516  
    7575     */ 
    7676    virtual int getSamplingFrequency( ) = 0; 
    77  
    78     /** 
    79      * @brief get a unique configuration identifier for current device setup 
    80      * 
    81      * Since each different setup (such as different sample frequency) 
    82      * can change the corresponding AV/C model, it is necessary to  
    83      * distinguish between those models in case where caching of  
    84      * AV/C models is enabled. 
    85      * 
    86      * @return a unique configuration identifier as integer 
    87      */ 
    88     virtual int getConfigurationId( ) = 0; 
    8977 
    9078    /** 
  • trunk/libffado/src/libutil/OptionContainer.cpp

    r445 r516  
    445445        strstrm << basePath << "/" << "Option" << i; 
    446446 
    447         Option pOption = Option::deserialize( strstrm.str() + "/", 
    448                                               deser ); 
    449         if ( pOption.getType() != Option::EInvalid ) { 
    450             result &= container.addOption(pOption); 
    451             i++; 
     447        if ( deser.isExisting( strstrm.str() ) ) { 
     448            Option pOption = Option::deserialize( strstrm.str() + "/", 
     449                                                  deser ); 
     450            if ( pOption.getType() != Option::EInvalid ) { 
     451                result &= container.addOption(pOption); 
     452                i++; 
     453            } else { 
     454                bFinished = true; 
     455            } 
    452456        } else { 
    453457            bFinished = true; 
  • trunk/libffado/src/libutil/serialize.cpp

    r445 r516  
    4747///////////////////////////////// 
    4848 
     49IMPL_DEBUG_MODULE( Util::XMLSerialize,   XMLSerialize,   DEBUG_LEVEL_NORMAL ); 
     50IMPL_DEBUG_MODULE( Util::XMLDeserialize, XMLDeserialize, DEBUG_LEVEL_NORMAL ); 
     51 
    4952Util::XMLSerialize::XMLSerialize( Glib::ustring fileName ) 
    5053    : IOSerialize() 
    5154    , m_filepath( fileName ) 
     55    , m_verboseLevel( 0 ) 
    5256{ 
    5357    try { 
     
    5862} 
    5963 
     64 
     65Util::XMLSerialize::XMLSerialize( Glib::ustring fileName, int verboseLevel ) 
     66    : IOSerialize() 
     67    , m_filepath( fileName ) 
     68    , m_verboseLevel( verboseLevel ) 
     69{ 
     70    try { 
     71        m_doc.create_root_node( "ffado_cache" ); 
     72    } catch ( const exception& ex ) { 
     73        cout << "Exception caught: " << ex.what(); 
     74    } 
     75} 
    6076 
    6177Util::XMLSerialize::~XMLSerialize() 
     
    7490 
    7591{ 
     92    debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "write %s = %d\n", 
     93                 strMemberName.c_str(), value ); 
     94 
    7695    vector<string> tokens; 
    7796    tokenize( strMemberName, tokens, "/" ); 
    7897 
    7998    if ( tokens.size() == 0 ) { 
     99        debugWarning( "token size is 0\n" ); 
    80100        return false; 
    81101    } 
     
    98118                           Glib::ustring str) 
    99119{ 
     120    debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "write %s = %s\n", 
     121                 strMemberName.c_str(), str.c_str() ); 
     122 
    100123    vector<string> tokens; 
    101124    tokenize( strMemberName, tokens, "/" ); 
    102125 
    103126    if ( tokens.size() == 0 ) { 
     127        debugWarning( "token size is 0\n" ); 
    104128        return false; 
    105129    } 
     
    160184    : IODeserialize() 
    161185    , m_filepath( fileName ) 
     186    , m_verboseLevel( 0 ) 
    162187{ 
    163188    try { 
     
    171196} 
    172197 
     198Util::XMLDeserialize::XMLDeserialize( Glib::ustring fileName, int verboseLevel ) 
     199    : IODeserialize() 
     200    , m_filepath( fileName ) 
     201    , m_verboseLevel( verboseLevel ) 
     202{ 
     203    try { 
     204        m_parser.set_substitute_entities(); //We just want the text to 
     205                                            //be resolved/unescaped 
     206                                            //automatically. 
     207        m_parser.parse_file( m_filepath ); 
     208    } catch ( const exception& ex ) { 
     209        cout << "Exception caught: " << ex.what(); 
     210    } 
     211} 
    173212 
    174213Util::XMLDeserialize::~XMLDeserialize() 
     
    181220 
    182221{ 
     222    debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "lookup %s\n", strMemberName.c_str() ); 
     223 
    183224    xmlpp::Document *pDoc=m_parser.get_document(); 
    184225    if(!pDoc) { 
     226        debugWarning( "no document found\n" ); 
    185227        return false; 
    186228    } 
    187229    xmlpp::Node* pNode = pDoc->get_root_node(); 
     230 
     231    debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "pNode = %s\n", pNode->get_name().c_str() ); 
    188232 
    189233    xmlpp::NodeSet nodeSet = pNode->find( strMemberName ); 
     
    198242            value = strtoll( pElement->get_child_text()->get_content().c_str(), 
    199243                             &tail, 0 ); 
     244            debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "found %s = %d\n", 
     245                         strMemberName.c_str(), value ); 
    200246            return true; 
    201247        } 
    202         return false; 
    203     } 
    204  
     248        debugWarning( "no such a node %s\n", strMemberName.c_str() ); 
     249        return false; 
     250    } 
     251 
     252    debugWarning( "no such a node %s\n", strMemberName.c_str() ); 
    205253    return false; 
    206254} 
     
    210258                            Glib::ustring& str ) 
    211259{ 
     260    debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "lookup %s\n", strMemberName.c_str() ); 
     261 
    212262    xmlpp::Document *pDoc=m_parser.get_document(); 
    213263    if(!pDoc) { 
     264        debugWarning( "no document found\n" ); 
    214265        return false; 
    215266    } 
     
    222273    { 
    223274        const xmlpp::Element* pElement = dynamic_cast< const xmlpp::Element* >( *it ); 
    224         if ( pElement && pElement->has_child_text() ) { 
    225             str = pElement->get_child_text()->get_content(); 
     275        if ( pElement ) { 
     276            if ( pElement->has_child_text() ) { 
     277                str = pElement->get_child_text()->get_content(); 
     278            } else { 
     279                str = ""; 
     280            } 
     281            debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "found %s = %s\n", 
     282                         strMemberName.c_str(), str.c_str() ); 
    226283            return true; 
    227284        } 
    228         return false; 
    229     } 
    230  
     285        debugWarning( "no such a node %s\n", strMemberName.c_str() ); 
     286        return false; 
     287    } 
     288 
     289    debugWarning( "no such a node %s\n", strMemberName.c_str() ); 
    231290    return false; 
    232291} 
  • trunk/libffado/src/libutil/serialize.h

    r445 r516  
    2424#ifndef bebob_serialize_h 
    2525#define bebob_serialize_h 
     26 
     27#include "debugmodule/debugmodule.h" 
    2628 
    2729#include <libxml++/libxml++.h> 
     
    6264    public: 
    6365        XMLSerialize( Glib::ustring fileName ); 
     66        XMLSerialize( Glib::ustring fileName, int verboseLevel ); 
    6467        virtual ~XMLSerialize(); 
    6568 
     
    7174        Glib::ustring    m_filepath; 
    7275        xmlpp::Document  m_doc; 
     76        int              m_verboseLevel; 
     77 
     78        DECLARE_DEBUG_MODULE; 
    7379 
    7480        xmlpp::Node* getNodePath( xmlpp::Node* pRootNode, 
     
    7985    public: 
    8086        XMLDeserialize( Glib::ustring fileName ); 
     87        XMLDeserialize( Glib::ustring fileName, int verboseLevel ); 
    8188        virtual ~XMLDeserialize(); 
    8289 
     
    9198        Glib::ustring    m_filepath; 
    9299        xmlpp::DomParser m_parser; 
     100        int              m_verboseLevel; 
     101 
     102        DECLARE_DEBUG_MODULE; 
    93103    }; 
    94104 
  • trunk/libffado/src/maudio/maudio_avdevice.h

    r479 r516  
    5959 
    6060    static bool probe( ConfigRom& configRom ); 
     61    static int getConfigurationId( ); 
    6162    virtual bool discover(); 
    6263 
     
    6566    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    6667    virtual int getSamplingFrequency( ); 
    67     virtual int getConfigurationId( ); 
    6868 
    6969    virtual bool prepare(); 
  • trunk/libffado/src/metrichalo/mh_avdevice.h

    r479 r516  
    5353 
    5454    static bool probe( ConfigRom& configRom ); 
     55    static int getConfigurationId(); 
    5556    virtual bool discover(); 
    5657 
     
    5960    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    6061    virtual int getSamplingFrequency( ); 
    61     virtual int getConfigurationId(); 
    6262 
    6363    virtual int getStreamCount(); 
  • trunk/libffado/src/motu/motu_avdevice.h

    r479 r516  
    100100 
    101101    static bool probe( ConfigRom& configRom ); 
     102    static int getConfigurationId( ); 
    102103    virtual bool discover(); 
    103104 
     
    106107    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    107108    virtual int getSamplingFrequency( ); 
    108     virtual int getConfigurationId( ); 
    109109 
    110110    virtual int getStreamCount(); 
  • trunk/libffado/src/rme/rme_avdevice.h

    r479 r516  
    5555 
    5656    static bool probe( ConfigRom& configRom ); 
     57    static int getConfigurationId( ); 
    5758    virtual bool discover(); 
    5859 
     
    6162    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    6263    virtual int getSamplingFrequency( ); 
    63     virtual int getConfigurationId( ); 
    6464 
    6565    virtual int getStreamCount(); 
  • trunk/libffado/src/ser.cpp

    r478 r516  
    4949 
    5050    devMgr.setVerboseLevel( 4 ); 
    51     return devMgr.loadCache( pFileName ); 
     51    //return devMgr.loadCache( pFileName ); 
     52    return false; 
    5253} 
    5354