Index: /trunk/libffado/src/dice/focusrite/saffire_pro40.cpp =================================================================== --- /trunk/libffado/src/dice/focusrite/saffire_pro40.cpp (revision 1766) +++ /trunk/libffado/src/dice/focusrite/saffire_pro40.cpp (revision 1794) @@ -29,4 +29,37 @@ namespace Focusrite { +int SaffirePro40::SaffirePro40EAP::commandToFix(unsigned offset) { + if (offset<0x14) return 2; + if (offset<0x3C && offset>=0x14) return 1; + if (offset<0x5C && offset>=0x54) return 1; + if (offset<0x44 && offset>=0x3C) return 3; + if (offset == 0x5C) return 4; + return 0; +} +FocusriteEAP::Poti* SaffirePro40::SaffirePro40EAP::getMonitorPoti(std::string name) { + return new FocusriteEAP::Poti(this, name, 0x54); +} +FocusriteEAP::Poti* SaffirePro40::SaffirePro40EAP::getDimPoti(std::string name) { + return new FocusriteEAP::Poti(this, name, 0x58); +} + +void SaffirePro40::SaffirePro40EAP::setupSources() { + addSource("SPDIF", 6, 2, eRS_AES); + addSource("ADAT", 0, 8, eRS_ADAT); + addSource("Analog", 0, 8, eRS_InS0); + addSource("Mixer", 0, 16, eRS_Mixer); + addSource("1394", 0, 16, eRS_ARX0); + addSource("Mute", 0, 1, eRS_Muted); +} +void SaffirePro40::SaffirePro40EAP::setupDestinations() { + addDestination("SPDIF", 6, 2, eRD_AES); + addDestination("ADAT", 0, 8, eRD_ADAT); + addDestination("Analog", 0, 8, eRD_InS0); + addDestination("Mixer", 0, 16, eRD_Mixer0); + addDestination("Mixer", 0, 2, eRD_Mixer1, 16); + addDestination("1394", 0, 16, eRD_ATX0); + addDestination("Mute", 0, 1, eRD_Muted); +} + SaffirePro40::SaffirePro40( DeviceManager& d, std::auto_ptr( configRom )) @@ -39,4 +72,14 @@ SaffirePro40::~SaffirePro40() { + getEAP()->storeFlashConfig(); +} + +bool SaffirePro40::discover() { + if (Dice::Device::discover()) { + m_monitor = new FocusriteEAP::MonitorSection(dynamic_cast(getEAP()), "Monitoring"); + getEAP()->addElement(m_monitor); + return true; + } + return false; } @@ -46,4 +89,8 @@ debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro40\n"); Dice::Device::showDevice(); +} + +Dice::EAP* SaffirePro40::createEAP() { + return new SaffirePro40EAP(*this); } Index: /trunk/libffado/src/dice/focusrite/saffire_pro24.cpp =================================================================== --- /trunk/libffado/src/dice/focusrite/saffire_pro24.cpp (revision 1779) +++ /trunk/libffado/src/dice/focusrite/saffire_pro24.cpp (revision 1794) @@ -45,18 +45,18 @@ void SaffirePro24::SaffirePro24EAP::setupSources() { - addSource("SPDIF", 6, 2, eRS_AES); - addSource("ADAT", 0, 8, eRS_ADAT); - addSource("Analog", 0, 4, eRS_InS0); + addSource("SPDIF", 6, 2, eRS_AES); + addSource("ADAT", 0, 8, eRS_ADAT); + addSource("Analog", 0, 4, eRS_InS0); addSource("Mixer", 0, 16, eRS_Mixer); - addSource("1394", 0, 8, eRS_ARX0); - addSource("Mute", 0, 1, eRS_Muted); + addSource("1394", 0, 8, eRS_ARX0); + addSource("Mute", 0, 1, eRS_Muted); } void SaffirePro24::SaffirePro24EAP::setupDestinations() { - addDestination("SPDIF", 6, 2, eRD_AES); - addDestination("Analog", 0, 6, eRD_InS0); + addDestination("SPDIF", 6, 2, eRD_AES); + addDestination("Analog", 0, 6, eRD_InS0); addDestination("Mixer", 0, 16, eRD_Mixer0); - addDestination("Mixer", 0, 2, eRD_Mixer1, 16); + addDestination("Mixer", 0, 2, eRD_Mixer1, 16); addDestination("1394", 0, 16, eRD_ATX0); - addDestination("Mute", 0, 1, eRD_Muted); + addDestination("Mute", 0, 1, eRD_Muted); } Index: /trunk/libffado/src/dice/focusrite/saffire_pro40.h =================================================================== --- /trunk/libffado/src/dice/focusrite/saffire_pro40.h (revision 1729) +++ /trunk/libffado/src/dice/focusrite/saffire_pro40.h (revision 1794) @@ -29,4 +29,6 @@ #include "libieee1394/configrom.h" +#include "focusrite_eap.h" + namespace Dice { namespace Focusrite { @@ -38,4 +40,6 @@ virtual ~SaffirePro40(); + bool discover(); + virtual void showDevice(); @@ -45,4 +49,22 @@ private: + + class SaffirePro40EAP : public FocusriteEAP + { + public: + SaffirePro40EAP(Dice::Device& dev) : FocusriteEAP(dev) { + } + + int commandToFix(unsigned offset); + + Poti* getMonitorPoti(std::string); + Poti* getDimPoti(std::string); + + void setupSources(); + void setupDestinations(); + }; + Dice::EAP* createEAP(); + + Dice::Focusrite::FocusriteEAP::MonitorSection *m_monitor; }; Index: /trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui =================================================================== --- /trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui (revision 1736) +++ /trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui (revision 1794) @@ -30,5 +30,5 @@ - + @@ -43,5 +43,5 @@ - + @@ -65,5 +65,5 @@ - + @@ -118,10 +118,10 @@ - + 0 - 4 + 10 @@ -140,10 +140,10 @@ - + 0 - 4 + 10 @@ -164,4 +164,10 @@ + + + 0 + 0 + + Ch 1 Instrument @@ -171,4 +177,10 @@ + + + 0 + 0 + + Ch 3 High Level @@ -178,4 +190,10 @@ + + + 0 + 0 + + Ch 2 Instrument @@ -185,6 +203,38 @@ + + + 0 + 0 + + Ch 4 High Level + + + + + + + + 0 + 0 + + + + Use ADAT-Out as S/PDIF + + + + + + + + 0 + 0 + + + + Pad Output Index: /trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py =================================================================== --- /trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py (revision 1736) +++ /trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py (revision 1794) @@ -255,4 +255,6 @@ widget.chkLevel4.setChecked(self.ch4level.selected()) self.connect(widget.chkLevel4, QtCore.SIGNAL("toggled(bool)"), self.ch4level.select) + widget.chkSpdif.deleteLater() + widget.btnPad.deleteLater() else: widget.chkInst1.deleteLater()