Changeset 716 for trunk/libffado

Show
Ignore:
Timestamp:
11/11/07 12:03:19 (16 years ago)
Author:
wagi
Message:

cache bebob avc model. lot's of small bug fixed. it should work now.

Files:

Legend:

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

    r662 r716  
    400400{ 
    401401    // XXX disable this part as long it is not correctly working 
    402     return false; 
     402    //return false; 
    403403 
    404404    Glib::ustring sDevicePath = getCachePath() + m_pConfigRom->getGuidString(); 
  • trunk/libffado/src/bebob/bebob_avdevice_subunit.cpp

    r618 r716  
    8282{ 
    8383    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering %s...\n", getName()); 
    84      
     84 
    8585    // discover the AV/C generic part 
    8686    if ( !AVC::SubunitAudio::discover() ) { 
     
    160160#ifdef DEBUG 
    161161    if ((int)getDebugLevel() >= DEBUG_LEVEL_NORMAL) { 
    162      
     162 
    163163        for ( FunctionBlockVector::iterator it = m_functions.begin(); 
    164164            it != m_functions.end(); 
     
    340340bool 
    341341BeBoB::SubunitAudio::serializeChild( Glib::ustring basePath, 
    342                                              Util::IOSerialize& ser ) const 
     342                                     Util::IOSerialize& ser ) const 
    343343{ 
    344344    bool result = true; 
     
    363363bool 
    364364BeBoB::SubunitAudio::deserializeChild( Glib::ustring basePath, 
    365                                                Util::IODeserialize& deser, 
    366                                                AVC::Unit& avDevice ) 
     365                                       Util::IODeserialize& deser, 
     366                                       AVC::Unit& avDevice ) 
    367367{ 
    368368    int i = 0; 
     
    426426{ 
    427427    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering %s...\n", getName()); 
    428      
     428 
    429429    // discover the AV/C generic part 
    430430    if ( !AVC::SubunitMusic::discover() ) { 
  • trunk/libffado/src/bebob/bebob_functionblock.cpp

    r557 r716  
    160160 
    161161bool 
    162 serializePlugVector( Glib::ustring basePath, 
    163                        Util::IOSerialize& ser, 
    164                        const PlugVector& vec ) 
    165 { 
    166     bool result = true; 
    167     int i = 0; 
    168     for ( PlugVector::const_iterator it = vec.begin(); 
    169           it != vec.end(); 
    170           ++it ) 
    171     { 
    172         std::ostringstream strstrm; 
    173         strstrm << basePath << i; 
    174         result &= ser.write( strstrm.str(), ( *it )->getGlobalId() ); 
    175         i++; 
    176     } 
    177     return result; 
    178 } 
    179  
    180 bool 
    181 deserializePlugVector( Glib::ustring basePath, 
    182                          Util::IODeserialize& deser, 
    183                          AVC::Unit& unit, 
    184                          PlugVector& vec ) 
    185 { 
    186     int i = 0; 
    187     bool bFinished = false; 
    188     bool result = true; 
    189     do { 
    190         plug_id_t plugId; 
    191         std::ostringstream strstrm; 
    192         strstrm << basePath << i; 
    193  
    194         if ( deser.isExisting( strstrm.str() ) ) { 
    195             result &= deser.read( strstrm.str(), plugId ); 
    196             AVC::Plug* pPlug = unit.getPlugManager().getPlug( plugId ); 
    197  
    198             if ( result && pPlug ) { 
    199                 vec.push_back( pPlug ); 
    200                 i++; 
    201             } else { 
    202                 bFinished = true; 
    203             } 
    204         } else { 
    205             bFinished = true; 
    206         } 
    207     } while ( !bFinished ); 
    208  
    209     return result; 
    210 } 
    211  
    212 bool 
    213162FunctionBlock::serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const 
    214163{ 
     
    229178FunctionBlock* 
    230179FunctionBlock::deserialize( Glib::ustring basePath, 
    231                                    Util::IODeserialize& deser, 
    232                                    AVC::Unit& unit, 
    233                                    AVC::Subunit& subunit ) 
     180                            Util::IODeserialize& deser, 
     181                            AVC::Unit& unit, 
     182                            AVC::Subunit& subunit ) 
    234183{ 
    235184    bool result; 
     
    278227    result &= deser.read( basePath + "m_nrOfOutputPlugs", pFB->m_nrOfOutputPlugs ); 
    279228    result &= deser.read( basePath + "m_verbose", pFB->m_verbose ); 
    280     result &= deserializePlugVector( basePath + "m_plugs", deser, unit, pFB->m_plugs ); 
     229    result &= deserializePlugVector( basePath + "m_plugs", deser, 
     230                                     unit.getPlugManager(), pFB->m_plugs ); 
    281231 
    282232    return 0; 
  • trunk/libffado/src/bebob/bebob_functionblock.h

    r628 r716  
    6969 
    7070    virtual const char* getName() = 0; 
    71      
     71 
    7272    AVC::function_block_type_t getType() {return m_type;}; 
    7373    AVC::function_block_type_t getSubtype() {return m_subtype;}; 
    7474    AVC::function_block_id_t getId() {return m_id;}; 
    75      
     75 
    7676    AVC::no_of_input_plugs_t getNrOfInputPlugs() {return m_nrOfInputPlugs;}; 
    7777    AVC::no_of_output_plugs_t getNrOfOutputPlugs() {return m_nrOfOutputPlugs;}; 
    7878 
    7979    bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const; 
     80 
    8081    static FunctionBlock* deserialize( Glib::ustring basePath, 
    8182                       Util::IODeserialize& deser, 
     
    144145 
    145146    virtual const char* getName(); 
    146      
     147 
    147148    // FIXME: this is not pretty! 
    148149    enum EControlSelectorEncoding { 
  • trunk/libffado/src/genericavc/avc_avdevice.cpp

    r685 r716  
    236236        bool found=false; 
    237237        for ( PlugVector::const_iterator it2 = syncMSUInputPlugs.begin(); 
    238             it2 != syncMSUInputPlugs.end(); 
    239             ++it2 ) 
     238              it2 != syncMSUInputPlugs.end(); 
     239              ++it2 ) 
    240240        { 
    241241            AVC::Plug* msuPlug = *it2; 
  • trunk/libffado/src/libavc/audiosubunit/avc_audiosubunit.h

    r612 r716  
    5252protected: 
    5353    virtual bool serializeChild( Glib::ustring basePath, 
    54                                  Util::IOSerialize& ser ) const {return false;}; 
     54                                 Util::IOSerialize& ser ) const { return true; } 
    5555    virtual bool deserializeChild( Glib::ustring basePath, 
    5656                                   Util::IODeserialize& deser, 
    57                                    Unit& avDevice ) {return false;}; 
     57                                   Unit& avDevice ) { return true; } 
    5858 
    5959}; 
  • trunk/libffado/src/libavc/general/avc_plug.cpp

    r637 r716  
    15761576} 
    15771577 
    1578  
    1579 bool 
    1580 Plug::serializePlugVector( Glib::ustring basePath, 
    1581                            Util::IOSerialize& ser, 
    1582                            const PlugVector& vec) const 
    1583 { 
    1584     bool result = true; 
    1585     int i = 0; 
    1586     for ( PlugVector::const_iterator it = vec.begin(); 
    1587           it != vec.end(); 
    1588           ++it ) 
    1589     { 
    1590         const Plug* pPlug = *it; 
    1591         std::ostringstream strstrm; 
    1592         strstrm << basePath << i; 
    1593  
    1594         result &= ser.write( strstrm.str() + "/global_id", pPlug->getGlobalId() ); 
    1595         i++; 
    1596     } 
    1597     return result; 
    1598 } 
    1599  
    1600 bool 
    1601 Plug::deserializePlugVector( Glib::ustring basePath, 
    1602                              Util::IODeserialize& deser, 
    1603                              PlugVector& vec ) 
    1604 { 
    1605     int i = 0; 
    1606     bool bFinished = false; 
    1607     bool result = true; 
    1608     do { 
    1609         std::ostringstream strstrm; 
    1610         strstrm << basePath << i; 
    1611  
    1612         // check for one element to exist. when one exist the other elements 
    1613         // must also be there. otherwise just return (last) result. 
    1614         if ( deser.isExisting( strstrm.str() + "/global_id" ) ) { 
    1615             unsigned int iPlugId; 
    1616             result &= deser.read( strstrm.str() + "/global_id", iPlugId ); 
    1617  
    1618             if ( result ) { 
    1619                 Plug* pPlug = m_unit->getPlugManager().getPlug( iPlugId ); 
    1620                 if ( pPlug ) { 
    1621                     vec.push_back( pPlug ); 
    1622                 } else { 
    1623                     result = false; 
    1624                     bFinished = true; 
    1625                 } 
    1626                 i++; 
    1627             } else { 
    1628                 bFinished = true; 
    1629             } 
    1630         } else { 
    1631             bFinished = true; 
    1632         } 
    1633     } while ( !bFinished ); 
    1634  
    1635     return result; 
    1636 } 
    1637  
    16381578bool 
    16391579Plug::serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const 
     
    16831623    bool result=true; 
    16841624 
    1685     ESubunitType subunitType; 
    1686     result  = deser.read( basePath + "m_subunitType", subunitType ); 
    1687     subunit_t subunitId; 
    1688     result &= deser.read( basePath + "m_subunitId", subunitId ); 
    1689     pPlug->m_subunit = unit.getSubunit( subunitType, subunitType ); 
    1690  
     1625    result  = deser.read( basePath + "m_subunitType", pPlug->m_subunitType ); 
     1626    result &= deser.read( basePath + "m_subunitId", pPlug->m_subunitId ); 
    16911627    result &= deser.read( basePath + "m_functionBlockType", pPlug->m_functionBlockType ); 
    16921628    result &= deser.read( basePath + "m_functionBlockId", pPlug->m_functionBlockId ); 
     
    17181654bool 
    17191655Plug::deserializeUpdate( Glib::ustring basePath, 
    1720                            Util::IODeserialize& deser ) 
     1656                         Util::IODeserialize& deser ) 
    17211657{ 
    17221658    bool result; 
    17231659 
    1724     result  = deserializePlugVector( basePath + "m_inputConnections", deser, m_inputConnections ); 
    1725     result &= deserializePlugVector( basePath + "m_outputConnections", deser, m_outputConnections ); 
     1660    result  = deserializePlugVector( basePath + "m_inputConnections", deser, 
     1661                                     m_unit->getPlugManager(), m_inputConnections ); 
     1662    result &= deserializePlugVector( basePath + "m_outputConnections", deser, 
     1663                                     m_unit->getPlugManager(), m_outputConnections ); 
    17261664 
    17271665    return result; 
     1666} 
     1667 
     1668bool 
     1669Plug::deserializeUpdateSubunit() 
     1670{ 
     1671    m_subunit = m_unit->getSubunit( m_subunitType, m_subunitId ); 
     1672    return true; 
    17281673} 
    17291674 
     
    22052150} 
    22062151 
     2152bool 
     2153PlugManager::deserializeUpdate() 
     2154{ 
     2155    bool result = true; 
     2156 
     2157    for ( PlugVector::const_iterator it = m_plugs.begin(); 
     2158          it !=  m_plugs.end(); 
     2159          ++it ) 
     2160    { 
     2161        Plug* pPlug = *it; 
     2162 
     2163        result &= pPlug->deserializeUpdateSubunit(); 
     2164    } 
     2165 
     2166    return result; 
     2167} 
    22072168 
    22082169//////////////////////////////////// 
     
    23392300} 
    23402301 
    2341 
     2302bool 
     2303serializePlugVector( Glib::ustring basePath, 
     2304                     Util::IOSerialize& ser, 
     2305                     const PlugVector& vec) 
     2306
     2307    bool result = true; 
     2308    int i = 0; 
     2309    for ( PlugVector::const_iterator it = vec.begin(); 
     2310          it != vec.end(); 
     2311          ++it ) 
     2312    { 
     2313        const Plug* pPlug = *it; 
     2314        std::ostringstream strstrm; 
     2315        strstrm << basePath << i; 
     2316 
     2317        result &= ser.write( strstrm.str() + "/global_id", pPlug->getGlobalId() ); 
     2318        i++; 
     2319    } 
     2320    return result; 
     2321
     2322 
     2323bool 
     2324deserializePlugVector( Glib::ustring basePath, 
     2325                       Util::IODeserialize& deser, 
     2326                       const PlugManager& plugManager, 
     2327                       PlugVector& vec ) 
     2328
     2329    int i = 0; 
     2330    bool bFinished = false; 
     2331    bool result = true; 
     2332    do { 
     2333        std::ostringstream strstrm; 
     2334        strstrm << basePath << i; 
     2335 
     2336        // check for one element to exist. when one exist the other elements 
     2337        // must also be there. otherwise just return (last) result. 
     2338        if ( deser.isExisting( strstrm.str() + "/global_id" ) ) { 
     2339            unsigned int iPlugId; 
     2340            result &= deser.read( strstrm.str() + "/global_id", iPlugId ); 
     2341 
     2342            if ( result ) { 
     2343                Plug* pPlug = plugManager.getPlug( iPlugId ); 
     2344                if ( pPlug ) { 
     2345                    vec.push_back( pPlug ); 
     2346                } else { 
     2347                    result = false; 
     2348                    bFinished = true; 
     2349                } 
     2350                i++; 
     2351            } else { 
     2352                bFinished = true; 
     2353            } 
     2354        } else { 
     2355            bFinished = true; 
     2356        } 
     2357    } while ( !bFinished ); 
     2358 
     2359    return result; 
     2360
     2361 
     2362
  • trunk/libffado/src/libavc/general/avc_plug.h

    r637 r716  
    163163    bool deserializeUpdate( Glib::ustring basePath, 
    164164                            Util::IODeserialize& deser ); 
     165    bool deserializeUpdateSubunit(); 
    165166 
    166167 public: 
     
    256257    bool deserializeFormatInfos( Glib::ustring basePath, 
    257258                                 Util::IODeserialize& deser ); 
    258  
    259     bool serializePlugVector( Glib::ustring basePath, 
    260                               Util::IOSerialize& ser, 
    261                               const PlugVector& vec) const; 
    262     bool deserializePlugVector( Glib::ustring basePath, 
    263                                 Util::IODeserialize& deser, 
    264                                 PlugVector& vec ); 
    265259 
    266260protected: 
     
    285279    Unit*                       m_unit; 
    286280    Subunit*                    m_subunit; 
     281    ESubunitType                m_subunitType; 
     282    subunit_t                   m_subunitId; 
    287283    function_block_type_t       m_functionBlockType; 
    288284    function_block_id_t         m_functionBlockId; 
     
    349345    bool tidyPlugConnections(PlugConnectionVector&); 
    350346 
     347    bool deserializeUpdate(); 
     348 
    351349private: 
    352350 
     
    379377typedef std::vector<PlugConnection> PlugConnectionOwnerVector; 
    380378 
     379 
     380bool serializePlugVector( Glib::ustring basePath, 
     381                          Util::IOSerialize& ser, 
     382                          const PlugVector& vec); 
     383 
     384bool deserializePlugVector( Glib::ustring basePath, 
     385                            Util::IODeserialize& deser, 
     386                            const PlugManager& plugManager, 
     387                            PlugVector& vec ); 
     388 
    381389} 
    382390 
  • trunk/libffado/src/libavc/general/avc_subunit.cpp

    r618 r716  
    107107{ 
    108108    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering plugs...\n"); 
    109      
     109 
    110110    PlugInfoCmd plugInfoCmd( getUnit().get1394Service(), 
    111111                             PlugInfoCmd::eSF_SerialBusIsochronousAndExternalPlug ); 
     
    147147{ 
    148148    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering connections...\n"); 
    149      
     149 
    150150    for ( PlugVector::iterator it = getPlugs().begin(); 
    151151          it != getPlugs().end(); 
     
    183183            return false; 
    184184        } 
    185          
     185 
    186186        plug->setVerboseLevel(getDebugLevel()); 
    187          
     187 
    188188        if ( !plug->discover() ) { 
    189189            debugError( "plug discover failed\n" ); 
     
    232232bool 
    233233Subunit::serialize( Glib::ustring basePath, 
    234                                    Util::IOSerialize& ser ) const 
     234                    Util::IOSerialize& ser ) const 
    235235{ 
    236236    bool result; 
     
    239239    result &= ser.write( basePath + "m_sbId", m_sbId ); 
    240240    result &= ser.write( basePath + "m_verboseLevel", getDebugLevel() ); 
     241    result &= serializePlugVector( basePath + "m_plugs", ser, m_plugs ); 
    241242    result &= serializeChild( basePath, ser ); 
    242243 
     
    259260 
    260261    Subunit* pSubunit = 0; 
    261      
     262 
    262263    #warning FIXME: The derived class should be creating these 
    263264    // FIXME: The derived class should be creating these, such that discover() can become pure virtual 
     
    280281    pSubunit->m_sbType = sbType; 
    281282    result &= deser.read( basePath + "m_sbId", pSubunit->m_sbId ); 
     283    result &= deserializePlugVector( basePath + "m_plugs", deser, 
     284                                     unit.getPlugManager(), pSubunit->m_plugs ); 
    282285    int verboseLevel; 
    283286    result &= deser.read( basePath + "m_verboseLevel", verboseLevel ); 
  • trunk/libffado/src/libavc/general/avc_subunit.h

    r612 r716  
    7373 
    7474    PlugVector& getPlugs() 
    75     { return m_plugs; } 
     75       { return m_plugs; } 
    7676    Plug* getPlug(Plug::EPlugDirection direction, plug_id_t plugId); 
    7777 
     
    8080    bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const; 
    8181    static Subunit* deserialize( Glib::ustring basePath, 
    82                     Util::IODeserialize& deser, Unit& avDevice ); 
     82                                Util::IODeserialize& deser, Unit& avDevice ); 
    8383 protected: 
    8484    Subunit(); 
  • trunk/libffado/src/libavc/general/avc_unit.cpp

    r678 r716  
    975975    result  = ser.write( basePath + "m_verboseLevel_unit", getDebugLevel() ); 
    976976    result &= serializeVector( basePath + "Subunit", ser, m_subunits ); 
    977     result &= serializeVector( basePath + "PcrPlug", ser, m_pcrPlugs ); 
    978     result &= serializeVector( basePath + "ExternalPlug",  ser, m_externalPlugs ); 
     977    result &= serializePlugVector( basePath + "PcrPlug", ser, m_pcrPlugs ); 
     978    result &= serializePlugVector( basePath + "ExternalPlug",  ser, m_externalPlugs ); 
    979979    result &= serializeVector( basePath + "PlugConnection", ser, m_plugConnections ); 
    980980    result &= m_pPlugManager->serialize( basePath + "Plug", ser ); // serialize all av plugs 
     
    10071007    setDebugLevel( verboseLevel ); 
    10081008 
    1009     result &= deserializeVector<Subunit>( basePath + "Subunit", deser, *this, m_subunits ); 
     1009    result &= deserializeVector<Subunit>( basePath + "Subunit", deser, *this, m_subunits ); 
    10101010 
    10111011    if (m_pPlugManager) 
     
    10171017        return false; 
    10181018 
    1019     // XXX We have to deserialize the m_pcrPlugs and m_externPlugs members somehow. 
    1020     // Of course the simple following simple approach wont work at the moment. Some 
    1021     // more hacking needed :) 
    1022     //result &= deserializeVector<Plug>( basePath + "PcrPlug", deser, *this, m_pcrPlugs ); 
    1023     //result &= deserializeVector<Plug>( basePath + "ExternalPlug", deser, *this, m_externalPlugs ); 
    1024     result &= deserializePlugUpdateConnections( basePath + "PcrPlug", deser, m_pcrPlugs ); 
    1025     result &= deserializePlugUpdateConnections( basePath + "ExternalPlug", deser, m_externalPlugs ); 
     1019    result &= deserializePlugVector( basePath + "PcrPlug", deser, getPlugManager(), m_pcrPlugs ); 
     1020    result &= deserializePlugVector( basePath + "ExternalPlug", deser, getPlugManager(), m_externalPlugs ); 
    10261021    result &= deserializeVector<PlugConnection>( basePath + "PlugConnnection", deser, *this, m_plugConnections ); 
    10271022    result &= deserializeVector<Subunit>( basePath + "Subunit",  deser, *this, m_subunits ); 
    10281023    result &= deserializeSyncInfoVector( basePath + "SyncInfo", deser, m_syncInfos ); 
    10291024 
     1025    result &= deserializePlugUpdateConnections( basePath + "PcrPlug", deser, m_pcrPlugs ); 
     1026    result &= deserializePlugUpdateConnections( basePath + "ExternalPlug", deser, m_externalPlugs ); 
     1027    m_pPlugManager->deserializeUpdate(); 
     1028 
    10301029    unsigned int i; 
    10311030    result &= deser.read( basePath + "m_activeSyncInfo", i ); 
  • trunk/libffado/src/libavc/musicsubunit/avc_musicsubunit.cpp

    r618 r716  
    6363{ 
    6464    debugOutput(DEBUG_LEVEL_NORMAL, "Discovering %s...\n", getName()); 
    65      
     65 
    6666    // discover the AV/C generic part 
    6767    if ( !Subunit::discover() ) { 
    6868        return false; 
    6969    } 
    70      
     70 
    7171    // now we have the subunit plugs 
    72      
     72 
    7373    return true; 
    7474} 
     
    7979    debugOutput(DEBUG_LEVEL_VERBOSE, "Loading info from descriptor for plug: \n"); 
    8080    bool result=true; 
    81      
     81 
    8282    // load the descriptor (if not already loaded) 
    8383    if (m_status_descriptor != NULL) { 
    8484        result &= m_status_descriptor->load(); 
    8585    } 
    86      
     86 
    8787    AVCMusicSubunitPlugInfoBlock *info; 
    8888    info = m_status_descriptor->getSubunitPlugInfoBlock(plug.getDirection(), plug.getPlugId()); 
    89      
     89 
    9090    if (info == NULL) { 
    9191        debugError("Could not find plug info block\n"); 
    9292        return false; 
    9393    } 
    94      
     94 
    9595    debugOutput(DEBUG_LEVEL_VERBOSE, "Found plug: %s\n",info->getName().c_str()); 
    96      
     96 
    9797    // plug name 
    9898    result &= plug.setName(info->getName()); 
    99      
     99 
    100100    // plug type 
    101101    switch (info->m_plug_type) { 
     
    119119            break; 
    120120    } 
    121      
     121 
    122122    // number of channels 
    123123    result &= plug.setNrOfChannels(info->m_nb_channels); 
    124      
     124 
    125125    int idx=1; 
    126126    for ( AVCMusicClusterInfoBlockVectorIterator it = info->m_Clusters.begin(); 
    127       it != info->m_Clusters.end(); 
    128       ++it ) 
     127          it != info->m_Clusters.end(); 
     128          ++it ) 
    129129    { 
    130130        struct Plug::ClusterInfo cinfo; 
    131          
     131 
    132132        AVCMusicClusterInfoBlock *c=(*it); 
    133          
     133 
    134134        cinfo.m_index=idx; //FIXME: is this correct? 
    135135        cinfo.m_portType=c->m_port_type; 
     
    141141            cinfo.m_index, cinfo.m_portType, cinfo.m_nrOfChannels, cinfo.m_streamFormat, cinfo.m_name.c_str()); 
    142142 
    143         for ( AVCMusicClusterInfoBlock::SignalInfoVectorIterator sig_it  
    144               = c->m_SignalInfos.begin(); 
    145             sig_it != c->m_SignalInfos.end(); 
    146             ++sig_it ) 
     143        for ( AVCMusicClusterInfoBlock::SignalInfoVectorIterator sig_it 
     144                  = c->m_SignalInfos.begin(); 
     145              sig_it != c->m_SignalInfos.end(); 
     146              ++sig_it ) 
    147147        { 
    148148            struct AVCMusicClusterInfoBlock::sSignalInfo s=(*sig_it); 
    149149            struct Plug::ChannelInfo sinfo; 
    150              
     150 
    151151            sinfo.m_streamPosition=s.stream_position; 
    152152            sinfo.m_location=s.stream_location; 
    153              
     153 
    154154            AVCMusicPlugInfoBlock *mplug=m_status_descriptor->getMusicPlugInfoBlock(s.music_plug_id); 
    155              
     155 
    156156            if (mplug==NULL) { 
    157157                debugWarning("No music plug found for this signal\n"); 
     
    160160                sinfo.m_name=mplug->getName(); 
    161161            } 
    162              
     162 
    163163            if (plug.getDirection() == Plug::eAPD_Input) { 
    164                 // it's an input plug to the subunit  
     164                // it's an input plug to the subunit 
    165165                // so we have to check the source field of the music plug 
    166166                if(s.stream_position != mplug->m_source_stream_position) { 
     
    177177                } 
    178178            } else if (plug.getDirection() == Plug::eAPD_Output) { 
    179                 // it's an output plug from the subunit  
     179                // it's an output plug from the subunit 
    180180                // so we have to check the destination field of the music plug 
    181181                if(s.stream_position != mplug->m_dest_stream_position) { 
     
    194194                debugWarning("Invalid plug direction.\n"); 
    195195            } 
    196              
     196 
    197197            debugOutput(DEBUG_LEVEL_VERBOSE, "Adding signal pos=%2d loc=%2d name=%s\n", 
    198198                sinfo.m_streamPosition, sinfo.m_location, mplug->getName().c_str()); 
    199              
     199 
    200200            cinfo.m_channelInfos.push_back(sinfo); 
    201201        } 
     
    204204        plug.getClusterInfos().push_back(cinfo); 
    205205    } 
    206      
    207      
     206 
     207 
    208208    return result; 
    209209 
     
    239239bool 
    240240SubunitMusic::serializeChild( Glib::ustring basePath, 
    241                                              Util::IOSerialize& ser ) const 
     241                              Util::IOSerialize& ser ) const 
    242242{ 
    243243    return true; 
     
    246246bool 
    247247SubunitMusic::deserializeChild( Glib::ustring basePath, 
    248                                                Util::IODeserialize& deser, 
    249                                                Unit& unit ) 
     248                                Util::IODeserialize& deser, 
     249                                Unit& unit ) 
    250250{ 
    251251    return true;