Show
Ignore:
Timestamp:
11/09/19 23:38:07 (4 years ago)
Author:
jwoithe
Message:

profire-610: Add support for setting master volume controlled line outs.

This has been implemented as an "extension" of the Profire 2626 version,
since much is shared between them (and the 610 is even advertised as a
cut-down version of the 2626).

Patch supplied by Donny Yang.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/dice_avdevice.cpp

    r2691 r2781  
    148148        case FW_VENDORID_MAUDIO: 
    149149            switch(modelId) { 
    150                 case 0x00000010: 
     150                case 0x00000010:    // ProFire 2626 
     151                case 0x00000011:    // ProFire 610 
    151152                    return new Maudio::Profire2626(d, configRom); 
    152153                default: // return a plain Dice device 
  • trunk/libffado/src/dice/maudio/profire_2626.cpp

    r2691 r2781  
    360360} 
    361361 
     362Profire2626::Profire610EAP::Profire610EAP(Dice::Device & dev) 
     363    : Profire2626EAP(dev) 
     364{ 
     365} 
     366 
     367// 
     368// Profire 610 has 
     369//  - 4 mic/line inputs 
     370//  - 2 coaxial SPDIF inputs 
     371//  - 32 ieee1394 inputs 
     372//  - 18 mixer inputs 
     373//  - 1 MIDI input 
     374// 
     375//  - 8 line outputs (first two pairs are also routed to 2 headphone jacks) 
     376//  - 2 coaxial SPDIF outputs 
     377//  - 32 ieee1394 outputs 
     378//  - 16 mixer outputs 
     379//  - 1 MIDI output 
     380// 
     381void Profire2626::Profire610EAP::setupSources_low() 
     382{ 
     383    addSource("Mic/Line/In", 0, 4, eRS_InS0, 1); 
     384    addSource("SPDIF/In", 0, 2, eRS_AES, 1); 
     385    addSource("Mixer/Out", 0, 16, eRS_Mixer, 1); 
     386    addSource("1394/In", 0, 16, eRS_ARX0, 1); 
     387    addSource("1394/In", 0, 16, eRS_ARX1, 17); 
     388    addSource("Mute", 0, 1, eRS_Muted); 
     389} 
     390 
     391void Profire2626::Profire610EAP::setupDestinations_low() 
     392{ 
     393    addDestination("Line/Out", 0, 8, eRD_InS0, 1); 
     394    addDestination("SPDIF/Out", 0, 2, eRD_AES, 1); 
     395    addDestination("Mixer/In", 0, 16, eRD_Mixer0, 1); 
     396    addDestination("Mixer/In", 0, 2, eRD_Mixer1, 17); 
     397    addDestination("1394/Out", 0, 16, eRD_ATX0, 1); 
     398    addDestination("1394/Out", 0, 16, eRD_ATX1, 17); 
     399    addDestination("Mute", 0, 1, eRD_Muted); 
     400} 
     401 
     402void Profire2626::Profire610EAP::setupSources_mid() 
     403{ 
     404    setupSources_low(); 
     405} 
     406 
     407void Profire2626::Profire610EAP::setupDestinations_mid() 
     408{ 
     409    setupDestinations_low(); 
     410} 
     411 
     412void Profire2626::Profire610EAP::setupSources_high() 
     413{ 
     414    setupSources_low(); 
     415} 
     416 
     417void Profire2626::Profire610EAP::setupDestinations_high() 
     418{ 
     419    setupDestinations_low(); 
     420} 
     421 
     422void Profire2626::Profire610EAP::setupDefaultRouterConfig_low() 
     423{ 
     424    unsigned int i; 
     425 
     426    // ======== the 1394 stream receivers 
     427 
     428    // LINE IN 
     429    for (i=0; i<4; i++) { 
     430        addRoute(eRS_InS0, i, eRD_ATX0, i); 
     431    } 
     432 
     433    // SPDIF IN 
     434    for (i=0; i<2; i++) { 
     435        addRoute(eRS_AES, i, eRD_ATX0, i+4); 
     436    } 
     437 
     438 
     439    // ======== Mixer inputs 
     440 
     441    // LINE IN 
     442    for (i=0; i<4; i++) { 
     443        addRoute(eRS_InS0, i, eRD_Mixer0, i); 
     444    } 
     445 
     446    // SPDIF IN 
     447    for (i=0; i<2; i++) { 
     448        addRoute(eRS_AES, i, eRD_Mixer0, i+4); 
     449    } 
     450 
     451    // IEEE1394 channels 
     452    for (i=0; i<10; i++) { 
     453        addRoute(eRS_ARX0, i, eRD_Mixer0, i+6); 
     454    } 
     455    for (i=0; i<2; i++) { 
     456        addRoute(eRS_ARX0, i+10, eRD_Mixer1, i); 
     457    } 
     458 
     459    // ======== Outputs 
     460 
     461    // LINE OUT 
     462    for (i=0; i<8; i++) { 
     463        addRoute(eRS_ARX0, i, eRD_InS0, i); 
     464    } 
     465 
     466    // SPDIF OUT 
     467    for (i=0; i<2; i++) { 
     468        addRoute(eRS_ARX0, i+8, eRD_AES, i); 
     469    } 
     470 
     471    // Mixer is muted 
     472    for (i=0; i<16; i++) { 
     473        addRoute(eRS_Mixer, i, eRD_Muted, 0); 
     474    } 
     475} 
     476 
     477void Profire2626::Profire610EAP::setupDefaultRouterConfig_mid() 
     478{ 
     479    setupDefaultRouterConfig_low(); 
     480} 
     481 
     482void Profire2626::Profire610EAP::setupDefaultRouterConfig_high() 
     483{ 
     484    setupDefaultRouterConfig_low(); 
     485} 
     486 
    362487/** 
    363488  Device 
     
    397522Dice::EAP* Profire2626::createEAP() 
    398523{ 
    399     return new Profire2626EAP(*this); 
     524    if (getConfigRom().getModelId() == 0x00000011) 
     525        return new Profire610EAP(*this); 
     526    else 
     527        return new Profire2626EAP(*this); 
    400528} 
    401529 
  • trunk/libffado/src/dice/maudio/profire_2626.h

    r2691 r2781  
    9999    }; 
    100100 
     101    class Profire610EAP : public Profire2626EAP 
     102    { 
     103    public: 
     104        Profire610EAP(Dice::Device& dev); 
     105 
     106        void setupSources_low() override; 
     107        void setupDestinations_low() override; 
     108        void setupSources_mid() override; 
     109        void setupDestinations_mid() override; 
     110        void setupSources_high() override; 
     111        void setupDestinations_high() override; 
     112        void setupDefaultRouterConfig_low() override; 
     113        void setupDefaultRouterConfig_mid() override; 
     114        void setupDefaultRouterConfig_high() override; 
     115    }; 
     116 
    101117private: 
    102118    Dice::EAP* createEAP();