root/trunk/libffado/src/bebob/focusrite/focusrite_saffire.h

Revision 742, 5.4 kB (checked in by ppalmers, 13 years ago)

- Remove some obsolete support files and dirs

- Clean up the license statements in the source files. Everything is

GPL version 3 now.

- Add license and copyright notices to scons scripts

- Clean up some other text files

Line 
1 /*
2  * Copyright (C) 2005-2007 by Daniel Wagner
3  * Copyright (C) 2005-2007 by Pieter Palmers
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 3 of the License, or
13  * (at your option) any later version.
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 #ifndef BEBOB_FOCUSRITE_SAFFIRE_DEVICE_H
26 #define BEBOB_FOCUSRITE_SAFFIRE_DEVICE_H
27
28 #include "debugmodule/debugmodule.h"
29 #include "focusrite_generic.h"
30
31 #include "libcontrol/BasicElements.h"
32 #include "libcontrol/MatrixMixer.h"
33
34 // The ID's for the hardware input matrix mixer
35 #define FR_SAFFIRE_CMD_ID_IN1_TO_OUT1       1
36 #define FR_SAFFIRE_CMD_ID_IN1_TO_OUT3       2
37 #define FR_SAFFIRE_CMD_ID_IN1_TO_OUT5       3
38 #define FR_SAFFIRE_CMD_ID_IN1_TO_OUT7       4
39 #define FR_SAFFIRE_CMD_ID_IN1_TO_OUT9       0
40 #define FR_SAFFIRE_CMD_ID_IN2_TO_OUT2       16
41 #define FR_SAFFIRE_CMD_ID_IN2_TO_OUT4       17
42 #define FR_SAFFIRE_CMD_ID_IN2_TO_OUT6       18
43 #define FR_SAFFIRE_CMD_ID_IN2_TO_OUT8       19
44 #define FR_SAFFIRE_CMD_ID_IN2_TO_OUT10      15
45 #define FR_SAFFIRE_CMD_ID_IN3_TO_OUT1       6
46 #define FR_SAFFIRE_CMD_ID_IN3_TO_OUT3       7
47 #define FR_SAFFIRE_CMD_ID_IN3_TO_OUT5       8
48 #define FR_SAFFIRE_CMD_ID_IN3_TO_OUT7       9
49 #define FR_SAFFIRE_CMD_ID_IN3_TO_OUT9       5
50 #define FR_SAFFIRE_CMD_ID_IN4_TO_OUT2       21
51 #define FR_SAFFIRE_CMD_ID_IN4_TO_OUT4       22
52 #define FR_SAFFIRE_CMD_ID_IN4_TO_OUT6       23
53 #define FR_SAFFIRE_CMD_ID_IN4_TO_OUT8       24
54 #define FR_SAFFIRE_CMD_ID_IN4_TO_OUT10      20
55
56 // reverb return id's (part of hardware input mixer)
57 #define FR_SAFFIRE_CMD_ID_REV1_TO_OUT1       11
58 #define FR_SAFFIRE_CMD_ID_REV2_TO_OUT2       26
59 #define FR_SAFFIRE_CMD_ID_REV1_TO_OUT3       12
60 #define FR_SAFFIRE_CMD_ID_REV2_TO_OUT4       27
61 #define FR_SAFFIRE_CMD_ID_REV1_TO_OUT5       13
62 #define FR_SAFFIRE_CMD_ID_REV2_TO_OUT6       28
63 #define FR_SAFFIRE_CMD_ID_REV1_TO_OUT7       14
64 #define FR_SAFFIRE_CMD_ID_REV2_TO_OUT8       29
65 #define FR_SAFFIRE_CMD_ID_REV1_TO_OUT9       10
66 #define FR_SAFFIRE_CMD_ID_REV2_TO_OUT10      25
67
68 // The ID's for the playback matrix mixer
69 #define FR_SAFFIRE_CMD_ID_PC12_TO_OUT12     36
70 #define FR_SAFFIRE_CMD_ID_PC12_TO_OUT34     37
71 #define FR_SAFFIRE_CMD_ID_PC12_TO_OUT56     38
72 #define FR_SAFFIRE_CMD_ID_PC12_TO_OUT79     39
73 #define FR_SAFFIRE_CMD_ID_PC12_TO_OUT910    35
74 #define FR_SAFFIRE_CMD_ID_PC34_TO_OUT12     41
75 #define FR_SAFFIRE_CMD_ID_PC34_TO_OUT34     42
76 #define FR_SAFFIRE_CMD_ID_PC34_TO_OUT56     43
77 #define FR_SAFFIRE_CMD_ID_PC34_TO_OUT79     44
78 #define FR_SAFFIRE_CMD_ID_PC34_TO_OUT910    40
79 #define FR_SAFFIRE_CMD_ID_PC56_TO_OUT12     46
80 #define FR_SAFFIRE_CMD_ID_PC56_TO_OUT34     47
81 #define FR_SAFFIRE_CMD_ID_PC56_TO_OUT56     48
82 #define FR_SAFFIRE_CMD_ID_PC56_TO_OUT79     49
83 #define FR_SAFFIRE_CMD_ID_PC56_TO_OUT910    45
84 #define FR_SAFFIRE_CMD_ID_PC78_TO_OUT12     51
85 #define FR_SAFFIRE_CMD_ID_PC78_TO_OUT34     52
86 #define FR_SAFFIRE_CMD_ID_PC78_TO_OUT56     53
87 #define FR_SAFFIRE_CMD_ID_PC78_TO_OUT79     54
88 #define FR_SAFFIRE_CMD_ID_PC78_TO_OUT910    50
89 #define FR_SAFFIRE_CMD_ID_PC910_TO_OUT12    31
90 #define FR_SAFFIRE_CMD_ID_PC910_TO_OUT34    32
91 #define FR_SAFFIRE_CMD_ID_PC910_TO_OUT56    33
92 #define FR_SAFFIRE_CMD_ID_PC910_TO_OUT79    34
93 #define FR_SAFFIRE_CMD_ID_PC910_TO_OUT910   30
94
95 // the control ID's
96 #define FR_SAFFIRE_CMD_ID_BITFIELD_OUT12      55
97 #define FR_SAFFIRE_CMD_ID_BITFIELD_OUT34      56
98 #define FR_SAFFIRE_CMD_ID_BITFIELD_OUT56      57
99 #define FR_SAFFIRE_CMD_ID_BITFIELD_OUT78      58
100 #define FR_SAFFIRE_CMD_ID_BITFIELD_OUT910     59
101
102 #define FR_SAFFIRE_CMD_ID_BITFIELD_BIT_DIM       24
103 #define FR_SAFFIRE_CMD_ID_BITFIELD_BIT_MUTE      25
104 #define FR_SAFFIRE_CMD_ID_BITFIELD_BIT_HWCTRL    26
105
106 // other stuff
107 #define FR_SAFFIRE_CMD_ID_MONITOR_DIAL    61
108 #define FR_SAFFIRE_CMD_ID_SPDIF_SWITCH    62
109
110 #define FR_SAFFIRE_CMD_ID_METERING_IN1      64
111 #define FR_SAFFIRE_CMD_ID_METERING_IN2      65
112 #define FR_SAFFIRE_CMD_ID_METERING_IN3      66
113 #define FR_SAFFIRE_CMD_ID_METERING_IN4      67
114
115 #define FR_SAFFIRE_CMD_ID_SPDIF_DETECT    79
116
117 namespace BeBoB {
118 namespace Focusrite {
119
120 class SaffireDevice;
121
122 class SaffireMatrixMixer : public FocusriteMatrixMixer
123 {
124 public:
125     enum eMatrixMixerType {
126         eMMT_InputMix,
127         eMMT_PCMix
128     };
129    
130 public:
131     SaffireMatrixMixer(SaffireDevice& parent, enum eMatrixMixerType type);
132     SaffireMatrixMixer(SaffireDevice& parent, enum eMatrixMixerType type, std::string n);
133     virtual ~SaffireMatrixMixer() {};
134
135     virtual void show();
136
137 protected:
138     void init();
139     enum eMatrixMixerType m_type;
140 };
141
142 class SaffireDevice : public FocusriteDevice {
143 public:
144     SaffireDevice(std::auto_ptr<ConfigRom>( configRom ));
145     virtual ~SaffireDevice() {};
146
147     virtual void showDevice();
148     virtual void setVerboseLevel(int l);
149
150     virtual bool buildMixer();
151     virtual bool destroyMixer();
152
153 private:
154     Control::Container *m_MixerContainer;
155 };
156
157 } // namespace Focusrite
158 } // namespace BeBoB
159
160 #endif
Note: See TracBrowser for help on using the browser.