root/branches/libffado-2.0/support/mixer/mixer_saffirele.py

Revision 1216, 9.4 kB (checked in by ppalmers, 13 years ago)

add support for the different mixers at different samplerates or configurations for the saffires

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 qt import *
24 from mixer_saffire_base import SaffireMixerBase
25 from mixer_saffirelelargeui import SaffireLEMixerLargeUI
26 from mixer_saffirelesmallui import SaffireLEMixerSmallUI
27
28 class SaffireLEMixerLarge(SaffireLEMixerLargeUI, SaffireMixerBase):
29     def __init__(self,parent = None,name = None,fl = 0):
30         SaffireLEMixerLargeUI.__init__(self,parent,name,fl)
31         SaffireMixerBase.__init__(self)
32
33     def init(self):
34         print "Init large Saffire LE mixer window"
35
36         self.VolumeControls={
37                 self.sldIN1Out1: ['/Mixer/LEMix48', 0, 0],
38                 self.sldIN1Out2: ['/Mixer/LEMix48', 0, 1],
39                 self.sldIN1Out3: ['/Mixer/LEMix48', 0, 2],
40                 self.sldIN1Out4: ['/Mixer/LEMix48', 0, 3],
41                 self.sldIN2Out1: ['/Mixer/LEMix48', 1, 0],
42                 self.sldIN2Out2: ['/Mixer/LEMix48', 1, 1],
43                 self.sldIN2Out3: ['/Mixer/LEMix48', 1, 2],
44                 self.sldIN2Out4: ['/Mixer/LEMix48', 1, 3],
45                 self.sldIN3Out1: ['/Mixer/LEMix48', 2, 0],
46                 self.sldIN3Out2: ['/Mixer/LEMix48', 2, 1],
47                 self.sldIN3Out3: ['/Mixer/LEMix48', 2, 2],
48                 self.sldIN3Out4: ['/Mixer/LEMix48', 2, 3],
49                 self.sldIN4Out1: ['/Mixer/LEMix48', 3, 0],
50                 self.sldIN4Out2: ['/Mixer/LEMix48', 3, 1],
51                 self.sldIN4Out3: ['/Mixer/LEMix48', 3, 2],
52                 self.sldIN4Out4: ['/Mixer/LEMix48', 3, 3],
53                 self.sldSPDIF1Out1: ['/Mixer/LEMix48', 4, 0],
54                 self.sldSPDIF1Out2: ['/Mixer/LEMix48', 4, 1],
55                 self.sldSPDIF1Out3: ['/Mixer/LEMix48', 4, 2],
56                 self.sldSPDIF1Out4: ['/Mixer/LEMix48', 4, 3],
57                 self.sldSPDIF2Out1: ['/Mixer/LEMix48', 5, 0],
58                 self.sldSPDIF2Out2: ['/Mixer/LEMix48', 5, 1],
59                 self.sldSPDIF2Out3: ['/Mixer/LEMix48', 5, 2],
60                 self.sldSPDIF2Out4: ['/Mixer/LEMix48', 5, 3],
61                
62                 self.sldPC1Out1: ['/Mixer/LEMix48', 6, 0],
63                 self.sldPC1Out2: ['/Mixer/LEMix48', 6, 1],
64                 self.sldPC1Out3: ['/Mixer/LEMix48', 6, 2],
65                 self.sldPC1Out4: ['/Mixer/LEMix48', 6, 3],
66                 self.sldPC2Out1: ['/Mixer/LEMix48', 7, 0],
67                 self.sldPC2Out2: ['/Mixer/LEMix48', 7, 1],
68                 self.sldPC2Out3: ['/Mixer/LEMix48', 7, 2],
69                 self.sldPC2Out4: ['/Mixer/LEMix48', 7, 3],
70                 self.sldPC3Out1: ['/Mixer/LEMix48', 8, 0],
71                 self.sldPC3Out2: ['/Mixer/LEMix48', 8, 1],
72                 self.sldPC3Out3: ['/Mixer/LEMix48', 8, 2],
73                 self.sldPC3Out4: ['/Mixer/LEMix48', 8, 3],
74                 self.sldPC4Out1: ['/Mixer/LEMix48', 9, 0],
75                 self.sldPC4Out2: ['/Mixer/LEMix48', 9, 1],
76                 self.sldPC4Out3: ['/Mixer/LEMix48', 9, 2],
77                 self.sldPC4Out4: ['/Mixer/LEMix48', 9, 3],
78                 self.sldPC5Out1: ['/Mixer/LEMix48', 10, 0],
79                 self.sldPC5Out2: ['/Mixer/LEMix48', 10, 1],
80                 self.sldPC5Out3: ['/Mixer/LEMix48', 10, 2],
81                 self.sldPC5Out4: ['/Mixer/LEMix48', 10, 3],
82                 self.sldPC6Out1: ['/Mixer/LEMix48', 11, 0],
83                 self.sldPC6Out2: ['/Mixer/LEMix48', 11, 1],
84                 self.sldPC6Out3: ['/Mixer/LEMix48', 11, 2],
85                 self.sldPC6Out4: ['/Mixer/LEMix48', 11, 3],
86                 self.sldPC7Out1: ['/Mixer/LEMix48', 12, 0],
87                 self.sldPC7Out2: ['/Mixer/LEMix48', 12, 1],
88                 self.sldPC7Out3: ['/Mixer/LEMix48', 12, 2],
89                 self.sldPC7Out4: ['/Mixer/LEMix48', 12, 3],
90                 self.sldPC8Out1: ['/Mixer/LEMix48', 13, 0],
91                 self.sldPC8Out2: ['/Mixer/LEMix48', 13, 1],
92                 self.sldPC8Out3: ['/Mixer/LEMix48', 13, 2],
93                 self.sldPC8Out4: ['/Mixer/LEMix48', 13, 3],
94                 }
95
96         self.SelectorControls={
97                 self.chkOut12Mute:          ['/Mixer/Out12Mute'],
98                 self.chkOut12HwCtrl:        ['/Mixer/Out12HwCtrl'],
99                 self.chkOut34Mute:          ['/Mixer/Out34Mute'],
100                 self.chkOut34HwCtrl:        ['/Mixer/Out34HwCtrl'],
101                 self.chkOut56Mute:          ['/Mixer/Out56Mute'],
102                 self.chkOut56HwCtrl:        ['/Mixer/Out56HwCtrl'],
103                 self.chkSPDIFTransparent:   ['/Mixer/SpdifTransparent'],
104                 self.chkMIDITru:            ['/Mixer/MidiThru'],
105                 self.chkHighGain3:          ['/Mixer/HighGainLine3'],
106                 self.chkHighGain4:          ['/Mixer/HighGainLine4'],
107                 }
108
109         self.VolumeControlsLowRes={
110                 self.sldOut12Level:      ['/Mixer/Out12Level'],
111                 self.sldOut34Level:      ['/Mixer/Out34Level'],
112                 self.sldOut56Level:      ['/Mixer/Out56Level'],
113                 }
114
115         self.TriggerButtonControls={
116             self.btnSaveSettings:        ['/Mixer/SaveSettings'],
117         }
118
119         self.TextControls={
120         }
121
122         self.saveTextControls={
123         }
124
125         self.ComboControls={
126         }
127
128     def updateMatrixVolume(self,a0):
129         SaffireMixerBase.updateMatrixVolume(self,a0)
130     def updateLowResVolume(self,a0):
131         SaffireMixerBase.updateLowResVolume(self,a0)
132     def updateSelector(self,a0):
133         SaffireMixerBase.updateSelector(self,a0)
134     def triggerButton(self):
135         SaffireMixerBase.triggerButton(self)
136     def saveText(self):
137         SaffireMixerBase.saveText(self)
138     def initCombo(self, combo):
139         SaffireMixerBase.initCombo(self,combo)
140     def selectCombo(self, mode):
141         SaffireMixerBase.selectCombo(self,mode)
142
143     def updateValues(self):
144         SaffireMixerBase.updateValues(self)
145
146 class SaffireLEMixerSmall(SaffireLEMixerSmallUI, SaffireMixerBase):
147     def __init__(self,parent = None,name = None,fl = 0):
148         SaffireLEMixerSmallUI.__init__(self,parent,name,fl)
149         SaffireMixerBase.__init__(self)
150
151     def init(self):
152         print "Init small Saffire LE mixer window"
153
154         self.VolumeControls={
155                 self.sldIN1RecMix:    ['/Mixer/LEMix96', 0, 4],
156                 self.sldIN2RecMix:    ['/Mixer/LEMix96', 1, 4],
157                 self.sldIN3RecMix:    ['/Mixer/LEMix96', 2, 4],
158                 self.sldIN4RecMix:    ['/Mixer/LEMix96', 3, 4],
159                 self.sldSPDIF1RecMix: ['/Mixer/LEMix96', 4, 4],
160                 self.sldSPDIF2RecMix: ['/Mixer/LEMix96', 5, 4],
161
162                 self.sldPC1Out1: ['/Mixer/LEMix96', 6, 0],
163                 self.sldPC1Out2: ['/Mixer/LEMix96', 6, 1],
164                 self.sldPC1Out3: ['/Mixer/LEMix96', 6, 2],
165                 self.sldPC1Out4: ['/Mixer/LEMix96', 6, 3],
166                 self.sldPC2Out1: ['/Mixer/LEMix96', 7, 0],
167                 self.sldPC2Out2: ['/Mixer/LEMix96', 7, 1],
168                 self.sldPC2Out3: ['/Mixer/LEMix96', 7, 2],
169                 self.sldPC2Out4: ['/Mixer/LEMix96', 7, 3],
170                 }
171
172         self.SelectorControls={
173                 self.chkOut12Mute:          ['/Mixer/Out12Mute'],
174                 self.chkOut12HwCtrl:        ['/Mixer/Out12HwCtrl'],
175                 self.chkOut34Mute:          ['/Mixer/Out34Mute'],
176                 self.chkOut34HwCtrl:        ['/Mixer/Out34HwCtrl'],
177                 self.chkOut56Mute:          ['/Mixer/Out56Mute'],
178                 self.chkOut56HwCtrl:        ['/Mixer/Out56HwCtrl'],
179                 self.chkSPDIFTransparent:   ['/Mixer/SpdifTransparent'],
180                 self.chkMIDITru:            ['/Mixer/MidiThru'],
181                 self.chkHighGain3:          ['/Mixer/HighGainLine3'],
182                 self.chkHighGain4:          ['/Mixer/HighGainLine4'],
183                 }
184
185         self.VolumeControlsLowRes={
186                 self.sldOut12Level:      ['/Mixer/Out12Level'],
187                 self.sldOut34Level:      ['/Mixer/Out34Level'],
188                 self.sldOut56Level:      ['/Mixer/Out56Level'],
189                 }
190
191         self.TriggerButtonControls={
192             self.btnSaveSettings:        ['/Mixer/SaveSettings'],
193         }
194
195         self.TextControls={
196         }
197
198         self.saveTextControls={
199         }
200
201         self.ComboControls={
202         }
203
204     def updateMatrixVolume(self,a0):
205         SaffireMixerBase.updateMatrixVolume(self,a0)
206     def updateLowResVolume(self,a0):
207         SaffireMixerBase.updateLowResVolume(self,a0)
208     def updateSelector(self,a0):
209         SaffireMixerBase.updateSelector(self,a0)
210     def triggerButton(self):
211         SaffireMixerBase.triggerButton(self)
212     def saveText(self):
213         SaffireMixerBase.saveText(self)
214     def initCombo(self, combo):
215         SaffireMixerBase.initCombo(self,combo)
216     def selectCombo(self, mode):
217         SaffireMixerBase.selectCombo(self,mode)
218
219     def updateValues(self):
220         SaffireMixerBase.updateValues(self)
Note: See TracBrowser for help on using the browser.