root/branches/libffado-2.0/support/mixer-qt4/mixer_saffire.py

Revision 1367, 27.2 kB (checked in by ppalmers, 12 years ago)

use the python logging framework for the mixer debug messages (QT4 only)

Line 
1 #
2 # Copyright (C) 2005-2008 by Pieter Palmers
3 #
4 # This file is part of FFADO
5 # FFADO = Free Firewire (pro-)audio drivers for linux
6 #
7 # FFADO is based upon FreeBoB.
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 2 of the License, or
12 # (at your option) version 3 of the License.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 #
22
23 from PyQt4.QtCore import SIGNAL, SLOT, QObject
24 from PyQt4.QtGui import QWidget, QHBoxLayout
25 from mixer_saffire_base import SaffireMixerBase
26 from mixer_saffire_stereoui import Ui_SaffireMixerStereoUI
27 from mixer_saffire_monoui import Ui_SaffireMixerMonoUI
28 from mixer_saffirele_smallui import Ui_SaffireLEMixerSmallUI
29 from mixer_saffirele_largeui import Ui_SaffireLEMixerLargeUI
30
31 import logging
32 log = logging.getLogger('saffire')
33
34 #MIXER LAYOUT:
35 #
36 #   |-- Out9/10--| |-- Out1/2 --| |-- Out3/4 --| |-- Out5/6 --| |-- Out7/8 --|
37 #P5  0:    0/    0  1:  110/  110  2:    0/    0  3:    0/    0  4:    0/    0
38 #P1  5:    0/    0  6:32767/32767  7:    0/    0  8:    0/    0  9:    0/    0
39 #P2 10:    0/    0 11:    0/    0 12:32767/32767 13:    0/    0 14:    0/    0
40 #P3 15:    0/    0 16:    0/    0 17:    0/    0 18:32767/32767 19:    0/    0
41 #P4 20:    0/    0 21:    0/    0 22:    0/    0 23:    0/    0 24:32767/32767
42 #R1 25:    0/    0 26:    0/    0 27:    0/    0 28:    0/    0 29:    0/    0
43 #R2 30:    0/    0 31:    0/    0 32:    0/    0 33:    0/    0 34:    0/    0
44 #Fx 35:    0/    0 36:    0/    0 37:    0/    0 38:    0/    0 39:    0/    0
45 #
46 #P5: DAW ch 9/10
47 #P1: DAW ch 1/2
48 #P2: DAW ch 3/4
49 #P3: DAW ch 5/6
50 #P4: DAW ch 7/8
51 #R1: HW INPUT ch 1/2
52 #R2: HW INPUT ch 3/4
53 #Fx: reverb/fx return
54
55 class SaffireMixer(QWidget):
56     def __init__(self,parent = None):
57         QWidget.__init__(self, parent)
58
59         self.mono_mode = False
60         self.is_saffire_le = False
61
62         # make a layout
63         self.layout = QHBoxLayout()
64         self.setLayout(self.layout)
65
66     def show(self):
67         self.selectCorrectMode()
68         QWidget.show(self)
69
70     def getMonoMode(self):
71         return self.hw.getDiscrete('/Mixer/MonoMode')
72     def setMonoMode(self, mode):
73         if mode:
74             self.hw.setDiscrete('/Mixer/MonoMode', 1)
75         else:
76             self.hw.setDiscrete('/Mixer/MonoMode', 0)
77         self.mono_mode = self.getMonoMode()
78
79     def getDisplayTitle(self):
80         if self.is_saffire_le:
81             return "SaffireLE"
82         else:
83             return "Saffire"
84
85     def selectCorrectMode(self):
86         if self.is_saffire_le:
87             if self.samplerate <= 48000:
88                 log.debug("large")
89                 self.small.hide()
90                 self.large.initValues()
91                 self.large.show()
92             else:
93                 log.debug("small")
94                 self.large.hide()
95                 self.small.initValues()
96                 self.small.show()
97         else:
98             if self.mono_mode:
99                 self.stereo.hide()
100                 self.mono.initValues()
101                 self.mono.show()
102             else:
103                 self.mono.hide()
104                 self.stereo.initValues()
105                 self.stereo.show()
106
107     def initValues(self):
108         selected = self.samplerateselect.selected()
109         self.samplerate = int(self.samplerateselect.getEnumLabel( selected ))
110
111         # Saffire:        0x130e010001????
112         # SaffireLE:    0x130e010004????
113         if int(self.configrom.getGUID(), 16) >= 0x130e0100040000:
114             self.is_saffire_le = True
115             log.debug("Found SaffireLE GUID")
116         else:
117             self.is_saffire_le = False
118             log.debug("Found Saffire GUID")
119
120         # init depending on what device we have
121         # and what mode it is in
122         if self.is_saffire_le:
123             # create the child widgets
124             self.small = SaffireLEMixerSmall(self)
125             self.layout.addWidget(self.small)
126             self.large = SaffireLEMixerLarge(self)
127             self.layout.addWidget(self.large)
128
129             self.small.hw = self.hw
130             self.small.configrom = self.configrom
131
132             self.large.hw = self.hw
133             self.large.configrom = self.configrom
134         else:
135             # create the child widgets
136             self.mono = SaffireMixerMono(self)
137             self.layout.addWidget(self.mono)
138             self.stereo = SaffireMixerStereo(self)
139             self.layout.addWidget(self.stereo)
140
141             self.mono_mode = self.getMonoMode()
142
143             self.mono.hw = self.hw
144             self.mono.configrom = self.configrom
145
146             self.stereo.hw = self.hw
147             self.stereo.configrom = self.configrom
148
149         self.selectCorrectMode()
150
151     def polledUpdate(self):
152         if self.is_saffire_le:
153             if self.samplerate <= 48000:
154                 self.large.polledUpdate()
155             else:
156                 self.small.polledUpdate()
157         else:
158             if self.mono_mode:
159                 self.mono.polledUpdate()
160             else:
161                 self.stereo.polledUpdate()
162
163 class SaffireMixerStereo(QWidget, Ui_SaffireMixerStereoUI, SaffireMixerBase):
164     def __init__(self,parent = None):
165         self.my_parent = parent
166         QWidget.__init__(self,parent)
167         self.setupUi(self)
168         SaffireMixerBase.__init__(self)
169         QObject.connect(self.btnRefresh, SIGNAL('clicked()'), self.updateValues)
170         QObject.connect(self.btnSwitchStereoMode, SIGNAL('clicked()'), self.switchStereoMode)
171
172         self.VolumeControls={
173                 self.sldPC910Out910: ['/Mixer/MatrixMixerStereo', 0, 0],
174                 self.sldPC910Out12: ['/Mixer/MatrixMixerStereo', 0, 1],
175                 self.sldPC910Out34: ['/Mixer/MatrixMixerStereo', 0, 2],
176                 self.sldPC910Out56: ['/Mixer/MatrixMixerStereo', 0, 3],
177                 self.sldPC910Out78: ['/Mixer/MatrixMixerStereo', 0, 4],
178                 self.sldPC12Out910: ['/Mixer/MatrixMixerStereo', 1, 0],
179                 self.sldPC12Out12: ['/Mixer/MatrixMixerStereo', 1, 1],
180                 self.sldPC12Out34: ['/Mixer/MatrixMixerStereo', 1, 2],
181                 self.sldPC12Out56: ['/Mixer/MatrixMixerStereo', 1, 3],
182                 self.sldPC12Out78: ['/Mixer/MatrixMixerStereo', 1, 4],
183                 self.sldPC34Out910: ['/Mixer/MatrixMixerStereo', 2, 0],
184                 self.sldPC34Out12: ['/Mixer/MatrixMixerStereo', 2, 1],
185                 self.sldPC34Out34: ['/Mixer/MatrixMixerStereo', 2, 2],
186                 self.sldPC34Out56: ['/Mixer/MatrixMixerStereo', 2, 3],
187                 self.sldPC34Out78: ['/Mixer/MatrixMixerStereo', 2, 4],
188                 self.sldPC56Out910: ['/Mixer/MatrixMixerStereo', 3, 0],
189                 self.sldPC56Out12: ['/Mixer/MatrixMixerStereo', 3, 1],
190                 self.sldPC56Out34: ['/Mixer/MatrixMixerStereo', 3, 2],
191                 self.sldPC56Out56: ['/Mixer/MatrixMixerStereo', 3, 3],
192                 self.sldPC56Out78: ['/Mixer/MatrixMixerStereo', 3, 4],
193                 self.sldPC78Out910: ['/Mixer/MatrixMixerStereo', 4, 0],
194                 self.sldPC78Out12: ['/Mixer/MatrixMixerStereo', 4, 1],
195                 self.sldPC78Out34: ['/Mixer/MatrixMixerStereo', 4, 2],
196                 self.sldPC78Out56: ['/Mixer/MatrixMixerStereo', 4, 3],
197                 self.sldPC78Out78: ['/Mixer/MatrixMixerStereo', 4, 4],
198
199                 self.sldIN12Out910: ['/Mixer/MatrixMixerStereo', 5, 0],
200                 self.sldIN12Out12: ['/Mixer/MatrixMixerStereo', 5, 1],
201                 self.sldIN12Out34: ['/Mixer/MatrixMixerStereo', 5, 2],
202                 self.sldIN12Out56: ['/Mixer/MatrixMixerStereo', 5, 3],
203                 self.sldIN12Out78: ['/Mixer/MatrixMixerStereo', 5, 4],
204                 self.sldIN34Out910: ['/Mixer/MatrixMixerStereo', 6, 0],
205                 self.sldIN34Out12: ['/Mixer/MatrixMixerStereo', 6, 1],
206                 self.sldIN34Out34: ['/Mixer/MatrixMixerStereo', 6, 2],
207                 self.sldIN34Out56: ['/Mixer/MatrixMixerStereo', 6, 3],
208                 self.sldIN34Out78: ['/Mixer/MatrixMixerStereo', 6, 4],
209
210                 self.sldFXOut910: ['/Mixer/MatrixMixerStereo', 7, 0],
211                 self.sldFXOut12: ['/Mixer/MatrixMixerStereo', 7, 1],
212                 self.sldFXOut34: ['/Mixer/MatrixMixerStereo', 7, 2],
213                 self.sldFXOut56: ['/Mixer/MatrixMixerStereo', 7, 3],
214                 self.sldFXOut78: ['/Mixer/MatrixMixerStereo', 7, 4],
215                 }
216
217
218         # First column is the DBUS subpath of the control.
219         # Second column is a list of linked controls that should
220         # be rewritten whenever this control is updated
221         self.SelectorControls={
222                 self.chkSpdifSwitch:    ['/Mixer/SpdifSwitch'],
223                 self.chkOut12Mute:      ['/Mixer/Out12Mute', [self.chkOut12HwCtrl]],
224                 self.chkOut12HwCtrl:    ['/Mixer/Out12HwCtrl'],
225                 self.chkOut12Dim:       ['/Mixer/Out12Dim'],
226                 self.chkOut34Mute:      ['/Mixer/Out34Mute', [self.chkOut34HwCtrl]],
227                 self.chkOut34HwCtrl:    ['/Mixer/Out34HwCtrl'],
228                 self.chkOut56Mute:      ['/Mixer/Out56Mute', [self.chkOut56HwCtrl]],
229                 self.chkOut56HwCtrl:    ['/Mixer/Out56HwCtrl'],
230                 self.chkOut78Mute:      ['/Mixer/Out78Mute', [self.chkOut78HwCtrl]],
231                 self.chkOut78HwCtrl:    ['/Mixer/Out78HwCtrl'],
232                 self.chkOut910Mute:     ['/Mixer/Out910Mute'],
233                 }
234
235         self.VolumeControlsLowRes={
236                 self.sldOut12Level:      ['/Mixer/Out12Level'],
237                 self.sldOut34Level:      ['/Mixer/Out34Level'],
238                 self.sldOut56Level:      ['/Mixer/Out56Level'],
239                 self.sldOut78Level:      ['/Mixer/Out78Level'],
240                 }
241
242         self.TriggerButtonControls={
243                 self.btnSaveSettings:      ['/Mixer/SaveSettings'],
244         }
245
246         self.TextControls={
247         }
248
249         self.saveTextControls={
250         }
251
252         self.ComboControls={
253         }
254
255     def polledUpdate(self):
256         self.polledUpdateHwCtrl(self.chkOut12HwCtrl, self.sldOut12Level)
257         self.polledUpdateHwCtrl(self.chkOut34HwCtrl, self.sldOut34Level)
258         self.polledUpdateHwCtrl(self.chkOut56HwCtrl, self.sldOut56Level)
259         self.polledUpdateHwCtrl(self.chkOut78HwCtrl, self.sldOut78Level)
260
261     def polledUpdateHwCtrl(self, selector, volctrl):
262         state = selector.isChecked()
263         if state:
264             self.polledUpdateVolumeLowRes('/Mixer/MonitorDial', volctrl)
265             volctrl.setEnabled(False)
266         else:
267             volctrl.setEnabled(True)
268
269     def updateMatrixVolume(self,a0):
270         SaffireMixerBase.updateMatrixVolume(self,a0)
271     def updateLowResVolume(self,a0):
272         SaffireMixerBase.updateLowResVolume(self,a0)
273     def updateSelector(self,a0):
274         SaffireMixerBase.updateSelector(self,a0)
275     def triggerButton(self):
276         SaffireMixerBase.triggerButton(self)
277     def saveText(self):
278         SaffireMixerBase.saveText(self)
279     def initCombo(self, combo):
280         SaffireMixerBase.initCombo(self,combo)
281     def selectCombo(self, mode):
282         SaffireMixerBase.selectCombo(self,mode)
283
284     def updateValues(self):
285         SaffireMixerBase.updateValues(self)
286     def switchStereoMode(self):
287         log.debug("should switch to mono mode")
288         self.my_parent.setMonoMode(1)
289         self.my_parent.selectCorrectMode()
290
291 class SaffireMixerMono(QWidget, Ui_SaffireMixerMonoUI, SaffireMixerBase):
292     def __init__(self,parent = None):
293         self.my_parent = parent
294         QWidget.__init__(self,parent)
295         self.setupUi(self)
296         SaffireMixerBase.__init__(self)
297         QObject.connect(self.btnRefresh, SIGNAL('clicked()'), self.updateValues)
298         QObject.connect(self.btnSwitchStereoMode, SIGNAL('clicked()'), self.switchStereoMode)
299
300         self.VolumeControls={
301                 self.sldIN1Out910: ['/Mixer/MatrixMixerMono', 0, 0],
302                 self.sldIN1Out12: ['/Mixer/MatrixMixerMono', 0, 1],
303                 self.sldIN1Out34: ['/Mixer/MatrixMixerMono', 0, 2],
304                 self.sldIN1Out56: ['/Mixer/MatrixMixerMono', 0, 3],
305                 self.sldIN1Out78: ['/Mixer/MatrixMixerMono', 0, 4],
306                 self.sldIN3Out910: ['/Mixer/MatrixMixerMono', 1, 0],
307                 self.sldIN3Out12: ['/Mixer/MatrixMixerMono', 1, 1],
308                 self.sldIN3Out34: ['/Mixer/MatrixMixerMono', 1, 2],
309                 self.sldIN3Out56: ['/Mixer/MatrixMixerMono', 1, 3],
310                 self.sldIN3Out78: ['/Mixer/MatrixMixerMono', 1, 4],
311                 self.sldFX1Out910: ['/Mixer/MatrixMixerMono', 2, 0],
312                 self.sldFX1Out12: ['/Mixer/MatrixMixerMono', 2, 1],
313                 self.sldFX1Out34: ['/Mixer/MatrixMixerMono', 2, 2],
314                 self.sldFX1Out56: ['/Mixer/MatrixMixerMono', 2, 3],
315                 self.sldFX1Out78: ['/Mixer/MatrixMixerMono', 2, 4],
316                 self.sldIN2Out910: ['/Mixer/MatrixMixerMono', 3, 0],
317                 self.sldIN2Out12: ['/Mixer/MatrixMixerMono', 3, 1],
318                 self.sldIN2Out34: ['/Mixer/MatrixMixerMono', 3, 2],
319                 self.sldIN2Out56: ['/Mixer/MatrixMixerMono', 3, 3],
320                 self.sldIN2Out78: ['/Mixer/MatrixMixerMono', 3, 4],
321                 self.sldIN4Out910: ['/Mixer/MatrixMixerMono', 4, 0],
322                 self.sldIN4Out12: ['/Mixer/MatrixMixerMono', 4, 1],
323                 self.sldIN4Out34: ['/Mixer/MatrixMixerMono', 4, 2],
324                 self.sldIN4Out56: ['/Mixer/MatrixMixerMono', 4, 3],
325                 self.sldIN4Out78: ['/Mixer/MatrixMixerMono', 4, 4],
326                 self.sldFX2Out910: ['/Mixer/MatrixMixerMono', 5, 0],
327                 self.sldFX2Out12: ['/Mixer/MatrixMixerMono', 5, 1],
328                 self.sldFX2Out34: ['/Mixer/MatrixMixerMono', 5, 2],
329                 self.sldFX2Out56: ['/Mixer/MatrixMixerMono', 5, 3],
330                 self.sldFX2Out78: ['/Mixer/MatrixMixerMono', 5, 4],
331
332                 self.sldPC910Out910: ['/Mixer/MatrixMixerMono', 6, 0],
333                 self.sldPC910Out12: ['/Mixer/MatrixMixerMono', 6, 1],
334                 self.sldPC910Out34: ['/Mixer/MatrixMixerMono', 6, 2],
335                 self.sldPC910Out56: ['/Mixer/MatrixMixerMono', 6, 3],
336                 self.sldPC910Out78: ['/Mixer/MatrixMixerMono', 6, 4],
337                 self.sldPC12Out910: ['/Mixer/MatrixMixerMono', 7, 0],
338                 self.sldPC12Out12: ['/Mixer/MatrixMixerMono', 7, 1],
339                 self.sldPC12Out34: ['/Mixer/MatrixMixerMono', 7, 2],
340                 self.sldPC12Out56: ['/Mixer/MatrixMixerMono', 7, 3],
341                 self.sldPC12Out78: ['/Mixer/MatrixMixerMono', 7, 4],
342                 self.sldPC34Out910: ['/Mixer/MatrixMixerMono', 8, 0],
343                 self.sldPC34Out12: ['/Mixer/MatrixMixerMono', 8, 1],
344                 self.sldPC34Out34: ['/Mixer/MatrixMixerMono', 8, 2],
345                 self.sldPC34Out56: ['/Mixer/MatrixMixerMono', 8, 3],
346                 self.sldPC34Out78: ['/Mixer/MatrixMixerMono', 8, 4],
347                 self.sldPC56Out910: ['/Mixer/MatrixMixerMono', 9, 0],
348                 self.sldPC56Out12: ['/Mixer/MatrixMixerMono', 9, 1],
349                 self.sldPC56Out34: ['/Mixer/MatrixMixerMono', 9, 2],
350                 self.sldPC56Out56: ['/Mixer/MatrixMixerMono', 9, 3],
351                 self.sldPC56Out78: ['/Mixer/MatrixMixerMono', 9, 4],
352                 self.sldPC78Out910: ['/Mixer/MatrixMixerMono', 10, 0],
353                 self.sldPC78Out12: ['/Mixer/MatrixMixerMono', 10, 1],
354                 self.sldPC78Out34: ['/Mixer/MatrixMixerMono', 10, 2],
355                 self.sldPC78Out56: ['/Mixer/MatrixMixerMono', 10, 3],
356                 self.sldPC78Out78: ['/Mixer/MatrixMixerMono', 10, 4],
357
358
359                 }
360
361
362         # First column is the DBUS subpath of the control.
363         # Second column is a list of linked controls that should
364         # be rewritten whenever this control is updated
365         self.SelectorControls={
366                 self.chkSpdifSwitch:    ['/Mixer/SpdifSwitch'],
367                 self.chkOut12Mute:      ['/Mixer/Out12Mute', [self.chkOut12HwCtrl]],
368                 self.chkOut12HwCtrl:    ['/Mixer/Out12HwCtrl'],
369                 self.chkOut12Dim:       ['/Mixer/Out12Dim'],
370                 self.chkOut34Mute:      ['/Mixer/Out34Mute', [self.chkOut34HwCtrl]],
371                 self.chkOut34HwCtrl:    ['/Mixer/Out34HwCtrl'],
372                 self.chkOut56Mute:      ['/Mixer/Out56Mute', [self.chkOut56HwCtrl]],
373                 self.chkOut56HwCtrl:    ['/Mixer/Out56HwCtrl'],
374                 self.chkOut78Mute:      ['/Mixer/Out78Mute', [self.chkOut78HwCtrl]],
375                 self.chkOut78HwCtrl:    ['/Mixer/Out78HwCtrl'],
376                 self.chkOut910Mute:     ['/Mixer/Out910Mute'],
377                 }
378
379         self.VolumeControlsLowRes={
380                 self.sldOut12Level:      ['/Mixer/Out12Level'],
381                 self.sldOut34Level:      ['/Mixer/Out34Level'],
382                 self.sldOut56Level:      ['/Mixer/Out56Level'],
383                 self.sldOut78Level:      ['/Mixer/Out78Level'],
384                 }
385
386         self.TriggerButtonControls={
387                 self.btnSaveSettings:      ['/Mixer/SaveSettings'],
388         }
389
390         self.TextControls={
391         }
392
393         self.saveTextControls={
394         }
395
396         self.ComboControls={
397         }
398
399     def polledUpdate(self):
400         self.polledUpdateHwCtrl(self.chkOut12HwCtrl, self.sldOut12Level)
401         self.polledUpdateHwCtrl(self.chkOut34HwCtrl, self.sldOut34Level)
402         self.polledUpdateHwCtrl(self.chkOut56HwCtrl, self.sldOut56Level)
403         self.polledUpdateHwCtrl(self.chkOut78HwCtrl, self.sldOut78Level)
404
405     def polledUpdateHwCtrl(self, selector, volctrl):
406         state = selector.isChecked()
407         if state:
408             self.polledUpdateVolumeLowRes('/Mixer/MonitorDial', volctrl)
409             volctrl.setEnabled(False)
410         else:
411             volctrl.setEnabled(True)
412
413     def updateMatrixVolume(self,a0):
414         SaffireMixerBase.updateMatrixVolume(self,a0)
415     def updateLowResVolume(self,a0):
416         SaffireMixerBase.updateLowResVolume(self,a0)
417     def updateSelector(self,a0):
418         SaffireMixerBase.updateSelector(self,a0)
419     def triggerButton(self):
420         SaffireMixerBase.triggerButton(self)
421     def saveText(self):
422         SaffireMixerBase.saveText(self)
423     def initCombo(self, combo):
424         SaffireMixerBase.initCombo(self,combo)
425     def selectCombo(self, mode):
426         SaffireMixerBase.selectCombo(self,mode)
427
428     def updateValues(self):
429         SaffireMixerBase.updateValues(self)
430
431     def switchStereoMode(self):
432         log.debug("should switch to stereo mode")
433         self.my_parent.setMonoMode(0)
434         self.my_parent.selectCorrectMode()
435
436 class SaffireLEMixerLarge(QWidget, Ui_SaffireLEMixerLargeUI, SaffireMixerBase):
437     def __init__(self,parent = None):
438         self.my_parent = parent
439         QWidget.__init__(self,parent)
440         self.setupUi(self)
441         SaffireMixerBase.__init__(self)
442
443         log.debug("Init large Saffire LE mixer window")
444
445         self.VolumeControls={
446                 self.sldIN1Out1: ['/Mixer/LEMix48', 0, 0],
447                 self.sldIN1Out2: ['/Mixer/LEMix48', 0, 1],
448                 self.sldIN1Out3: ['/Mixer/LEMix48', 0, 2],
449                 self.sldIN1Out4: ['/Mixer/LEMix48', 0, 3],
450                 self.sldIN2Out1: ['/Mixer/LEMix48', 1, 0],
451                 self.sldIN2Out2: ['/Mixer/LEMix48', 1, 1],
452                 self.sldIN2Out3: ['/Mixer/LEMix48', 1, 2],
453                 self.sldIN2Out4: ['/Mixer/LEMix48', 1, 3],
454                 self.sldIN3Out1: ['/Mixer/LEMix48', 2, 0],
455                 self.sldIN3Out2: ['/Mixer/LEMix48', 2, 1],
456                 self.sldIN3Out3: ['/Mixer/LEMix48', 2, 2],
457                 self.sldIN3Out4: ['/Mixer/LEMix48', 2, 3],
458                 self.sldIN4Out1: ['/Mixer/LEMix48', 3, 0],
459                 self.sldIN4Out2: ['/Mixer/LEMix48', 3, 1],
460                 self.sldIN4Out3: ['/Mixer/LEMix48', 3, 2],
461                 self.sldIN4Out4: ['/Mixer/LEMix48', 3, 3],
462                 self.sldSPDIF1Out1: ['/Mixer/LEMix48', 4, 0],
463                 self.sldSPDIF1Out2: ['/Mixer/LEMix48', 4, 1],
464                 self.sldSPDIF1Out3: ['/Mixer/LEMix48', 4, 2],
465                 self.sldSPDIF1Out4: ['/Mixer/LEMix48', 4, 3],
466                 self.sldSPDIF2Out1: ['/Mixer/LEMix48', 5, 0],
467                 self.sldSPDIF2Out2: ['/Mixer/LEMix48', 5, 1],
468                 self.sldSPDIF2Out3: ['/Mixer/LEMix48', 5, 2],
469                 self.sldSPDIF2Out4: ['/Mixer/LEMix48', 5, 3],
470                
471                 self.sldPC1Out1: ['/Mixer/LEMix48', 6, 0],
472                 self.sldPC1Out2: ['/Mixer/LEMix48', 6, 1],
473                 self.sldPC1Out3: ['/Mixer/LEMix48', 6, 2],
474                 self.sldPC1Out4: ['/Mixer/LEMix48', 6, 3],
475                 self.sldPC2Out1: ['/Mixer/LEMix48', 7, 0],
476                 self.sldPC2Out2: ['/Mixer/LEMix48', 7, 1],
477                 self.sldPC2Out3: ['/Mixer/LEMix48', 7, 2],
478                 self.sldPC2Out4: ['/Mixer/LEMix48', 7, 3],
479                 self.sldPC3Out1: ['/Mixer/LEMix48', 8, 0],
480                 self.sldPC3Out2: ['/Mixer/LEMix48', 8, 1],
481                 self.sldPC3Out3: ['/Mixer/LEMix48', 8, 2],
482                 self.sldPC3Out4: ['/Mixer/LEMix48', 8, 3],
483                 self.sldPC4Out1: ['/Mixer/LEMix48', 9, 0],
484                 self.sldPC4Out2: ['/Mixer/LEMix48', 9, 1],
485                 self.sldPC4Out3: ['/Mixer/LEMix48', 9, 2],
486                 self.sldPC4Out4: ['/Mixer/LEMix48', 9, 3],
487                 self.sldPC5Out1: ['/Mixer/LEMix48', 10, 0],
488                 self.sldPC5Out2: ['/Mixer/LEMix48', 10, 1],
489                 self.sldPC5Out3: ['/Mixer/LEMix48', 10, 2],
490                 self.sldPC5Out4: ['/Mixer/LEMix48', 10, 3],
491                 self.sldPC6Out1: ['/Mixer/LEMix48', 11, 0],
492                 self.sldPC6Out2: ['/Mixer/LEMix48', 11, 1],
493                 self.sldPC6Out3: ['/Mixer/LEMix48', 11, 2],
494                 self.sldPC6Out4: ['/Mixer/LEMix48', 11, 3],
495                 self.sldPC7Out1: ['/Mixer/LEMix48', 12, 0],
496                 self.sldPC7Out2: ['/Mixer/LEMix48', 12, 1],
497                 self.sldPC7Out3: ['/Mixer/LEMix48', 12, 2],
498                 self.sldPC7Out4: ['/Mixer/LEMix48', 12, 3],
499                 self.sldPC8Out1: ['/Mixer/LEMix48', 13, 0],
500                 self.sldPC8Out2: ['/Mixer/LEMix48', 13, 1],
501                 self.sldPC8Out3: ['/Mixer/LEMix48', 13, 2],
502                 self.sldPC8Out4: ['/Mixer/LEMix48', 13, 3],
503                 }
504
505         self.SelectorControls={
506                 self.chkOut12Mute:          ['/Mixer/Out12Mute'],
507                 self.chkOut12HwCtrl:        ['/Mixer/Out12HwCtrl'],
508                 self.chkOut34Mute:          ['/Mixer/Out34Mute'],
509                 self.chkOut34HwCtrl:        ['/Mixer/Out34HwCtrl'],
510                 self.chkOut56Mute:          ['/Mixer/Out56Mute'],
511                 self.chkOut56HwCtrl:        ['/Mixer/Out56HwCtrl'],
512                 self.chkSPDIFTransparent:   ['/Mixer/SpdifTransparent'],
513                 self.chkMIDITru:            ['/Mixer/MidiThru'],
514                 self.chkHighGain3:          ['/Mixer/HighGainLine3'],
515                 self.chkHighGain4:          ['/Mixer/HighGainLine4'],
516                 }
517
518         self.VolumeControlsLowRes={
519                 self.sldOut12Level:      ['/Mixer/Out12Level'],
520                 self.sldOut34Level:      ['/Mixer/Out34Level'],
521                 self.sldOut56Level:      ['/Mixer/Out56Level'],
522                 }
523
524         self.TriggerButtonControls={
525             self.btnSaveSettings:        ['/Mixer/SaveSettings'],
526         }
527
528         self.TextControls={
529         }
530
531         self.saveTextControls={
532         }
533
534         self.ComboControls={
535         }
536
537     def polledUpdate(self):
538         #fixme do what it takes to make the gui follow the front panel dial
539         pass
540
541     def updateMatrixVolume(self,a0):
542         SaffireMixerBase.updateMatrixVolume(self,a0)
543     def updateLowResVolume(self,a0):
544         SaffireMixerBase.updateLowResVolume(self,a0)
545     def updateSelector(self,a0):
546         SaffireMixerBase.updateSelector(self,a0)
547     def triggerButton(self):
548         SaffireMixerBase.triggerButton(self)
549     def saveText(self):
550         SaffireMixerBase.saveText(self)
551     def initCombo(self, combo):
552         SaffireMixerBase.initCombo(self,combo)
553     def selectCombo(self, mode):
554         SaffireMixerBase.selectCombo(self,mode)
555
556     def updateValues(self):
557         SaffireMixerBase.updateValues(self)
558
559 class SaffireLEMixerSmall(QWidget, Ui_SaffireLEMixerSmallUI, SaffireMixerBase):
560     def __init__(self,parent = None):
561         self.my_parent = parent
562         QWidget.__init__(self,parent)
563         self.setupUi(self)
564         SaffireMixerBase.__init__(self)
565
566         log.debug("Init small Saffire LE mixer window")
567
568         self.VolumeControls={
569                 self.sldIN1RecMix:    ['/Mixer/LEMix96', 0, 4],
570                 self.sldIN2RecMix:    ['/Mixer/LEMix96', 1, 4],
571                 self.sldIN3RecMix:    ['/Mixer/LEMix96', 2, 4],
572                 self.sldIN4RecMix:    ['/Mixer/LEMix96', 3, 4],
573                 self.sldSPDIF1RecMix: ['/Mixer/LEMix96', 4, 4],
574                 self.sldSPDIF2RecMix: ['/Mixer/LEMix96', 5, 4],
575
576                 self.sldPC1Out1: ['/Mixer/LEMix96', 6, 0],
577                 self.sldPC1Out2: ['/Mixer/LEMix96', 6, 1],
578                 self.sldPC1Out3: ['/Mixer/LEMix96', 6, 2],
579                 self.sldPC1Out4: ['/Mixer/LEMix96', 6, 3],
580                 self.sldPC2Out1: ['/Mixer/LEMix96', 7, 0],
581                 self.sldPC2Out2: ['/Mixer/LEMix96', 7, 1],
582                 self.sldPC2Out3: ['/Mixer/LEMix96', 7, 2],
583                 self.sldPC2Out4: ['/Mixer/LEMix96', 7, 3],
584                 }
585
586         self.SelectorControls={
587                 self.chkOut12Mute:          ['/Mixer/Out12Mute'],
588                 self.chkOut12HwCtrl:        ['/Mixer/Out12HwCtrl'],
589                 self.chkOut34Mute:          ['/Mixer/Out34Mute'],
590                 self.chkOut34HwCtrl:        ['/Mixer/Out34HwCtrl'],
591                 self.chkOut56Mute:          ['/Mixer/Out56Mute'],
592                 self.chkOut56HwCtrl:        ['/Mixer/Out56HwCtrl'],
593                 self.chkSPDIFTransparent:   ['/Mixer/SpdifTransparent'],
594                 self.chkMIDITru:            ['/Mixer/MidiThru'],
595                 self.chkHighGain3:          ['/Mixer/HighGainLine3'],
596                 self.chkHighGain4:          ['/Mixer/HighGainLine4'],
597                 }
598
599         self.VolumeControlsLowRes={
600                 self.sldOut12Level:      ['/Mixer/Out12Level'],
601                 self.sldOut34Level:      ['/Mixer/Out34Level'],
602                 self.sldOut56Level:      ['/Mixer/Out56Level'],
603                 }
604
605         self.TriggerButtonControls={
606             self.btnSaveSettings:        ['/Mixer/SaveSettings'],
607         }
608
609         self.TextControls={
610         }
611
612         self.saveTextControls={
613         }
614
615         self.ComboControls={
616         }
617
618     def polledUpdate(self):
619         #fixme do what it takes to make the gui follow the front panel dial
620         pass
621
622     def updateMatrixVolume(self,a0):
623         SaffireMixerBase.updateMatrixVolume(self,a0)
624     def updateLowResVolume(self,a0):
625         SaffireMixerBase.updateLowResVolume(self,a0)
626     def updateSelector(self,a0):
627         SaffireMixerBase.updateSelector(self,a0)
628     def triggerButton(self):
629         SaffireMixerBase.triggerButton(self)
630     def saveText(self):
631         SaffireMixerBase.saveText(self)
632     def initCombo(self, combo):
633         SaffireMixerBase.initCombo(self,combo)
634     def selectCombo(self, mode):
635         SaffireMixerBase.selectCombo(self,mode)
636
637     def updateValues(self):
638         SaffireMixerBase.updateValues(self)
Note: See TracBrowser for help on using the browser.