Changeset 1261

Show
Ignore:
Timestamp:
06/21/08 03:52:27 (13 years ago)
Author:
ppalmers
Message:

ensure proper behavior of the hardware control checkbox of the saffire on un-mute (fixes #135)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.h

    r1158 r1261  
    4646    BinaryControl(FocusriteDevice& parent, int id, int bit, 
    4747                  std::string name, std::string label, std::string descr); 
    48      
     48 
    4949    virtual bool setValue(int v); 
    5050    virtual int getValue(); 
  • branches/libffado-2.0/support/mixer/mixer_saffire.py

    r1237 r1261  
    9292 
    9393 
     94        # First column is the DBUS subpath of the control. 
     95        # Second column is a list of linked controls that should 
     96        # be rewritten whenever this control is updated 
    9497        self.SelectorControls={ 
    9598                self.chkSpdifSwitch:    ['/Mixer/SpdifSwitch'], 
    96                 self.chkOut12Mute:      ['/Mixer/Out12Mute'], 
     99                self.chkOut12Mute:      ['/Mixer/Out12Mute', [self.chkOut12HwCtrl]], 
    97100                self.chkOut12HwCtrl:    ['/Mixer/Out12HwCtrl'], 
    98101                self.chkOut12Dim:       ['/Mixer/Out12Dim'], 
    99                 self.chkOut34Mute:      ['/Mixer/Out34Mute'], 
     102                self.chkOut34Mute:      ['/Mixer/Out34Mute', [self.chkOut34HwCtrl]], 
    100103                self.chkOut34HwCtrl:    ['/Mixer/Out34HwCtrl'], 
    101                 self.chkOut56Mute:      ['/Mixer/Out56Mute'], 
     104                self.chkOut56Mute:      ['/Mixer/Out56Mute', [self.chkOut56HwCtrl]], 
    102105                self.chkOut56HwCtrl:    ['/Mixer/Out56HwCtrl'], 
    103                 self.chkOut78Mute:      ['/Mixer/Out78Mute'], 
     106                self.chkOut78Mute:      ['/Mixer/Out78Mute', [self.chkOut78HwCtrl]], 
    104107                self.chkOut78HwCtrl:    ['/Mixer/Out78HwCtrl'], 
    105108                self.chkOut910Mute:     ['/Mixer/Out910Mute'], 
  • branches/libffado-2.0/support/mixer/mixer_saffire_base.py

    r1248 r1261  
    5858                    state) 
    5959        self.hw.setDiscrete(self.SelectorControls[sender][0], state) 
     60 
     61        # if there are linked selector controls, update them 
     62        if len(self.SelectorControls[sender]) >= 2: 
     63            linked = self.SelectorControls[sender][1] 
     64            for ctl in linked: 
     65                if ctl.state(): 
     66                    state = 1 
     67                else: 
     68                    state = 0 
     69                self.hw.setDiscrete(self.SelectorControls[ctl][0], state) 
    6070 
    6171    def triggerButton(self):