Changeset 1361 for trunk

Show
Ignore:
Timestamp:
10/19/08 03:19:04 (15 years ago)
Author:
ppalmers
Message:

Merge 2.0 branch changes.

svn merge -r1349:HEAD svn+ssh://ffadosvn@ffado.org/ffado/branches/libffado-2.0

Files:

Legend:

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

    r1336 r1361  
    256256 
    257257//     if ( getDebugLevel() >= DEBUG_LEVEL_NORMAL ) { 
    258 //         Util::CoutSerializer se; 
     258//         Util::Cmd::CoutSerializer se; 
    259259//         fbCmd.serialize( se ); 
    260260//     } 
     
    286286     
    287287//     if ( getDebugLevel() >= DEBUG_LEVEL_NORMAL ) { 
    288 //         Util::CoutSerializer se; 
     288//         Util::Cmd::CoutSerializer se; 
    289289//         fbCmd.serialize( se ); 
    290290//     } 
     
    309309    fbCmd.m_pFBFeature->m_audioChannelNumber = channel; 
    310310    fbCmd.m_pFBFeature->m_controlSelector = FunctionBlockFeature::eCSE_Feature_Volume; 
     311    AVC::FunctionBlockFeatureVolume vl; 
     312    fbCmd.m_pFBFeature->m_pVolume = vl.clone(); 
    311313    fbCmd.m_pFBFeature->m_pVolume->m_volume = v; 
    312314    fbCmd.setVerboseLevel( getDebugLevel() ); 
     
    318320 
    319321//     if ( getDebugLevel() >= DEBUG_LEVEL_NORMAL ) { 
    320 //         Util::CoutSerializer se; 
     322//         Util::Cmd::CoutSerializer se; 
    321323//         fbCmd.serialize( se ); 
    322324//     } 
     
    341343    fbCmd.m_pFBFeature->m_audioChannelNumber = channel; 
    342344    fbCmd.m_pFBFeature->m_controlSelector = FunctionBlockFeature::eCSE_Feature_Volume; 
     345    AVC::FunctionBlockFeatureVolume vl; 
     346    fbCmd.m_pFBFeature->m_pVolume = vl.clone(); 
    343347    fbCmd.m_pFBFeature->m_pVolume->m_volume = 0; 
    344348    fbCmd.setVerboseLevel( getDebugLevel() ); 
     
    350354     
    351355//     if ( getDebugLevel() >= DEBUG_LEVEL_NORMAL ) { 
    352 //         Util::CoutSerializer se; 
     356//         Util::Cmd::CoutSerializer se; 
    353357//         fbCmd.serialize( se ); 
    354358//     } 
     
    379383{ 
    380384    return getFeatureFBVolumeValue(id, channel, AVC::FunctionBlockCmd::eCA_Current);    
     385} 
     386 
     387bool 
     388AvDevice::setFeatureFBLRBalanceCurrent(int id, int channel, int v) { 
     389 
     390    FunctionBlockCmd fbCmd( get1394Service(), 
     391                            FunctionBlockCmd::eFBT_Feature, 
     392                            id, 
     393                            FunctionBlockCmd::eCA_Current ); 
     394    fbCmd.setNodeId( getNodeId() ); 
     395    fbCmd.setSubunitId( 0x00 ); 
     396    fbCmd.setCommandType( AVCCommand::eCT_Control ); 
     397    fbCmd.m_pFBFeature->m_audioChannelNumber = channel; 
     398    fbCmd.m_pFBFeature->m_controlSelector = FunctionBlockFeature::eCSE_Feature_LRBalance; 
     399    AVC::FunctionBlockFeatureLRBalance bl; 
     400    fbCmd.m_pFBFeature->m_pLRBalance = bl.clone(); 
     401    fbCmd.m_pFBFeature->m_pLRBalance->m_lrBalance = v; 
     402    fbCmd.setVerboseLevel( getDebugLevel() ); 
     403 
     404    if ( !fbCmd.fire() ) { 
     405        debugError( "cmd failed\n" ); 
     406        return false; 
     407    } 
     408 
     409//     if ( getDebugLevel() >= DEBUG_LEVEL_NORMAL ) { 
     410//         Util::Cmd::CoutSerializer se; 
     411//         fbCmd.serialize( se ); 
     412//     } 
     413     
     414    if((fbCmd.getResponse() != AVCCommand::eR_Accepted)) { 
     415        debugWarning("fbCmd.getResponse() != AVCCommand::eR_Accepted\n"); 
     416    } 
     417 
     418    return (fbCmd.getResponse() == AVCCommand::eR_Accepted); 
     419} 
     420 
     421int 
     422AvDevice::getFeatureFBLRBalanceValue(int id, int channel, FunctionBlockCmd::EControlAttribute controlAttribute)  
     423{ 
     424    FunctionBlockCmd fbCmd( get1394Service(), 
     425                            FunctionBlockCmd::eFBT_Feature, 
     426                            id, 
     427                            controlAttribute); 
     428    fbCmd.setNodeId( getNodeId() ); 
     429    fbCmd.setSubunitId( 0x00 ); 
     430    fbCmd.setCommandType( AVCCommand::eCT_Status ); 
     431    fbCmd.m_pFBFeature->m_audioChannelNumber = channel; 
     432    fbCmd.m_pFBFeature->m_controlSelector = FunctionBlockFeature::eCSE_Feature_LRBalance; 
     433    AVC::FunctionBlockFeatureLRBalance bl; 
     434    fbCmd.m_pFBFeature->m_pLRBalance = bl.clone(); 
     435    fbCmd.m_pFBFeature->m_pLRBalance->m_lrBalance = 0; 
     436    fbCmd.setVerboseLevel( getDebugLevel() ); 
     437 
     438    if ( !fbCmd.fire() ) { 
     439        debugError( "cmd failed\n" ); 
     440        return 0; 
     441    } 
     442     
     443//     if ( getDebugLevel() >= DEBUG_LEVEL_NORMAL ) { 
     444//         Util::Cmd::CoutSerializer se; 
     445//         fbCmd.serialize( se ); 
     446//     } 
     447 
     448    if((fbCmd.getResponse() != AVCCommand::eR_Implemented)) { 
     449        debugWarning("fbCmd.getResponse() != AVCCommand::eR_Implemented\n"); 
     450    } 
     451     
     452    int16_t balance=(int16_t)(fbCmd.m_pFBFeature->m_pLRBalance->m_lrBalance); 
     453 
     454    return balance; 
     455} 
     456 
     457int  
     458AvDevice::getFeatureFBLRBalanceMinimum(int id, int channel) 
     459{ 
     460    return getFeatureFBLRBalanceValue(id, channel, AVC::FunctionBlockCmd::eCA_Minimum); 
     461} 
     462 
     463int  
     464AvDevice::getFeatureFBLRBalanceMaximum(int id, int channel) 
     465{ 
     466    return getFeatureFBLRBalanceValue(id, channel, AVC::FunctionBlockCmd::eCA_Maximum); 
     467} 
     468 
     469int  
     470AvDevice::getFeatureFBLRBalanceCurrent(int id, int channel) 
     471{ 
     472    return getFeatureFBLRBalanceValue(id, channel, AVC::FunctionBlockCmd::eCA_Current);    
    381473} 
    382474 
  • trunk/libffado/src/bebob/bebob_avdevice.h

    r1336 r1361  
    8585    virtual int getSelectorFBValue(int id); 
    8686    virtual bool setSelectorFBValue(int id, int v); 
     87 
    8788    virtual int getFeatureFBVolumeMinimum(int id, int channel); 
    8889    virtual int getFeatureFBVolumeMaximum(int id, int channel); 
    8990    virtual int getFeatureFBVolumeCurrent(int id, int channel); 
    9091    virtual bool setFeatureFBVolumeCurrent(int id, int channel, int v); 
     92 
     93    virtual int getFeatureFBLRBalanceMinimum(int id, int channel); 
     94    virtual int getFeatureFBLRBalanceMaximum(int id, int channel); 
     95    virtual int getFeatureFBLRBalanceCurrent(int id, int channel); 
     96    virtual bool setFeatureFBLRBalanceCurrent(int id, int channel, int v); 
    9197 
    9298    virtual void showDevice(); 
     
    99105 
    100106    virtual int getFeatureFBVolumeValue(int id, int channel, AVC::FunctionBlockCmd::EControlAttribute controlAttribute); 
     107    virtual int getFeatureFBLRBalanceValue(int id, int channel, AVC::FunctionBlockCmd::EControlAttribute controlAttribute); 
    101108 
    102109public: 
  • trunk/libffado/src/bebob/bebob_mixer.cpp

    r1324 r1361  
    108108} 
    109109 
    110 bool 
    111 Mixer::addElementForFunctionBlock(FunctionBlock& b) { 
    112     bool retval=true; 
    113      
    114     std::ostringstream ostrm; 
    115     ostrm << b.getName() << "_" << (int)(b.getId()); 
    116      
    117     debugOutput(DEBUG_LEVEL_NORMAL,"Adding element for functionblock %s...\n", 
    118         ostrm.str().c_str()); 
    119  
    120     Control::Element *e=NULL; 
    121      
    122     if (dynamic_cast<FunctionBlockSelector *>(&b) != NULL) { 
    123         FunctionBlockSelector *bf=dynamic_cast<FunctionBlockSelector *>(&b); 
    124         debugOutput( DEBUG_LEVEL_VERBOSE, "FB is a SelectorFunctionBlock\n"); 
    125         e=new MixerFBSelector(*this, *bf); 
    126         if (e) { 
    127             e->setVerboseLevel(getDebugLevel()); 
    128             retval &= Control::Container::addElement(e); 
    129         } else { 
    130             debugError("Control element creation failed\n"); 
    131             retval &= false; 
    132         } 
    133     } 
    134     if (dynamic_cast<FunctionBlockFeature *>(&b) != NULL) { 
    135         FunctionBlockFeature *bf=dynamic_cast<FunctionBlockFeature *>(&b); 
    136         debugOutput( DEBUG_LEVEL_VERBOSE, "FB is a FeatureFunctionBlock\n"); 
    137         e=new MixerFBFeature(*this, *bf); 
    138         if (e) { 
    139             e->setVerboseLevel(getDebugLevel()); 
    140             retval &= Control::Container::addElement(e); 
    141         } else { 
    142             debugError("Control element creation failed\n"); 
    143             retval &= false; 
    144         } 
    145     } 
    146  
    147     if (dynamic_cast<FunctionBlockEnhancedMixer *>(&b) != NULL) { 
    148         FunctionBlockEnhancedMixer *bf=dynamic_cast<FunctionBlockEnhancedMixer *>(&b); 
    149         debugOutput( DEBUG_LEVEL_VERBOSE, "FB is a FunctionBlockEnhancedMixer\n"); 
    150         e=new EnhancedMixerFBFeature(*this, *bf); 
    151         if (e) { 
    152             e->setVerboseLevel(getDebugLevel()); 
    153             retval &= Control::Container::addElement(e); 
    154         } else { 
    155             debugError("Control element creation failed\n"); 
    156             retval &= false; 
    157         } 
    158     } 
    159      
     110template<typename FBType, typename MixerType>  
     111bool 
     112Mixer::addElementForFunctionBlock(FBType& b) 
     113
     114    Control::Element *e = new MixerType(*this, b); 
    160115    if (!e) { 
    161         debugError("No control element created\n"); 
     116        debugError("Control element creation failed\n"); 
    162117        return false; 
    163118    } 
    164119 
    165     return retval; 
     120    e->setVerboseLevel(getDebugLevel()); 
     121    return Control::Container::addElement(e); 
    166122} 
    167123 
     
    169125Mixer::addElementForAllFunctionBlocks() { 
    170126    debugOutput(DEBUG_LEVEL_NORMAL,"Adding elements for functionblocks...\n"); 
     127 
     128    bool retval = true; 
    171129 
    172130    BeBoB::SubunitAudio *asu = 
     
    183141          ++it ) 
    184142    { 
    185         if (!addElementForFunctionBlock(*(*it))) { 
     143        FunctionBlock *pfb = *it; 
     144        FunctionBlockSelector *ps; 
     145        FunctionBlockFeature *pf; 
     146        FunctionBlockEnhancedMixer *pm; 
     147 
     148        if ((ps = dynamic_cast<FunctionBlockSelector *>(pfb))) { 
     149            debugOutput( DEBUG_LEVEL_VERBOSE, "FB is a SelectorFunctionBlock\n"); 
     150            retval = addElementForFunctionBlock<FunctionBlockSelector, MixerFBSelector>(*ps); 
     151        } else if ((pf = dynamic_cast<FunctionBlockFeature *>(pfb))) { 
     152            // We might should check if really both feature function 
     153            // blocks exists and only then announce them. The FA-101, 
     154            // FA-66 and the Ref BCO Audio5 do have both. 
     155            debugOutput( DEBUG_LEVEL_VERBOSE, "FB is a FeatureFunctionBlock\n"); 
     156            retval  = addElementForFunctionBlock<FunctionBlockFeature, MixerFBFeatureVolume>(*pf); 
     157            retval &= addElementForFunctionBlock<FunctionBlockFeature, MixerFBFeatureLRBalance>(*pf); 
     158        } else if ((pm = dynamic_cast<FunctionBlockEnhancedMixer *>(pfb))) { 
     159            // All BeBoB devices lock the mixer feature function 
     160            // block. The AV/C model for this mixer is just to 
     161            // complex and the BridgeCo guys decided to use the above 
     162            // function feature blocks (level and balance) to achive 
     163            // the same. 
     164            debugOutput( DEBUG_LEVEL_VERBOSE, "FB is a FunctionBlockEnhancedMixer\n"); 
     165            retval = addElementForFunctionBlock<FunctionBlockEnhancedMixer, EnhancedMixerFBFeature>(*pm); 
     166        } 
     167 
     168        if (!retval) { 
    186169            std::ostringstream ostrm; 
    187170            ostrm << (*it)->getName() << " " << (int)((*it)->getId()); 
     
    191174        }; 
    192175    } 
    193     return true
     176    return retval
    194177} 
    195178 
    196179// --- element implementation classes 
    197180 
    198 MixerFBFeature::MixerFBFeature(Mixer& parent, FunctionBlockFeature& s) 
     181MixerFBFeatureVolume::MixerFBFeatureVolume(Mixer& parent, FunctionBlockFeature& s) 
    199182: Control::Continuous(&parent) 
    200183, m_Parent(parent)  
     
    202185{ 
    203186    std::ostringstream ostrm; 
    204     ostrm << s.getName() << "_" << (int)(s.getId()); 
     187    ostrm << s.getName() << "_Volume_" << (int)(s.getId()); 
    205188     
    206189    Control::Continuous::setName(ostrm.str()); 
    207190     
    208191    ostrm.str(""); 
    209     ostrm << "Label for " << s.getName() << " " << (int)(s.getId()); 
     192    ostrm << "Label for " << s.getName() << "_Volume " << (int)(s.getId()); 
    210193    setLabel(ostrm.str()); 
    211194     
    212195    ostrm.str(""); 
    213     ostrm << "Description for " << s.getName() << " " << (int)(s.getId()); 
     196    ostrm << "Description for " << s.getName() << "_Volume " << (int)(s.getId()); 
    214197    setDescription(ostrm.str()); 
    215198} 
    216199 
    217 bool 
    218 MixerFBFeature::setValue(double v) 
     200MixerFBFeatureVolume::~MixerFBFeatureVolume() 
     201
     202
     203 
     204bool 
     205MixerFBFeatureVolume::setValue(double v) 
    219206{ 
    220207    return setValue(0, v); 
     
    222209 
    223210bool 
    224 MixerFBFeature::setValue(int idx, double v) 
     211MixerFBFeatureVolume::setValue(int idx, double v) 
    225212{ 
    226213    int volume=(int)v; 
     
    231218 
    232219double 
    233 MixerFBFeature::getValue() 
     220MixerFBFeatureVolume::getValue() 
    234221{ 
    235222    return getValue(0); 
     
    237224 
    238225double 
    239 MixerFBFeature::getValue(int idx) 
     226MixerFBFeatureVolume::getValue(int idx) 
    240227{ 
    241228    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature volume %d...\n", 
     
    246233 
    247234double 
    248 MixerFBFeature::getMinimum() 
     235MixerFBFeatureVolume::getMinimum() 
    249236{ 
    250237    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature minimum volume %d...\n", 
     
    255242 
    256243double 
    257 MixerFBFeature::getMaximum() 
     244MixerFBFeatureVolume::getMaximum() 
    258245{ 
    259246    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature maximum volume %d...\n", 
     
    261248 
    262249    return m_Parent.getParent().getFeatureFBVolumeMaximum(m_Slave.getId(), 0); 
     250} 
     251 
     252// --- element implementation classes 
     253 
     254MixerFBFeatureLRBalance::MixerFBFeatureLRBalance(Mixer& parent, FunctionBlockFeature& s) 
     255: Control::Continuous(&parent) 
     256, m_Parent(parent)  
     257, m_Slave(s) 
     258{ 
     259    std::ostringstream ostrm; 
     260    ostrm << s.getName() << "_LRBalance_" << (int)(s.getId()); 
     261     
     262    Control::Continuous::setName(ostrm.str()); 
     263     
     264    ostrm.str(""); 
     265    ostrm << "Label for " << s.getName() << "_LRBalance " << (int)(s.getId()); 
     266    setLabel(ostrm.str()); 
     267     
     268    ostrm.str(""); 
     269    ostrm << "Description for " << s.getName() << "_LRBalance " << (int)(s.getId()); 
     270    setDescription(ostrm.str()); 
     271} 
     272 
     273MixerFBFeatureLRBalance::~MixerFBFeatureLRBalance() 
     274{ 
     275} 
     276 
     277bool 
     278MixerFBFeatureLRBalance::setValue(double v) 
     279{ 
     280    return setValue(0, v); 
     281} 
     282 
     283bool 
     284MixerFBFeatureLRBalance::setValue(int idx, double v) 
     285{ 
     286    int volume=(int)v; 
     287    debugOutput(DEBUG_LEVEL_NORMAL,"Set feature balance %d to %d...\n", 
     288        m_Slave.getId(), volume); 
     289    return m_Parent.getParent().setFeatureFBLRBalanceCurrent(m_Slave.getId(), idx, volume); 
     290} 
     291 
     292double 
     293MixerFBFeatureLRBalance::getValue() 
     294{ 
     295    return getValue(0); 
     296} 
     297 
     298double 
     299MixerFBFeatureLRBalance::getValue(int idx) 
     300{ 
     301    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature balance %d...\n", 
     302        m_Slave.getId()); 
     303 
     304    return m_Parent.getParent().getFeatureFBLRBalanceCurrent(m_Slave.getId(), idx); 
     305} 
     306 
     307double 
     308MixerFBFeatureLRBalance::getMinimum() 
     309{ 
     310    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature balance volume %d...\n", 
     311        m_Slave.getId()); 
     312 
     313    return m_Parent.getParent().getFeatureFBLRBalanceMinimum(m_Slave.getId(), 0); 
     314} 
     315 
     316double 
     317MixerFBFeatureLRBalance::getMaximum() 
     318{ 
     319    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature maximum balance %d...\n", 
     320        m_Slave.getId()); 
     321 
     322    return m_Parent.getParent().getFeatureFBLRBalanceMaximum(m_Slave.getId(), 0); 
    263323} 
    264324 
     
    284344} 
    285345 
     346EnhancedMixerFBFeature::~EnhancedMixerFBFeature() 
     347{ 
     348} 
     349 
    286350bool 
    287351EnhancedMixerFBFeature::setValue(double v) 
     
    323387} 
    324388 
     389MixerFBSelector::~MixerFBSelector() 
     390{ 
     391} 
     392 
    325393bool 
    326394MixerFBSelector::setValue(int v) 
  • trunk/libffado/src/bebob/bebob_mixer.h

    r1324 r1361  
    5151        { return false; }; 
    5252 
    53     bool addElementForFunctionBlock(FunctionBlock& b); 
     53    template<typename FBType, typename MixerType> bool addElementForFunctionBlock(FBType& b); 
    5454    bool addElementForAllFunctionBlocks(); 
    5555 
     
    6969}; 
    7070 
    71 class MixerFBFeature 
     71class MixerFBFeatureVolume 
    7272    : public Control::Continuous 
    7373{ 
    7474public: 
    75     MixerFBFeature(Mixer& parent, FunctionBlockFeature&); 
     75    MixerFBFeatureVolume(Mixer& parent, FunctionBlockFeature&); 
     76    virtual ~MixerFBFeatureVolume(); 
     77 
     78    virtual bool setValue(double v); 
     79    virtual double getValue(); 
     80    virtual bool setValue(int idx, double v); 
     81    virtual double getValue(int idx); 
     82    virtual double getMinimum(); 
     83    virtual double getMaximum(); 
     84 
     85private: 
     86    Mixer&                  m_Parent; 
     87    FunctionBlockFeature&   m_Slave; 
     88}; 
     89 
     90class MixerFBFeatureLRBalance 
     91    : public Control::Continuous 
     92
     93public: 
     94    MixerFBFeatureLRBalance(Mixer& parent, FunctionBlockFeature&); 
     95    virtual ~MixerFBFeatureLRBalance(); 
    7696 
    7797    virtual bool setValue(double v); 
     
    92112public: 
    93113    EnhancedMixerFBFeature(Mixer& parent, FunctionBlockEnhancedMixer&); 
     114    virtual ~EnhancedMixerFBFeature(); 
    94115 
    95116    virtual bool setValue(double v); 
     
    113134public: 
    114135    MixerFBSelector(Mixer& parent, FunctionBlockSelector&); 
     136    virtual ~MixerFBSelector(); 
    115137 
    116138    virtual bool setValue(int v); 
  • trunk/libffado/src/libavc/audiosubunit/avc_function_block.cpp

    r864 r1361  
    8686///////////////////////////////// 
    8787 
     88FunctionBlockFeatureLRBalance::FunctionBlockFeatureLRBalance() 
     89    : IBusData() 
     90    , m_controlDataLength( 2 ) 
     91    , m_lrBalance( 0 ) 
     92{ 
     93} 
     94 
     95FunctionBlockFeatureLRBalance::FunctionBlockFeatureLRBalance( const FunctionBlockFeatureLRBalance& rhs ) 
     96    : m_controlDataLength( rhs.m_controlDataLength ) 
     97    , m_lrBalance( rhs.m_lrBalance ) 
     98{ 
     99} 
     100 
     101FunctionBlockFeatureLRBalance::~FunctionBlockFeatureLRBalance() 
     102{ 
     103} 
     104 
     105bool 
     106FunctionBlockFeatureLRBalance::serialize( Util::Cmd::IOSSerialize& se ) 
     107{ 
     108    bool bStatus; 
     109    byte_t val; 
     110    bStatus = se.write( m_controlDataLength,  "FunctionBlockFeatureLRBalance controlDataLength" ); 
     111    val = (byte_t)(m_lrBalance >> 8); 
     112    bStatus &= se.write( val,                 "FunctionBlockFeatureLRBalance LR Balance high" ); 
     113    val = m_lrBalance & 0xff; 
     114    bStatus &= se.write( val,                 "FunctionBlockFeatureLRBalance LR Balance low" ); 
     115 
     116    return bStatus; 
     117} 
     118 
     119bool 
     120FunctionBlockFeatureLRBalance::deserialize( Util::Cmd::IISDeserialize& de ) 
     121{ 
     122    bool bStatus; 
     123    byte_t val; 
     124    bStatus = de.read( &m_controlDataLength ); 
     125    bStatus &= de.read( &val ); 
     126    m_lrBalance = val << 8; 
     127    bStatus &= de.read( &val ); 
     128    m_lrBalance |= val; 
     129 
     130    return bStatus; 
     131} 
     132 
     133FunctionBlockFeatureLRBalance* 
     134FunctionBlockFeatureLRBalance::clone() const 
     135{ 
     136    return new FunctionBlockFeatureLRBalance( *this ); 
     137} 
     138 
     139///////////////////////////////// 
     140 
    88141FunctionBlockProcessingMixer::FunctionBlockProcessingMixer() 
    89142    : IBusData() 
     
    210263{ 
    211264    int todo; 
    212     bool bStatus=true
     265    bool bStatus
    213266    bStatus  = de.read( &m_controlSelector ); 
    214267 
     
    219272 
    220273    // same here 
    221     //m_statusSelector = eSS_Level;  
    222     m_statusSelector = eSS_ProgramableState;  
     274    m_statusSelector = eSS_Level;  
     275    //m_statusSelector = eSS_ProgramableState;  
    223276 
    224277    byte_t data_length_hi; 
     
    228281 
    229282    m_controlDataLength = (data_length_hi << 8) + data_length_lo; 
     283    printf("m_controlDataLength = %d\n", m_controlDataLength); 
    230284    switch (m_statusSelector) { 
    231285        case eSS_ProgramableState: 
     
    256310        case eSS_Level: 
    257311            m_LevelData.clear(); 
    258             for (int i=0;i<m_controlDataLength/2;i++) { 
    259                 byte_t mixer_value_hi=0, mixer_value_lo=0; 
     312            for (int i = 0; i < m_controlDataLength/2; i++) { 
     313                byte_t mixer_value_hi = 0; 
     314                byte_t mixer_value_lo = 0; 
    260315                bStatus &= de.read( &mixer_value_hi); 
    261316                bStatus &= de.read( &mixer_value_lo); 
     317 
    262318                mixer_level_t value = (mixer_value_hi << 8) + mixer_value_lo; 
     319 
     320                printf("value = %x\n", value); 
    263321                m_LevelData.push_back(value); 
    264322            } 
     
    334392    , m_audioChannelNumber( 0x00 ) 
    335393    , m_controlSelector( eCSE_Feature_Unknown ) 
    336     , m_pVolume( new FunctionBlockFeatureVolume ) 
     394    , m_pVolume( 0 ) 
     395    , m_pLRBalance( 0 ) 
    337396{ 
    338397} 
     
    346405    if ( rhs.m_pVolume ) { 
    347406        m_pVolume = new FunctionBlockFeatureVolume( *rhs.m_pVolume ); 
     407    } else if ( rhs.m_pLRBalance ) { 
     408        m_pLRBalance = new FunctionBlockFeatureLRBalance( *rhs.m_pLRBalance ); 
    348409    } 
    349410} 
     
    352413{ 
    353414    delete m_pVolume; 
    354     m_pVolume = NULL; 
     415    m_pVolume = 0; 
     416    delete m_pLRBalance; 
     417    m_pLRBalance = 0; 
    355418} 
    356419 
     
    363426    bStatus &= se.write( m_controlSelector,    "FunctionBlockFeature controlSelector" ); 
    364427 
    365     if ( m_controlSelector == eCSE_Feature_Volume ) { 
     428    switch( m_controlSelector ) { 
     429    case eCSE_Feature_Volume: 
    366430        bStatus &= m_pVolume->serialize( se ); 
    367     } else { 
     431        break; 
     432    case eCSE_Feature_LRBalance: 
     433        bStatus &= m_pLRBalance->serialize( se ); 
     434        break; 
     435    case eCSE_Feature_Mute: 
     436    case eCSE_Feature_FRBalance: 
     437    case eCSE_Feature_Bass: 
     438    case eCSE_Feature_Mid: 
     439    case eCSE_Feature_Treble: 
     440    case eCSE_Feature_GEQ: 
     441    case eCSE_Feature_AGC: 
     442    case eCSE_Feature_Delay: 
     443    case eCSE_Feature_BassBoost: 
     444    case eCSE_Feature_Loudness: 
     445    default: 
    368446        bStatus = false; 
    369447    } 
     
    384462        bStatus &= m_pVolume->deserialize( de ); 
    385463        break; 
     464    case eCSE_Feature_LRBalance: 
     465        bStatus &= m_pLRBalance->deserialize( de ); 
     466        break; 
    386467    case eCSE_Feature_Mute: 
    387     case eCSE_Feature_LRBalance: 
    388468    case eCSE_Feature_FRBalance: 
    389469    case eCSE_Feature_Bass: 
  • trunk/libffado/src/libavc/audiosubunit/avc_function_block.h

    r864 r1361  
    4848    control_data_length_t  m_controlDataLength; 
    4949    u_int16_t              m_volume; 
     50}; 
     51 
     52/////////////////////////////////////////// 
     53 
     54class FunctionBlockFeatureLRBalance: public IBusData 
     55{ 
     56public: 
     57    FunctionBlockFeatureLRBalance(); 
     58    FunctionBlockFeatureLRBalance( const FunctionBlockFeatureLRBalance& rhs ); 
     59    virtual ~FunctionBlockFeatureLRBalance(); 
     60 
     61    virtual bool serialize( Util::Cmd::IOSSerialize& se ); 
     62    virtual bool deserialize( Util::Cmd::IISDeserialize& de ); 
     63    virtual FunctionBlockFeatureLRBalance* clone() const; 
     64 
     65    control_data_length_t  m_controlDataLength; 
     66    u_int16_t              m_lrBalance; 
    5067}; 
    5168 
     
    159176 
    160177    FunctionBlockFeatureVolume*     m_pVolume; 
     178    FunctionBlockFeatureLRBalance*  m_pLRBalance; 
    161179}; 
    162180 
  • trunk/libffado/src/libavc/descriptors/avc_descriptor.h

    r1024 r1361  
    5151class Subunit; 
    5252 
    53 class Util::Cmd::IOSSerialize; 
    54 class Util::Cmd::IISDeserialize; 
    5553/** 
    5654 * The specifier used to indicate the target descriptor 
  • trunk/libffado/src/libavc/musicsubunit/avc_descriptor_music.h

    r1042 r1361  
    4646 
    4747namespace AVC { 
    48  
    49  
    50 class Util::Cmd::IOSSerialize; 
    51 class Util::Cmd::IISDeserialize; 
    5248 
    5349/** 
  • trunk/libffado/src/libavc/streamformat/avc_extended_stream_format.h

    r864 r1361  
    105105#define AVC1394_EXTENDED_STREAM_FORMAT_INFO_STATUS_NO_STREAM_FORMAT 0x02 
    106106#define AVC1394_EXTENDED_STREAM_FORMAT_INFO_STATUS_NOT_USED         0xff 
    107  
    108 class Util::Cmd::IOSSerialize; 
    109 class Util::Cmd::IISDeserialize; 
    110107 
    111108enum ERateControl { 
  • trunk/libffado/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp

    r1348 r1361  
    147147        unsigned int fdf_size = get_bits(CondSwapFromBus32(quadlet[1]), 23, 8) == 0x22 ? 32:0; // Event unit size in bits 
    148148 
    149         // Don't even attempt to process a packet if it isn't what 
    150         // we expect from a MOTU.  Yes, an FDF value of 32 bears 
    151         // little relationship to the actual data (24 bit integer) 
    152         // sent by the MOTU - it's one of those areas where MOTU 
    153         // have taken a curious detour around the standards. 
    154         if (tag!=1 || fdf_size!=32) { 
     149        // Don't even attempt to process a packet if it isn't what we expect 
     150        // from a MOTU.  Yes, an FDF value of 32 bears little relationship 
     151        // to the actual data (24 bit integer) sent by the MOTU - it's one 
     152        // of those areas where MOTU have taken a curious detour around the 
     153        // standards.  Do this check early on because for invalid packets 
     154        // dbs may not be what we expect, potentially causing issues later 
     155        // on. 
     156        if (tag!=1 || fdf_size!=32 || dbs==0) { 
    155157            return eCRV_Invalid; 
    156158        } 
    157159 
    158         // put this after the check because event_length can become 0 on invalid packets 
    159         unsigned int event_length = (fdf_size * dbs) / 8;       // Event size in bytes 
    160         unsigned int n_events = (length-8) / event_length; 
     160        // m_event_size is the event size in bytes 
     161        unsigned int n_events = (length-8) / m_event_size; 
    161162 
    162163        // Acquire the timestamp of the last frame in the packet just 
    163164        // received.  Since every frame from the MOTU has its own timestamp 
    164165        // we can just pick it straight from the packet. 
    165         uint32_t last_sph = CondSwapFromBus32(*(quadlet_t *)(data+8+(n_events-1)*event_length)); 
     166        uint32_t last_sph = CondSwapFromBus32(*(quadlet_t *)(data+8+(n_events-1)*m_event_size)); 
    166167        m_last_timestamp = sphRecvToFullTicks(last_sph, m_Parent.get1394Service().getCycleTimer()); 
    167168 
     
    185186enum StreamProcessor::eChildReturnValue 
    186187MotuReceiveStreamProcessor::processPacketData(unsigned char *data, unsigned int length) { 
    187     quadlet_t* quadlet = (quadlet_t*) data; 
    188  
    189     unsigned int dbs = get_bits(CondSwapFromBus32(quadlet[0]), 23, 8);  // Size of one event in terms of fdf_size 
    190     unsigned int fdf_size = get_bits(CondSwapFromBus32(quadlet[1]), 23, 8) == 0x22 ? 32:0; // Event unit size in bits 
    191     // this is only called for packets that return eCRV_OK on processPacketHeader 
    192     // so event_length won't become 0 
    193     unsigned int event_length = (fdf_size * dbs) / 8;       // Event size in bytes 
    194     unsigned int n_events = (length-8) / event_length; 
     188    // m_event_size should never be zero 
     189    unsigned int n_events = (length-8) / m_event_size; 
    195190 
    196191    // we have to keep in mind that there are also 
  • trunk/libffado/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp

    r1348 r1361  
    481481{ 
    482482    quadlet_t *quadlet = (quadlet_t *)data; 
    483     // Size of a single data frame in quadlets 
     483    // Size of a single data frame in quadlets.  For data sent by the 
     484    // Ultralite this is not strictly true (with m_event_size 52, dbs is set 
     485    // to 19).  Even so, we'll run with the assumption that a different dbs 
     486    // will be fine unless proven otherwise. 
    484487    unsigned dbs = m_event_size / 4; 
    485488 
     
    504507{ 
    505508    quadlet_t *quadlet = (quadlet_t *)data; 
    506     // Size of a single data frame in quadlets 
     509    // Size of a single data frame in quadlets.  See comment in 
     510    // fillDataPacketHeader() regarding the Ultralite. 
    507511    unsigned dbs = m_event_size / 4; 
    508512    // construct the packet CIP-like header.  Even if this is a data-less 
  • trunk/libffado/src/libutil/ringbuffer.c

    r864 r1361  
    188188 
    189189  memcpy (dest, &(rb->buf[rb->read_ptr]), n1); 
    190   rb->read_ptr += n1; 
    191   rb->read_ptr &= rb->size_mask; 
     190  rb->read_ptr = (rb->read_ptr + n1) & rb->size_mask; 
    192191 
    193192  if (n2) { 
    194193    memcpy (dest + n1, &(rb->buf[rb->read_ptr]), n2); 
    195     rb->read_ptr += n2; 
    196     rb->read_ptr &= rb->size_mask; 
     194    rb->read_ptr = (rb->read_ptr + n2) & rb->size_mask; 
    197195  } 
    198196 
     
    237235  if (n2) { 
    238236    memcpy (dest + n1, &(rb->buf[tmp_read_ptr]), n2); 
     237    // FIXME: tmp_read_ptr is not used anymore 
    239238    tmp_read_ptr += n2; 
    240239    tmp_read_ptr &= rb->size_mask; 
     
    273272 
    274273  memcpy (&(rb->buf[rb->write_ptr]), src, n1); 
    275   rb->write_ptr += n1; 
    276   rb->write_ptr &= rb->size_mask; 
     274  rb->write_ptr = (rb->write_ptr + n1) & rb->size_mask; 
    277275 
    278276  if (n2) { 
    279277    memcpy (&(rb->buf[rb->write_ptr]), src + n1, n2); 
    280     rb->write_ptr += n2; 
    281     rb->write_ptr &= rb->size_mask; 
     278    rb->write_ptr = (rb->write_ptr + n2) & rb->size_mask; 
    282279  } 
    283280 
     
    290287ffado_ringbuffer_read_advance (ffado_ringbuffer_t * rb, size_t cnt) 
    291288{ 
    292   rb->read_ptr += cnt; 
    293   rb->read_ptr &= rb->size_mask; 
     289  rb->read_ptr = (rb->read_ptr + cnt) & rb->size_mask; 
    294290} 
    295291 
     
    299295ffado_ringbuffer_write_advance (ffado_ringbuffer_t * rb, size_t cnt) 
    300296{ 
    301   rb->write_ptr += cnt; 
    302   rb->write_ptr &= rb->size_mask; 
     297  rb->write_ptr = (rb->write_ptr + cnt) & rb->size_mask; 
    303298} 
    304299 
  • trunk/libffado/src/motu/motu_avdevice.cpp

    r1336 r1361  
    194194const PortEntry Ports_ULTRALITE[] = 
    195195{ 
    196     {"Main-L", MOTU_DIR_OUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 40}, 
    197     {"Main-R", MOTU_DIR_OUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 43}, 
     196    {"Main-L", MOTU_DIR_OUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 46}, 
     197    {"Main-R", MOTU_DIR_OUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 49}, 
     198    {"Padding1", MOTU_DIR_IN, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY|MOTU_PA_PADDING, 46}, 
     199    {"Padding2", MOTU_DIR_IN, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY|MOTU_PA_PADDING, 49}, 
    198200    {"Mix-L", MOTU_DIR_IN, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 10}, 
    199201    {"Mix-R", MOTU_DIR_IN, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 13}, 
     
    210212    {"Phones-L", MOTU_DIR_OUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 10}, 
    211213    {"Phones-R", MOTU_DIR_OUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 13}, 
    212     {"SPDIF1", MOTU_DIR_INOUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 46}, 
    213     {"SPDIF2", MOTU_DIR_INOUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 49}, 
     214    {"SPDIF1", MOTU_DIR_INOUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 40}, 
     215    {"SPDIF2", MOTU_DIR_INOUT, MOTU_PA_RATE_ANY|MOTU_PA_OPTICAL_ANY, 43}, 
    214216}; 
    215217 
     
    14851487        flags |= MOTU_PA_RATE_1x; 
    14861488 
     1489    // Don't test for padding port flag here since we need to include such 
     1490    // pseudo-ports when calculating the event size. 
    14871491    for (i=0; i < DevicesProperty[m_motu_model-1].n_port_entries; i++) { 
    14881492        if (( DevicesProperty[m_motu_model-1].port_entry[i].port_dir & dir ) && 
     
    15591563        if (( DevicesProperty[m_motu_model-1].port_entry[i].port_dir & dir ) && 
    15601564           ( DevicesProperty[m_motu_model-1].port_entry[i].port_flags & MOTU_PA_RATE_MASK & flags ) && 
    1561            ( DevicesProperty[m_motu_model-1].port_entry[i].port_flags & MOTU_PA_OPTICAL_MASK & flags )) { 
     1565           ( DevicesProperty[m_motu_model-1].port_entry[i].port_flags & MOTU_PA_OPTICAL_MASK & flags ) && 
     1566           !( DevicesProperty[m_motu_model-1].port_entry[i].port_flags & MOTU_PA_PADDING )) { 
    15621567            asprintf(&buff,"%s_%s_%s" , id.c_str(), mode_str, 
    15631568              DevicesProperty[m_motu_model-1].port_entry[i].port_name); 
  • trunk/libffado/src/motu/motu_avdevice.h

    r1336 r1361  
    102102#define MOTU_PA_OPTICAL_ANY      (MOTU_PA_OPTICAL_OFF|MOTU_PA_OPTICAL_ON) 
    103103#define MOTU_PA_OPTICAL_MASK     MOTU_PA_OPTICAL_ANY 
     104#define MOTU_PA_PADDING          0x0100 
    104105 
    105106class ConfigRom; 
  • trunk/libffado/src/motu/motu_controls.h

    r1336 r1361  
    7676#define MOTU_CTRL_MODE_TRIMGAIN            0x00000001 
    7777 
    78 #define MOTU_CTRL_METER_PEAKHOLD           0x00000000 
    79 #define MOTU_CTRL_METER_CLIPHOLD           0x00000001 
    80 #define MOTU_CTRL_METER_AESEBU_SRC         0x00000002 
    81 #define MOTU_CTRL_METER_PROG_SRC           0x00000004 
     78#define MOTU_CTRL_METER_PEAKHOLD           0x00000001 
     79#define MOTU_CTRL_METER_CLIPHOLD           0x00000002 
     80#define MOTU_CTRL_METER_AESEBU_SRC         0x00000004 
     81#define MOTU_CTRL_METER_PROG_SRC           0x00000008 
    8282 
    8383#define MOTU_INFO_MODEL                    0x00000001 
  • trunk/libffado/support/mixer/mixer_bcoaudio5.py

    r1106 r1361  
    8888 
    8989            self.VolumeControls={ 
    90                 'in_line12'  :   ['/Mixer/Feature_1', self.sldInput12], 
    91                 'in_line34'  :   ['/Mixer/Feature_2', self.sldInput34], 
    92                 'in_spdif'   :   ['/Mixer/Feature_3', self.sldInputSPDIF], 
    93                 'out_line12' :   ['/Mixer/Feature_6', self.sldOutput12], 
    94                 'out_line34' :   ['/Mixer/Feature_7', self.sldOutput34], 
    95                 'cross_a'    :   ['/Mixer/Feature_4', self.sldCrossA], 
    96                 'cross_b'    :   ['/Mixer/Feature_5', self.sldCrossB], 
     90                'in_line12'  :   ['/Mixer/Feature_Volume_1', self.sldInput12], 
     91                'in_line34'  :   ['/Mixer/Feature_Volume_2', self.sldInput34], 
     92                'in_spdif'   :   ['/Mixer/Feature_Volume_3', self.sldInputSPDIF], 
     93                'out_line12' :   ['/Mixer/Feature_Volume_6', self.sldOutput12], 
     94                'out_line34' :   ['/Mixer/Feature_Volume_7', self.sldOutput34], 
     95                'cross_a'    :   ['/Mixer/Feature_Volume_4', self.sldCrossA], 
     96                'cross_b'    :   ['/Mixer/Feature_Volume_5', self.sldCrossB], 
    9797                } 
    9898 
  • trunk/libffado/support/mixer/mixer_edirolfa101.py

    r1328 r1361  
    2929 
    3030    def setVolumeIn1(self, vol): 
    31             self.setVolume('in1', vol) 
     31        self.setValue('vol1', vol) 
    3232 
    3333    def setVolumeIn2(self, vol): 
    34             self.setVolume('in2', vol) 
     34        self.setValue('vol2', vol) 
    3535 
    3636    def setVolumeIn3(self, vol): 
    37             self.setVolume('in3', vol) 
     37        self.setValue('vol3', vol) 
    3838 
    3939    def setVolumeIn4(self, vol): 
    40             self.setVolume('in4', vol) 
     40        self.setValue('vol4', vol) 
    4141 
    4242    def setVolumeIn5(self, vol): 
    43             self.setVolume('in5', vol) 
     43        self.setValue('vol5', vol) 
    4444 
    4545    def setVolumeIn6(self, vol): 
    46             self.setVolume('in6', vol) 
     46        self.setValue('vol6', vol) 
    4747 
    4848    def setVolumeIn7(self, vol): 
    49             self.setVolume('in7', vol) 
    50  
     49        self.setValue('vol7', vol) 
     50             
    5151    def setVolumeIn8(self, vol): 
    52             self.setVolume('in8', vol) 
    53              
     52        self.setValue('vol8', vol) 
     53         
    5454    def setVolumeIn9(self, vol): 
    55             self.setVolume('in9', vol) 
     55        self.setValue('vol9', vol) 
    5656 
    5757    def setVolumeIn10(self,vol): 
    58             self.setVolume('in10', vol) 
     58        self.setValue('vol10', vol) 
    5959 
    60     def setVolume(self, name, vol): 
    61             vol = -vol 
    62             ctrl = self.VolumeControls[name] 
    63             print "setting %s volume to %d" % (name, vol) 
    64             self.hw.setContignuous(ctrl[0], vol, idx = ctrl[1]) 
     60    def setBalanceIn1(self, bal): 
     61        self.setValue('bal1', bal) 
     62 
     63    def setBalanceIn2(self, bal): 
     64        self.setValue('bal2', bal) 
     65 
     66    def setBalanceIn3(self, bal): 
     67        self.setValue('bal3', bal) 
     68 
     69    def setBalanceIn4(self, bal): 
     70        self.setValue('bal4', bal) 
     71 
     72    def setBalanceIn5(self, bal): 
     73        self.setValue('bal5', bal) 
     74 
     75    def setBalanceIn6(self, bal): 
     76        self.setValue('bal6', bal) 
     77 
     78    def setBalanceIn7(self, bal): 
     79        self.setValue('bal7', bal) 
     80             
     81    def setBalanceIn8(self, bal): 
     82        self.setValue('bal8', bal) 
     83         
     84    def setBalanceIn9(self, bal): 
     85        self.setValue('bal9', bal) 
     86 
     87    def setBalanceIn10(self,bal): 
     88        self.setValue('bal10', bal) 
     89 
     90    def setValue(self, name, val): 
     91        val = -val 
     92        ctrl = self.VolumeControls[name] 
     93        print "setting %s to %d" % (name, val) 
     94        self.hw.setContignuous(ctrl[0], val, idx = ctrl[1]) 
    6595 
    6696    def init(self): 
    67             print "Init Edirol FA-101 window" 
     97        print "Init Edirol FA-101 window" 
    6898 
    69             self.VolumeControls = { 
    70                 #          feature name, channel, qt slider 
    71                 'in1'  :   ['/Mixer/Feature_5', 1, self.sldInput1], 
    72                 'in2'  :   ['/Mixer/Feature_5', 2, self.sldInput2], 
    73                 'in3'  :   ['/Mixer/Feature_1', 1, self.sldInput3], 
    74                 'in4'  :   ['/Mixer/Feature_1', 2, self.sldInput4], 
    75                 'in5'  :   ['/Mixer/Feature_2', 1, self.sldInput5], 
    76                 'in6'  :   ['/Mixer/Feature_2', 2, self.sldInput6], 
    77                 'in7'  :   ['/Mixer/Feature_3', 1, self.sldInput7], 
    78                 'in8'  :   ['/Mixer/Feature_3', 2, self.sldInput8], 
    79                 'in9'  :   ['/Mixer/Feature_4', 1, self.sldInput9], 
    80                 'in10' :   ['/Mixer/Feature_4', 2, self.sldInput10], 
    81                 } 
     99        self.VolumeControls = { 
     100            #          feature name, channel, qt slider 
     101            'vol1'  :   ['/Mixer/Feature_Volume_5', 1, self.sldInput1], 
     102            'vol2'  :   ['/Mixer/Feature_Volume_5', 2, self.sldInput2], 
     103            'vol3'  :   ['/Mixer/Feature_Volume_1', 1, self.sldInput3], 
     104            'vol4'  :   ['/Mixer/Feature_Volume_1', 2, self.sldInput4], 
     105            'vol5'  :   ['/Mixer/Feature_Volume_2', 1, self.sldInput5], 
     106            'vol6'  :   ['/Mixer/Feature_Volume_2', 2, self.sldInput6], 
     107            'vol7'  :   ['/Mixer/Feature_Volume_3', 1, self.sldInput7], 
     108            'vol8'  :   ['/Mixer/Feature_Volume_3', 2, self.sldInput8], 
     109            'vol9'  :   ['/Mixer/Feature_Volume_4', 1, self.sldInput9], 
     110            'vol10' :   ['/Mixer/Feature_Volume_4', 2, self.sldInput10], 
     111 
     112            'bal1'  :   ['/Mixer/Feature_LRBalance_5', 1, self.sldBal1], 
     113            'bal2'  :   ['/Mixer/Feature_LRBalance_5', 2, self.sldBal2], 
     114            'bal3'  :   ['/Mixer/Feature_LRBalance_1', 1, self.sldBal3], 
     115            'bal4'  :   ['/Mixer/Feature_LRBalance_1', 2, self.sldBal4], 
     116            'bal5'  :   ['/Mixer/Feature_LRBalance_2', 1, self.sldBal5], 
     117            'bal6'  :   ['/Mixer/Feature_LRBalance_2', 2, self.sldBal6], 
     118            'bal7'  :   ['/Mixer/Feature_LRBalance_3', 1, self.sldBal7], 
     119            'bal8'  :   ['/Mixer/Feature_LRBalance_3', 2, self.sldBal8], 
     120            'bal9'  :   ['/Mixer/Feature_LRBalance_4', 1, self.sldBal9], 
     121            'bal10' :   ['/Mixer/Feature_LRBalance_4', 2, self.sldBal10], 
     122            } 
    82123 
    83124    def initValues(self): 
    84             for name, ctrl in self.VolumeControls.iteritems(): 
    85                 vol = self.hw.getContignuous(ctrl[0], idx = ctrl[1]) 
    86                 print "%s volume is %d" % (name , vol) 
    87                 ctrl[2].setValue(-vol) 
     125        for name, ctrl in self.VolumeControls.iteritems(): 
     126            val = self.hw.getContignuous(ctrl[0], idx = ctrl[1]) 
     127            print "%s value is %d" % (name , val) 
     128 
     129            # Workaround: The current value is not properly initialized 
     130            # on the device and returns after bootup always 0. 
     131            # Though we happen to know what the correct value should 
     132            # be therefore we overwrite the 0  
     133            if name[0:3] == 'bal' and val == 0: 
     134                if ctrl[1] == 1: 
     135                    val = 32512 
     136                else: 
     137                    val = -32768 
     138                     
     139            ctrl[2].setValue(-val) 
  • trunk/libffado/support/mixer/mixer_edirolfa101.ui

    r1328 r1361  
    2626            <x>0</x> 
    2727            <y>0</y> 
    28             <width>521</width> 
    29             <height>161</height> 
     28            <width>681</width> 
     29            <height>193</height> 
    3030        </rect> 
    3131    </property> 
     
    3333        <string>Edirol FA-101</string> 
    3434    </property> 
    35     <vbox> 
     35    <hbox> 
    3636        <property name="name"> 
    3737            <cstring>unnamed</cstring> 
     
    5858                <widget class="QLayoutWidget"> 
    5959                    <property name="name"> 
    60                         <cstring>layout42</cstring> 
     60                        <cstring>layout33</cstring> 
    6161                    </property> 
    6262                    <vbox> 
     
    7575                            </property> 
    7676                        </widget> 
     77                        <widget class="QLayoutWidget"> 
     78                            <property name="name"> 
     79                                <cstring>layout32</cstring> 
     80                            </property> 
     81                            <hbox> 
     82                                <property name="name"> 
     83                                    <cstring>unnamed</cstring> 
     84                                </property> 
     85                                <spacer> 
     86                                    <property name="name"> 
     87                                        <cstring>spacer16_11</cstring> 
     88                                    </property> 
     89                                    <property name="orientation"> 
     90                                        <enum>Horizontal</enum> 
     91                                    </property> 
     92                                    <property name="sizeType"> 
     93                                        <enum>Expanding</enum> 
     94                                    </property> 
     95                                    <property name="sizeHint"> 
     96                                        <size> 
     97                                            <width>20</width> 
     98                                            <height>20</height> 
     99                                        </size> 
     100                                    </property> 
     101                                </spacer> 
     102                                <widget class="QSlider"> 
     103                                    <property name="name"> 
     104                                        <cstring>sldInput1</cstring> 
     105                                    </property> 
     106                                    <property name="sizePolicy"> 
     107                                        <sizepolicy> 
     108                                            <hsizetype>0</hsizetype> 
     109                                            <vsizetype>7</vsizetype> 
     110                                            <horstretch>0</horstretch> 
     111                                            <verstretch>0</verstretch> 
     112                                        </sizepolicy> 
     113                                    </property> 
     114                                    <property name="minValue"> 
     115                                        <number>0</number> 
     116                                    </property> 
     117                                    <property name="maxValue"> 
     118                                        <number>32767</number> 
     119                                    </property> 
     120                                    <property name="lineStep"> 
     121                                        <number>10000</number> 
     122                                    </property> 
     123                                    <property name="pageStep"> 
     124                                        <number>1000</number> 
     125                                    </property> 
     126                                    <property name="orientation"> 
     127                                        <enum>Vertical</enum> 
     128                                    </property> 
     129                                    <property name="tickmarks"> 
     130                                        <enum>Both</enum> 
     131                                    </property> 
     132                                    <property name="tickInterval"> 
     133                                        <number>10000</number> 
     134                                    </property> 
     135                                </widget> 
     136                                <spacer> 
     137                                    <property name="name"> 
     138                                        <cstring>spacer16_10</cstring> 
     139                                    </property> 
     140                                    <property name="orientation"> 
     141                                        <enum>Horizontal</enum> 
     142                                    </property> 
     143                                    <property name="sizeType"> 
     144                                        <enum>Expanding</enum> 
     145                                    </property> 
     146                                    <property name="sizeHint"> 
     147                                        <size> 
     148                                            <width>20</width> 
     149                                            <height>16</height> 
     150                                        </size> 
     151                                    </property> 
     152                                </spacer> 
     153                            </hbox> 
     154                        </widget> 
    77155                        <widget class="QSlider"> 
    78156                            <property name="name"> 
    79                                 <cstring>sldInput1</cstring> 
     157                                <cstring>sldBal1</cstring> 
    80158                            </property> 
    81159                            <property name="minValue"> 
    82                                 <number>0</number> 
     160                                <number>-32767</number> 
    83161                            </property> 
    84162                            <property name="maxValue"> 
    85                                 <number>32767</number> 
    86                             </property> 
    87                             <property name="lineStep"> 
    88                                 <number>10000</number> 
    89                             </property> 
    90                             <property name="pageStep"> 
    91                                 <number>1000</number> 
     163                                <number>32512</number> 
    92164                            </property> 
    93165                            <property name="orientation"> 
    94                                 <enum>Vertical</enum> 
    95                             </property> 
    96                             <property name="tickmarks"> 
    97                                 <enum>Both</enum> 
    98                             </property> 
    99                             <property name="tickInterval"> 
    100                                 <number>10000</number> 
     166                                <enum>Horizontal</enum> 
    101167                            </property> 
    102168                        </widget> 
     
    105171                <spacer> 
    106172                    <property name="name"> 
    107                         <cstring>spacer16</cstring> 
     173                        <cstring>spacer16_2</cstring> 
    108174                    </property> 
    109175                    <property name="orientation"> 
     
    122188                <widget class="QLayoutWidget"> 
    123189                    <property name="name"> 
    124                         <cstring>layout6</cstring> 
     190                        <cstring>layout36</cstring> 
    125191                    </property> 
    126192                    <vbox> 
     
    139205                            </property> 
    140206                        </widget> 
     207                        <widget class="QLayoutWidget"> 
     208                            <property name="name"> 
     209                                <cstring>layout34</cstring> 
     210                            </property> 
     211                            <hbox> 
     212                                <property name="name"> 
     213                                    <cstring>unnamed</cstring> 
     214                                </property> 
     215                                <spacer> 
     216                                    <property name="name"> 
     217                                        <cstring>spacer16_12</cstring> 
     218                                    </property> 
     219                                    <property name="orientation"> 
     220                                        <enum>Horizontal</enum> 
     221                                    </property> 
     222                                    <property name="sizeType"> 
     223                                        <enum>Expanding</enum> 
     224                                    </property> 
     225                                    <property name="sizeHint"> 
     226                                        <size> 
     227                                            <width>20</width> 
     228                                            <height>20</height> 
     229                                        </size> 
     230                                    </property> 
     231                                </spacer> 
     232                                <widget class="QSlider"> 
     233                                    <property name="name"> 
     234                                        <cstring>sldInput2</cstring> 
     235                                    </property> 
     236                                    <property name="minValue"> 
     237                                        <number>0</number> 
     238                                    </property> 
     239                                    <property name="maxValue"> 
     240                                        <number>32767</number> 
     241                                    </property> 
     242                                    <property name="lineStep"> 
     243                                        <number>10000</number> 
     244                                    </property> 
     245                                    <property name="pageStep"> 
     246                                        <number>1000</number> 
     247                                    </property> 
     248                                    <property name="orientation"> 
     249                                        <enum>Vertical</enum> 
     250                                    </property> 
     251                                    <property name="tickmarks"> 
     252                                        <enum>Both</enum> 
     253                                    </property> 
     254                                    <property name="tickInterval"> 
     255                                        <number>10000</number> 
     256                                    </property> 
     257                                </widget> 
     258                                <spacer> 
     259                                    <property name="name"> 
     260                                        <cstring>spacer16</cstring> 
     261                                    </property> 
     262                                    <property name="orientation"> 
     263                                        <enum>Horizontal</enum> 
     264                                    </property> 
     265                                    <property name="sizeType"> 
     266                                        <enum>Expanding</enum> 
     267                                    </property> 
     268                                    <property name="sizeHint"> 
     269                                        <size> 
     270                                            <width>20</width> 
     271                                            <height>20</height> 
     272                                        </size> 
     273                                    </property> 
     274                                </spacer> 
     275                            </hbox> 
     276                        </widget> 
    141277                        <widget class="QSlider"> 
    142278                            <property name="name"> 
    143                                 <cstring>sldInput2</cstring> 
     279                                <cstring>sldBal2</cstring> 
    144280                            </property> 
    145281                            <property name="minValue"> 
    146                                 <number>0</number> 
     282                                <number>-32767</number> 
    147283                            </property> 
    148284                            <property name="maxValue"> 
    149                                 <number>32767</number> 
    150                             </property> 
    151                             <property name="lineStep"> 
    152                                 <number>10000</number> 
    153                             </property> 
    154                             <property name="pageStep"> 
    155                                 <number>1000</number> 
     285                                <number>32512</number> 
    156286                            </property> 
    157287                            <property name="orientation"> 
    158                                 <enum>Vertical</enum> 
    159                             </property> 
    160                             <property name="tickmarks"> 
    161                                 <enum>Both</enum> 
    162                             </property> 
    163                             <property name="tickInterval"> 
    164                                 <number>10000</number> 
     288                                <enum>Horizontal</enum> 
    165289                            </property> 
    166290                        </widget> 
     
    169293                <spacer> 
    170294                    <property name="name"> 
    171                         <cstring>spacer16_2</cstring> 
     295                        <cstring>spacer16_2_2</cstring> 
    172296                    </property> 
    173297                    <property name="orientation"> 
     
    186310                <widget class="QLayoutWidget"> 
    187311                    <property name="name"> 
    188                         <cstring>layout41</cstring> 
     312                        <cstring>layout38</cstring> 
    189313                    </property> 
    190314                    <vbox> 
     
    203327                            </property> 
    204328                        </widget> 
     329                        <widget class="QLayoutWidget"> 
     330                            <property name="name"> 
     331                                <cstring>layout37</cstring> 
     332                            </property> 
     333                            <hbox> 
     334                                <property name="name"> 
     335                                    <cstring>unnamed</cstring> 
     336                                </property> 
     337                                <spacer> 
     338                                    <property name="name"> 
     339                                        <cstring>spacer16_2_3</cstring> 
     340                                    </property> 
     341                                    <property name="orientation"> 
     342                                        <enum>Horizontal</enum> 
     343                                    </property> 
     344                                    <property name="sizeType"> 
     345                                        <enum>Expanding</enum> 
     346                                    </property> 
     347                                    <property name="sizeHint"> 
     348                                        <size> 
     349                                            <width>20</width> 
     350                                            <height>20</height> 
     351                                        </size> 
     352                                    </property> 
     353                                </spacer> 
     354                                <widget class="QSlider"> 
     355                                    <property name="name"> 
     356                                        <cstring>sldInput3</cstring> 
     357                                    </property> 
     358                                    <property name="minValue"> 
     359                                        <number>0</number> 
     360                                    </property> 
     361                                    <property name="maxValue"> 
     362                                        <number>32767</number> 
     363                                    </property> 
     364                                    <property name="lineStep"> 
     365                                        <number>10000</number> 
     366                                    </property> 
     367                                    <property name="pageStep"> 
     368                                        <number>1000</number> 
     369                                    </property> 
     370                                    <property name="orientation"> 
     371                                        <enum>Vertical</enum> 
     372                                    </property> 
     373                                    <property name="tickmarks"> 
     374                                        <enum>Both</enum> 
     375                                    </property> 
     376                                    <property name="tickInterval"> 
     377                                        <number>10000</number> 
     378                                    </property> 
     379                                </widget> 
     380                                <spacer> 
     381                                    <property name="name"> 
     382                                        <cstring>spacer16_2_3_3</cstring> 
     383                                    </property> 
     384                                    <property name="orientation"> 
     385                                        <enum>Horizontal</enum> 
     386                                    </property> 
     387                                    <property name="sizeType"> 
     388                                        <enum>Expanding</enum> 
     389                                    </property> 
     390                                    <property name="sizeHint"> 
     391                                        <size> 
     392                                            <width>20</width> 
     393                                            <height>20</height> 
     394                                        </size> 
     395                                    </property> 
     396                                </spacer> 
     397                            </hbox> 
     398                        </widget> 
    205399                        <widget class="QSlider"> 
    206400                            <property name="name"> 
    207                                 <cstring>sldInput3</cstring> 
     401                                <cstring>sldBal3</cstring> 
    208402                            </property> 
    209403                            <property name="minValue"> 
    210                                 <number>0</number> 
     404                                <number>-32767</number> 
    211405                            </property> 
    212406                            <property name="maxValue"> 
    213                                 <number>32767</number> 
    214                             </property> 
    215                             <property name="lineStep"> 
    216                                 <number>10000</number> 
    217                             </property> 
    218                             <property name="pageStep"> 
    219                                 <number>1000</number> 
     407                                <number>32512</number> 
    220408                            </property> 
    221409                            <property name="orientation"> 
    222                                 <enum>Vertical</enum> 
    223                             </property> 
    224                             <property name="tickmarks"> 
    225                                 <enum>Both</enum> 
    226                             </property> 
    227                             <property name="tickInterval"> 
    228                                 <number>10000</number> 
     410                                <enum>Horizontal</enum> 
    229411                            </property> 
    230412                        </widget> 
     
    250432                <widget class="QLayoutWidget"> 
    251433                    <property name="name"> 
    252                         <cstring>layout7</cstring> 
     434                        <cstring>layout40</cstring> 
    253435                    </property> 
    254436                    <vbox> 
     
    267449                            </property> 
    268450                        </widget> 
     451                        <widget class="QLayoutWidget"> 
     452                            <property name="name"> 
     453                                <cstring>layout39</cstring> 
     454                            </property> 
     455                            <hbox> 
     456                                <property name="name"> 
     457                                    <cstring>unnamed</cstring> 
     458                                </property> 
     459                                <spacer> 
     460                                    <property name="name"> 
     461                                        <cstring>spacer16_3_2</cstring> 
     462                                    </property> 
     463                                    <property name="orientation"> 
     464                                        <enum>Horizontal</enum> 
     465                                    </property> 
     466                                    <property name="sizeType"> 
     467                                        <enum>Expanding</enum> 
     468                                    </property> 
     469                                    <property name="sizeHint"> 
     470                                        <size> 
     471                                            <width>20</width> 
     472                                            <height>20</height> 
     473                                        </size> 
     474                                    </property> 
     475                                </spacer> 
     476                                <widget class="QSlider"> 
     477                                    <property name="name"> 
     478                                        <cstring>sldInput4</cstring> 
     479                                    </property> 
     480                                    <property name="minValue"> 
     481                                        <number>0</number> 
     482                                    </property> 
     483                                    <property name="maxValue"> 
     484                                        <number>32767</number> 
     485                                    </property> 
     486                                    <property name="lineStep"> 
     487                                        <number>10000</number> 
     488                                    </property> 
     489                                    <property name="pageStep"> 
     490                                        <number>1000</number> 
     491                                    </property> 
     492                                    <property name="orientation"> 
     493                                        <enum>Vertical</enum> 
     494                                    </property> 
     495                                    <property name="tickmarks"> 
     496                                        <enum>Both</enum> 
     497                                    </property> 
     498                                    <property name="tickInterval"> 
     499                                        <number>10000</number> 
     500                                    </property> 
     501                                </widget> 
     502                                <spacer> 
     503                                    <property name="name"> 
     504                                        <cstring>spacer16_3_3</cstring> 
     505                                    </property> 
     506                                    <property name="orientation"> 
     507                                        <enum>Horizontal</enum> 
     508                                    </property> 
     509                                    <property name="sizeType"> 
     510                                        <enum>Expanding</enum> 
     511                                    </property> 
     512                                    <property name="sizeHint"> 
     513                                        <size> 
     514                                            <width>20</width> 
     515                                            <height>20</height> 
     516                                        </size> 
     517                                    </property> 
     518                                </spacer> 
     519                            </hbox> 
     520                        </widget> 
    269521                        <widget class="QSlider"> 
    270522                            <property name="name"> 
    271                                 <cstring>sldInput4</cstring> 
     523                                <cstring>sldBal4</cstring> 
    272524                            </property> 
    273525                            <property name="minValue"> 
    274                                 <number>0</number> 
     526                                <number>-32767</number> 
    275527                            </property> 
    276528                            <property name="maxValue"> 
    277                                 <number>32767</number> 
    278                             </property> 
    279                             <property name="lineStep"> 
    280                                 <number>10000</number> 
    281                             </property> 
    282                             <property name="pageStep"> 
    283                                 <number>1000</number> 
     529                                <number>32512</number> 
    284530                            </property> 
    285531                            <property name="orientation"> 
    286                                 <enum>Vertical</enum> 
    287                             </property> 
    288                             <property name="tickmarks"> 
    289                                 <enum>Both</enum> 
    290                             </property> 
    291                             <property name="tickInterval"> 
    292                                 <number>10000</number> 
     532                                <enum>Horizontal</enum> 
    293533                            </property> 
    294534                        </widget> 
     
    297537                <spacer> 
    298538                    <property name="name"> 
    299                         <cstring>spacer16_4</cstring> 
     539                        <cstring>spacer16_5_4</cstring> 
    300540                    </property> 
    301541                    <property name="orientation"> 
     
    314554                <widget class="QLayoutWidget"> 
    315555                    <property name="name"> 
    316                         <cstring>layout43</cstring> 
     556                        <cstring>layout42</cstring> 
    317557                    </property> 
    318558                    <vbox> 
     
    331571                            </property> 
    332572                        </widget> 
     573                        <widget class="QLayoutWidget"> 
     574                            <property name="name"> 
     575                                <cstring>layout41</cstring> 
     576                            </property> 
     577                            <hbox> 
     578                                <property name="name"> 
     579                                    <cstring>unnamed</cstring> 
     580                                </property> 
     581                                <spacer> 
     582                                    <property name="name"> 
     583                                        <cstring>spacer16_4</cstring> 
     584                                    </property> 
     585                                    <property name="orientation"> 
     586                                        <enum>Horizontal</enum> 
     587                                    </property> 
     588                                    <property name="sizeType"> 
     589                                        <enum>Expanding</enum> 
     590                                    </property> 
     591                                    <property name="sizeHint"> 
     592                                        <size> 
     593                                            <width>20</width> 
     594                                            <height>20</height> 
     595                                        </size> 
     596                                    </property> 
     597                                </spacer> 
     598                                <widget class="QSlider"> 
     599                                    <property name="name"> 
     600                                        <cstring>sldInput5</cstring> 
     601                                    </property> 
     602                                    <property name="minimumSize"> 
     603                                        <size> 
     604                                            <width>0</width> 
     605                                            <height>80</height> 
     606                                        </size> 
     607                                    </property> 
     608                                    <property name="minValue"> 
     609                                        <number>0</number> 
     610                                    </property> 
     611                                    <property name="maxValue"> 
     612                                        <number>32767</number> 
     613                                    </property> 
     614                                    <property name="lineStep"> 
     615                                        <number>10000</number> 
     616                                    </property> 
     617                                    <property name="pageStep"> 
     618                                        <number>1000</number> 
     619                                    </property> 
     620                                    <property name="orientation"> 
     621                                        <enum>Vertical</enum> 
     622                                    </property> 
     623                                    <property name="tickmarks"> 
     624                                        <enum>Both</enum> 
     625                                    </property> 
     626                                    <property name="tickInterval"> 
     627                                        <number>10000</number> 
     628                                    </property> 
     629                                </widget> 
     630                                <spacer> 
     631                                    <property name="name"> 
     632                                        <cstring>spacer16_4_3</cstring> 
     633                                    </property> 
     634                                    <property name="orientation"> 
     635                                        <enum>Horizontal</enum> 
     636                                    </property> 
     637                                    <property name="sizeType"> 
     638                                        <enum>Expanding</enum> 
     639                                    </property> 
     640                                    <property name="sizeHint"> 
     641                                        <size> 
     642                                            <width>20</width> 
     643                                            <height>20</height> 
     644                                        </size> 
     645                                    </property> 
     646                                </spacer> 
     647                            </hbox> 
     648                        </widget> 
    333649                        <widget class="QSlider"> 
    334650                            <property name="name"> 
    335                                 <cstring>sldInput5</cstring> 
    336                             </property> 
    337                             <property name="minimumSize"> 
    338                                 <size> 
    339                                     <width>0</width> 
    340                                     <height>80</height> 
    341                                 </size> 
     651                                <cstring>sldBal5</cstring> 
    342652                            </property> 
    343653                            <property name="minValue"> 
    344                                 <number>0</number> 
     654                                <number>-32767</number> 
    345655                            </property> 
    346656                            <property name="maxValue"> 
    347                                 <number>32767</number> 
    348                             </property> 
    349                             <property name="lineStep"> 
    350                                 <number>10000</number> 
    351                             </property> 
    352                             <property name="pageStep"> 
    353                                 <number>1000</number> 
     657                                <number>32512</number> 
    354658                            </property> 
    355659                            <property name="orientation"> 
    356                                 <enum>Vertical</enum> 
    357                             </property> 
    358                             <property name="tickmarks"> 
    359                                 <enum>Both</enum> 
    360                             </property> 
    361                             <property name="tickInterval"> 
    362                                 <number>10000</number> 
     660                                <enum>Horizontal</enum> 
    363661                            </property> 
    364662                        </widget> 
     
    384682                <widget class="QLayoutWidget"> 
    385683                    <property name="name"> 
    386                         <cstring>layout8</cstring> 
     684                        <cstring>layout44</cstring> 
    387685                    </property> 
    388686                    <vbox> 
     
    401699                            </property> 
    402700                        </widget> 
     701                        <widget class="QLayoutWidget"> 
     702                            <property name="name"> 
     703                                <cstring>layout43</cstring> 
     704                            </property> 
     705                            <hbox> 
     706                                <property name="name"> 
     707                                    <cstring>unnamed</cstring> 
     708                                </property> 
     709                                <spacer> 
     710                                    <property name="name"> 
     711                                        <cstring>spacer16_5_2</cstring> 
     712                                    </property> 
     713                                    <property name="orientation"> 
     714                                        <enum>Horizontal</enum> 
     715                                    </property> 
     716                                    <property name="sizeType"> 
     717                                        <enum>Expanding</enum> 
     718                                    </property> 
     719                                    <property name="sizeHint"> 
     720                                        <size> 
     721                                            <width>20</width> 
     722                                            <height>20</height> 
     723                                        </size> 
     724                                    </property> 
     725                                </spacer> 
     726                                <widget class="QSlider"> 
     727                                    <property name="name"> 
     728                                        <cstring>sldInput6</cstring> 
     729                                    </property> 
     730                                    <property name="minValue"> 
     731                                        <number>0</number> 
     732                                    </property> 
     733                                    <property name="maxValue"> 
     734                                        <number>32767</number> 
     735                                    </property> 
     736                                    <property name="lineStep"> 
     737                                        <number>10000</number> 
     738                                    </property> 
     739                                    <property name="pageStep"> 
     740                                        <number>1000</number> 
     741                                    </property> 
     742                                    <property name="orientation"> 
     743                                        <enum>Vertical</enum> 
     744                                    </property> 
     745                                    <property name="tickmarks"> 
     746                                        <enum>Both</enum> 
     747                                    </property> 
     748                                    <property name="tickInterval"> 
     749                                        <number>10000</number> 
     750                                    </property> 
     751                                </widget> 
     752                                <spacer> 
     753                                    <property name="name"> 
     754                                        <cstring>spacer16_5_3</cstring> 
     755                                    </property> 
     756                                    <property name="orientation"> 
     757                                        <enum>Horizontal</enum> 
     758                                    </property> 
     759                                    <property name="sizeType"> 
     760                                        <enum>Expanding</enum> 
     761                                    </property> 
     762                                    <property name="sizeHint"> 
     763                                        <size> 
     764                                            <width>20</width> 
     765                                            <height>20</height> 
     766                                        </size> 
     767                                    </property> 
     768                                </spacer> 
     769                            </hbox> 
     770                        </widget> 
    403771                        <widget class="QSlider"> 
    404772                            <property name="name"> 
    405                                 <cstring>sldInput6</cstring> 
     773                                <cstring>sldBal6</cstring> 
    406774                            </property> 
    407775                            <property name="minValue"> 
    408                                 <number>0</number> 
     776                                <number>-32767</number> 
    409777                            </property> 
    410778                            <property name="maxValue"> 
    411                                 <number>32767</number> 
    412                             </property> 
    413                             <property name="lineStep"> 
    414                                 <number>10000</number> 
    415                             </property> 
    416                             <property name="pageStep"> 
    417                                 <number>1000</number> 
     779                                <number>32512</number> 
    418780                            </property> 
    419781                            <property name="orientation"> 
    420                                 <enum>Vertical</enum> 
    421                             </property> 
    422                             <property name="tickmarks"> 
    423                                 <enum>Both</enum> 
    424                             </property> 
    425                             <property name="tickInterval"> 
    426                                 <number>10000</number> 
     782                                <enum>Horizontal</enum> 
    427783                            </property> 
    428784                        </widget> 
     
    431787                <spacer> 
    432788                    <property name="name"> 
    433                         <cstring>spacer16_6</cstring> 
     789                        <cstring>spacer16_8_2_2</cstring> 
    434790                    </property> 
    435791                    <property name="orientation"> 
     
    448804                <widget class="QLayoutWidget"> 
    449805                    <property name="name"> 
    450                         <cstring>layout44</cstring> 
     806                        <cstring>layout46</cstring> 
    451807                    </property> 
    452808                    <vbox> 
     
    465821                            </property> 
    466822                        </widget> 
     823                        <widget class="QLayoutWidget"> 
     824                            <property name="name"> 
     825                                <cstring>layout45</cstring> 
     826                            </property> 
     827                            <hbox> 
     828                                <property name="name"> 
     829                                    <cstring>unnamed</cstring> 
     830                                </property> 
     831                                <spacer> 
     832                                    <property name="name"> 
     833                                        <cstring>spacer16_6</cstring> 
     834                                    </property> 
     835                                    <property name="orientation"> 
     836                                        <enum>Horizontal</enum> 
     837                                    </property> 
     838                                    <property name="sizeType"> 
     839                                        <enum>Expanding</enum> 
     840                                    </property> 
     841                                    <property name="sizeHint"> 
     842                                        <size> 
     843                                            <width>20</width> 
     844                                            <height>20</height> 
     845                                        </size> 
     846                                    </property> 
     847                                </spacer> 
     848                                <widget class="QSlider"> 
     849                                    <property name="name"> 
     850                                        <cstring>sldInput7</cstring> 
     851                                    </property> 
     852                                    <property name="minimumSize"> 
     853                                        <size> 
     854                                            <width>0</width> 
     855                                            <height>80</height> 
     856                                        </size> 
     857                                    </property> 
     858                                    <property name="minValue"> 
     859                                        <number>0</number> 
     860                                    </property> 
     861                                    <property name="maxValue"> 
     862                                        <number>32767</number> 
     863                                    </property> 
     864                                    <property name="lineStep"> 
     865                                        <number>10000</number> 
     866                                    </property> 
     867                                    <property name="pageStep"> 
     868                                        <number>1000</number> 
     869                                    </property> 
     870                                    <property name="orientation"> 
     871                                        <enum>Vertical</enum> 
     872                                    </property> 
     873                                    <property name="tickmarks"> 
     874                                        <enum>Both</enum> 
     875                                    </property> 
     876                                    <property name="tickInterval"> 
     877                                        <number>10000</number> 
     878                                    </property> 
     879                                </widget> 
     880                                <spacer> 
     881                                    <property name="name"> 
     882                                        <cstring>spacer16_6_3</cstring> 
     883                                    </property> 
     884                                    <property name="orientation"> 
     885                                        <enum>Horizontal</enum> 
     886                                    </property> 
     887                                    <property name="sizeType"> 
     888                                        <enum>Expanding</enum> 
     889                                    </property> 
     890                                    <property name="sizeHint"> 
     891                                        <size> 
     892                                            <width>20</width> 
     893                                            <height>20</height> 
     894                                        </size> 
     895                                    </property> 
     896                                </spacer> 
     897                            </hbox> 
     898                        </widget> 
    467899                        <widget class="QSlider"> 
    468900                            <property name="name"> 
    469                                 <cstring>sldInput7</cstring> 
    470                             </property> 
    471                             <property name="minimumSize"> 
    472                                 <size> 
    473                                     <width>0</width> 
    474                                     <height>80</height> 
    475                                 </size> 
     901                                <cstring>sldBal7</cstring> 
    476902                            </property> 
    477903                            <property name="minValue"> 
    478                                 <number>0</number> 
     904                                <number>-32767</number> 
    479905                            </property> 
    480906                            <property name="maxValue"> 
    481                                 <number>32767</number> 
    482                             </property> 
    483                             <property name="lineStep"> 
    484                                 <number>10000</number> 
    485                             </property> 
    486                             <property name="pageStep"> 
    487                                 <number>1000</number> 
     907                                <number>32512</number> 
    488908                            </property> 
    489909                            <property name="orientation"> 
    490                                 <enum>Vertical</enum> 
    491                             </property> 
    492                             <property name="tickmarks"> 
    493                                 <enum>Both</enum> 
    494                             </property> 
    495                             <property name="tickInterval"> 
    496                                 <number>10000</number> 
     910                                <enum>Horizontal</enum> 
    497911                            </property> 
    498912                        </widget> 
     
    501915                <spacer> 
    502916                    <property name="name"> 
    503                         <cstring>spacer16_7</cstring> 
     917                        <cstring>spacer16_8_2</cstring> 
    504918                    </property> 
    505919                    <property name="orientation"> 
     
    518932                <widget class="QLayoutWidget"> 
    519933                    <property name="name"> 
    520                         <cstring>layout9</cstring> 
     934                        <cstring>layout48</cstring> 
    521935                    </property> 
    522936                    <vbox> 
     
    535949                            </property> 
    536950                        </widget> 
     951                        <widget class="QLayoutWidget"> 
     952                            <property name="name"> 
     953                                <cstring>layout47</cstring> 
     954                            </property> 
     955                            <hbox> 
     956                                <property name="name"> 
     957                                    <cstring>unnamed</cstring> 
     958                                </property> 
     959                                <spacer> 
     960                                    <property name="name"> 
     961                                        <cstring>spacer16_7</cstring> 
     962                                    </property> 
     963                                    <property name="orientation"> 
     964                                        <enum>Horizontal</enum> 
     965                                    </property> 
     966                                    <property name="sizeType"> 
     967                                        <enum>Expanding</enum> 
     968                                    </property> 
     969                                    <property name="sizeHint"> 
     970                                        <size> 
     971                                            <width>20</width> 
     972                                            <height>20</height> 
     973                                        </size> 
     974                                    </property> 
     975                                </spacer> 
     976                                <widget class="QSlider"> 
     977                                    <property name="name"> 
     978                                        <cstring>sldInput8</cstring> 
     979                                    </property> 
     980                                    <property name="minValue"> 
     981                                        <number>0</number> 
     982                                    </property> 
     983                                    <property name="maxValue"> 
     984                                        <number>32767</number> 
     985                                    </property> 
     986                                    <property name="lineStep"> 
     987                                        <number>10000</number> 
     988                                    </property> 
     989                                    <property name="pageStep"> 
     990                                        <number>1000</number> 
     991                                    </property> 
     992                                    <property name="orientation"> 
     993                                        <enum>Vertical</enum> 
     994                                    </property> 
     995                                    <property name="tickmarks"> 
     996                                        <enum>Both</enum> 
     997                                    </property> 
     998                                    <property name="tickInterval"> 
     999                                        <number>10000</number> 
     1000                                    </property> 
     1001                                </widget> 
     1002                                <spacer> 
     1003                                    <property name="name"> 
     1004                                        <cstring>spacer16_7_5</cstring> 
     1005                                    </property> 
     1006                                    <property name="orientation"> 
     1007                                        <enum>Horizontal</enum> 
     1008                                    </property> 
     1009                                    <property name="sizeType"> 
     1010                                        <enum>Expanding</enum> 
     1011                                    </property> 
     1012                                    <property name="sizeHint"> 
     1013                                        <size> 
     1014                                            <width>20</width> 
     1015                                            <height>20</height> 
     1016                                        </size> 
     1017                                    </property> 
     1018                                </spacer> 
     1019                            </hbox> 
     1020                        </widget> 
    5371021                        <widget class="QSlider"> 
    5381022                            <property name="name"> 
    539                                 <cstring>sldInput8</cstring> 
     1023                                <cstring>sldBal8</cstring> 
    5401024                            </property> 
    5411025                            <property name="minValue"> 
    542                                 <number>0</number> 
     1026                                <number>-32767</number> 
    5431027                            </property> 
    5441028                            <property name="maxValue"> 
    545                                 <number>32767</number> 
    546                             </property> 
    547                             <property name="lineStep"> 
    548                                 <number>10000</number> 
    549                             </property> 
    550                             <property name="pageStep"> 
    551                                 <number>1000</number> 
     1029                                <number>32512</number> 
    5521030                            </property> 
    5531031                            <property name="orientation"> 
    554                                 <enum>Vertical</enum> 
    555                             </property> 
    556                             <property name="tickmarks"> 
    557                                 <enum>Both</enum> 
    558                             </property> 
    559                             <property name="tickInterval"> 
    560                                 <number>10000</number> 
     1032                                <enum>Horizontal</enum> 
    5611033                            </property> 
    5621034                        </widget> 
     
    5821054                <widget class="QLayoutWidget"> 
    5831055                    <property name="name"> 
    584                         <cstring>layout45</cstring> 
     1056                        <cstring>layout50</cstring> 
    5851057                    </property> 
    5861058                    <vbox> 
     
    5991071                            </property> 
    6001072                        </widget> 
     1073                        <widget class="QLayoutWidget"> 
     1074                            <property name="name"> 
     1075                                <cstring>layout49</cstring> 
     1076                            </property> 
     1077                            <hbox> 
     1078                                <property name="name"> 
     1079                                    <cstring>unnamed</cstring> 
     1080                                </property> 
     1081                                <spacer> 
     1082                                    <property name="name"> 
     1083                                        <cstring>spacer16_8_3</cstring> 
     1084                                    </property> 
     1085                                    <property name="orientation"> 
     1086                                        <enum>Horizontal</enum> 
     1087                                    </property> 
     1088                                    <property name="sizeType"> 
     1089                                        <enum>Expanding</enum> 
     1090                                    </property> 
     1091                                    <property name="sizeHint"> 
     1092                                        <size> 
     1093                                            <width>20</width> 
     1094                                            <height>20</height> 
     1095                                        </size> 
     1096                                    </property> 
     1097                                </spacer> 
     1098                                <widget class="QSlider"> 
     1099                                    <property name="name"> 
     1100                                        <cstring>sldInput9</cstring> 
     1101                                    </property> 
     1102                                    <property name="minimumSize"> 
     1103                                        <size> 
     1104                                            <width>0</width> 
     1105                                            <height>80</height> 
     1106                                        </size> 
     1107                                    </property> 
     1108                                    <property name="minValue"> 
     1109                                        <number>0</number> 
     1110                                    </property> 
     1111                                    <property name="maxValue"> 
     1112                                        <number>32767</number> 
     1113                                    </property> 
     1114                                    <property name="lineStep"> 
     1115                                        <number>10000</number> 
     1116                                    </property> 
     1117                                    <property name="pageStep"> 
     1118                                        <number>1000</number> 
     1119                                    </property> 
     1120                                    <property name="orientation"> 
     1121                                        <enum>Vertical</enum> 
     1122                                    </property> 
     1123                                    <property name="tickmarks"> 
     1124                                        <enum>Both</enum> 
     1125                                    </property> 
     1126                                    <property name="tickInterval"> 
     1127                                        <number>10000</number> 
     1128                                    </property> 
     1129                                </widget> 
     1130                                <spacer> 
     1131                                    <property name="name"> 
     1132                                        <cstring>spacer16_8_4</cstring> 
     1133                                    </property> 
     1134                                    <property name="orientation"> 
     1135                                        <enum>Horizontal</enum> 
     1136                                    </property> 
     1137                                    <property name="sizeType"> 
     1138                                        <enum>Expanding</enum> 
     1139                                    </property> 
     1140                                    <property name="sizeHint"> 
     1141                                        <size> 
     1142                                            <width>20</width> 
     1143                                            <height>20</height> 
     1144                                        </size> 
     1145                                    </property> 
     1146                                </spacer> 
     1147                            </hbox> 
     1148                        </widget> 
    6011149                        <widget class="QSlider"> 
    6021150                            <property name="name"> 
    603                                 <cstring>sldInput9</cstring> 
    604                             </property> 
    605                             <property name="minimumSize"> 
    606                                 <size> 
    607                                     <width>0</width> 
    608                                     <height>80</height> 
    609                                 </size> 
     1151                                <cstring>sldBal9</cstring> 
    6101152                            </property> 
    6111153                            <property name="minValue"> 
    612                                 <number>0</number> 
     1154                                <number>-32767</number> 
    6131155                            </property> 
    6141156                            <property name="maxValue"> 
    615                                 <number>32767</number> 
    616                             </property> 
    617                             <property name="lineStep"> 
    618                                 <number>10000</number> 
    619                             </property> 
    620                             <property name="pageStep"> 
    621                                 <number>1000</number> 
     1157                                <number>32512</number> 
    6221158                            </property> 
    6231159                            <property name="orientation"> 
    624                                 <enum>Vertical</enum> 
    625                             </property> 
    626                             <property name="tickmarks"> 
    627                                 <enum>Both</enum> 
    628                             </property> 
    629                             <property name="tickInterval"> 
    630                                 <number>10000</number> 
     1160                                <enum>Horizontal</enum> 
    6311161                            </property> 
    6321162                        </widget> 
     
    6521182                <widget class="QLayoutWidget"> 
    6531183                    <property name="name"> 
    654                         <cstring>layout10</cstring> 
     1184                        <cstring>layout52</cstring> 
    6551185                    </property> 
    6561186                    <vbox> 
     
    6691199                            </property> 
    6701200                        </widget> 
     1201                        <widget class="QLayoutWidget"> 
     1202                            <property name="name"> 
     1203                                <cstring>layout51</cstring> 
     1204                            </property> 
     1205                            <hbox> 
     1206                                <property name="name"> 
     1207                                    <cstring>unnamed</cstring> 
     1208                                </property> 
     1209                                <spacer> 
     1210                                    <property name="name"> 
     1211                                        <cstring>spacer16_9_5</cstring> 
     1212                                    </property> 
     1213                                    <property name="orientation"> 
     1214                                        <enum>Horizontal</enum> 
     1215                                    </property> 
     1216                                    <property name="sizeType"> 
     1217                                        <enum>Expanding</enum> 
     1218                                    </property> 
     1219                                    <property name="sizeHint"> 
     1220                                        <size> 
     1221                                            <width>20</width> 
     1222                                            <height>20</height> 
     1223                                        </size> 
     1224                                    </property> 
     1225                                </spacer> 
     1226                                <widget class="QSlider"> 
     1227                                    <property name="name"> 
     1228                                        <cstring>sldInput10</cstring> 
     1229                                    </property> 
     1230                                    <property name="minValue"> 
     1231                                        <number>0</number> 
     1232                                    </property> 
     1233                                    <property name="maxValue"> 
     1234                                        <number>32767</number> 
     1235                                    </property> 
     1236                                    <property name="lineStep"> 
     1237                                        <number>10000</number> 
     1238                                    </property> 
     1239                                    <property name="pageStep"> 
     1240                                        <number>1000</number> 
     1241                                    </property> 
     1242                                    <property name="orientation"> 
     1243                                        <enum>Vertical</enum> 
     1244                                    </property> 
     1245                                    <property name="tickmarks"> 
     1246                                        <enum>Both</enum> 
     1247                                    </property> 
     1248                                    <property name="tickInterval"> 
     1249                                        <number>10000</number> 
     1250                                    </property> 
     1251                                </widget> 
     1252                                <spacer> 
     1253                                    <property name="name"> 
     1254                                        <cstring>spacer16_9_6</cstring> 
     1255                                    </property> 
     1256                                    <property name="orientation"> 
     1257                                        <enum>Horizontal</enum> 
     1258                                    </property> 
     1259                                    <property name="sizeType"> 
     1260                                        <enum>Expanding</enum> 
     1261                                    </property> 
     1262                                    <property name="sizeHint"> 
     1263                                        <size> 
     1264                                            <width>20</width> 
     1265                                            <height>20</height> 
     1266                                        </size> 
     1267                                    </property> 
     1268                                </spacer> 
     1269                            </hbox> 
     1270                        </widget> 
    6711271                        <widget class="QSlider"> 
    6721272                            <property name="name"> 
    673                                 <cstring>sldInput10</cstring> 
     1273                                <cstring>sldBal10</cstring> 
    6741274                            </property> 
    6751275                            <property name="minValue"> 
    676                                 <number>0</number> 
     1276                                <number>-32768</number> 
    6771277                            </property> 
    6781278                            <property name="maxValue"> 
    679                                 <number>32767</number> 
    680                             </property> 
    681                             <property name="lineStep"> 
    682                                 <number>10000</number> 
    683                             </property> 
    684                             <property name="pageStep"> 
    685                                 <number>1000</number> 
     1279                                <number>32512</number> 
    6861280                            </property> 
    6871281                            <property name="orientation"> 
    688                                 <enum>Vertical</enum> 
    689                             </property> 
    690                             <property name="tickmarks"> 
    691                                 <enum>Both</enum> 
    692                             </property> 
    693                             <property name="tickInterval"> 
    694                                 <number>10000</number> 
     1282                                <enum>Horizontal</enum> 
    6951283                            </property> 
    6961284                        </widget> 
     
    6991287            </hbox> 
    7001288        </widget> 
    701     </vbox> 
     1289    </hbox> 
    7021290</widget> 
    7031291<connections> 
     
    7621350        <slot>setVolumeIn10(int)</slot> 
    7631351    </connection> 
     1352    <connection> 
     1353        <sender>sldBal1</sender> 
     1354        <signal>sliderMoved(int)</signal> 
     1355        <receiver>EdirolFa101ControlUI</receiver> 
     1356        <slot>setBalanceIn1(int)</slot> 
     1357    </connection> 
     1358    <connection> 
     1359        <sender>sldBal2</sender> 
     1360        <signal>sliderMoved(int)</signal> 
     1361        <receiver>EdirolFa101ControlUI</receiver> 
     1362        <slot>setBalanceIn2(int)</slot> 
     1363    </connection> 
     1364    <connection> 
     1365        <sender>sldBal3</sender> 
     1366        <signal>sliderMoved(int)</signal> 
     1367        <receiver>EdirolFa101ControlUI</receiver> 
     1368        <slot>setBalanceIn3(int)</slot> 
     1369    </connection> 
     1370    <connection> 
     1371        <sender>sldBal4</sender> 
     1372        <signal>sliderMoved(int)</signal> 
     1373        <receiver>EdirolFa101ControlUI</receiver> 
     1374        <slot>setBalanceIn4(int)</slot> 
     1375    </connection> 
     1376    <connection> 
     1377        <sender>sldBal5</sender> 
     1378        <signal>sliderMoved(int)</signal> 
     1379        <receiver>EdirolFa101ControlUI</receiver> 
     1380        <slot>setBalanceIn5(int)</slot> 
     1381    </connection> 
     1382    <connection> 
     1383        <sender>sldBal6</sender> 
     1384        <signal>sliderMoved(int)</signal> 
     1385        <receiver>EdirolFa101ControlUI</receiver> 
     1386        <slot>setBalanceIn6(int)</slot> 
     1387    </connection> 
     1388    <connection> 
     1389        <sender>sldBal7</sender> 
     1390        <signal>sliderMoved(int)</signal> 
     1391        <receiver>EdirolFa101ControlUI</receiver> 
     1392        <slot>setBalanceIn7(int)</slot> 
     1393    </connection> 
     1394    <connection> 
     1395        <sender>sldBal8</sender> 
     1396        <signal>sliderMoved(int)</signal> 
     1397        <receiver>EdirolFa101ControlUI</receiver> 
     1398        <slot>setBalanceIn8(int)</slot> 
     1399    </connection> 
     1400    <connection> 
     1401        <sender>sldBal9</sender> 
     1402        <signal>sliderMoved(int)</signal> 
     1403        <receiver>EdirolFa101ControlUI</receiver> 
     1404        <slot>setBalanceIn9(int)</slot> 
     1405    </connection> 
     1406    <connection> 
     1407        <sender>sldBal10</sender> 
     1408        <signal>sliderMoved(int)</signal> 
     1409        <receiver>EdirolFa101ControlUI</receiver> 
     1410        <slot>setVolumeIn10(int)</slot> 
     1411    </connection> 
    7641412</connections> 
    765 <includes> 
    766     <include location="local" impldecl="in implementation">mixer_edirolfa101.ui.h</include> 
    767 </includes> 
    7681413<slots> 
    7691414    <slot>init()</slot> 
    7701415    <slot>initValues()</slot> 
    771     <slot>setVolumeIn6( int )</slot> 
    772     <slot>setVolumeIn7( int )</slot> 
    773     <slot>setVolumeIn8( int )</slot> 
    774     <slot>setVolumeIn9( int )</slot> 
    775     <slot>setVolumeIn10( int )</slot> 
    7761416    <slot>setVolumeIn1(int)</slot> 
    7771417    <slot>setVolumeIn2(int)</slot> 
     
    7791419    <slot>setVolumeIn4(int)</slot> 
    7801420    <slot>setVolumeIn5(int)</slot> 
     1421    <slot>setVolumeIn6(int)</slot> 
     1422    <slot>setVolumeIn7(int)</slot> 
     1423    <slot>setVolumeIn8(int)</slot> 
     1424    <slot>setVolumeIn9(int)</slot> 
     1425    <slot>setVolumeIn10(int)</slot> 
     1426    <slot>setBalanceIn1(int)</slot> 
     1427    <slot>setBalanceIn2(int)</slot> 
     1428    <slot>setBalanceIn3(int)</slot> 
     1429    <slot>setBalanceIn4(int)</slot> 
     1430    <slot>setBalanceIn5(int)</slot> 
     1431    <slot>setBalanceIn6(int)</slot> 
     1432    <slot>setBalanceIn7(int)</slot> 
     1433    <slot>setBalanceIn8(int)</slot> 
     1434    <slot>setBalanceIn9(int)</slot> 
    7811435</slots> 
    7821436<layoutdefaults spacing="6" margin="11"/> 
  • trunk/libffado/support/mixer/mixer_edirolfa66.py

    r1328 r1361  
    2525 
    2626class EdirolFa66Control(EdirolFa66ControlUI): 
    27     def __init__(self,parent = None,name = None,fl = 0): 
     27    def __init__(self, parent = None, name = None, fl = 0): 
    2828        EdirolFa66ControlUI.__init__(self, parent, name, fl) 
    2929 
    30     def setComboMixSource(self, a0): 
    31             self.setSelector('line34source', a0) 
    32  
    3330    def setVolumeIn1(self, vol): 
    34             self.setVolume('in1', vol) 
     31        self.setValue('vol1', vol) 
    3532 
    3633    def setVolumeIn2(self, vol): 
    37             self.setVolume('in2', vol) 
     34        self.setValue('vol2', vol) 
    3835 
    3936    def setVolumeIn3(self, vol): 
    40             self.setVolume('in3', vol) 
     37        self.setValue('vol3', vol) 
    4138 
    4239    def setVolumeIn4(self, vol): 
    43             self.setVolume('in4', vol) 
     40        self.setValue('vol4', vol) 
    4441 
    4542    def setVolumeIn5(self, vol): 
    46             self.setVolume('in5', vol) 
     43        self.setValue('vol5', vol) 
    4744 
    4845    def setVolumeIn6(self, vol): 
    49             self.setVolume('in6', vol) 
     46        self.setValue('vol6', vol) 
    5047 
    51     def setVolume(self, name, vol): 
    52             vol = -vol 
    53             ctrl = self.VolumeControls[name] 
    54             print "setting %s volume to %d" % (name, vol) 
    55             self.hw.setContignuous(ctrl[0], vol, idx = ctrl[1]) 
     48    def setBalanceIn1(self, bal): 
     49        self.setValue('bal1', bal) 
     50 
     51    def setBalanceIn2(self, bal): 
     52        self.setValue('bal2', bal) 
     53 
     54    def setBalanceIn3(self, bal): 
     55        self.setValue('bal3', bal) 
     56 
     57    def setBalanceIn4(self, bal): 
     58        self.setValue('bal4', bal) 
     59 
     60    def setBalanceIn5(self, bal): 
     61        self.setValue('bal5', bal) 
     62 
     63    def setBalanceIn6(self, bal): 
     64        self.setValue('bal6', bal) 
     65 
     66    def setValue(self, name, val): 
     67        val = -val 
     68        ctrl = self.VolumeControls[name] 
     69        print "setting %s to %d" % (name, val) 
     70        self.hw.setContignuous(ctrl[0], val, idx = ctrl[1]) 
    5671 
    5772    def init(self): 
    58             print "Init Edirol FA-66 window" 
     73        print "Init Edirol FA-66 window" 
    5974 
    60             self.VolumeControls = { 
    61                 #          feature name, channel, qt slider 
    62                 'in1'  :   ['/Mixer/Feature_1', 1, self.sldInput1], 
    63                 'in2'  :   ['/Mixer/Feature_1', 2, self.sldInput2], 
    64                 'in3'  :   ['/Mixer/Feature_2', 1, self.sldInput3], 
    65                 'in4'  :   ['/Mixer/Feature_2', 2, self.sldInput4], 
    66                 'in5'  :   ['/Mixer/Feature_3', 1, self.sldInput5], 
    67                 'in6'  :   ['/Mixer/Feature_3', 2, self.sldInput6], 
    68                 } 
     75        self.VolumeControls = { 
     76            #          feature name, channel, qt slider 
     77            'vol1'  :   ['/Mixer/Feature_Volume_1', 1, self.sldInput1], 
     78            'vol2'  :   ['/Mixer/Feature_Volume_1', 2, self.sldInput2], 
     79            'vol3'  :   ['/Mixer/Feature_Volume_2', 1, self.sldInput3], 
     80            'vol4'  :   ['/Mixer/Feature_Volume_2', 2, self.sldInput4], 
     81            'vol5'  :   ['/Mixer/Feature_Volume_3', 1, self.sldInput5], 
     82            'vol6'  :   ['/Mixer/Feature_Volume_3', 2, self.sldInput6], 
     83 
     84            'bal1'  :   ['/Mixer/Feature_LRBalance_1', 1, self.sldBal1], 
     85            'bal2'  :   ['/Mixer/Feature_LRBalance_1', 2, self.sldBal2], 
     86            'bal3'  :   ['/Mixer/Feature_LRBalance_2', 1, self.sldBal3], 
     87            'bal4'  :   ['/Mixer/Feature_LRBalance_2', 2, self.sldBal4], 
     88            'bal5'  :   ['/Mixer/Feature_LRBalance_3', 1, self.sldBal5], 
     89            'bal6'  :   ['/Mixer/Feature_LRBalance_3', 2, self.sldBal6], 
     90            } 
    6991 
    7092    def initValues(self): 
    71             for name, ctrl in self.VolumeControls.iteritems(): 
    72                 vol = self.hw.getContignuous(ctrl[0], idx = ctrl[1]) 
    73                 print "%s volume is %d" % (name , vol) 
    74                 ctrl[2].setValue(-vol) 
     93        for name, ctrl in self.VolumeControls.iteritems(): 
     94            val = self.hw.getContignuous(ctrl[0], idx = ctrl[1]) 
     95            print "%s value is %d" % (name , val) 
     96 
     97            # Workaround: The current value is not properly initialized 
     98            # on the device and returns after bootup always 0. 
     99            # Though we happen to know what the correct value should 
     100            # be therefore we overwrite the 0  
     101            if name[0:3] == 'bal' and val == 0: 
     102                if ctrl[1] == 1: 
     103                    val = 32512 
     104                else: 
     105                    val = -32768 
     106                     
     107            ctrl[2].setValue(-val) 
  • trunk/libffado/support/mixer/mixer_edirolfa66.ui

    r1328 r1361  
    2626            <x>0</x> 
    2727            <y>0</y> 
    28             <width>325</width> 
    29             <height>161</height> 
     28            <width>421</width> 
     29            <height>193</height> 
    3030        </rect> 
    3131    </property> 
     
    3333        <string>Edirol FA-66</string> 
    3434    </property> 
    35     <hbox> 
     35    <vbox> 
    3636        <property name="name"> 
    3737            <cstring>unnamed</cstring> 
     
    4040            <property name="name"> 
    4141                <cstring>groupBox1</cstring> 
     42            </property> 
     43            <property name="sizePolicy"> 
     44                <sizepolicy> 
     45                    <hsizetype>5</hsizetype> 
     46                    <vsizetype>5</vsizetype> 
     47                    <horstretch>0</horstretch> 
     48                    <verstretch>0</verstretch> 
     49                </sizepolicy> 
    4250            </property> 
    4351            <property name="title"> 
     
    5058                <widget class="QLayoutWidget"> 
    5159                    <property name="name"> 
    52                         <cstring>layout14</cstring> 
     60                        <cstring>layout33</cstring> 
    5361                    </property> 
    5462                    <vbox> 
     
    6775                            </property> 
    6876                        </widget> 
     77                        <widget class="QLayoutWidget"> 
     78                            <property name="name"> 
     79                                <cstring>layout32</cstring> 
     80                            </property> 
     81                            <hbox> 
     82                                <property name="name"> 
     83                                    <cstring>unnamed</cstring> 
     84                                </property> 
     85                                <spacer> 
     86                                    <property name="name"> 
     87                                        <cstring>spacer16_11</cstring> 
     88                                    </property> 
     89                                    <property name="orientation"> 
     90                                        <enum>Horizontal</enum> 
     91                                    </property> 
     92                                    <property name="sizeType"> 
     93                                        <enum>Expanding</enum> 
     94                                    </property> 
     95                                    <property name="sizeHint"> 
     96                                        <size> 
     97                                            <width>20</width> 
     98                                            <height>20</height> 
     99                                        </size> 
     100                                    </property> 
     101                                </spacer> 
     102                                <widget class="QSlider"> 
     103                                    <property name="name"> 
     104                                        <cstring>sldInput1</cstring> 
     105                                    </property> 
     106                                    <property name="sizePolicy"> 
     107                                        <sizepolicy> 
     108                                            <hsizetype>0</hsizetype> 
     109                                            <vsizetype>7</vsizetype> 
     110                                            <horstretch>0</horstretch> 
     111                                            <verstretch>0</verstretch> 
     112                                        </sizepolicy> 
     113                                    </property> 
     114                                    <property name="minValue"> 
     115                                        <number>0</number> 
     116                                    </property> 
     117                                    <property name="maxValue"> 
     118                                        <number>32767</number> 
     119                                    </property> 
     120                                    <property name="lineStep"> 
     121                                        <number>10000</number> 
     122                                    </property> 
     123                                    <property name="pageStep"> 
     124                                        <number>1000</number> 
     125                                    </property> 
     126                                    <property name="orientation"> 
     127                                        <enum>Vertical</enum> 
     128                                    </property> 
     129                                    <property name="tickmarks"> 
     130                                        <enum>Both</enum> 
     131                                    </property> 
     132                                    <property name="tickInterval"> 
     133                                        <number>10000</number> 
     134                                    </property> 
     135                                </widget> 
     136                                <spacer> 
     137                                    <property name="name"> 
     138                                        <cstring>spacer16_10</cstring> 
     139                                    </property> 
     140                                    <property name="orientation"> 
     141                                        <enum>Horizontal</enum> 
     142                                    </property> 
     143                                    <property name="sizeType"> 
     144                                        <enum>Expanding</enum> 
     145                                    </property> 
     146                                    <property name="sizeHint"> 
     147                                        <size> 
     148                                            <width>20</width> 
     149                                            <height>16</height> 
     150                                        </size> 
     151                                    </property> 
     152                                </spacer> 
     153                            </hbox> 
     154                        </widget> 
    69155                        <widget class="QSlider"> 
    70156                            <property name="name"> 
    71                                 <cstring>sldInput1</cstring> 
     157                                <cstring>sldBal1</cstring> 
    72158                            </property> 
    73159                            <property name="minValue"> 
    74                                 <number>0</number> 
     160                                <number>-32767</number> 
    75161                            </property> 
    76162                            <property name="maxValue"> 
    77                                 <number>32767</number> 
    78                             </property> 
    79                             <property name="lineStep"> 
    80                                 <number>10000</number> 
    81                             </property> 
    82                             <property name="pageStep"> 
    83                                 <number>1000</number> 
     163                                <number>32512</number> 
    84164                            </property> 
    85165                            <property name="orientation"> 
    86                                 <enum>Vertical</enum> 
    87                             </property> 
    88                             <property name="tickmarks"> 
    89                                 <enum>Both</enum> 
    90                             </property> 
    91                             <property name="tickInterval"> 
    92                                 <number>10000</number> 
     166                                <enum>Horizontal</enum> 
    93167                            </property> 
    94168                        </widget> 
     
    97171                <spacer> 
    98172                    <property name="name"> 
    99                         <cstring>spacer16_2_2</cstring> 
     173                        <cstring>spacer16_2</cstring> 
    100174                    </property> 
    101175                    <property name="orientation"> 
     
    114188                <widget class="QLayoutWidget"> 
    115189                    <property name="name"> 
    116                         <cstring>layout16</cstring> 
     190                        <cstring>layout36</cstring> 
    117191                    </property> 
    118192                    <vbox> 
     
    131205                            </property> 
    132206                        </widget> 
     207                        <widget class="QLayoutWidget"> 
     208                            <property name="name"> 
     209                                <cstring>layout34</cstring> 
     210                            </property> 
     211                            <hbox> 
     212                                <property name="name"> 
     213                                    <cstring>unnamed</cstring> 
     214                                </property> 
     215                                <spacer> 
     216                                    <property name="name"> 
     217                                        <cstring>spacer16_12</cstring> 
     218                                    </property> 
     219                                    <property name="orientation"> 
     220                                        <enum>Horizontal</enum> 
     221                                    </property> 
     222                                    <property name="sizeType"> 
     223                                        <enum>Expanding</enum> 
     224                                    </property> 
     225                                    <property name="sizeHint"> 
     226                                        <size> 
     227                                            <width>20</width> 
     228                                            <height>20</height> 
     229                                        </size> 
     230                                    </property> 
     231                                </spacer> 
     232                                <widget class="QSlider"> 
     233                                    <property name="name"> 
     234                                        <cstring>sldInput2</cstring> 
     235                                    </property> 
     236                                    <property name="minValue"> 
     237                                        <number>0</number> 
     238                                    </property> 
     239                                    <property name="maxValue"> 
     240                                        <number>32767</number> 
     241                                    </property> 
     242                                    <property name="lineStep"> 
     243                                        <number>10000</number> 
     244                                    </property> 
     245                                    <property name="pageStep"> 
     246                                        <number>1000</number> 
     247                                    </property> 
     248                                    <property name="orientation"> 
     249                                        <enum>Vertical</enum> 
     250                                    </property> 
     251                                    <property name="tickmarks"> 
     252                                        <enum>Both</enum> 
     253                                    </property> 
     254                                    <property name="tickInterval"> 
     255                                        <number>10000</number> 
     256                                    </property> 
     257                                </widget> 
     258                                <spacer> 
     259                                    <property name="name"> 
     260                                        <cstring>spacer16</cstring> 
     261                                    </property> 
     262                                    <property name="orientation"> 
     263                                        <enum>Horizontal</enum> 
     264                                    </property> 
     265                                    <property name="sizeType"> 
     266                                        <enum>Expanding</enum> 
     267                                    </property> 
     268                                    <property name="sizeHint"> 
     269                                        <size> 
     270                                            <width>20</width> 
     271                                            <height>20</height> 
     272                                        </size> 
     273                                    </property> 
     274                                </spacer> 
     275                            </hbox> 
     276                        </widget> 
    133277                        <widget class="QSlider"> 
    134278                            <property name="name"> 
    135                                 <cstring>sldInput2</cstring> 
     279                                <cstring>sldBal2</cstring> 
    136280                            </property> 
    137281                            <property name="minValue"> 
    138                                 <number>0</number> 
     282                                <number>-32767</number> 
    139283                            </property> 
    140284                            <property name="maxValue"> 
    141                                 <number>32767</number> 
    142                             </property> 
    143                             <property name="lineStep"> 
    144                                 <number>10000</number> 
    145                             </property> 
    146                             <property name="pageStep"> 
    147                                 <number>1000</number> 
     285                                <number>32512</number> 
    148286                            </property> 
    149287                            <property name="orientation"> 
    150                                 <enum>Vertical</enum> 
    151                             </property> 
    152                             <property name="tickmarks"> 
    153                                 <enum>Both</enum> 
    154                             </property> 
    155                             <property name="tickInterval"> 
    156                                 <number>10000</number> 
     288                                <enum>Horizontal</enum> 
    157289                            </property> 
    158290                        </widget> 
     
    161293                <spacer> 
    162294                    <property name="name"> 
    163                         <cstring>spacer16</cstring> 
     295                        <cstring>spacer16_2_2</cstring> 
    164296                    </property> 
    165297                    <property name="orientation"> 
     
    178310                <widget class="QLayoutWidget"> 
    179311                    <property name="name"> 
    180                         <cstring>layout17</cstring> 
     312                        <cstring>layout38</cstring> 
    181313                    </property> 
    182314                    <vbox> 
     
    195327                            </property> 
    196328                        </widget> 
     329                        <widget class="QLayoutWidget"> 
     330                            <property name="name"> 
     331                                <cstring>layout37</cstring> 
     332                            </property> 
     333                            <hbox> 
     334                                <property name="name"> 
     335                                    <cstring>unnamed</cstring> 
     336                                </property> 
     337                                <spacer> 
     338                                    <property name="name"> 
     339                                        <cstring>spacer16_2_3</cstring> 
     340                                    </property> 
     341                                    <property name="orientation"> 
     342                                        <enum>Horizontal</enum> 
     343                                    </property> 
     344                                    <property name="sizeType"> 
     345                                        <enum>Expanding</enum> 
     346                                    </property> 
     347                                    <property name="sizeHint"> 
     348                                        <size> 
     349                                            <width>20</width> 
     350                                            <height>20</height> 
     351                                        </size> 
     352                                    </property> 
     353                                </spacer> 
     354                                <widget class="QSlider"> 
     355                                    <property name="name"> 
     356                                        <cstring>sldInput3</cstring> 
     357                                    </property> 
     358                                    <property name="minValue"> 
     359                                        <number>0</number> 
     360                                    </property> 
     361                                    <property name="maxValue"> 
     362                                        <number>32767</number> 
     363                                    </property> 
     364                                    <property name="lineStep"> 
     365                                        <number>10000</number> 
     366                                    </property> 
     367                                    <property name="pageStep"> 
     368                                        <number>1000</number> 
     369                                    </property> 
     370                                    <property name="orientation"> 
     371                                        <enum>Vertical</enum> 
     372                                    </property> 
     373                                    <property name="tickmarks"> 
     374                                        <enum>Both</enum> 
     375                                    </property> 
     376                                    <property name="tickInterval"> 
     377                                        <number>10000</number> 
     378                                    </property> 
     379                                </widget> 
     380                                <spacer> 
     381                                    <property name="name"> 
     382                                        <cstring>spacer16_2_3_3</cstring> 
     383                                    </property> 
     384                                    <property name="orientation"> 
     385                                        <enum>Horizontal</enum> 
     386                                    </property> 
     387                                    <property name="sizeType"> 
     388                                        <enum>Expanding</enum> 
     389                                    </property> 
     390                                    <property name="sizeHint"> 
     391                                        <size> 
     392                                            <width>20</width> 
     393                                            <height>20</height> 
     394                                        </size> 
     395                                    </property> 
     396                                </spacer> 
     397                            </hbox> 
     398                        </widget> 
    197399                        <widget class="QSlider"> 
    198400                            <property name="name"> 
    199                                 <cstring>sldInput3</cstring> 
     401                                <cstring>sldBal3</cstring> 
    200402                            </property> 
    201403                            <property name="minValue"> 
    202                                 <number>0</number> 
     404                                <number>-32767</number> 
    203405                            </property> 
    204406                            <property name="maxValue"> 
    205                                 <number>32767</number> 
    206                             </property> 
    207                             <property name="lineStep"> 
    208                                 <number>10000</number> 
    209                             </property> 
    210                             <property name="pageStep"> 
    211                                 <number>1000</number> 
     407                                <number>32512</number> 
    212408                            </property> 
    213409                            <property name="orientation"> 
    214                                 <enum>Vertical</enum> 
    215                             </property> 
    216                             <property name="tickmarks"> 
    217                                 <enum>Both</enum> 
    218                             </property> 
    219                             <property name="tickInterval"> 
    220                                 <number>10000</number> 
     410                                <enum>Horizontal</enum> 
    221411                            </property> 
    222412                        </widget> 
     
    225415                <spacer> 
    226416                    <property name="name"> 
    227                         <cstring>spacer16_2_3</cstring> 
     417                        <cstring>spacer16_3</cstring> 
    228418                    </property> 
    229419                    <property name="orientation"> 
     
    242432                <widget class="QLayoutWidget"> 
    243433                    <property name="name"> 
    244                         <cstring>layout18</cstring> 
     434                        <cstring>layout40</cstring> 
    245435                    </property> 
    246436                    <vbox> 
     
    259449                            </property> 
    260450                        </widget> 
     451                        <widget class="QLayoutWidget"> 
     452                            <property name="name"> 
     453                                <cstring>layout39</cstring> 
     454                            </property> 
     455                            <hbox> 
     456                                <property name="name"> 
     457                                    <cstring>unnamed</cstring> 
     458                                </property> 
     459                                <spacer> 
     460                                    <property name="name"> 
     461                                        <cstring>spacer16_3_2</cstring> 
     462                                    </property> 
     463                                    <property name="orientation"> 
     464                                        <enum>Horizontal</enum> 
     465                                    </property> 
     466                                    <property name="sizeType"> 
     467                                        <enum>Expanding</enum> 
     468                                    </property> 
     469                                    <property name="sizeHint"> 
     470                                        <size> 
     471                                            <width>20</width> 
     472                                            <height>20</height> 
     473                                        </size> 
     474                                    </property> 
     475                                </spacer> 
     476                                <widget class="QSlider"> 
     477                                    <property name="name"> 
     478                                        <cstring>sldInput4</cstring> 
     479                                    </property> 
     480                                    <property name="minValue"> 
     481                                        <number>0</number> 
     482                                    </property> 
     483                                    <property name="maxValue"> 
     484                                        <number>32767</number> 
     485                                    </property> 
     486                                    <property name="lineStep"> 
     487                                        <number>10000</number> 
     488                                    </property> 
     489                                    <property name="pageStep"> 
     490                                        <number>1000</number> 
     491                                    </property> 
     492                                    <property name="orientation"> 
     493                                        <enum>Vertical</enum> 
     494                                    </property> 
     495                                    <property name="tickmarks"> 
     496                                        <enum>Both</enum> 
     497                                    </property> 
     498                                    <property name="tickInterval"> 
     499                                        <number>10000</number> 
     500                                    </property> 
     501                                </widget> 
     502                                <spacer> 
     503                                    <property name="name"> 
     504                                        <cstring>spacer16_3_3</cstring> 
     505                                    </property> 
     506                                    <property name="orientation"> 
     507                                        <enum>Horizontal</enum> 
     508                                    </property> 
     509                                    <property name="sizeType"> 
     510                                        <enum>Expanding</enum> 
     511                                    </property> 
     512                                    <property name="sizeHint"> 
     513                                        <size> 
     514                                            <width>20</width> 
     515                                            <height>20</height> 
     516                                        </size> 
     517                                    </property> 
     518                                </spacer> 
     519                            </hbox> 
     520                        </widget> 
    261521                        <widget class="QSlider"> 
    262522                            <property name="name"> 
    263                                 <cstring>sldInput4</cstring> 
     523                                <cstring>sldBal4</cstring> 
    264524                            </property> 
    265525                            <property name="minValue"> 
    266                                 <number>0</number> 
     526                                <number>-32767</number> 
    267527                            </property> 
    268528                            <property name="maxValue"> 
    269                                 <number>32767</number> 
    270                             </property> 
    271                             <property name="lineStep"> 
    272                                 <number>10000</number> 
    273                             </property> 
    274                             <property name="pageStep"> 
    275                                 <number>1000</number> 
     529                                <number>32512</number> 
    276530                            </property> 
    277531                            <property name="orientation"> 
    278                                 <enum>Vertical</enum> 
    279                             </property> 
    280                             <property name="tickmarks"> 
    281                                 <enum>Both</enum> 
    282                             </property> 
    283                             <property name="tickInterval"> 
    284                                 <number>10000</number> 
     532                                <enum>Horizontal</enum> 
    285533                            </property> 
    286534                        </widget> 
     
    289537                <spacer> 
    290538                    <property name="name"> 
    291                         <cstring>spacer16_2</cstring> 
     539                        <cstring>spacer16_5_4</cstring> 
    292540                    </property> 
    293541                    <property name="orientation"> 
     
    306554                <widget class="QLayoutWidget"> 
    307555                    <property name="name"> 
    308                         <cstring>layout19</cstring> 
     556                        <cstring>layout42</cstring> 
    309557                    </property> 
    310558                    <vbox> 
     
    323571                            </property> 
    324572                        </widget> 
     573                        <widget class="QLayoutWidget"> 
     574                            <property name="name"> 
     575                                <cstring>layout41</cstring> 
     576                            </property> 
     577                            <hbox> 
     578                                <property name="name"> 
     579                                    <cstring>unnamed</cstring> 
     580                                </property> 
     581                                <spacer> 
     582                                    <property name="name"> 
     583                                        <cstring>spacer16_4</cstring> 
     584                                    </property> 
     585                                    <property name="orientation"> 
     586                                        <enum>Horizontal</enum> 
     587                                    </property> 
     588                                    <property name="sizeType"> 
     589                                        <enum>Expanding</enum> 
     590                                    </property> 
     591                                    <property name="sizeHint"> 
     592                                        <size> 
     593                                            <width>20</width> 
     594                                            <height>20</height> 
     595                                        </size> 
     596                                    </property> 
     597                                </spacer> 
     598                                <widget class="QSlider"> 
     599                                    <property name="name"> 
     600                                        <cstring>sldInput5</cstring> 
     601                                    </property> 
     602                                    <property name="minimumSize"> 
     603                                        <size> 
     604                                            <width>0</width> 
     605                                            <height>80</height> 
     606                                        </size> 
     607                                    </property> 
     608                                    <property name="minValue"> 
     609                                        <number>0</number> 
     610                                    </property> 
     611                                    <property name="maxValue"> 
     612                                        <number>32767</number> 
     613                                    </property> 
     614                                    <property name="lineStep"> 
     615                                        <number>10000</number> 
     616                                    </property> 
     617                                    <property name="pageStep"> 
     618                                        <number>1000</number> 
     619                                    </property> 
     620                                    <property name="orientation"> 
     621                                        <enum>Vertical</enum> 
     622                                    </property> 
     623                                    <property name="tickmarks"> 
     624                                        <enum>Both</enum> 
     625                                    </property> 
     626                                    <property name="tickInterval"> 
     627                                        <number>10000</number> 
     628                                    </property> 
     629                                </widget> 
     630                                <spacer> 
     631                                    <property name="name"> 
     632                                        <cstring>spacer16_4_3</cstring> 
     633                                    </property> 
     634                                    <property name="orientation"> 
     635                                        <enum>Horizontal</enum> 
     636                                    </property> 
     637                                    <property name="sizeType"> 
     638                                        <enum>Expanding</enum> 
     639                                    </property> 
     640                                    <property name="sizeHint"> 
     641                                        <size> 
     642                                            <width>20</width> 
     643                                            <height>20</height> 
     644                                        </size> 
     645                                    </property> 
     646                                </spacer> 
     647                            </hbox> 
     648                        </widget> 
    325649                        <widget class="QSlider"> 
    326650                            <property name="name"> 
    327                                 <cstring>sldInput5</cstring> 
     651                                <cstring>sldBal5</cstring> 
    328652                            </property> 
    329653                            <property name="minValue"> 
    330                                 <number>0</number> 
     654                                <number>-32767</number> 
    331655                            </property> 
    332656                            <property name="maxValue"> 
    333                                 <number>32767</number> 
    334                             </property> 
    335                             <property name="lineStep"> 
    336                                 <number>10000</number> 
    337                             </property> 
    338                             <property name="pageStep"> 
    339                                 <number>1000</number> 
     657                                <number>32512</number> 
    340658                            </property> 
    341659                            <property name="orientation"> 
    342                                 <enum>Vertical</enum> 
    343                             </property> 
    344                             <property name="tickmarks"> 
    345                                 <enum>Both</enum> 
    346                             </property> 
    347                             <property name="tickInterval"> 
    348                                 <number>10000</number> 
     660                                <enum>Horizontal</enum> 
    349661                            </property> 
    350662                        </widget> 
     
    353665                <spacer> 
    354666                    <property name="name"> 
    355                         <cstring>spacer16_2_4</cstring> 
     667                        <cstring>spacer16_5</cstring> 
    356668                    </property> 
    357669                    <property name="orientation"> 
     
    370682                <widget class="QLayoutWidget"> 
    371683                    <property name="name"> 
    372                         <cstring>layout20</cstring> 
     684                        <cstring>layout44</cstring> 
    373685                    </property> 
    374686                    <vbox> 
     
    387699                            </property> 
    388700                        </widget> 
     701                        <widget class="QLayoutWidget"> 
     702                            <property name="name"> 
     703                                <cstring>layout43</cstring> 
     704                            </property> 
     705                            <hbox> 
     706                                <property name="name"> 
     707                                    <cstring>unnamed</cstring> 
     708                                </property> 
     709                                <spacer> 
     710                                    <property name="name"> 
     711                                        <cstring>spacer16_5_2</cstring> 
     712                                    </property> 
     713                                    <property name="orientation"> 
     714                                        <enum>Horizontal</enum> 
     715                                    </property> 
     716                                    <property name="sizeType"> 
     717                                        <enum>Expanding</enum> 
     718                                    </property> 
     719                                    <property name="sizeHint"> 
     720                                        <size> 
     721                                            <width>20</width> 
     722                                            <height>20</height> 
     723                                        </size> 
     724                                    </property> 
     725                                </spacer> 
     726                                <widget class="QSlider"> 
     727                                    <property name="name"> 
     728                                        <cstring>sldInput6</cstring> 
     729                                    </property> 
     730                                    <property name="minValue"> 
     731                                        <number>0</number> 
     732                                    </property> 
     733                                    <property name="maxValue"> 
     734                                        <number>32767</number> 
     735                                    </property> 
     736                                    <property name="lineStep"> 
     737                                        <number>10000</number> 
     738                                    </property> 
     739                                    <property name="pageStep"> 
     740                                        <number>1000</number> 
     741                                    </property> 
     742                                    <property name="orientation"> 
     743                                        <enum>Vertical</enum> 
     744                                    </property> 
     745                                    <property name="tickmarks"> 
     746                                        <enum>Both</enum> 
     747                                    </property> 
     748                                    <property name="tickInterval"> 
     749                                        <number>10000</number> 
     750                                    </property> 
     751                                </widget> 
     752                                <spacer> 
     753                                    <property name="name"> 
     754                                        <cstring>spacer16_5_3</cstring> 
     755                                    </property> 
     756                                    <property name="orientation"> 
     757                                        <enum>Horizontal</enum> 
     758                                    </property> 
     759                                    <property name="sizeType"> 
     760                                        <enum>Expanding</enum> 
     761                                    </property> 
     762                                    <property name="sizeHint"> 
     763                                        <size> 
     764                                            <width>20</width> 
     765                                            <height>20</height> 
     766                                        </size> 
     767                                    </property> 
     768                                </spacer> 
     769                            </hbox> 
     770                        </widget> 
    389771                        <widget class="QSlider"> 
    390772                            <property name="name"> 
    391                                 <cstring>sldInput6</cstring> 
    392                             </property> 
    393                             <property name="minimumSize"> 
    394                                 <size> 
    395                                     <width>0</width> 
    396                                     <height>80</height> 
    397                                 </size> 
     773                                <cstring>sldBal6</cstring> 
    398774                            </property> 
    399775                            <property name="minValue"> 
    400                                 <number>0</number> 
     776                                <number>-32767</number> 
    401777                            </property> 
    402778                            <property name="maxValue"> 
    403                                 <number>32767</number> 
    404                             </property> 
    405                             <property name="lineStep"> 
    406                                 <number>10000</number> 
    407                             </property> 
    408                             <property name="pageStep"> 
    409                                 <number>1000</number> 
     779                                <number>32512</number> 
    410780                            </property> 
    411781                            <property name="orientation"> 
    412                                 <enum>Vertical</enum> 
    413                             </property> 
    414                             <property name="tickmarks"> 
    415                                 <enum>Both</enum> 
    416                             </property> 
    417                             <property name="tickInterval"> 
    418                                 <number>10000</number> 
     782                                <enum>Horizontal</enum> 
    419783                            </property> 
    420784                        </widget> 
     
    423787            </hbox> 
    424788        </widget> 
    425     </hbox> 
     789    </vbox> 
    426790</widget> 
    427791<connections> 
     
    462826        <slot>setVolumeIn6(int)</slot> 
    463827    </connection> 
     828    <connection> 
     829        <sender>sldBal1</sender> 
     830        <signal>sliderMoved(int)</signal> 
     831        <receiver>EdirolFa66ControlUI</receiver> 
     832        <slot>setBalanceIn1(int)</slot> 
     833    </connection> 
     834    <connection> 
     835        <sender>sldBal2</sender> 
     836        <signal>sliderMoved(int)</signal> 
     837        <receiver>EdirolFa66ControlUI</receiver> 
     838        <slot>setBalanceIn2(int)</slot> 
     839    </connection> 
     840    <connection> 
     841        <sender>sldBal3</sender> 
     842        <signal>sliderMoved(int)</signal> 
     843        <receiver>EdirolFa66ControlUI</receiver> 
     844        <slot>setBalanceIn3(int)</slot> 
     845    </connection> 
     846    <connection> 
     847        <sender>sldBal4</sender> 
     848        <signal>sliderMoved(int)</signal> 
     849        <receiver>EdirolFa66ControlUI</receiver> 
     850        <slot>setBalanceIn4(int)</slot> 
     851    </connection> 
     852    <connection> 
     853        <sender>sldBal5</sender> 
     854        <signal>sliderMoved(int)</signal> 
     855        <receiver>EdirolFa66ControlUI</receiver> 
     856        <slot>setBalanceIn5(int)</slot> 
     857    </connection> 
     858    <connection> 
     859        <sender>sldBal6</sender> 
     860        <signal>sliderMoved(int)</signal> 
     861        <receiver>EdirolFa66ControlUI</receiver> 
     862        <slot>setBalanceIn6(int)</slot> 
     863    </connection> 
    464864</connections> 
    465 <includes> 
    466     <include location="local" impldecl="in implementation">mixer_edirolfa66.ui.h</include> 
    467 </includes> 
    468865<slots> 
    469     <slot>setVolumeIn2( int )</slot> 
     866    <slot>init()</slot> 
    470867    <slot>initValues()</slot> 
    471     <slot>setVolumeIn1( int )</slot> 
    472     <slot>setVolumeIn3( int )</slot> 
    473     <slot>setVolumeIn4( int )</slot> 
    474     <slot>setVolumeIn5( int )</slot> 
    475     <slot>setVolumeIn6( int )</slot> 
    476     <slot>init()</slot> 
     868    <slot>setVolumeIn1(int)</slot> 
     869    <slot>setVolumeIn2(int)</slot> 
     870    <slot>setVolumeIn3(int)</slot> 
     871    <slot>setVolumeIn4(int)</slot> 
     872    <slot>setVolumeIn5(int)</slot> 
     873    <slot>setVolumeIn6(int)</slot> 
     874    <slot>setVolumeIn7(int)</slot> 
     875    <slot>setVolumeIn8(int)</slot> 
     876    <slot>setVolumeIn9(int)</slot> 
     877    <slot>setVolumeIn10(int)</slot> 
     878    <slot>setBalanceIn1(int)</slot> 
     879    <slot>setBalanceIn2(int)</slot> 
     880    <slot>setBalanceIn3(int)</slot> 
     881    <slot>setBalanceIn4(int)</slot> 
     882    <slot>setBalanceIn5(int)</slot> 
     883    <slot>setBalanceIn6(int)</slot> 
     884    <slot>setBalanceIn7(int)</slot> 
     885    <slot>setBalanceIn8(int)</slot> 
     886    <slot>setBalanceIn9(int)</slot> 
    477887</slots> 
    478888<layoutdefaults spacing="6" margin="11"/> 
  • trunk/libffado/support/mixer/mixer_generic.py

    r1093 r1361  
    6363                return ( self.max - self.min ) * (100-slider)/100.0 + self.min 
    6464        def interfaceToSlider( self, interface ): 
    65                 return - ( interface - self.min ) / ( self.max - self.min ) * 100.0 + 100 
     65                if self.max == self.min: 
     66                        return 0 
     67                else: 
     68                        return - ( interface - self.min ) / ( self.max - self.min ) * 100.0 + 100 
    6669 
    6770        def sliderMoved( self, i ): 
  • trunk/libffado/support/mixer/mixer_phase24.py

    r1239 r1361  
    104104 
    105105            self.VolumeControls={ 
    106                 'analogin' :      ['/Mixer/Feature_6', self.sldLineIn], 
    107                 'spdifin' :       ['/Mixer/Feature_7', self.sldSPDIFIn], 
    108                 'out12' :         ['/Mixer/Feature_3', self.sldInput12], 
    109                 'out34' :         ['/Mixer/Feature_4', self.sldInput34], 
    110                 'outspdif' :      ['/Mixer/Feature_5', self.sldSPDIFOut], 
     106                'analogin' :      ['/Mixer/Feature_Volume_6', self.sldLineIn], 
     107                'spdifin' :       ['/Mixer/Feature_Volume_7', self.sldSPDIFIn], 
     108                'out12' :         ['/Mixer/Feature_Volume_3', self.sldInput12], 
     109                'out34' :         ['/Mixer/Feature_Volume_4', self.sldInput34], 
     110                'outspdif' :      ['/Mixer/Feature_Volume_5', self.sldSPDIFOut], 
    111111                } 
    112112 
  • trunk/libffado/support/mixer/mixer_phase88.py

    r1106 r1361  
    8080 
    8181            self.VolumeControls={ 
    82                 'master':    ['/Mixer/Feature_1', self.sldInputMaster],  
    83                 'line12' :   ['/Mixer/Feature_2', self.sldInput12], 
    84                 'line34' :   ['/Mixer/Feature_3', self.sldInput34], 
    85                 'line56' :   ['/Mixer/Feature_4', self.sldInput56], 
    86                 'line78' :   ['/Mixer/Feature_5', self.sldInput78], 
    87                 'spdif' :    ['/Mixer/Feature_6', self.sldInputSPDIF], 
    88                 'waveplay' : ['/Mixer/Feature_7', self.sldInputWavePlay], 
     82                'master':    ['/Mixer/Feature_Volume_1', self.sldInputMaster],  
     83                'line12' :   ['/Mixer/Feature_Volume_2', self.sldInput12], 
     84                'line34' :   ['/Mixer/Feature_Volume_3', self.sldInput34], 
     85                'line56' :   ['/Mixer/Feature_Volume_4', self.sldInput56], 
     86                'line78' :   ['/Mixer/Feature_Volume_5', self.sldInput78], 
     87                'spdif' :    ['/Mixer/Feature_Volume_6', self.sldInputSPDIF], 
     88                'waveplay' : ['/Mixer/Feature_Volume_7', self.sldInputWavePlay], 
    8989                } 
    9090 
  • trunk/libffado/support/mixer/mixer_quatafire.py

    r1106 r1361  
    3232 
    3333            self.VolumeControls={ 
    34                     self.sldCh1: ['/Mixer/Feature_1', 1], 
    35                     self.sldCh2: ['/Mixer/Feature_1', 2], 
    36                     self.sldCh34: ['/Mixer/Feature_2', 0], 
    37                     self.sldCh56: ['/Mixer/Feature_3', 0], 
    38                     self.sldDawAll: ['/Mixer/Feature_4', 0], 
    39                     self.sldDawCH1: ['/Mixer/Feature_4', 1], 
    40                     self.sldDawCH2: ['/Mixer/Feature_4', 2], 
    41                     self.sldDawCH3: ['/Mixer/Feature_4', 3], 
    42                     self.sldDawCH4: ['/Mixer/Feature_4', 4], 
    43                     self.sldDawCH5: ['/Mixer/Feature_4', 5], 
    44                     self.sldDawCH6: ['/Mixer/Feature_4', 6], 
    45                     self.sldDawCH7: ['/Mixer/Feature_4', 7], 
    46                     self.sldDawCH8: ['/Mixer/Feature_4', 8], 
     34                    self.sldCh1: ['/Mixer/Feature_Volume_1', 1], 
     35                    self.sldCh2: ['/Mixer/Feature_Volume_1', 2], 
     36                    self.sldCh34: ['/Mixer/Feature_Volume_2', 0], 
     37                    self.sldCh56: ['/Mixer/Feature_Volume_3', 0], 
     38                    self.sldDawAll: ['/Mixer/Feature_Volume_4', 0], 
     39                    self.sldDawCH1: ['/Mixer/Feature_Volume_4', 1], 
     40                    self.sldDawCH2: ['/Mixer/Feature_Volume_4', 2], 
     41                    self.sldDawCH3: ['/Mixer/Feature_Volume_4', 3], 
     42                    self.sldDawCH4: ['/Mixer/Feature_Volume_4', 4], 
     43                    self.sldDawCH5: ['/Mixer/Feature_Volume_4', 5], 
     44                    self.sldDawCH6: ['/Mixer/Feature_Volume_4', 6], 
     45                    self.sldDawCH7: ['/Mixer/Feature_Volume_4', 7], 
     46                    self.sldDawCH8: ['/Mixer/Feature_Volume_4', 8], 
    4747                    } 
    4848            self.PanControls={ 
    49                     #self.dialCh1: ['/Mixer/Feature_1'], 
    50                     #self.dialCh2: ['/Mixer/Feature_1'], 
    51                     self.dialCh34: ['/Mixer/Feature_2'], 
    52                     self.dialCh56: ['/Mixer/Feature_3'], 
     49                    #self.dialCh1: ['/Mixer/Feature_Volume_1'], 
     50                    #self.dialCh2: ['/Mixer/Feature_Volume_1'], 
     51                    self.dialCh34: ['/Mixer/Feature_Volume_2'], 
     52                    self.dialCh56: ['/Mixer/Feature_Volume_3'], 
    5353                    } 
    5454