Changeset 1794
- Timestamp:
- 01/18/10 13:38:33 (14 years ago)
- Files:
-
- trunk/libffado/src/dice/focusrite/saffire_pro24.cpp (modified) (1 diff)
- trunk/libffado/src/dice/focusrite/saffire_pro40.cpp (modified) (3 diffs)
- trunk/libffado/src/dice/focusrite/saffire_pro40.h (modified) (3 diffs)
- trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py (modified) (1 diff)
- trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/dice/focusrite/saffire_pro24.cpp
r1779 r1794 45 45 46 46 void SaffirePro24::SaffirePro24EAP::setupSources() { 47 addSource("SPDIF", 6, 2, eRS_AES);48 addSource("ADAT", 0, 8, eRS_ADAT);49 addSource("Analog", 0, 4, eRS_InS0);47 addSource("SPDIF", 6, 2, eRS_AES); 48 addSource("ADAT", 0, 8, eRS_ADAT); 49 addSource("Analog", 0, 4, eRS_InS0); 50 50 addSource("Mixer", 0, 16, eRS_Mixer); 51 addSource("1394", 0, 8, eRS_ARX0);52 addSource("Mute", 0, 1, eRS_Muted);51 addSource("1394", 0, 8, eRS_ARX0); 52 addSource("Mute", 0, 1, eRS_Muted); 53 53 } 54 54 void SaffirePro24::SaffirePro24EAP::setupDestinations() { 55 addDestination("SPDIF", 6, 2, eRD_AES);56 addDestination("Analog", 0, 6, eRD_InS0);55 addDestination("SPDIF", 6, 2, eRD_AES); 56 addDestination("Analog", 0, 6, eRD_InS0); 57 57 addDestination("Mixer", 0, 16, eRD_Mixer0); 58 addDestination("Mixer", 0, 2, eRD_Mixer1, 16);58 addDestination("Mixer", 0, 2, eRD_Mixer1, 16); 59 59 addDestination("1394", 0, 16, eRD_ATX0); 60 addDestination("Mute", 0, 1, eRD_Muted);60 addDestination("Mute", 0, 1, eRD_Muted); 61 61 } 62 62 trunk/libffado/src/dice/focusrite/saffire_pro40.cpp
r1766 r1794 29 29 namespace Focusrite { 30 30 31 int SaffirePro40::SaffirePro40EAP::commandToFix(unsigned offset) { 32 if (offset<0x14) return 2; 33 if (offset<0x3C && offset>=0x14) return 1; 34 if (offset<0x5C && offset>=0x54) return 1; 35 if (offset<0x44 && offset>=0x3C) return 3; 36 if (offset == 0x5C) return 4; 37 return 0; 38 } 39 FocusriteEAP::Poti* SaffirePro40::SaffirePro40EAP::getMonitorPoti(std::string name) { 40 return new FocusriteEAP::Poti(this, name, 0x54); 41 } 42 FocusriteEAP::Poti* SaffirePro40::SaffirePro40EAP::getDimPoti(std::string name) { 43 return new FocusriteEAP::Poti(this, name, 0x58); 44 } 45 46 void SaffirePro40::SaffirePro40EAP::setupSources() { 47 addSource("SPDIF", 6, 2, eRS_AES); 48 addSource("ADAT", 0, 8, eRS_ADAT); 49 addSource("Analog", 0, 8, eRS_InS0); 50 addSource("Mixer", 0, 16, eRS_Mixer); 51 addSource("1394", 0, 16, eRS_ARX0); 52 addSource("Mute", 0, 1, eRS_Muted); 53 } 54 void SaffirePro40::SaffirePro40EAP::setupDestinations() { 55 addDestination("SPDIF", 6, 2, eRD_AES); 56 addDestination("ADAT", 0, 8, eRD_ADAT); 57 addDestination("Analog", 0, 8, eRD_InS0); 58 addDestination("Mixer", 0, 16, eRD_Mixer0); 59 addDestination("Mixer", 0, 2, eRD_Mixer1, 16); 60 addDestination("1394", 0, 16, eRD_ATX0); 61 addDestination("Mute", 0, 1, eRD_Muted); 62 } 63 31 64 SaffirePro40::SaffirePro40( DeviceManager& d, 32 65 std::auto_ptr<ConfigRom>( configRom )) … … 39 72 SaffirePro40::~SaffirePro40() 40 73 { 74 getEAP()->storeFlashConfig(); 75 } 76 77 bool SaffirePro40::discover() { 78 if (Dice::Device::discover()) { 79 m_monitor = new FocusriteEAP::MonitorSection(dynamic_cast<FocusriteEAP*>(getEAP()), "Monitoring"); 80 getEAP()->addElement(m_monitor); 81 return true; 82 } 83 return false; 41 84 } 42 85 … … 46 89 debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro40\n"); 47 90 Dice::Device::showDevice(); 91 } 92 93 Dice::EAP* SaffirePro40::createEAP() { 94 return new SaffirePro40EAP(*this); 48 95 } 49 96 trunk/libffado/src/dice/focusrite/saffire_pro40.h
r1729 r1794 29 29 #include "libieee1394/configrom.h" 30 30 31 #include "focusrite_eap.h" 32 31 33 namespace Dice { 32 34 namespace Focusrite { … … 38 40 virtual ~SaffirePro40(); 39 41 42 bool discover(); 43 40 44 virtual void showDevice(); 41 45 … … 45 49 46 50 private: 51 52 class SaffirePro40EAP : public FocusriteEAP 53 { 54 public: 55 SaffirePro40EAP(Dice::Device& dev) : FocusriteEAP(dev) { 56 } 57 58 int commandToFix(unsigned offset); 59 60 Poti* getMonitorPoti(std::string); 61 Poti* getDimPoti(std::string); 62 63 void setupSources(); 64 void setupDestinations(); 65 }; 66 Dice::EAP* createEAP(); 67 68 Dice::Focusrite::FocusriteEAP::MonitorSection *m_monitor; 47 69 }; 48 70 trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py
r1736 r1794 255 255 widget.chkLevel4.setChecked(self.ch4level.selected()) 256 256 self.connect(widget.chkLevel4, QtCore.SIGNAL("toggled(bool)"), self.ch4level.select) 257 widget.chkSpdif.deleteLater() 258 widget.btnPad.deleteLater() 257 259 else: 258 260 widget.chkInst1.deleteLater() trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui
r1736 r1794 30 30 <widget class="QWidget" name="layoutWidget"> 31 31 <layout class="QGridLayout" name="gridLayout"> 32 <item row=" 2" column="0">32 <item row="3" column="0"> 33 33 <widget class="QLabel" name="label"> 34 34 <property name="text"> … … 43 43 </widget> 44 44 </item> 45 <item row=" 2" column="1">45 <item row="3" column="1"> 46 46 <widget class="QSpinBox" name="dimLevel"> 47 47 <property name="sizePolicy"> … … 65 65 </widget> 66 66 </item> 67 <item row="0" column="2" rowspan=" 5">67 <item row="0" column="2" rowspan="6"> 68 68 <widget class="QGroupBox" name="groupBox"> 69 69 <property name="sizePolicy"> … … 118 118 </widget> 119 119 </item> 120 <item row=" 3" column="0" colspan="2">120 <item row="4" column="0" colspan="2"> 121 121 <widget class="QPushButton" name="btnDim"> 122 122 <property name="sizePolicy"> 123 123 <sizepolicy hsizetype="Minimum" vsizetype="Expanding"> 124 124 <horstretch>0</horstretch> 125 <verstretch> 4</verstretch>125 <verstretch>10</verstretch> 126 126 </sizepolicy> 127 127 </property> … … 140 140 </widget> 141 141 </item> 142 <item row=" 4" column="0" colspan="2">142 <item row="5" column="0" colspan="2"> 143 143 <widget class="QPushButton" name="btnMute"> 144 144 <property name="sizePolicy"> 145 145 <sizepolicy hsizetype="Minimum" vsizetype="Expanding"> 146 146 <horstretch>0</horstretch> 147 <verstretch> 4</verstretch>147 <verstretch>10</verstretch> 148 148 </sizepolicy> 149 149 </property> … … 164 164 <item row="0" column="0"> 165 165 <widget class="QCheckBox" name="chkInst1"> 166 <property name="sizePolicy"> 167 <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 168 <horstretch>0</horstretch> 169 <verstretch>0</verstretch> 170 </sizepolicy> 171 </property> 166 172 <property name="text"> 167 173 <string>Ch 1 Instrument</string> … … 171 177 <item row="0" column="1"> 172 178 <widget class="QCheckBox" name="chkLevel3"> 179 <property name="sizePolicy"> 180 <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 181 <horstretch>0</horstretch> 182 <verstretch>0</verstretch> 183 </sizepolicy> 184 </property> 173 185 <property name="text"> 174 186 <string>Ch 3 High Level</string> … … 178 190 <item row="1" column="0"> 179 191 <widget class="QCheckBox" name="chkInst2"> 192 <property name="sizePolicy"> 193 <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 194 <horstretch>0</horstretch> 195 <verstretch>0</verstretch> 196 </sizepolicy> 197 </property> 180 198 <property name="text"> 181 199 <string>Ch 2 Instrument</string> … … 185 203 <item row="1" column="1"> 186 204 <widget class="QCheckBox" name="chkLevel4"> 205 <property name="sizePolicy"> 206 <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 207 <horstretch>0</horstretch> 208 <verstretch>0</verstretch> 209 </sizepolicy> 210 </property> 187 211 <property name="text"> 188 212 <string>Ch 4 High Level</string> 213 </property> 214 </widget> 215 </item> 216 <item row="2" column="0"> 217 <widget class="QCheckBox" name="chkSpdif"> 218 <property name="sizePolicy"> 219 <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 220 <horstretch>0</horstretch> 221 <verstretch>0</verstretch> 222 </sizepolicy> 223 </property> 224 <property name="text"> 225 <string>Use ADAT-Out as S/PDIF</string> 226 </property> 227 </widget> 228 </item> 229 <item row="2" column="1"> 230 <widget class="QPushButton" name="btnPad"> 231 <property name="sizePolicy"> 232 <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 233 <horstretch>0</horstretch> 234 <verstretch>0</verstretch> 235 </sizepolicy> 236 </property> 237 <property name="text"> 238 <string>Pad Output</string> 189 239 </property> 190 240 </widget>