Changeset 2138

Show
Ignore:
Timestamp:
05/01/12 17:35:04 (12 years ago)
Author:
jwoithe
Message:

dice: default router setup patch 5/10 from Philippe Carriere: DICE EAP Saffire Pro 40 Introduce specific default routing functions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/dice_eap.h

    r2137 r2138  
    579579    virtual void setupDefaultRouterConfig_high(); 
    580580    void setupDefaultRouterConfig();   
     581    bool addRoute(enum eRouteSource srcid, unsigned int base_src, enum eRouteDestination dstid, 
     582                  unsigned int base_dst); 
    581583 
    582584    /** 
     
    611613    bool loadStreamConfig(bool low, bool mid, bool high); 
    612614    bool loadRouterAndStreamConfig(bool low, bool mid, bool high); 
    613  
    614     bool addRoute(enum eRouteSource srcid, unsigned int base_src, enum eRouteDestination dstid, 
    615                   unsigned int base_dst); 
    616615 
    617616private: 
  • trunk/libffado/src/dice/focusrite/saffire_pro40.cpp

    r2097 r2138  
    137137} 
    138138 
     139/** 
     140 * The default configurations for the Saffire Pro 40 router. 
     141 *  For coherence with hardware, destinations must follow a specific ordering 
     142 *  There must be 60 destinations at low samplerate 
     143 *  Front LEDs are connected to the first eight router entries 
     144 */ 
     145void 
     146SaffirePro40::SaffirePro40EAP::setupDefaultRouterConfig_low() { 
     147    unsigned int i; 
     148    // the 1394 stream receivers except the two "loops" one 
     149    for (i=0; i<8; i++) { 
     150        addRoute(eRS_InS0, i, eRD_ATX0, i); 
     151    } 
     152    for (i=0; i<2; i++) { 
     153        addRoute(eRS_ADAT, i, eRD_ATX0, i+8); 
     154    } 
     155    for (i=0; i<6; i++) { 
     156        addRoute(eRS_ADAT, i+2, eRD_ATX1, i); 
     157    } 
     158    for (i=0; i<2; i++) { 
     159        addRoute(eRS_AES, i, eRD_ATX1, i+6); 
     160    } 
     161    // The audio ports 
     162    // Ensure that audio port are not muted 
     163    for (i=0; i<2; i++) { 
     164        addRoute(eRS_ARX0, i, eRD_InS0, i); 
     165    } 
     166    for (i=0; i<8; i++) { 
     167      addRoute(eRS_ARX0, i%2, eRD_InS1, i); 
     168    } 
     169    // the SPDIF receiver 
     170    for (i=0; i<2; i++) { 
     171        addRoute(eRS_Muted, 0, eRD_AES, i); 
     172    } 
     173    // the ADAT receiver 
     174    for (i=0; i<8; i++) { 
     175        addRoute(eRS_Muted, 0, eRD_ADAT, i); 
     176    } 
     177    // the "loops" 1394 stream receivers 
     178    for (i=0; i<2; i++) { 
     179        addRoute(eRS_Muted, i, eRD_ATX1, i+8); 
     180    } 
     181    // the Mixer inputs 
     182    for (i=0; i<8; i++) { 
     183        addRoute(eRS_InS0, i, eRD_Mixer0, i); 
     184    } 
     185    for (i=0; i<8; i++) { 
     186        addRoute(eRS_ADAT, i, eRD_Mixer0, i+8); 
     187    } 
     188    for (i=0; i<2; i++) { 
     189        addRoute(eRS_ARX0, i, eRD_Mixer1, i); 
     190    } 
     191    // The two mute destinations 
     192    for (i=0; i<2; i++) { 
     193        addRoute(eRS_Mixer, i, eRD_Muted, 0); 
     194    } 
     195} 
     196 
     197/** 
     198 *  There must be 52 destinations at mid samplerate 
     199 *  Front LEDs are connected to the first eight router entries 
     200 */ 
     201void 
     202SaffirePro40::SaffirePro40EAP::setupDefaultRouterConfig_mid() { 
     203    unsigned int i; 
     204    // the 1394 stream receivers except the two "loops" one 
     205    for (i=0; i<8; i++) { 
     206        addRoute(eRS_InS0, i, eRD_ATX0, i); 
     207    } 
     208    for (i=0; i<4; i++) { 
     209        addRoute(eRS_ADAT, i, eRD_ATX0, i+8); 
     210    } 
     211    for (i=0; i<2; i++) { 
     212        addRoute(eRS_AES, i, eRD_ATX0, i+12); 
     213    } 
     214    // The audio ports 
     215    // Ensure that audio port are not muted 
     216    for (i=0; i<2; i++) { 
     217        addRoute(eRS_ARX0, i, eRD_InS0, i); 
     218    } 
     219    for (i=0; i<8; i++) { 
     220      addRoute(eRS_ARX0, i%2, eRD_InS1, i); 
     221    } 
     222    // the SPDIF receiver 
     223    for (i=0; i<2; i++) { 
     224        addRoute(eRS_Muted, 0, eRD_AES, i); 
     225    } 
     226    // the ADAT receiver 
     227    for (i=0; i<4; i++) { 
     228        addRoute(eRS_Muted, 0, eRD_ADAT, i); 
     229    } 
     230    // the "loops" 1394 stream receivers 
     231    for (i=0; i<2; i++) { 
     232        addRoute(eRS_Muted, i, eRD_ATX0, i+14); 
     233    } 
     234    // the Mixer inputs 
     235    for (i=0; i<8; i++) { 
     236        addRoute(eRS_InS0, i, eRD_Mixer0, i); 
     237    } 
     238    for (i=0; i<4; i++) { 
     239        addRoute(eRS_ADAT, i, eRD_Mixer0, i+8); 
     240    } 
     241    for (i=0; i<4; i++) { 
     242        addRoute(eRS_Muted, 0, eRD_Mixer0, i+12); 
     243    } 
     244    for (i=0; i<2; i++) { 
     245        addRoute(eRS_ARX0, i, eRD_Mixer1, i); 
     246    } 
     247    // The two mute destinations 
     248    for (i=0; i<2; i++) { 
     249        addRoute(eRS_Mixer, i, eRD_Muted, 0); 
     250    } 
     251} 
     252 
     253/** 
     254 *  High rate not supported 
     255 */ 
     256void 
     257SaffirePro40::SaffirePro40EAP::setupDefaultRouterConfig_high() { 
     258    printMessage("High (192 kHz) sample rate not supported by Saffire Pro 40\n"); 
     259} 
     260 
    139261SaffirePro40::~SaffirePro40() 
    140262{ 
  • trunk/libffado/src/dice/focusrite/saffire_pro40.h

    r2050 r2138  
    6767        void setupSources_high(); 
    6868        void setupDestinations_high(); 
     69        void setupDefaultRouterConfig_low(); 
     70        void setupDefaultRouterConfig_mid(); 
     71        void setupDefaultRouterConfig_high(); 
    6972    }; 
    7073    Dice::EAP* createEAP();