Index: src/dice/dice_eap.h
===================================================================
--- src/dice/dice_eap.h (révision 2040)
+++ src/dice/dice_eap.h (copie de travail)
@@ -394,6 +394,7 @@
         Router(EAP &);
         ~Router();

+ void update();
         void show();

         void addDestination(const std::string& name, enum eRouteDestination dstid,
@@ -464,6 +465,9 @@
       */
     bool init();

+ /// update EAP
+ void update();
+
     /// Show information about the EAP
     void show();
     /// Dump the first parts of the application space
@@ -509,7 +513,10 @@

       To ease custom device support, this function is not in EAP::Router but here.
       */
-    virtual void setupSources();
+    void setupSources();
+    virtual void setupSources_low();
+    virtual void setupSources_mid();
+    virtual void setupSources_high();
     /**
       @brief Setup all the available destinations

@@ -519,7 +526,10 @@

       To ease custom device support, this function is not in EAP::Router but here.
       */
-    virtual void setupDestinations();
+    void setupDestinations();
+    virtual void setupDestinations_low();
+    virtual void setupDestinations_mid();
+    virtual void setupDestinations_high();

     /**
       @brief Actually add the source
Index: src/dice/focusrite/saffire_pro40.cpp
===================================================================
--- src/dice/focusrite/saffire_pro40.cpp (révision 2040)
+++ src/dice/focusrite/saffire_pro40.cpp (copie de travail)
@@ -24,7 +24,6 @@
#include "saffire_pro40.h"

#include "focusrite_eap.h"
-
namespace Dice {
namespace Focusrite {

@@ -43,24 +42,108 @@
     return new FocusriteEAP::Poti(this, name, 0x58);
}

+/*
void SaffirePro40::SaffirePro40EAP::setupSources() {
-    addSource("SPDIF",  6,  2, eRS_AES);
+      addSource("SPDIF",  0,  2, eRS_AES);
+      addSource("ADAT",   0,  8, eRS_ADAT);
+      addSource("Analog", 16,  8, eRS_InS0);
+      addSource("Mixer",  0, 16, eRS_Mixer);
+      addSource("1394",   0, 10, eRS_ARX0);
+      addSource("1394",   0, 10, eRS_ARX1, 10);
+      addSource("Mute",   0,  1, eRS_Muted);
+}
+void SaffirePro40::SaffirePro40EAP::setupDestinations() {
+    addDestination("SPDIF",  0,  2, eRD_AES);
+    addDestination("ADAT",   0,  8, eRD_ADAT);
+    addDestination("Analog", 0,  2, eRD_InS0);
+    addDestination("Analog", 0,  8, eRD_InS1, 2);
+    addDestination("Mixer",  0, 16, eRD_Mixer0);
+    addDestination("Mixer",  0,  2, eRD_Mixer1, 16);
+    addDestination("1394",   0, 10, eRD_ATX0);
+    addDestination("1394",   0, 10, eRD_ATX1, 10);
+    addDestination("Mute",   0,  1, eRD_Muted);
+}
+*/
+//
+// Under 48kHz Saffire pro 40 has
+//  - 8 analogic inputs (mic/line)
+//  - 8 ADAT inputs
+//  - 2 SPDIF inputs
+//  - 20 ieee1394 inputs
+//  - 18 mixer inputs
+//
+//  - 10 analogic outputs
+//  - 8 ADAT outputs
+//  - 2 SPDIF outputs
+//  - 20 ieee1394 outputs
+//  - 16 mixer outputs
+//
+void SaffirePro40::SaffirePro40EAP::setupSources_low() {
+    addSource("SPDIF",  0,  2, eRS_AES);
     addSource("ADAT",   0,  8, eRS_ADAT);
-    addSource("Analog", 0,  8, eRS_InS0);
+    addSource("Analog", 16,  8, eRS_InS0);
     addSource("Mixer",  0, 16, eRS_Mixer);
-    addSource("1394",   0, 16, eRS_ARX0);
+    addSource("1394",   0, 10, eRS_ARX0);
+    addSource("1394",   0, 10, eRS_ARX1, 10);
     addSource("Mute",   0,  1, eRS_Muted);
}
-void SaffirePro40::SaffirePro40EAP::setupDestinations() {
-    addDestination("SPDIF",  6,  2, eRD_AES);
+void SaffirePro40::SaffirePro40EAP::setupDestinations_low() {
+    addDestination("SPDIF",  0,  2, eRD_AES);
     addDestination("ADAT",   0,  8, eRD_ADAT);
-    addDestination("Analog", 0,  8, eRD_InS0);
+    addDestination("Analog", 0,  2, eRD_InS0);
+    addDestination("Analog", 0,  8, eRD_InS1, 2);
     addDestination("Mixer",  0, 16, eRD_Mixer0);
     addDestination("Mixer",  0,  2, eRD_Mixer1, 16);
-    addDestination("1394",   0, 16, eRD_ATX0);
+    addDestination("1394",   0, 10, eRD_ATX0);
+    addDestination("1394",   0,  8, eRD_ATX1, 10);
+    addDestination("Loop",   8,  2, eRD_ATX1);
     addDestination("Mute",   0,  1, eRD_Muted);
}

+//
+// Under 96kHz Saffire pro 40 has
+//  - 8 analogic inputs (mic/line)
+//  - 4 ADAT inputs
+//  - 2 SPDIF inputs
+//  - 16 ieee1394 inputs
+//  - 18 mixer inputs
+//
+//  - 10 analogic outputs
+//  - 4 ADAT outputs
+//  - 2 SPDIF outputs
+//  - 16 ieee1394 outputs
+//  - 16 mixer outputs
+//
+void SaffirePro40::SaffirePro40EAP::setupSources_mid() {
+      addSource("SPDIF",  0,  2, eRS_AES);
+      addSource("ADAT",   0,  4, eRS_ADAT);
+      addSource("Analog", 16,  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_mid() {
+    addDestination("SPDIF",  0,  2, eRD_AES);
+    addDestination("ADAT",   0,  4, eRD_ADAT);
+    addDestination("Analog", 0,  2, eRD_InS0);
+    addDestination("Analog", 0,  8, eRD_InS1, 2);
+    addDestination("Mixer",  0, 16, eRD_Mixer0);
+    addDestination("Mixer",  0,  2, eRD_Mixer1, 16);
+    addDestination("1394",   0, 14, eRD_ATX0);
+    addDestination("Loop",   14, 2, eRD_ATX0);
+    addDestination("Mute",   0,  1, eRD_Muted);
+}
+
+//
+// 192 kHz is not supported
+//
+void SaffirePro40::SaffirePro40EAP::setupSources_high() {
+      printMessage("High (192 kHz) sample rate not supported by Saffire Pro 40\n");
+}
+void SaffirePro40::SaffirePro40EAP::setupDestinations_high() {
+      printMessage("High (192 kHz) sample rate not supported by Saffire Pro 40\n");
+}
+
SaffirePro40::SaffirePro40( DeviceManager& d,
                                         std::auto_ptr<ConfigRom>( configRom ))
     : Dice::Device( d , configRom)
Index: src/dice/focusrite/saffire_pro24.cpp
===================================================================
--- src/dice/focusrite/saffire_pro24.cpp (révision 2040)
+++ src/dice/focusrite/saffire_pro24.cpp (copie de travail)
@@ -43,6 +43,7 @@
     return new FocusriteEAP::Poti(this, name, 0x54);
}

+/*
void SaffirePro24::SaffirePro24EAP::setupSources() {
     addSource("SPDIF",  6,  2, eRS_AES);
     addSource("ADAT",   0,  8, eRS_ADAT);
@@ -59,8 +60,49 @@
     addDestination("1394",   0, 16, eRD_ATX0);
     addDestination("Mute",   0,  1, eRD_Muted);
}
+*/

+void SaffirePro24::SaffirePro24EAP::setupSources_low() {
+    addSource("SPDIF",  6,  2, eRS_AES);
+    addSource("ADAT",   0,  8, eRS_ADAT);
+    addSource("Analog", 0,  4, eRS_InS0);
+    addSource("Mixer",  0,  8, eRS_Mixer);
+    addSource("1394",   0,  8, eRS_ARX0);
+    addSource("Mute",   0,  1, eRS_Muted);
+}
+void SaffirePro24::SaffirePro24EAP::setupDestinations_low() {
+    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("1394",   0, 16, eRD_ATX0);
+    addDestination("Mute",   0,  1, eRD_Muted);
+}

+void SaffirePro24::SaffirePro24EAP::setupSources_mid() {
+    addSource("SPDIF",  6,  2, eRS_AES);
+    addSource("ADAT",   0,  4, 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);
+}
+void SaffirePro24::SaffirePro24EAP::setupDestinations_mid() {
+    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("1394",   0, 12, eRD_ATX0);
+    addDestination("Mute",   0,  1, eRD_Muted);
+}
+
+void SaffirePro24::SaffirePro24EAP::setupSources_high() {
+    printMessage("High (192 kHz) sample rate not supported by Saffire Pro 24\n");
+}
+void SaffirePro24::SaffirePro24EAP::setupDestinations_high() {
+    printMessage("High (192 kHz) sample rate not supported by Saffire Pro 24\n");
+}
+
class SaffirePro24::LineInstSwitch : public Dice::Focusrite::FocusriteEAP::Switch
{
public:
Index: src/dice/focusrite/saffire_pro40.h
===================================================================
--- src/dice/focusrite/saffire_pro40.h (révision 2040)
+++ src/dice/focusrite/saffire_pro40.h (copie de travail)
@@ -60,8 +60,12 @@
         Poti* getMonitorPoti(std::string);
         Poti* getDimPoti(std::string);

-        void setupSources();
-        void setupDestinations();
+        void setupSources_low();
+        void setupDestinations_low();
+        void setupSources_mid();
+        void setupDestinations_mid();
+        void setupSources_high();
+        void setupDestinations_high();
     };
     Dice::EAP* createEAP();

Index: src/dice/focusrite/saffire_pro24.h
===================================================================
--- src/dice/focusrite/saffire_pro24.h (révision 2040)
+++ src/dice/focusrite/saffire_pro24.h (copie de travail)
@@ -61,8 +61,12 @@
         Poti* getMonitorPoti(std::string);
         Poti* getDimPoti(std::string);

-        void setupSources();
-        void setupDestinations();
+        void setupSources_low();
+        void setupDestinations_low();
+        void setupSources_mid();
+        void setupDestinations_mid();
+        void setupSources_high();
+        void setupDestinations_high();
     };
     Dice::EAP* createEAP();


--
Philippe Carriere <la-page-web-of-phil.contact@orange.fr>