Changeset 963
- Timestamp:
- 03/19/08 14:41:56 (14 years ago)
- Files:
-
- trunk/libffado/support/mixer/ffadomixer.in (modified) (1 diff)
- trunk/libffado/support/mixer/mixer_af2.ui (modified) (2 diffs)
- trunk/libffado/support/mixer/mixer_bcoaudio5.py (modified) (2 diffs)
- trunk/libffado/support/mixer/mixer_bcoaudio5.ui (modified) (3 diffs)
- trunk/libffado/support/mixer/mixer_saffire.py (modified) (1 diff)
- trunk/libffado/support/mixer/mixer_saffire.ui (modified) (2 diffs)
- trunk/libffado/support/mixer/mixer_saffirele.py (modified) (2 diffs)
- trunk/libffado/support/mixer/mixer_saffirele.ui (modified) (1 diff)
- trunk/libffado/support/mixer/mixer_saffirepro.py (modified) (2 diffs)
- trunk/libffado/support/mixer/mixer_saffirepro.ui (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/support/mixer/ffadomixer.in
r958 r963 249 249 # SaffireLE: 0x130e010004???? 250 250 if thisdev == (0x00130e, 0x00000000): 251 if GUID< 0x130e0100040000:251 if int(GUID, 16) < 0x130e0100040000: 252 252 mixerapp = "SaffireMixer" 253 253 else: trunk/libffado/support/mixer/mixer_af2.ui
r958 r963 2822 2822 <y>120</y> 2823 2823 <width>521</width> 2824 <height> 60</height>2824 <height>70</height> 2825 2825 </rect> 2826 2826 </property> … … 2835 2835 <rect> 2836 2836 <x>10</x> 2837 <y> 20</y>2837 <y>30</y> 2838 2838 <width>500</width> 2839 2839 <height>31</height> trunk/libffado/support/mixer/mixer_bcoaudio5.py
r864 r963 64 64 self.hw.setDiscrete(self.SelectorControls[name][0], state) 65 65 66 def updateClockSelection(self,a0): 67 #disable the combobox 68 self.comboClockSelect.setEnabled(False) 69 #change the clock source 70 self.clockselect.select(a0) 71 #refresh the clock source selection box 72 self.initClockSelector() 73 #make the box available again 74 self.comboClockSelect.setEnabled(True) 75 76 def initClockSelector(self): 77 self.comboClockSelect.clear() 78 nbsources = self.clockselect.count() 79 for idx in range(nbsources): 80 desc = self.clockselect.getEnumLabel(idx) 81 self.comboClockSelect.insertItem(desc) 82 active_idx = self.clockselect.selected(); 83 if active_idx >= 0: 84 self.comboClockSelect.setCurrentItem(active_idx) 85 66 86 def init(self): 67 87 print "Init BridgeCo Audio 5 window" … … 90 110 state = self.hw.getDiscrete(ctrl[0]) 91 111 print "%s state is %d" % (name , state) 92 ctrl[1].setCurrentItem(state) 112 ctrl[1].setCurrentItem(state) 113 114 self.initClockSelector() 115 # connect the clock selector UI element 116 QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection) trunk/libffado/support/mixer/mixer_bcoaudio5.ui
r864 r963 27 27 <y>0</y> 28 28 <width>403</width> 29 <height> 257</height>29 <height>333</height> 30 30 </rect> 31 31 </property> … … 475 475 </property> 476 476 </widget> 477 <widget class="QGroupBox"> 478 <property name="name"> 479 <cstring>groupBox1_3</cstring> 480 </property> 481 <property name="geometry"> 482 <rect> 483 <x>10</x> 484 <y>250</y> 485 <width>380</width> 486 <height>70</height> 487 </rect> 488 </property> 489 <property name="title"> 490 <string>Clock Source</string> 491 </property> 492 <widget class="QComboBox"> 493 <property name="name"> 494 <cstring>comboClockSelect</cstring> 495 </property> 496 <property name="geometry"> 497 <rect> 498 <x>10</x> 499 <y>30</y> 500 <width>360</width> 501 <height>31</height> 502 </rect> 503 </property> 504 </widget> 505 </widget> 477 506 </widget> 478 507 <connections> … … 526 555 </connection> 527 556 </connections> 528 <includes>529 <include location="local" impldecl="in implementation">mixer_bcoaudio5.ui.h</include>530 </includes>531 557 <slots> 532 558 <slot>setVolumeIn12( int )</slot> trunk/libffado/support/mixer/mixer_saffire.py
r864 r963 141 141 state) 142 142 self.hw.setDiscrete(self.SelectorControls[sender][0], state) 143 143 144 def updateClockSelection(self,a0): 145 #disable the combobox 146 self.comboClockSelect.setEnabled(False) 147 #change the clock source 148 self.clockselect.select(a0) 149 #refresh the clock source selection box 150 self.initClockSelector() 151 #make the box available again 152 self.comboClockSelect.setEnabled(True) 153 154 def initClockSelector(self): 155 self.comboClockSelect.clear() 156 nbsources = self.clockselect.count() 157 for idx in range(nbsources): 158 desc = self.clockselect.getEnumLabel(idx) 159 self.comboClockSelect.insertItem(desc) 160 active_idx = self.clockselect.selected(); 161 if active_idx >= 0: 162 self.comboClockSelect.setCurrentItem(active_idx) 163 144 164 def initValues(self): 145 146 147 148 165 for ctrl, info in self.VolumeControls.iteritems(): 166 vol = self.hw.getMatrixMixerValue(self.VolumeControls[ctrl][0], 167 self.VolumeControls[ctrl][1], 168 self.VolumeControls[ctrl][2]) 149 169 150 151 170 print "%s volume is %d" % (ctrl.name() , 0x7FFF-vol) 171 ctrl.setValue(0x7FFF-vol) 152 172 153 154 173 # connect the UI element 174 QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateMatrixVolume) 155 175 156 157 176 for ctrl, info in self.VolumeControlsLowRes.iteritems(): 177 vol = self.hw.getDiscrete(self.VolumeControlsLowRes[ctrl][0]) 158 178 159 160 179 print "%s volume is %d" % (ctrl.name() , vol) 180 ctrl.setValue(vol) 161 181 162 163 182 # connect the UI element 183 QObject.connect(ctrl,SIGNAL('valueChanged(int)'),self.updateLowResVolume) 164 184 165 166 167 168 169 170 171 185 for ctrl, info in self.SelectorControls.iteritems(): 186 state = self.hw.getDiscrete(self.SelectorControls[ctrl][0]) 187 print "%s state is %d" % (ctrl.name() , state) 188 if state: 189 ctrl.setChecked(True) 190 else: 191 ctrl.setChecked(False) 172 192 173 # connect the UI element 174 QObject.connect(ctrl,SIGNAL('stateChanged(int)'),self.updateSelector) 193 # connect the UI element 194 QObject.connect(ctrl,SIGNAL('stateChanged(int)'),self.updateSelector) 195 196 self.initClockSelector() 197 # connect the clock selector UI element 198 QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection) trunk/libffado/support/mixer/mixer_saffire.ui
r864 r963 33 33 <string>Focusrite Saffire Mixer</string> 34 34 </property> 35 <widget class="QGroupBox">36 <property name="name">37 <cstring>groupBox7</cstring>38 </property>39 <property name="geometry">40 <rect>41 <x>10</x>42 <y>320</y>43 <width>900</width>44 <height>60</height>45 </rect>46 </property>47 <property name="title">48 <string>Device Control</string>49 </property>50 <widget class="QCheckBox">51 <property name="name">52 <cstring>chkSpdifSwitch</cstring>53 </property>54 <property name="geometry">55 <rect>56 <x>20</x>57 <y>20</y>58 <width>170</width>59 <height>31</height>60 </rect>61 </property>62 <property name="text">63 <string>S/PDIF input enable</string>64 </property>65 </widget>66 </widget>67 35 <widget class="QTabWidget"> 68 36 <property name="name"> … … 3448 3416 </widget> 3449 3417 </widget> 3418 <widget class="QGroupBox"> 3419 <property name="name"> 3420 <cstring>groupBox1_3</cstring> 3421 </property> 3422 <property name="geometry"> 3423 <rect> 3424 <x>220</x> 3425 <y>320</y> 3426 <width>290</width> 3427 <height>70</height> 3428 </rect> 3429 </property> 3430 <property name="title"> 3431 <string>Clock Source</string> 3432 </property> 3433 <widget class="QComboBox"> 3434 <property name="name"> 3435 <cstring>comboClockSelect</cstring> 3436 </property> 3437 <property name="geometry"> 3438 <rect> 3439 <x>10</x> 3440 <y>30</y> 3441 <width>270</width> 3442 <height>30</height> 3443 </rect> 3444 </property> 3445 </widget> 3446 </widget> 3447 <widget class="QGroupBox"> 3448 <property name="name"> 3449 <cstring>groupBox7</cstring> 3450 </property> 3451 <property name="geometry"> 3452 <rect> 3453 <x>10</x> 3454 <y>320</y> 3455 <width>200</width> 3456 <height>70</height> 3457 </rect> 3458 </property> 3459 <property name="title"> 3460 <string>Device Control</string> 3461 </property> 3462 <widget class="QCheckBox"> 3463 <property name="name"> 3464 <cstring>chkSpdifSwitch</cstring> 3465 </property> 3466 <property name="geometry"> 3467 <rect> 3468 <x>20</x> 3469 <y>21</y> 3470 <width>170</width> 3471 <height>40</height> 3472 </rect> 3473 </property> 3474 <property name="text"> 3475 <string>S/PDIF input enable</string> 3476 </property> 3477 </widget> 3478 </widget> 3450 3479 </widget> 3451 3480 <slots> trunk/libffado/support/mixer/mixer_saffirele.py
r954 r963 131 131 state) 132 132 self.hw.setDiscrete(self.SelectorControls[sender][0], state) 133 133 134 def updateClockSelection(self,a0): 135 #disable the combobox 136 self.comboClockSelect.setEnabled(False) 137 #change the clock source 138 self.clockselect.select(a0) 139 #refresh the clock source selection box 140 self.initClockSelector() 141 #make the box available again 142 self.comboClockSelect.setEnabled(True) 143 144 def initClockSelector(self): 145 self.comboClockSelect.clear() 146 nbsources = self.clockselect.count() 147 for idx in range(nbsources): 148 desc = self.clockselect.getEnumLabel(idx) 149 self.comboClockSelect.insertItem(desc) 150 active_idx = self.clockselect.selected(); 151 if active_idx >= 0: 152 self.comboClockSelect.setCurrentItem(active_idx) 153 134 154 def initValues(self): 135 155 for ctrl, info in self.VolumeControls.iteritems(): … … 163 183 # connect the UI element 164 184 QObject.connect(ctrl,SIGNAL('stateChanged(int)'),self.updateSelector) 185 186 self.initClockSelector() 187 # connect the clock selector UI element 188 QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection) trunk/libffado/support/mixer/mixer_saffirele.ui
r945 r963 3073 3073 </widget> 3074 3074 </widget> 3075 <widget class="QWidget"> 3076 <property name="name"> 3077 <cstring>TabPage</cstring> 3078 </property> 3079 <attribute name="title"> 3080 <string>Control</string> 3081 </attribute> 3082 <widget class="QGroupBox"> 3083 <property name="name"> 3084 <cstring>groupBox1_3</cstring> 3085 </property> 3086 <property name="geometry"> 3087 <rect> 3088 <x>10</x> 3089 <y>10</y> 3090 <width>380</width> 3091 <height>70</height> 3092 </rect> 3093 </property> 3094 <property name="title"> 3095 <string>Clock Source</string> 3096 </property> 3097 <widget class="QComboBox"> 3098 <property name="name"> 3099 <cstring>comboClockSelect</cstring> 3100 </property> 3101 <property name="geometry"> 3102 <rect> 3103 <x>10</x> 3104 <y>30</y> 3105 <width>360</width> 3106 <height>31</height> 3107 </rect> 3108 </property> 3109 </widget> 3110 </widget> 3111 </widget> 3075 3112 </widget> 3076 3113 </widget> trunk/libffado/support/mixer/mixer_saffirepro.py
r933 r963 241 241 ctrl.setText(text) 242 242 243 self.initClockSelector() 244 245 def updateClockSelection(self,a0): 246 #disable the combobox 247 self.comboClockSelect.setEnabled(False) 248 #change the clock source 249 self.clockselect.select(a0) 250 #refresh the clock source selection box 251 self.initClockSelector() 252 #make the box available again 253 self.comboClockSelect.setEnabled(True) 254 255 def initClockSelector(self): 256 self.comboClockSelect.clear() 257 nbsources = self.clockselect.count() 258 for idx in range(nbsources): 259 desc = self.clockselect.getEnumLabel(idx) 260 self.comboClockSelect.insertItem(desc) 261 active_idx = self.clockselect.selected(); 262 if active_idx >= 0: 263 self.comboClockSelect.setCurrentItem(active_idx) 264 243 265 def initValues(self): 244 266 self.updateValues() … … 262 284 # connect the UI element 263 285 QObject.connect(ctrl,SIGNAL('clicked()'), self.saveText) 286 287 self.initClockSelector() 288 # connect the clock selector UI element 289 QObject.connect(self.comboClockSelect, SIGNAL('activated(int)'), self.updateClockSelection) trunk/libffado/support/mixer/mixer_saffirepro.ui
r933 r963 5568 5568 <string>Device Control</string> 5569 5569 </property> 5570 <widget class="QPushButton">5571 <property name="name">5572 <cstring>btnReboot</cstring>5573 </property>5574 <property name="geometry">5575 <rect>5576 <x>10</x>5577 <y>340</y>5578 <width>150</width>5579 <height>31</height>5580 </rect>5581 </property>5582 <property name="text">5583 <string>Re&boot Device</string>5584 </property>5585 <property name="accel">5586 <string>Alt+B</string>5587 </property>5588 </widget>5589 <widget class="QPushButton">5590 <property name="name">5591 <cstring>btnRefresh</cstring>5592 </property>5593 <property name="geometry">5594 <rect>5595 <x>219</x>5596 <y>340</y>5597 <width>80</width>5598 <height>31</height>5599 </rect>5600 </property>5601 <property name="text">5602 <string>Refresh</string>5603 </property>5604 <property name="accel">5605 <string></string>5606 </property>5607 </widget>5608 <widget class="QPushButton">5609 <property name="name">5610 <cstring>btnIdentify</cstring>5611 </property>5612 <property name="geometry">5613 <rect>5614 <x>10</x>5615 <y>300</y>5616 <width>150</width>5617 <height>31</height>5618 </rect>5619 </property>5620 <property name="text">5621 <string>Identif&y Device</string>5622 </property>5623 <property name="accel">5624 <string>Alt+Y</string>5625 </property>5626 </widget>5627 5570 <widget class="QCheckBox"> 5628 5571 <property name="name"> … … 5724 5667 </property> 5725 5668 </widget> 5669 <widget class="QPushButton"> 5670 <property name="name"> 5671 <cstring>btnIdentify</cstring> 5672 </property> 5673 <property name="geometry"> 5674 <rect> 5675 <x>10</x> 5676 <y>300</y> 5677 <width>110</width> 5678 <height>31</height> 5679 </rect> 5680 </property> 5681 <property name="text"> 5682 <string>Identif&y Device</string> 5683 </property> 5684 <property name="accel"> 5685 <string>Alt+Y</string> 5686 </property> 5687 </widget> 5688 <widget class="QPushButton"> 5689 <property name="name"> 5690 <cstring>btnReboot</cstring> 5691 </property> 5692 <property name="geometry"> 5693 <rect> 5694 <x>10</x> 5695 <y>340</y> 5696 <width>110</width> 5697 <height>31</height> 5698 </rect> 5699 </property> 5700 <property name="text"> 5701 <string>Re&boot Device</string> 5702 </property> 5703 <property name="accel"> 5704 <string>Alt+B</string> 5705 </property> 5706 </widget> 5726 5707 <widget class="QCheckBox"> 5727 5708 <property name="name"> 5728 5709 <cstring>chkAC3</cstring> 5729 5710 </property> 5711 <property name="enabled"> 5712 <bool>false</bool> 5713 </property> 5730 5714 <property name="geometry"> 5731 5715 <rect> 5732 <x> 20</x>5716 <x>160</x> 5733 5717 <y>80</y> 5734 <width> 230</width>5718 <width>140</width> 5735 5719 <height>31</height> 5736 5720 </rect> … … 5750 5734 <rect> 5751 5735 <x>20</x> 5752 <y> 110</y>5753 <width> 230</width>5736 <y>80</y> 5737 <width>90</width> 5754 5738 <height>31</height> 5755 5739 </rect> … … 5769 5753 <rect> 5770 5754 <x>20</x> 5771 <y>1 40</y>5755 <y>110</y> 5772 5756 <width>230</width> 5773 5757 <height>31</height> … … 5781 5765 </property> 5782 5766 </widget> 5783 <widget class="QPushButton">5784 <property name="name">5785 <cstring>btnSaveSettings</cstring>5786 </property>5787 <property name="geometry">5788 <rect>5789 <x>9</x>5790 <y>260</y>5791 <width>150</width>5792 <height>31</height>5793 </rect>5794 </property>5795 <property name="text">5796 <string>&Save Settings</string>5797 </property>5798 <property name="accel">5799 <string>Alt+S</string>5800 </property>5801 </widget>5802 5767 <widget class="QGroupBox"> 5803 5768 <property name="name"> … … 5807 5772 <rect> 5808 5773 <x>10</x> 5809 <y>1 80</y>5774 <y>140</y> 5810 5775 <width>290</width> 5811 5776 <height>60</height> … … 5848 5813 </widget> 5849 5814 </widget> 5815 <widget class="QGroupBox"> 5816 <property name="name"> 5817 <cstring>groupBox1_3</cstring> 5818 </property> 5819 <property name="geometry"> 5820 <rect> 5821 <x>10</x> 5822 <y>200</y> 5823 <width>290</width> 5824 <height>70</height> 5825 </rect> 5826 </property> 5827 <property name="title"> 5828 <string>Clock Source</string> 5829 </property> 5830 <widget class="QComboBox"> 5831 <property name="name"> 5832 <cstring>comboClockSelect</cstring> 5833 </property> 5834 <property name="geometry"> 5835 <rect> 5836 <x>10</x> 5837 <y>30</y> 5838 <width>270</width> 5839 <height>30</height> 5840 </rect> 5841 </property> 5842 </widget> 5843 </widget> 5844 <widget class="QPushButton"> 5845 <property name="name"> 5846 <cstring>btnRefresh</cstring> 5847 </property> 5848 <property name="geometry"> 5849 <rect> 5850 <x>190</x> 5851 <y>340</y> 5852 <width>110</width> 5853 <height>31</height> 5854 </rect> 5855 </property> 5856 <property name="text"> 5857 <string>Refresh</string> 5858 </property> 5859 <property name="accel"> 5860 <string></string> 5861 </property> 5862 </widget> 5863 <widget class="QPushButton"> 5864 <property name="name"> 5865 <cstring>btnSaveSettings</cstring> 5866 </property> 5867 <property name="geometry"> 5868 <rect> 5869 <x>190</x> 5870 <y>300</y> 5871 <width>110</width> 5872 <height>31</height> 5873 </rect> 5874 </property> 5875 <property name="text"> 5876 <string>&Save Settings</string> 5877 </property> 5878 <property name="accel"> 5879 <string>Alt+S</string> 5880 </property> 5881 </widget> 5850 5882 </widget> 5851 5883 </widget>