Show
Ignore:
Timestamp:
08/02/09 07:26:58 (15 years ago)
Author:
jwoithe
Message:

RME: initial implementation of ff400 channel 3/4 input options in mixer control tab

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/mixer-qt4/mixer_rme.py

    r1608 r1610  
    4949        } 
    5050 
     51        self.Switches={ 
     52            self.ff400_chan3_opt_instr: ['/Control/Chan3_opt_instr'], 
     53            self.ff400_chan3_opt_pad:   ['/Control/Chan3_opt_pad'], 
     54            self.ff400_chan4_opt_instr: ['/Control/Chan4_opt_instr'], 
     55            self.ff400_chan4_opt_pad:   ['/Control/Chan4_opt_pad'], 
     56        } 
     57 
    5158        # Other mixer variables 
    5259        self.is_streaming = 0 
     
    5562        self.tco_present = 0 
    5663 
    57     # Public slot: update phantom power hardware switch
     64    # Public slot: update phantom power hardware switche
    5865    def updatePhantomSwitch(self, a0): 
    5966        sender = self.sender() 
     
    6370        log.debug("phantom switch %d set to %d" % (self.PhantomSwitches[sender][1], a0)) 
    6471        self.hw.setDiscrete(self.PhantomSwitches[sender][0], val) 
     72 
     73    # Public slot: update generic switches 
     74    def updateSwitch(self, a0): 
     75        sender = self.sender() 
     76        log.debug("switch %s set to %d" % (self.Switches[sender][0], a0)) 
     77        self.hw.setDiscrete(self.Switches[sender][0], a0) 
    6578 
    6679    # Hide and disable a control 
     
    118131                ctrl.setChecked(False) 
    119132            QObject.connect(ctrl, SIGNAL('toggled(bool)'), self.updatePhantomSwitch) 
     133 
     134        for ctrl, info in self.Switches.iteritems(): 
     135            if (not(ctrl.isEnabled())): 
     136                continue 
     137            val = self.hw.getDiscrete(info[0]) 
     138            log.debug("switch %s is %d" % (info[0], val)) 
     139            if val: 
     140                ctrl.setChecked(True) 
     141            else: 
     142                ctrl.setChecked(False) 
     143            QObject.connect(ctrl, SIGNAL('toggled(bool)'), self.updateSwitch) 
  • trunk/libffado/support/mixer-qt4/mixer_rme.ui

    r1608 r1610  
    489489     </layout> 
    490490    </widget> 
    491     <widget class="QGroupBox" name="groupBox_13" > 
     491    <widget class="QGroupBox" name="phones_level_group" > 
    492492     <property name="geometry" > 
    493493      <rect> 
     
    582582      </item> 
    583583      <item row="0" column="2" > 
    584        <widget class="QCheckBox" name="checkBox_9" > 
     584       <widget class="QCheckBox" name="ff400_chan3_opt_instr" > 
    585585        <property name="text" > 
    586586         <string>Instr</string> 
     
    589589      </item> 
    590590      <item row="0" column="3" > 
    591        <widget class="QCheckBox" name="checkBox_11" > 
     591       <widget class="QCheckBox" name="ff400_chan3_opt_pad" > 
    592592        <property name="text" > 
    593593         <string>Pad</string> 
     
    603603      </item> 
    604604      <item row="2" column="3" > 
    605        <widget class="QCheckBox" name="checkBox_12" > 
     605       <widget class="QCheckBox" name="ff400_chan4_opt_pad" > 
    606606        <property name="text" > 
    607607         <string>Pad</string> 
     
    610610      </item> 
    611611      <item row="2" column="2" > 
    612        <widget class="QCheckBox" name="checkBox_10" > 
     612       <widget class="QCheckBox" name="ff400_chan4_opt_instr" > 
    613613        <property name="text" > 
    614614         <string>Instr</string>