root/trunk/libffado/src/motu/motu_mixerdefs.cpp

Revision 1763, 14.1 kB (checked in by ppalmers, 11 years ago)

Merged revisions 1536,1541,1544-1546,1549,1554-1562,1571,1579-1581,1618,1632,1634-1635,1661,1677-1679,1703-1704,1715,1720-1723,1743-1745,1755 via svnmerge from
svn+ssh://ffadosvn@ffado.org/ffado/branches/libffado-2.0

Also fix remaining format string warnings.

Line 
1 /*
2  * Copyright (C) 2005-2008 by Pieter Palmers
3  * Copyright (C) 2005-2009 by Jonathan Woithe
4  *
5  * This file is part of FFADO
6  * FFADO = Free Firewire (pro-)audio drivers for linux
7  *
8  * FFADO is based upon FreeBoB.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 2 of the License, or
13  * (at your option) version 3 of the License.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24
25 /* This module contains definitions of mixers on devices which utilise the
26  * original "pre-Mark3" mixer control protocol.
27  */
28
29 #include "motu/motu_avdevice.h"
30 #include "motu/motu_mixerdefs.h"
31
32 namespace Motu {
33
34 // Mixer registers
35 const MatrixMixBus MixerBuses_Traveler[] = {
36     {"Mix 1", 0x4000, },
37     {"Mix 2", 0x4100, },
38     {"Mix 3", 0x4200, },
39     {"Mix 4", 0x4300, },
40 };
41
42 const MatrixMixChannel MixerChannels_Traveler[] = {
43     {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, },
44     {"Analog 2", MOTU_CTRL_STD_CHANNEL, 0x0004, },
45     {"Analog 3", MOTU_CTRL_STD_CHANNEL, 0x0008, },
46     {"Analog 4", MOTU_CTRL_STD_CHANNEL, 0x000c, },
47     {"Analog 5", MOTU_CTRL_STD_CHANNEL, 0x0010, },
48     {"Analog 6", MOTU_CTRL_STD_CHANNEL, 0x0014, },
49     {"Analog 7", MOTU_CTRL_STD_CHANNEL, 0x0018, },
50     {"Analog 8", MOTU_CTRL_STD_CHANNEL, 0x001c, },
51     {"AES/EBU 1", MOTU_CTRL_STD_CHANNEL, 0x0020, },
52     {"AES/EBU 2", MOTU_CTRL_STD_CHANNEL, 0x0024, },
53     {"SPDIF 1", MOTU_CTRL_STD_CHANNEL, 0x0028, },
54     {"SPDIF 2", MOTU_CTRL_STD_CHANNEL, 0x002c, },
55     {"ADAT 1", MOTU_CTRL_STD_CHANNEL, 0x0030, },
56     {"ADAT 2", MOTU_CTRL_STD_CHANNEL, 0x0034, },
57     {"ADAT 3", MOTU_CTRL_STD_CHANNEL, 0x0038, },
58     {"ADAT 4", MOTU_CTRL_STD_CHANNEL, 0x003c, },
59     {"ADAT 5", MOTU_CTRL_STD_CHANNEL, 0x0040, },
60     {"ADAT 6", MOTU_CTRL_STD_CHANNEL, 0x0044, },
61     {"ADAT 7", MOTU_CTRL_STD_CHANNEL, 0x0048, },
62     {"ADAT 8", MOTU_CTRL_STD_CHANNEL, 0x004c, },
63 };
64
65 const MixerCtrl MixerCtrls_Traveler[] = {
66     {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, },
67     {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, },
68     {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, },
69     {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, },
70     {"Mainout_",  "MainOut ", "", MOTU_CTRL_MIX_FADER, 0x0c0c, },
71     {"Phones_",   "Phones ",  "", MOTU_CTRL_MIX_FADER, 0x0c10, },
72
73     /* For mic/line input controls, the "register" is the zero-based channel number */
74     {"Control/Ana1_", "Analog 1 input ", "", MOTU_CTRL_TRAVELER_MIC_INPUT_CTRLS, 0},
75     {"Control/Ana2_", "Analog 2 input ", "", MOTU_CTRL_TRAVELER_MIC_INPUT_CTRLS, 1},
76     {"Control/Ana3_", "Analog 3 input ", "", MOTU_CTRL_TRAVELER_MIC_INPUT_CTRLS, 2},
77     {"Control/Ana4_", "Analog 4 input ", "", MOTU_CTRL_TRAVELER_MIC_INPUT_CTRLS, 3},
78     {"Control/Ana5_", "Analog 5 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 4},
79     {"Control/Ana6_", "Analog 6 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 5},
80     {"Control/Ana7_", "Analog 7 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 6},
81     {"Control/Ana8_", "Analog 8 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 7},
82
83     /* For phones source control, "register" is currently unused */
84     {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0},
85
86     /* For optical mode controls, the "register" is used to indicate direction */
87     {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_IN},
88     {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_OUT},
89 };
90
91 const MatrixMixBus MixerBuses_Ultralite[] = {
92     {"Mix 1", 0x4000, },
93     {"Mix 2", 0x4100, },
94     {"Mix 3", 0x4200, },
95     {"Mix 4", 0x4300, },
96 };
97
98 const MatrixMixChannel MixerChannels_Ultralite[] = {
99     {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, },
100     {"Analog 2", MOTU_CTRL_STD_CHANNEL, 0x0004, },
101     {"Analog 3", MOTU_CTRL_STD_CHANNEL, 0x0008, },
102     {"Analog 4", MOTU_CTRL_STD_CHANNEL, 0x000c, },
103     {"Analog 5", MOTU_CTRL_STD_CHANNEL, 0x0010, },
104     {"Analog 6", MOTU_CTRL_STD_CHANNEL, 0x0014, },
105     {"Analog 7", MOTU_CTRL_STD_CHANNEL, 0x0018, },
106     {"Analog 8", MOTU_CTRL_STD_CHANNEL, 0x001c, },
107     {"AES/EBU 1", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
108     {"AES/EBU 2", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
109     {"SPDIF 1", MOTU_CTRL_STD_CHANNEL, 0x0020, },
110     {"SPDIF 2", MOTU_CTRL_STD_CHANNEL, 0x0024, },
111     {"ADAT 1", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
112     {"ADAT 2", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
113     {"ADAT 3", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
114     {"ADAT 4", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
115     {"ADAT 5", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
116     {"ADAT 6", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
117     {"ADAT 7", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
118     {"ADAT 8", MOTU_CTRL_STD_CHANNEL, MOTU_CTRL_NONE, },
119 };
120
121 const MixerCtrl MixerCtrls_Ultralite[] = {
122     {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, },
123     {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, },
124     {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, },
125     {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, },
126     {"Mainout_",  "MainOut ", "", MOTU_CTRL_MIX_FADER, 0x0c0c, },
127     {"Phones_",   "Phones ",  "", MOTU_CTRL_MIX_FADER, 0x0c10, },
128
129     /* For mic/line input controls, the "register" is the zero-based channel number */
130     {"Control/Ana1_", "Analog 1 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 0},
131     {"Control/Ana2_", "Analog 2 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 1},
132     {"Control/Ana3_", "Analog 3 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 2},
133     {"Control/Ana4_", "Analog 4 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 3},
134     {"Control/Ana5_", "Analog 5 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 4},
135     {"Control/Ana6_", "Analog 6 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 5},
136     {"Control/Ana7_", "Analog 7 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 6},
137     {"Control/Ana8_", "Analog 8 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 7},
138     {"Control/Spdif1_", "SPDIF 1 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 6},
139     {"Control/Spdif2_", "SPDIF 2 input ", "", MOTU_CTRL_ULTRALITE_INPUT_CTRLS, 7},
140
141     /* For phones source control, "register" is currently unused */
142     {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0},
143
144     /* For optical mode controls, the "register" is used to indicate direction */
145     {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_IN},
146     {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_OUT},
147 };
148
149 const MatrixMixBus MixerBuses_896HD[] = {
150     {"Mix 1", 0x4000, },
151     {"Mix 2", 0x4100, },
152     {"Mix 3", 0x4200, },
153     {"Mix 4", 0x4300, },
154 };
155
156 const MatrixMixChannel MixerChannels_896HD[] = {
157     {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, },
158     {"Analog 2", MOTU_CTRL_STD_CHANNEL, 0x0004, },
159     {"Analog 3", MOTU_CTRL_STD_CHANNEL, 0x0008, },
160     {"Analog 4", MOTU_CTRL_STD_CHANNEL, 0x000c, },
161     {"Analog 5", MOTU_CTRL_STD_CHANNEL, 0x0010, },
162     {"Analog 6", MOTU_CTRL_STD_CHANNEL, 0x0014, },
163     {"Analog 7", MOTU_CTRL_STD_CHANNEL, 0x0018, },
164     {"Analog 8", MOTU_CTRL_STD_CHANNEL, 0x001c, },
165     {"AES/EBU 1", MOTU_CTRL_STD_CHANNEL, 0x0020, },
166     {"AES/EBU 2", MOTU_CTRL_STD_CHANNEL, 0x0024, },
167     {"SPDIF 1", MOTU_CTRL_STD_CHANNEL, 0x0048, },
168     {"SPDIF 2", MOTU_CTRL_STD_CHANNEL, 0x004c, },
169     {"ADAT 1", MOTU_CTRL_STD_CHANNEL, 0x0028, },
170     {"ADAT 2", MOTU_CTRL_STD_CHANNEL, 0x002c, },
171     {"ADAT 3", MOTU_CTRL_STD_CHANNEL, 0x0030, },
172     {"ADAT 4", MOTU_CTRL_STD_CHANNEL, 0x0034, },
173     {"ADAT 5", MOTU_CTRL_STD_CHANNEL, 0x0038, },
174     {"ADAT 6", MOTU_CTRL_STD_CHANNEL, 0x003c, },
175     {"ADAT 7", MOTU_CTRL_STD_CHANNEL, 0x0040, },
176     {"ADAT 8", MOTU_CTRL_STD_CHANNEL, 0x0044, },
177 };
178
179 const MixerCtrl MixerCtrls_896HD[] = {
180     {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, },
181     {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, },
182     {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, },
183     {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, },
184     {"Mainout_",  "MainOut ", "", MOTU_CTRL_MIX_FADER, 0x0c0c, },
185     {"Phones_",   "Phones ",  "", MOTU_CTRL_MIX_FADER, 0x0c10, },
186
187     /* For phones source control, "register" is currently unused */
188     {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0},
189
190     /* For optical mode controls, the "register" is used to indicate direction */
191     {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_IN},
192     {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_OUT},
193
194     /* For meter controls the "register" indicates which meter controls are available */
195     {"Control/Meter_", "Meter ", "", MOTU_CTRL_METER,
196       MOTU_CTRL_METER_PEAKHOLD | MOTU_CTRL_METER_CLIPHOLD | MOTU_CTRL_METER_AESEBU_SRC |
197       MOTU_CTRL_METER_PROG_SRC},
198 };
199
200 const MatrixMixBus MixerBuses_828Mk2[] = {
201     {"Mix 1", 0x4000, },
202     {"Mix 2", 0x4100, },
203     {"Mix 3", 0x4200, },
204     {"Mix 4", 0x4300, },
205 };
206
207 const MatrixMixChannel MixerChannels_828Mk2[] = {
208     {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, },
209     {"Analog 2", MOTU_CTRL_STD_CHANNEL, 0x0004, },
210     {"Analog 3", MOTU_CTRL_STD_CHANNEL, 0x0008, },
211     {"Analog 4", MOTU_CTRL_STD_CHANNEL, 0x000c, },
212     {"Analog 5", MOTU_CTRL_STD_CHANNEL, 0x0010, },
213     {"Analog 6", MOTU_CTRL_STD_CHANNEL, 0x0014, },
214     {"Analog 7", MOTU_CTRL_STD_CHANNEL, 0x0018, },
215     {"Analog 8", MOTU_CTRL_STD_CHANNEL, 0x001c, },
216     {"Mic 1", MOTU_CTRL_STD_CHANNEL, 0x0020, },
217     {"Mic 2", MOTU_CTRL_STD_CHANNEL, 0x0024, },
218     {"SPDIF 1", MOTU_CTRL_STD_CHANNEL, 0x0028, },
219     {"SPDIF 2", MOTU_CTRL_STD_CHANNEL, 0x002c, },
220     {"ADAT 1", MOTU_CTRL_STD_CHANNEL, 0x0030, },
221     {"ADAT 2", MOTU_CTRL_STD_CHANNEL, 0x0034, },
222     {"ADAT 3", MOTU_CTRL_STD_CHANNEL, 0x0038, },
223     {"ADAT 4", MOTU_CTRL_STD_CHANNEL, 0x003c, },
224     {"ADAT 5", MOTU_CTRL_STD_CHANNEL, 0x0040, },
225     {"ADAT 6", MOTU_CTRL_STD_CHANNEL, 0x0044, },
226     {"ADAT 7", MOTU_CTRL_STD_CHANNEL, 0x0048, },
227     {"ADAT 8", MOTU_CTRL_STD_CHANNEL, 0x004c, },
228 };
229
230 const MixerCtrl MixerCtrls_828Mk2[] = {
231     {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, },
232     {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, },
233     {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, },
234     {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, },
235     {"Mainout_",  "MainOut ", "", MOTU_CTRL_MIX_FADER, 0x0c0c, },
236     {"Phones_",   "Phones ",  "", MOTU_CTRL_MIX_FADER, 0x0c10, },
237
238     /* For mic/line input controls, the "register" is the zero-based channel number */
239     {"Control/Ana1_", "Analog 1 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 0},
240     {"Control/Ana2_", "Analog 2 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 1},
241     {"Control/Ana3_", "Analog 3 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 2},
242     {"Control/Ana4_", "Analog 4 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 3},
243     {"Control/Ana5_", "Analog 5 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 4},
244     {"Control/Ana6_", "Analog 6 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 5},
245     {"Control/Ana7_", "Analog 7 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 6},
246     {"Control/Ana8_", "Analog 8 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 7},
247
248     /* For phones source control, "register" is currently unused */
249     {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0},
250
251     /* For optical mode controls, the "register" is used to indicate direction */
252     {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_IN},
253     {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_OUT},
254 };
255
256 const MatrixMixBus MixerBuses_8pre[] = {
257     {"Mix 1", 0x4000, },
258     {"Mix 2", 0x4100, },
259     {"Mix 3", 0x4200, },
260     {"Mix 4", 0x4300, },
261 };
262
263 const MatrixMixChannel MixerChannels_8pre[] = {
264     {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, },
265     {"Analog 2", MOTU_CTRL_STD_CHANNEL, 0x0004, },
266     {"Analog 3", MOTU_CTRL_STD_CHANNEL, 0x0008, },
267     {"Analog 4", MOTU_CTRL_STD_CHANNEL, 0x000c, },
268     {"Analog 5", MOTU_CTRL_STD_CHANNEL, 0x0010, },
269     {"Analog 6", MOTU_CTRL_STD_CHANNEL, 0x0014, },
270     {"Analog 7", MOTU_CTRL_STD_CHANNEL, 0x0018, },
271     {"Analog 8", MOTU_CTRL_STD_CHANNEL, 0x001c, },
272     {"ADAT 1", MOTU_CTRL_STD_CHANNEL, 0x0020, },
273     {"ADAT 2", MOTU_CTRL_STD_CHANNEL, 0x0024, },
274     {"ADAT 3", MOTU_CTRL_STD_CHANNEL, 0x0028, },
275     {"ADAT 4", MOTU_CTRL_STD_CHANNEL, 0x002c, },
276     {"ADAT 5", MOTU_CTRL_STD_CHANNEL, 0x0030, },
277     {"ADAT 6", MOTU_CTRL_STD_CHANNEL, 0x0034, },
278     {"ADAT 7", MOTU_CTRL_STD_CHANNEL, 0x0038, },
279     {"ADAT 8", MOTU_CTRL_STD_CHANNEL, 0x003c, },
280 };
281
282 const MixerCtrl MixerCtrls_8pre[] = {
283     {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, },
284     {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, },
285     {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, },
286     {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, },
287
288     /* For phones source control, "register" is currently unused */
289     {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0},
290
291     /* For optical mode controls, the "register" is used to indicate direction */
292     {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_IN},
293     {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_CTRL_DIR_OUT},
294 };
295
296 const MotuMixer Mixer_Traveler = MOTUMIXER(
297     MixerCtrls_Traveler, MixerBuses_Traveler, MixerChannels_Traveler);
298
299 const MotuMixer Mixer_Ultralite = MOTUMIXER(
300     MixerCtrls_Ultralite, MixerBuses_Ultralite, MixerChannels_Ultralite);
301
302 const MotuMixer Mixer_828Mk2 = MOTUMIXER(
303     MixerCtrls_828Mk2, MixerBuses_828Mk2, MixerChannels_828Mk2);
304
305 const MotuMixer Mixer_896HD = MOTUMIXER(
306     MixerCtrls_896HD, MixerBuses_896HD, MixerChannels_896HD);
307
308 const MotuMixer Mixer_8pre = MOTUMIXER(
309     MixerCtrls_8pre, MixerBuses_8pre, MixerChannels_8pre);
310
311 }
Note: See TracBrowser for help on using the browser.