Index: /trunk/libffado/support/mixer/mixer_saffirele.ui =================================================================== --- /trunk/libffado/support/mixer/mixer_saffirele.ui (revision 945) +++ /trunk/libffado/support/mixer/mixer_saffirele.ui (revision 963) @@ -3073,4 +3073,41 @@ + + + TabPage + + + Control + + + + groupBox1_3 + + + + 10 + 10 + 380 + 70 + + + + Clock Source + + + + comboClockSelect + + + + 10 + 30 + 360 + 31 + + + + + Index: /trunk/libffado/support/mixer/mixer_saffirepro.ui =================================================================== --- /trunk/libffado/support/mixer/mixer_saffirepro.ui (revision 933) +++ /trunk/libffado/support/mixer/mixer_saffirepro.ui (revision 963) @@ -5568,61 +5568,4 @@ Device Control - - - btnReboot - - - - 10 - 340 - 150 - 31 - - - - Re&boot Device - - - Alt+B - - - - - btnRefresh - - - - 219 - 340 - 80 - 31 - - - - Refresh - - - - - - - - btnIdentify - - - - 10 - 300 - 150 - 31 - - - - Identif&y Device - - - Alt+Y - - @@ -5724,13 +5667,54 @@ + + + btnIdentify + + + + 10 + 300 + 110 + 31 + + + + Identif&y Device + + + Alt+Y + + + + + btnReboot + + + + 10 + 340 + 110 + 31 + + + + Re&boot Device + + + Alt+B + + chkAC3 + + false + - 20 + 160 80 - 230 + 140 31 @@ -5750,6 +5734,6 @@ 20 - 110 - 230 + 80 + 90 31 @@ -5769,5 +5753,5 @@ 20 - 140 + 110 230 31 @@ -5781,23 +5765,4 @@ - - - btnSaveSettings - - - - 9 - 260 - 150 - 31 - - - - &Save Settings - - - Alt+S - - @@ -5807,5 +5772,5 @@ 10 - 180 + 140 290 60 @@ -5848,4 +5813,71 @@ + + + groupBox1_3 + + + + 10 + 200 + 290 + 70 + + + + Clock Source + + + + comboClockSelect + + + + 10 + 30 + 270 + 30 + + + + + + + btnRefresh + + + + 190 + 340 + 110 + 31 + + + + Refresh + + + + + + + + btnSaveSettings + + + + 190 + 300 + 110 + 31 + + + + &Save Settings + + + Alt+S + + Index: /trunk/libffado/support/mixer/mixer_af2.ui =================================================================== --- /trunk/libffado/support/mixer/mixer_af2.ui (revision 958) +++ /trunk/libffado/support/mixer/mixer_af2.ui (revision 963) @@ -2822,5 +2822,5 @@ 120 521 - 60 + 70 @@ -2835,5 +2835,5 @@ 10 - 20 + 30 500 31 Index: /trunk/libffado/support/mixer/ffadomixer.in =================================================================== --- /trunk/libffado/support/mixer/ffadomixer.in (revision 958) +++ /trunk/libffado/support/mixer/ffadomixer.in (revision 963) @@ -249,5 +249,5 @@ # SaffireLE: 0x130e010004???? if thisdev == (0x00130e, 0x00000000): - if GUID < 0x130e0100040000: + if int(GUID, 16) < 0x130e0100040000: mixerapp = "SaffireMixer" else: Index: /trunk/libffado/support/mixer/mixer_bcoaudio5.ui =================================================================== --- /trunk/libffado/support/mixer/mixer_bcoaudio5.ui (revision 864) +++ /trunk/libffado/support/mixer/mixer_bcoaudio5.ui (revision 963) @@ -27,5 +27,5 @@ 0 403 - 257 + 333 @@ -475,4 +475,33 @@ + + + groupBox1_3 + + + + 10 + 250 + 380 + 70 + + + + Clock Source + + + + comboClockSelect + + + + 10 + 30 + 360 + 31 + + + + @@ -526,7 +555,4 @@ - - mixer_bcoaudio5.ui.h - setVolumeIn12( int ) Index: /trunk/libffado/support/mixer/mixer_saffirele.py =================================================================== --- /trunk/libffado/support/mixer/mixer_saffirele.py (revision 954) +++ /trunk/libffado/support/mixer/mixer_saffirele.py (revision 963) @@ -131,5 +131,25 @@ state) self.hw.setDiscrete(self.SelectorControls[sender][0], state) - + + def updateClockSelection(self,a0): + #disable the combobox + self.comboClockSelect.setEnabled(False) + #change the clock source + self.clockselect.select(a0) + #refresh the clock source selection box + self.initClockSelector() + #make the box available again + self.comboClockSelect.setEnabled(True) + + def initClockSelector(self): + self.comboClockSelect.clear() + nbsources = self.clockselect.count() + for idx in range(nbsources): + desc = self.clockselect.getEnumLabel(idx) + self.comboClockSelect.insertItem(desc) + active_idx = self.clockselect.selected(); + if active_idx >= 0: + self.comboClockSelect.setCurrentItem(active_idx) + def initValues(self): for ctrl, info in self.VolumeControls.iteritems(): @@ -163,2 +183,6 @@ # connect the UI element QObject.connect(ctrl,SIGNAL('stateChanged(int)'),self.updateSelector) + + self.initClockSelector() + # connect the clock selector UI element + QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection) Index: /trunk/libffado/support/mixer/mixer_saffirepro.py =================================================================== --- /trunk/libffado/support/mixer/mixer_saffirepro.py (revision 933) +++ /trunk/libffado/support/mixer/mixer_saffirepro.py (revision 963) @@ -241,4 +241,26 @@ ctrl.setText(text) + self.initClockSelector() + + def updateClockSelection(self,a0): + #disable the combobox + self.comboClockSelect.setEnabled(False) + #change the clock source + self.clockselect.select(a0) + #refresh the clock source selection box + self.initClockSelector() + #make the box available again + self.comboClockSelect.setEnabled(True) + + def initClockSelector(self): + self.comboClockSelect.clear() + nbsources = self.clockselect.count() + for idx in range(nbsources): + desc = self.clockselect.getEnumLabel(idx) + self.comboClockSelect.insertItem(desc) + active_idx = self.clockselect.selected(); + if active_idx >= 0: + self.comboClockSelect.setCurrentItem(active_idx) + def initValues(self): self.updateValues() @@ -262,2 +284,6 @@ # connect the UI element QObject.connect(ctrl,SIGNAL('clicked()'), self.saveText) + + self.initClockSelector() + # connect the clock selector UI element + QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection) Index: /trunk/libffado/support/mixer/mixer_saffire.ui =================================================================== --- /trunk/libffado/support/mixer/mixer_saffire.ui (revision 864) +++ /trunk/libffado/support/mixer/mixer_saffire.ui (revision 963) @@ -33,36 +33,4 @@ Focusrite Saffire Mixer - - - groupBox7 - - - - 10 - 320 - 900 - 60 - - - - Device Control - - - - chkSpdifSwitch - - - - 20 - 20 - 170 - 31 - - - - S/PDIF input enable - - - @@ -3448,4 +3416,65 @@ + + + groupBox1_3 + + + + 220 + 320 + 290 + 70 + + + + Clock Source + + + + comboClockSelect + + + + 10 + 30 + 270 + 30 + + + + + + + groupBox7 + + + + 10 + 320 + 200 + 70 + + + + Device Control + + + + chkSpdifSwitch + + + + 20 + 21 + 170 + 40 + + + + S/PDIF input enable + + + Index: /trunk/libffado/support/mixer/mixer_bcoaudio5.py =================================================================== --- /trunk/libffado/support/mixer/mixer_bcoaudio5.py (revision 864) +++ /trunk/libffado/support/mixer/mixer_bcoaudio5.py (revision 963) @@ -64,4 +64,24 @@ self.hw.setDiscrete(self.SelectorControls[name][0], state) + def updateClockSelection(self,a0): + #disable the combobox + self.comboClockSelect.setEnabled(False) + #change the clock source + self.clockselect.select(a0) + #refresh the clock source selection box + self.initClockSelector() + #make the box available again + self.comboClockSelect.setEnabled(True) + + def initClockSelector(self): + self.comboClockSelect.clear() + nbsources = self.clockselect.count() + for idx in range(nbsources): + desc = self.clockselect.getEnumLabel(idx) + self.comboClockSelect.insertItem(desc) + active_idx = self.clockselect.selected(); + if active_idx >= 0: + self.comboClockSelect.setCurrentItem(active_idx) + def init(self): print "Init BridgeCo Audio 5 window" @@ -90,3 +110,7 @@ state = self.hw.getDiscrete(ctrl[0]) print "%s state is %d" % (name , state) - ctrl[1].setCurrentItem(state) + ctrl[1].setCurrentItem(state) + + self.initClockSelector() + # connect the clock selector UI element + QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection) Index: /trunk/libffado/support/mixer/mixer_saffire.py =================================================================== --- /trunk/libffado/support/mixer/mixer_saffire.py (revision 864) +++ /trunk/libffado/support/mixer/mixer_saffire.py (revision 963) @@ -141,34 +141,58 @@ state) self.hw.setDiscrete(self.SelectorControls[sender][0], state) - + + def updateClockSelection(self,a0): + #disable the combobox + self.comboClockSelect.setEnabled(False) + #change the clock source + self.clockselect.select(a0) + #refresh the clock source selection box + self.initClockSelector() + #make the box available again + self.comboClockSelect.setEnabled(True) + + def initClockSelector(self): + self.comboClockSelect.clear() + nbsources = self.clockselect.count() + for idx in range(nbsources): + desc = self.clockselect.getEnumLabel(idx) + self.comboClockSelect.insertItem(desc) + active_idx = self.clockselect.selected(); + if active_idx >= 0: + self.comboClockSelect.setCurrentItem(active_idx) + def initValues(self): - for ctrl, info in self.VolumeControls.iteritems(): - vol = self.hw.getMatrixMixerValue(self.VolumeControls[ctrl][0], - self.VolumeControls[ctrl][1], - self.VolumeControls[ctrl][2]) + for ctrl, info in self.VolumeControls.iteritems(): + vol = self.hw.getMatrixMixerValue(self.VolumeControls[ctrl][0], + self.VolumeControls[ctrl][1], + self.VolumeControls[ctrl][2]) - print "%s volume is %d" % (ctrl.name() , 0x7FFF-vol) - ctrl.setValue(0x7FFF-vol) + print "%s volume is %d" % (ctrl.name() , 0x7FFF-vol) + ctrl.setValue(0x7FFF-vol) - # connect the UI element - QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateMatrixVolume) + # connect the UI element + QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateMatrixVolume) - for ctrl, info in self.VolumeControlsLowRes.iteritems(): - vol = self.hw.getDiscrete(self.VolumeControlsLowRes[ctrl][0]) + for ctrl, info in self.VolumeControlsLowRes.iteritems(): + vol = self.hw.getDiscrete(self.VolumeControlsLowRes[ctrl][0]) - print "%s volume is %d" % (ctrl.name() , vol) - ctrl.setValue(vol) + print "%s volume is %d" % (ctrl.name() , vol) + ctrl.setValue(vol) - # connect the UI element - QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateLowResVolume) + # connect the UI element + QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateLowResVolume) - for ctrl, info in self.SelectorControls.iteritems(): - state = self.hw.getDiscrete(self.SelectorControls[ctrl][0]) - print "%s state is %d" % (ctrl.name() , state) - if state: - ctrl.setChecked(True) - else: - ctrl.setChecked(False) + for ctrl, info in self.SelectorControls.iteritems(): + state = self.hw.getDiscrete(self.SelectorControls[ctrl][0]) + print "%s state is %d" % (ctrl.name() , state) + if state: + ctrl.setChecked(True) + else: + ctrl.setChecked(False) - # connect the UI element - QObject.connect(ctrl,SIGNAL('stateChanged(int)'),self.updateSelector) + # connect the UI element + QObject.connect(ctrl,SIGNAL('stateChanged(int)'),self.updateSelector) + + self.initClockSelector() + # connect the clock selector UI element + QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection)