Changeset 653

Show
Ignore:
Timestamp:
10/17/07 01:16:58 (13 years ago)
Author:
ppalmers
Message:

- a first pass at Focusrite Saffire Pro mixer support. Note: the mixer only works when streaming.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/bebob/ffado_driver_bebob.txt

    r625 r653  
    17170x000d6c,       0x00010062,     "M-Audio"                       ,"FW Solo" 
    18180x000d6c,       0x00010081,     "M-Audio"                       ,"NRV10" 
     190x000d6c,       0x00010060,     "M-Audio"                       ,"FW Audiophile" 
  • trunk/libffado/src/bebob/focusrite/focusrite_cmd.h

    r650 r653  
    3131#include <libavc1394/avc1394.h> 
    3232 
    33 #define FOCUSRITE_CMD_ID_SAMPLERATE         84 
    34 #define FOCUSRITE_CMD_ID_SAMPLERATE_MIRROR  115 
    35  
    36 #define FOCUSRITE_CMD_ID_PHANTOM14          98 
    37 #define FOCUSRITE_CMD_ID_PHANTOM58          99 
    38 #define FOCUSRITE_CMD_ID_INSERT1            100 
    39 #define FOCUSRITE_CMD_ID_INSERT2            101 
    40 #define FOCUSRITE_CMD_ID_AC3_PASSTHROUGH    103 
    41 #define FOCUSRITE_CMD_ID_MIDI_TRU           104 
    42  
    43 #define FOCUSRITE_CMD_SAMPLERATE_44K1   1 
    44 #define FOCUSRITE_CMD_SAMPLERATE_48K    2 
    45 #define FOCUSRITE_CMD_SAMPLERATE_88K2   3 
    46 #define FOCUSRITE_CMD_SAMPLERATE_96K    4 
    47 #define FOCUSRITE_CMD_SAMPLERATE_176K4  5 
    48 #define FOCUSRITE_CMD_SAMPLERATE_192K   6 
    49  
    50 #define FOCUSRITE_CMD_ID_AN1_TO_IMIXL        0 
    51 #define FOCUSRITE_CMD_ID_AN1_TO_IMIXR        1 
    52 #define FOCUSRITE_CMD_ID_AN2_TO_IMIXL        2 
    53 #define FOCUSRITE_CMD_ID_AN2_TO_IMIXR        3 
    54 #define FOCUSRITE_CMD_ID_AN3_TO_IMIXL        4 
    55 #define FOCUSRITE_CMD_ID_AN3_TO_IMIXR        5 
    56 #define FOCUSRITE_CMD_ID_AN4_TO_IMIXL        6 
    57 #define FOCUSRITE_CMD_ID_AN4_TO_IMIXR        7 
    58 #define FOCUSRITE_CMD_ID_AN5_TO_IMIXL        8 
    59 #define FOCUSRITE_CMD_ID_AN5_TO_IMIXR        9 
    60 #define FOCUSRITE_CMD_ID_AN6_TO_IMIXL       10 
    61 #define FOCUSRITE_CMD_ID_AN6_TO_IMIXR       11 
    62 #define FOCUSRITE_CMD_ID_AN7_TO_IMIXL       12 
    63 #define FOCUSRITE_CMD_ID_AN7_TO_IMIXR       13 
    64 #define FOCUSRITE_CMD_ID_AN8_TO_IMIXL       14 
    65 #define FOCUSRITE_CMD_ID_AN8_TO_IMIXR       15 
    66 #define FOCUSRITE_CMD_ID_SPDIFL_TO_IMIXL    16 
    67 #define FOCUSRITE_CMD_ID_SPDIFL_TO_IMIXR    17 
    68 #define FOCUSRITE_CMD_ID_SPDIFR_TO_IMIXL    18 
    69 #define FOCUSRITE_CMD_ID_SPDIFR_TO_IMIXR    19 
    70  
    71 #define FOCUSRITE_CMD_ID_ADAT11_TO_IMIXL    20 
    72 #define FOCUSRITE_CMD_ID_ADAT11_TO_IMIXR    21 
    73 #define FOCUSRITE_CMD_ID_ADAT12_TO_IMIXL    22 
    74 #define FOCUSRITE_CMD_ID_ADAT12_TO_IMIXR    23 
    75 #define FOCUSRITE_CMD_ID_ADAT13_TO_IMIXL    24 
    76 #define FOCUSRITE_CMD_ID_ADAT13_TO_IMIXR    25 
    77 #define FOCUSRITE_CMD_ID_ADAT14_TO_IMIXL    26 
    78 #define FOCUSRITE_CMD_ID_ADAT14_TO_IMIXR    27 
    79 #define FOCUSRITE_CMD_ID_ADAT15_TO_IMIXL    28 
    80 #define FOCUSRITE_CMD_ID_ADAT15_TO_IMIXR    29 
    81 #define FOCUSRITE_CMD_ID_ADAT16_TO_IMIXL    30 
    82 #define FOCUSRITE_CMD_ID_ADAT16_TO_IMIXR    31 
    83 #define FOCUSRITE_CMD_ID_ADAT17_TO_IMIXL    32 
    84 #define FOCUSRITE_CMD_ID_ADAT17_TO_IMIXR    33 
    85 #define FOCUSRITE_CMD_ID_ADAT18_TO_IMIXL    34 
    86 #define FOCUSRITE_CMD_ID_ADAT18_TO_IMIXR    35 
    87  
    88 #define FOCUSRITE_CMD_ID_ADAT21_TO_IMIXL    36 
    89 #define FOCUSRITE_CMD_ID_ADAT21_TO_IMIXR    37 
    90 #define FOCUSRITE_CMD_ID_ADAT22_TO_IMIXL    38 
    91 #define FOCUSRITE_CMD_ID_ADAT22_TO_IMIXR    39 
    92 #define FOCUSRITE_CMD_ID_ADAT23_TO_IMIXL    40 
    93 #define FOCUSRITE_CMD_ID_ADAT23_TO_IMIXR    41 
    94 #define FOCUSRITE_CMD_ID_ADAT24_TO_IMIXL    42 
    95 #define FOCUSRITE_CMD_ID_ADAT24_TO_IMIXR    43 
    96 #define FOCUSRITE_CMD_ID_ADAT25_TO_IMIXL    44 
    97 #define FOCUSRITE_CMD_ID_ADAT25_TO_IMIXR    45 
    98 #define FOCUSRITE_CMD_ID_ADAT26_TO_IMIXL    46 
    99 #define FOCUSRITE_CMD_ID_ADAT26_TO_IMIXR    47 
    100 #define FOCUSRITE_CMD_ID_ADAT27_TO_IMIXL    48 
    101 #define FOCUSRITE_CMD_ID_ADAT27_TO_IMIXR    49 
    102 #define FOCUSRITE_CMD_ID_ADAT28_TO_IMIXL    50 
    103 #define FOCUSRITE_CMD_ID_ADAT28_TO_IMIXR    51 
    104  
    105 #define FOCUSRITE_CMD_ID_PC1_TO_OUT1    52 
    106 #define FOCUSRITE_CMD_ID_PC2_TO_OUT2    54 
    107 #define FOCUSRITE_CMD_ID_MIX1_TO_OUT1   53 
    108 #define FOCUSRITE_CMD_ID_MIX2_TO_OUT2   55 
    109  
    110 #define FOCUSRITE_CMD_ID_PC1_TO_OUT3    56 
    111 #define FOCUSRITE_CMD_ID_PC2_TO_OUT4    59 
    112 #define FOCUSRITE_CMD_ID_PC3_TO_OUT3    57 
    113 #define FOCUSRITE_CMD_ID_PC4_TO_OUT4    60 
    114 #define FOCUSRITE_CMD_ID_MIX1_TO_OUT3   58 
    115 #define FOCUSRITE_CMD_ID_MIX2_TO_OUT4   61 
    116  
    117 #define FOCUSRITE_CMD_ID_PC1_TO_OUT5    62 
    118 #define FOCUSRITE_CMD_ID_PC2_TO_OUT6    65 
    119 #define FOCUSRITE_CMD_ID_PC5_TO_OUT5    63 
    120 #define FOCUSRITE_CMD_ID_PC6_TO_OUT6    66 
    121 #define FOCUSRITE_CMD_ID_MIX1_TO_OUT5   64 
    122 #define FOCUSRITE_CMD_ID_MIX2_TO_OUT6   67 
    123  
    124 #define FOCUSRITE_CMD_ID_PC1_TO_OUT7    68 
    125 #define FOCUSRITE_CMD_ID_PC2_TO_OUT8    71 
    126 #define FOCUSRITE_CMD_ID_PC7_TO_OUT7    69 
    127 #define FOCUSRITE_CMD_ID_PC8_TO_OUT8    72 
    128 #define FOCUSRITE_CMD_ID_MIX1_TO_OUT7   70 
    129 #define FOCUSRITE_CMD_ID_MIX2_TO_OUT8   73 
    130  
    131 #define FOCUSRITE_CMD_ID_PC1_TO_OUT9    74 
    132 #define FOCUSRITE_CMD_ID_PC2_TO_OUT10   77 
    133 #define FOCUSRITE_CMD_ID_PC9_TO_OUT9    75 
    134 #define FOCUSRITE_CMD_ID_PC10_TO_OUT10  78 
    135 #define FOCUSRITE_CMD_ID_MIX1_TO_OUT9   76 
    136 #define FOCUSRITE_CMD_ID_MIX2_TO_OUT10  79 
    137  
    13833namespace BeBoB { 
    13934namespace Focusrite { 
  • trunk/libffado/src/bebob/focusrite/focusrite_generic.cpp

    r649 r653  
    152152    uint32_t val=0; 
    153153    if (v) val=1; 
     154    debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for id %d to %d\n",  
     155                                     m_cmd_id, v); 
    154156 
    155157    if ( !m_Parent.setSpecificValue(m_cmd_id, val) ) { 
     
    167169        debugError( "getSpecificValue failed\n" ); 
    168170        return 0; 
    169     } else return val; 
     171    } else { 
     172        debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %d = %d\n",  
     173                                         m_cmd_id, val); 
     174        return val; 
     175    } 
    170176} 
    171177 
     
    195201    else if (v<0) v=0; 
    196202 
     203    debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for id %d to %d\n",  
     204                                     m_cmd_id, v); 
     205 
    197206    if ( !m_Parent.setSpecificValue(m_cmd_id, v) ) { 
    198207        debugError( "setSpecificValue failed\n" ); 
     
    209218        debugError( "getSpecificValue failed\n" ); 
    210219        return 0; 
    211     } else return val; 
     220    } else { 
     221        debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %d = %d\n",  
     222                                         m_cmd_id, val); 
     223        return val; 
     224    } 
    212225} 
    213226 
  • trunk/libffado/src/bebob/focusrite/focusrite_saffirepro.cpp

    r650 r653  
    4141 
    4242    // create control objects for the saffire pro 
    43     m_Phantom1 = new BinaryControl(*this, FOCUSRITE_CMD_ID_PHANTOM14, 
     43    m_Phantom1 = new BinaryControl(*this, FR_SAFFIREPRO_CMD_ID_PHANTOM14, 
    4444                 "Phantom_1to4", "Phantom 1-4", "Switch Phantom Power on channels 1-4"); 
    4545    if (m_Phantom1) addElement(m_Phantom1); 
    4646     
    47     m_Phantom2 = new BinaryControl(*this, FOCUSRITE_CMD_ID_PHANTOM58, 
     47    m_Phantom2 = new BinaryControl(*this, FR_SAFFIREPRO_CMD_ID_PHANTOM58, 
    4848                 "Phantom_5to8", "Phantom 5-8", "Switch Phantom Power on channels 5-8"); 
    4949    if (m_Phantom2) addElement(m_Phantom2); 
    5050     
    51     m_Insert1 = new BinaryControl(*this, FOCUSRITE_CMD_ID_INSERT1, 
     51    m_Insert1 = new BinaryControl(*this, FR_SAFFIREPRO_CMD_ID_INSERT1, 
    5252                "Insert1", "Insert 1", "Switch Insert on Channel 1"); 
    5353    if (m_Insert1) addElement(m_Insert1); 
    5454     
    55     m_Insert2 = new BinaryControl(*this, FOCUSRITE_CMD_ID_INSERT2, 
     55    m_Insert2 = new BinaryControl(*this, FR_SAFFIREPRO_CMD_ID_INSERT2, 
    5656                "Insert2", "Insert 2", "Switch Insert on Channel 2"); 
    5757    if (m_Insert2) addElement(m_Insert2); 
    5858     
    59     m_AC3pass = new BinaryControl(*this, FOCUSRITE_CMD_ID_AC3_PASSTHROUGH, 
     59    m_AC3pass = new BinaryControl(*this, FR_SAFFIREPRO_CMD_ID_AC3_PASSTHROUGH, 
    6060                "AC3pass", "AC3 Passtrough", "Enable AC3 Passthrough"); 
    6161    if (m_AC3pass) addElement(m_AC3pass); 
    6262     
    63     m_MidiTru = new BinaryControl(*this, FOCUSRITE_CMD_ID_MIDI_TRU, 
     63    m_MidiTru = new BinaryControl(*this, FR_SAFFIREPRO_CMD_ID_MIDI_TRU, 
    6464                "MidiTru", "Midi Tru", "Enable Midi Tru"); 
    6565    if (m_MidiTru) addElement(m_MidiTru); 
     
    115115    if (m_Phantom1) m_Phantom2->setVerboseLevel(l); 
    116116    if (m_Phantom2) m_Phantom2->setVerboseLevel(l); 
     117    if (m_Insert1) m_Insert1->setVerboseLevel(l); 
     118    if (m_Insert2) m_Insert2->setVerboseLevel(l); 
     119    if (m_MidiTru) m_MidiTru->setVerboseLevel(l); 
     120    if (m_AC3pass) m_AC3pass->setVerboseLevel(l); 
     121    if (m_InputMixer) m_InputMixer->setVerboseLevel(l); 
     122    if (m_OutputMixer) m_OutputMixer->setVerboseLevel(l); 
    117123 
    118124    // FIXME: add the other elements here too 
     
    124130SaffireProDevice::getSamplingFrequency( ) { 
    125131    uint32_t sr; 
    126     if ( !getSpecificValue(FOCUSRITE_CMD_ID_SAMPLERATE, &sr ) ) { 
     132    if ( !getSpecificValue(FR_SAFFIREPRO_CMD_ID_SAMPLERATE, &sr ) ) { 
    127133        debugError( "getSpecificValue failed\n" ); 
    128134        return 0; 
     
    139145{ 
    140146    uint32_t value=convertSrToDef(s); 
    141     if ( !setSpecificValue(FOCUSRITE_CMD_ID_SAMPLERATE, value) ) { 
     147    if ( !setSpecificValue(FR_SAFFIREPRO_CMD_ID_SAMPLERATE, value) ) { 
    142148        debugError( "setSpecificValue failed\n" ); 
    143149        return false; 
     
    150156SaffireProDevice::getSamplingFrequencyMirror( ) { 
    151157    uint32_t sr; 
    152     if ( !getSpecificValue(FOCUSRITE_CMD_ID_SAMPLERATE_MIRROR, &sr ) ) { 
     158    if ( !getSpecificValue(FR_SAFFIREPRO_CMD_ID_SAMPLERATE_MIRROR, &sr ) ) { 
    153159        debugError( "getSpecificValue failed\n" ); 
    154160        return 0; 
     
    312318     
    313319        // now set the cells that are valid 
    314         setCellInfo(0,0,FOCUSRITE_CMD_ID_PC1_TO_OUT1, true); 
    315         setCellInfo(1,1,FOCUSRITE_CMD_ID_PC2_TO_OUT2, true); 
    316         setCellInfo(10,0,FOCUSRITE_CMD_ID_MIX1_TO_OUT1, true); 
    317         setCellInfo(11,1,FOCUSRITE_CMD_ID_MIX2_TO_OUT2, true); 
    318         setCellInfo(0,2,FOCUSRITE_CMD_ID_PC1_TO_OUT3, true); 
    319         setCellInfo(1,3,FOCUSRITE_CMD_ID_PC2_TO_OUT4, true); 
    320         setCellInfo(2,2,FOCUSRITE_CMD_ID_PC3_TO_OUT3, true); 
    321         setCellInfo(3,3,FOCUSRITE_CMD_ID_PC4_TO_OUT4, true); 
    322         setCellInfo(10,2,FOCUSRITE_CMD_ID_MIX1_TO_OUT3, true); 
    323         setCellInfo(11,3,FOCUSRITE_CMD_ID_MIX2_TO_OUT4, true); 
    324         setCellInfo(0,4,FOCUSRITE_CMD_ID_PC1_TO_OUT5, true); 
    325         setCellInfo(1,5,FOCUSRITE_CMD_ID_PC2_TO_OUT6, true); 
    326         setCellInfo(4,4,FOCUSRITE_CMD_ID_PC5_TO_OUT5, true); 
    327         setCellInfo(5,5,FOCUSRITE_CMD_ID_PC6_TO_OUT6, true); 
    328         setCellInfo(10,4,FOCUSRITE_CMD_ID_MIX1_TO_OUT5, true); 
    329         setCellInfo(11,5,FOCUSRITE_CMD_ID_MIX2_TO_OUT6, true); 
    330         setCellInfo(0,6,FOCUSRITE_CMD_ID_PC1_TO_OUT7, true); 
    331         setCellInfo(1,7,FOCUSRITE_CMD_ID_PC2_TO_OUT8, true); 
    332         setCellInfo(6,6,FOCUSRITE_CMD_ID_PC7_TO_OUT7, true); 
    333         setCellInfo(7,7,FOCUSRITE_CMD_ID_PC8_TO_OUT8, true); 
    334         setCellInfo(10,6,FOCUSRITE_CMD_ID_MIX1_TO_OUT7, true); 
    335         setCellInfo(11,7,FOCUSRITE_CMD_ID_MIX2_TO_OUT8, true); 
    336         setCellInfo(0,8,FOCUSRITE_CMD_ID_PC1_TO_OUT9, true); 
    337         setCellInfo(1,9,FOCUSRITE_CMD_ID_PC2_TO_OUT10, true); 
    338         setCellInfo(8,8,FOCUSRITE_CMD_ID_PC9_TO_OUT9, true); 
    339         setCellInfo(9,9,FOCUSRITE_CMD_ID_PC10_TO_OUT10, true); 
    340         setCellInfo(10,8,FOCUSRITE_CMD_ID_MIX1_TO_OUT9, true); 
    341         setCellInfo(11,9,FOCUSRITE_CMD_ID_MIX2_TO_OUT10, true); 
     320        setCellInfo(0,0,FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT1, true); 
     321        setCellInfo(1,1,FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT2, true); 
     322        setCellInfo(10,0,FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT1, true); 
     323        setCellInfo(11,1,FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT2, true); 
     324        setCellInfo(0,2,FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT3, true); 
     325        setCellInfo(1,3,FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT4, true); 
     326        setCellInfo(2,2,FR_SAFFIREPRO_CMD_ID_PC3_TO_OUT3, true); 
     327        setCellInfo(3,3,FR_SAFFIREPRO_CMD_ID_PC4_TO_OUT4, true); 
     328        setCellInfo(10,2,FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT3, true); 
     329        setCellInfo(11,3,FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT4, true); 
     330        setCellInfo(0,4,FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT5, true); 
     331        setCellInfo(1,5,FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT6, true); 
     332        setCellInfo(4,4,FR_SAFFIREPRO_CMD_ID_PC5_TO_OUT5, true); 
     333        setCellInfo(5,5,FR_SAFFIREPRO_CMD_ID_PC6_TO_OUT6, true); 
     334        setCellInfo(10,4,FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT5, true); 
     335        setCellInfo(11,5,FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT6, true); 
     336        setCellInfo(0,6,FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT7, true); 
     337        setCellInfo(1,7,FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT8, true); 
     338        setCellInfo(6,6,FR_SAFFIREPRO_CMD_ID_PC7_TO_OUT7, true); 
     339        setCellInfo(7,7,FR_SAFFIREPRO_CMD_ID_PC8_TO_OUT8, true); 
     340        setCellInfo(10,6,FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT7, true); 
     341        setCellInfo(11,7,FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT8, true); 
     342        setCellInfo(0,8,FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT9, true); 
     343        setCellInfo(1,9,FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT10, true); 
     344        setCellInfo(8,8,FR_SAFFIREPRO_CMD_ID_PC9_TO_OUT9, true); 
     345        setCellInfo(9,9,FR_SAFFIREPRO_CMD_ID_PC10_TO_OUT10, true); 
     346        setCellInfo(10,8,FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT9, true); 
     347        setCellInfo(11,9,FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT10, true); 
    342348 
    343349    } else if (type==eMMT_InputMix) { 
     
    395401     
    396402        // now set the cells that are valid 
    397         setCellInfo(0,0,FOCUSRITE_CMD_ID_AN1_TO_IMIXL, true); 
    398         setCellInfo(0,1,FOCUSRITE_CMD_ID_AN1_TO_IMIXR, true); 
    399         setCellInfo(1,0,FOCUSRITE_CMD_ID_AN2_TO_IMIXL, true); 
    400         setCellInfo(1,1,FOCUSRITE_CMD_ID_AN2_TO_IMIXR, true); 
    401         setCellInfo(2,0,FOCUSRITE_CMD_ID_AN3_TO_IMIXL, true); 
    402         setCellInfo(2,1,FOCUSRITE_CMD_ID_AN3_TO_IMIXR, true); 
    403         setCellInfo(3,0,FOCUSRITE_CMD_ID_AN4_TO_IMIXL, true); 
    404         setCellInfo(3,1,FOCUSRITE_CMD_ID_AN4_TO_IMIXR, true); 
    405         setCellInfo(4,0,FOCUSRITE_CMD_ID_AN5_TO_IMIXL, true); 
    406         setCellInfo(4,1,FOCUSRITE_CMD_ID_AN5_TO_IMIXR, true); 
    407         setCellInfo(5,0,FOCUSRITE_CMD_ID_AN6_TO_IMIXL, true); 
    408         setCellInfo(5,1,FOCUSRITE_CMD_ID_AN6_TO_IMIXR, true); 
    409         setCellInfo(6,0,FOCUSRITE_CMD_ID_AN7_TO_IMIXL, true); 
    410         setCellInfo(6,1,FOCUSRITE_CMD_ID_AN7_TO_IMIXR, true); 
    411         setCellInfo(7,0,FOCUSRITE_CMD_ID_AN8_TO_IMIXL, true); 
    412         setCellInfo(7,1,FOCUSRITE_CMD_ID_AN8_TO_IMIXR, true); 
    413         setCellInfo(8,0,FOCUSRITE_CMD_ID_SPDIFL_TO_IMIXL, true); 
    414         setCellInfo(8,1,FOCUSRITE_CMD_ID_SPDIFL_TO_IMIXR, true); 
    415         setCellInfo(9,0,FOCUSRITE_CMD_ID_SPDIFR_TO_IMIXL, true); 
    416         setCellInfo(9,1,FOCUSRITE_CMD_ID_SPDIFR_TO_IMIXR, true); 
    417  
    418         setCellInfo(10,0,FOCUSRITE_CMD_ID_ADAT11_TO_IMIXL, true); 
    419         setCellInfo(10,1,FOCUSRITE_CMD_ID_ADAT11_TO_IMIXR, true); 
    420         setCellInfo(11,0,FOCUSRITE_CMD_ID_ADAT12_TO_IMIXL, true); 
    421         setCellInfo(11,1,FOCUSRITE_CMD_ID_ADAT12_TO_IMIXR, true); 
    422         setCellInfo(12,0,FOCUSRITE_CMD_ID_ADAT13_TO_IMIXL, true); 
    423         setCellInfo(12,1,FOCUSRITE_CMD_ID_ADAT13_TO_IMIXR, true); 
    424         setCellInfo(13,0,FOCUSRITE_CMD_ID_ADAT14_TO_IMIXL, true); 
    425         setCellInfo(13,1,FOCUSRITE_CMD_ID_ADAT14_TO_IMIXR, true); 
    426         setCellInfo(14,0,FOCUSRITE_CMD_ID_ADAT15_TO_IMIXL, true); 
    427         setCellInfo(14,1,FOCUSRITE_CMD_ID_ADAT15_TO_IMIXR, true); 
    428         setCellInfo(15,0,FOCUSRITE_CMD_ID_ADAT16_TO_IMIXL, true); 
    429         setCellInfo(15,1,FOCUSRITE_CMD_ID_ADAT16_TO_IMIXR, true); 
    430         setCellInfo(16,0,FOCUSRITE_CMD_ID_ADAT17_TO_IMIXL, true); 
    431         setCellInfo(16,1,FOCUSRITE_CMD_ID_ADAT17_TO_IMIXR, true); 
    432         setCellInfo(17,0,FOCUSRITE_CMD_ID_ADAT18_TO_IMIXL, true); 
    433         setCellInfo(17,1,FOCUSRITE_CMD_ID_ADAT18_TO_IMIXR, true); 
    434  
    435         setCellInfo(18,0,FOCUSRITE_CMD_ID_ADAT21_TO_IMIXL, true); 
    436         setCellInfo(18,1,FOCUSRITE_CMD_ID_ADAT21_TO_IMIXR, true); 
    437         setCellInfo(19,0,FOCUSRITE_CMD_ID_ADAT22_TO_IMIXL, true); 
    438         setCellInfo(19,1,FOCUSRITE_CMD_ID_ADAT22_TO_IMIXR, true); 
    439         setCellInfo(20,0,FOCUSRITE_CMD_ID_ADAT23_TO_IMIXL, true); 
    440         setCellInfo(20,1,FOCUSRITE_CMD_ID_ADAT23_TO_IMIXR, true); 
    441         setCellInfo(21,0,FOCUSRITE_CMD_ID_ADAT24_TO_IMIXL, true); 
    442         setCellInfo(21,1,FOCUSRITE_CMD_ID_ADAT24_TO_IMIXR, true); 
    443         setCellInfo(22,0,FOCUSRITE_CMD_ID_ADAT25_TO_IMIXL, true); 
    444         setCellInfo(22,1,FOCUSRITE_CMD_ID_ADAT25_TO_IMIXR, true); 
    445         setCellInfo(23,0,FOCUSRITE_CMD_ID_ADAT26_TO_IMIXL, true); 
    446         setCellInfo(23,1,FOCUSRITE_CMD_ID_ADAT26_TO_IMIXR, true); 
    447         setCellInfo(24,0,FOCUSRITE_CMD_ID_ADAT27_TO_IMIXL, true); 
    448         setCellInfo(24,1,FOCUSRITE_CMD_ID_ADAT27_TO_IMIXR, true); 
    449         setCellInfo(25,0,FOCUSRITE_CMD_ID_ADAT28_TO_IMIXL, true); 
    450         setCellInfo(25,1,FOCUSRITE_CMD_ID_ADAT28_TO_IMIXR, true); 
     403        setCellInfo(0,0,FR_SAFFIREPRO_CMD_ID_AN1_TO_IMIXL, true); 
     404        setCellInfo(0,1,FR_SAFFIREPRO_CMD_ID_AN1_TO_IMIXR, true); 
     405        setCellInfo(1,0,FR_SAFFIREPRO_CMD_ID_AN2_TO_IMIXL, true); 
     406        setCellInfo(1,1,FR_SAFFIREPRO_CMD_ID_AN2_TO_IMIXR, true); 
     407        setCellInfo(2,0,FR_SAFFIREPRO_CMD_ID_AN3_TO_IMIXL, true); 
     408        setCellInfo(2,1,FR_SAFFIREPRO_CMD_ID_AN3_TO_IMIXR, true); 
     409        setCellInfo(3,0,FR_SAFFIREPRO_CMD_ID_AN4_TO_IMIXL, true); 
     410        setCellInfo(3,1,FR_SAFFIREPRO_CMD_ID_AN4_TO_IMIXR, true); 
     411        setCellInfo(4,0,FR_SAFFIREPRO_CMD_ID_AN5_TO_IMIXL, true); 
     412        setCellInfo(4,1,FR_SAFFIREPRO_CMD_ID_AN5_TO_IMIXR, true); 
     413        setCellInfo(5,0,FR_SAFFIREPRO_CMD_ID_AN6_TO_IMIXL, true); 
     414        setCellInfo(5,1,FR_SAFFIREPRO_CMD_ID_AN6_TO_IMIXR, true); 
     415        setCellInfo(6,0,FR_SAFFIREPRO_CMD_ID_AN7_TO_IMIXL, true); 
     416        setCellInfo(6,1,FR_SAFFIREPRO_CMD_ID_AN7_TO_IMIXR, true); 
     417        setCellInfo(7,0,FR_SAFFIREPRO_CMD_ID_AN8_TO_IMIXL, true); 
     418        setCellInfo(7,1,FR_SAFFIREPRO_CMD_ID_AN8_TO_IMIXR, true); 
     419        setCellInfo(8,0,FR_SAFFIREPRO_CMD_ID_SPDIFL_TO_IMIXL, true); 
     420        setCellInfo(8,1,FR_SAFFIREPRO_CMD_ID_SPDIFL_TO_IMIXR, true); 
     421        setCellInfo(9,0,FR_SAFFIREPRO_CMD_ID_SPDIFR_TO_IMIXL, true); 
     422        setCellInfo(9,1,FR_SAFFIREPRO_CMD_ID_SPDIFR_TO_IMIXR, true); 
     423 
     424        setCellInfo(10,0,FR_SAFFIREPRO_CMD_ID_ADAT11_TO_IMIXL, true); 
     425        setCellInfo(10,1,FR_SAFFIREPRO_CMD_ID_ADAT11_TO_IMIXR, true); 
     426        setCellInfo(11,0,FR_SAFFIREPRO_CMD_ID_ADAT12_TO_IMIXL, true); 
     427        setCellInfo(11,1,FR_SAFFIREPRO_CMD_ID_ADAT12_TO_IMIXR, true); 
     428        setCellInfo(12,0,FR_SAFFIREPRO_CMD_ID_ADAT13_TO_IMIXL, true); 
     429        setCellInfo(12,1,FR_SAFFIREPRO_CMD_ID_ADAT13_TO_IMIXR, true); 
     430        setCellInfo(13,0,FR_SAFFIREPRO_CMD_ID_ADAT14_TO_IMIXL, true); 
     431        setCellInfo(13,1,FR_SAFFIREPRO_CMD_ID_ADAT14_TO_IMIXR, true); 
     432        setCellInfo(14,0,FR_SAFFIREPRO_CMD_ID_ADAT15_TO_IMIXL, true); 
     433        setCellInfo(14,1,FR_SAFFIREPRO_CMD_ID_ADAT15_TO_IMIXR, true); 
     434        setCellInfo(15,0,FR_SAFFIREPRO_CMD_ID_ADAT16_TO_IMIXL, true); 
     435        setCellInfo(15,1,FR_SAFFIREPRO_CMD_ID_ADAT16_TO_IMIXR, true); 
     436        setCellInfo(16,0,FR_SAFFIREPRO_CMD_ID_ADAT17_TO_IMIXL, true); 
     437        setCellInfo(16,1,FR_SAFFIREPRO_CMD_ID_ADAT17_TO_IMIXR, true); 
     438        setCellInfo(17,0,FR_SAFFIREPRO_CMD_ID_ADAT18_TO_IMIXL, true); 
     439        setCellInfo(17,1,FR_SAFFIREPRO_CMD_ID_ADAT18_TO_IMIXR, true); 
     440 
     441        setCellInfo(18,0,FR_SAFFIREPRO_CMD_ID_ADAT21_TO_IMIXL, true); 
     442        setCellInfo(18,1,FR_SAFFIREPRO_CMD_ID_ADAT21_TO_IMIXR, true); 
     443        setCellInfo(19,0,FR_SAFFIREPRO_CMD_ID_ADAT22_TO_IMIXL, true); 
     444        setCellInfo(19,1,FR_SAFFIREPRO_CMD_ID_ADAT22_TO_IMIXR, true); 
     445        setCellInfo(20,0,FR_SAFFIREPRO_CMD_ID_ADAT23_TO_IMIXL, true); 
     446        setCellInfo(20,1,FR_SAFFIREPRO_CMD_ID_ADAT23_TO_IMIXR, true); 
     447        setCellInfo(21,0,FR_SAFFIREPRO_CMD_ID_ADAT24_TO_IMIXL, true); 
     448        setCellInfo(21,1,FR_SAFFIREPRO_CMD_ID_ADAT24_TO_IMIXR, true); 
     449        setCellInfo(22,0,FR_SAFFIREPRO_CMD_ID_ADAT25_TO_IMIXL, true); 
     450        setCellInfo(22,1,FR_SAFFIREPRO_CMD_ID_ADAT25_TO_IMIXR, true); 
     451        setCellInfo(23,0,FR_SAFFIREPRO_CMD_ID_ADAT26_TO_IMIXL, true); 
     452        setCellInfo(23,1,FR_SAFFIREPRO_CMD_ID_ADAT26_TO_IMIXR, true); 
     453        setCellInfo(24,0,FR_SAFFIREPRO_CMD_ID_ADAT27_TO_IMIXL, true); 
     454        setCellInfo(24,1,FR_SAFFIREPRO_CMD_ID_ADAT27_TO_IMIXR, true); 
     455        setCellInfo(25,0,FR_SAFFIREPRO_CMD_ID_ADAT28_TO_IMIXL, true); 
     456        setCellInfo(25,1,FR_SAFFIREPRO_CMD_ID_ADAT28_TO_IMIXR, true); 
    451457 
    452458    } else { 
     
    462468std::string SaffireProMatrixMixer::getRowName( const int row ) 
    463469{ 
     470    debugOutput(DEBUG_LEVEL_VERBOSE, "name for row %d is %s\n",  
     471                                     row, m_RowInfo.at(row).name.c_str()); 
    464472    return m_RowInfo.at(row).name; 
    465473} 
     
    467475std::string SaffireProMatrixMixer::getColName( const int col ) 
    468476{ 
     477    debugOutput(DEBUG_LEVEL_VERBOSE, "name for col %d is %s\n",  
     478                                     col, m_ColInfo.at(col).name.c_str()); 
    469479    return m_ColInfo.at(col).name; 
    470480} 
     
    472482int SaffireProMatrixMixer::canWrite( const int row, const int col ) 
    473483{ 
     484    debugOutput(DEBUG_LEVEL_VERBOSE, "canWrite for row %d col %d is %d\n",  
     485                                     row, col, m_CellInfo.at(row).at(col).valid); 
    474486    return m_CellInfo.at(row).at(col).valid; 
    475487} 
     
    477489double SaffireProMatrixMixer::setValue( const int row, const int col, const double val ) 
    478490{ 
    479     uint32_t v=val; 
     491    int32_t v=val; 
    480492    struct sCellInfo c=m_CellInfo.at(row).at(col); 
     493     
     494    debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for id %d row %d col %d to %lf (%ld)\n",  
     495                                     c.address, row, col, val, v); 
    481496     
    482497    if (v>0x07FFF) v=0x07FFF; 
     
    497512        debugError( "getSpecificValue failed\n" ); 
    498513        return 0; 
    499     } else return val; 
     514    } else { 
     515        debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for id %d row %d col %d = %lf\n",  
     516                                         c.address, row, col, val); 
     517        return val; 
     518    } 
    500519} 
    501520 
  • trunk/libffado/src/bebob/focusrite/focusrite_saffirepro.h

    r650 r653  
    3333#include <vector> 
    3434#include <string> 
     35 
     36#define FR_SAFFIREPRO_CMD_ID_SAMPLERATE         84 
     37#define FR_SAFFIREPRO_CMD_ID_SAMPLERATE_MIRROR  115 
     38 
     39#define FR_SAFFIREPRO_CMD_ID_PHANTOM14          98 
     40#define FR_SAFFIREPRO_CMD_ID_PHANTOM58          99 
     41#define FR_SAFFIREPRO_CMD_ID_INSERT1            100 
     42#define FR_SAFFIREPRO_CMD_ID_INSERT2            101 
     43#define FR_SAFFIREPRO_CMD_ID_AC3_PASSTHROUGH    103 
     44#define FR_SAFFIREPRO_CMD_ID_MIDI_TRU           104 
     45 
     46#define FOCUSRITE_CMD_SAMPLERATE_44K1   1 
     47#define FOCUSRITE_CMD_SAMPLERATE_48K    2 
     48#define FOCUSRITE_CMD_SAMPLERATE_88K2   3 
     49#define FOCUSRITE_CMD_SAMPLERATE_96K    4 
     50#define FOCUSRITE_CMD_SAMPLERATE_176K4  5 
     51#define FOCUSRITE_CMD_SAMPLERATE_192K   6 
     52 
     53#define FR_SAFFIREPRO_CMD_ID_AN1_TO_IMIXL        0 
     54#define FR_SAFFIREPRO_CMD_ID_AN1_TO_IMIXR        1 
     55#define FR_SAFFIREPRO_CMD_ID_AN2_TO_IMIXL        2 
     56#define FR_SAFFIREPRO_CMD_ID_AN2_TO_IMIXR        3 
     57#define FR_SAFFIREPRO_CMD_ID_AN3_TO_IMIXL        4 
     58#define FR_SAFFIREPRO_CMD_ID_AN3_TO_IMIXR        5 
     59#define FR_SAFFIREPRO_CMD_ID_AN4_TO_IMIXL        6 
     60#define FR_SAFFIREPRO_CMD_ID_AN4_TO_IMIXR        7 
     61#define FR_SAFFIREPRO_CMD_ID_AN5_TO_IMIXL        8 
     62#define FR_SAFFIREPRO_CMD_ID_AN5_TO_IMIXR        9 
     63#define FR_SAFFIREPRO_CMD_ID_AN6_TO_IMIXL       10 
     64#define FR_SAFFIREPRO_CMD_ID_AN6_TO_IMIXR       11 
     65#define FR_SAFFIREPRO_CMD_ID_AN7_TO_IMIXL       12 
     66#define FR_SAFFIREPRO_CMD_ID_AN7_TO_IMIXR       13 
     67#define FR_SAFFIREPRO_CMD_ID_AN8_TO_IMIXL       14 
     68#define FR_SAFFIREPRO_CMD_ID_AN8_TO_IMIXR       15 
     69#define FR_SAFFIREPRO_CMD_ID_SPDIFL_TO_IMIXL    16 
     70#define FR_SAFFIREPRO_CMD_ID_SPDIFL_TO_IMIXR    17 
     71#define FR_SAFFIREPRO_CMD_ID_SPDIFR_TO_IMIXL    18 
     72#define FR_SAFFIREPRO_CMD_ID_SPDIFR_TO_IMIXR    19 
     73 
     74#define FR_SAFFIREPRO_CMD_ID_ADAT11_TO_IMIXL    20 
     75#define FR_SAFFIREPRO_CMD_ID_ADAT11_TO_IMIXR    21 
     76#define FR_SAFFIREPRO_CMD_ID_ADAT12_TO_IMIXL    22 
     77#define FR_SAFFIREPRO_CMD_ID_ADAT12_TO_IMIXR    23 
     78#define FR_SAFFIREPRO_CMD_ID_ADAT13_TO_IMIXL    24 
     79#define FR_SAFFIREPRO_CMD_ID_ADAT13_TO_IMIXR    25 
     80#define FR_SAFFIREPRO_CMD_ID_ADAT14_TO_IMIXL    26 
     81#define FR_SAFFIREPRO_CMD_ID_ADAT14_TO_IMIXR    27 
     82#define FR_SAFFIREPRO_CMD_ID_ADAT15_TO_IMIXL    28 
     83#define FR_SAFFIREPRO_CMD_ID_ADAT15_TO_IMIXR    29 
     84#define FR_SAFFIREPRO_CMD_ID_ADAT16_TO_IMIXL    30 
     85#define FR_SAFFIREPRO_CMD_ID_ADAT16_TO_IMIXR    31 
     86#define FR_SAFFIREPRO_CMD_ID_ADAT17_TO_IMIXL    32 
     87#define FR_SAFFIREPRO_CMD_ID_ADAT17_TO_IMIXR    33 
     88#define FR_SAFFIREPRO_CMD_ID_ADAT18_TO_IMIXL    34 
     89#define FR_SAFFIREPRO_CMD_ID_ADAT18_TO_IMIXR    35 
     90 
     91#define FR_SAFFIREPRO_CMD_ID_ADAT21_TO_IMIXL    36 
     92#define FR_SAFFIREPRO_CMD_ID_ADAT21_TO_IMIXR    37 
     93#define FR_SAFFIREPRO_CMD_ID_ADAT22_TO_IMIXL    38 
     94#define FR_SAFFIREPRO_CMD_ID_ADAT22_TO_IMIXR    39 
     95#define FR_SAFFIREPRO_CMD_ID_ADAT23_TO_IMIXL    40 
     96#define FR_SAFFIREPRO_CMD_ID_ADAT23_TO_IMIXR    41 
     97#define FR_SAFFIREPRO_CMD_ID_ADAT24_TO_IMIXL    42 
     98#define FR_SAFFIREPRO_CMD_ID_ADAT24_TO_IMIXR    43 
     99#define FR_SAFFIREPRO_CMD_ID_ADAT25_TO_IMIXL    44 
     100#define FR_SAFFIREPRO_CMD_ID_ADAT25_TO_IMIXR    45 
     101#define FR_SAFFIREPRO_CMD_ID_ADAT26_TO_IMIXL    46 
     102#define FR_SAFFIREPRO_CMD_ID_ADAT26_TO_IMIXR    47 
     103#define FR_SAFFIREPRO_CMD_ID_ADAT27_TO_IMIXL    48 
     104#define FR_SAFFIREPRO_CMD_ID_ADAT27_TO_IMIXR    49 
     105#define FR_SAFFIREPRO_CMD_ID_ADAT28_TO_IMIXL    50 
     106#define FR_SAFFIREPRO_CMD_ID_ADAT28_TO_IMIXR    51 
     107 
     108#define FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT1    52 
     109#define FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT2    54 
     110#define FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT1   53 
     111#define FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT2   55 
     112 
     113#define FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT3    56 
     114#define FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT4    59 
     115#define FR_SAFFIREPRO_CMD_ID_PC3_TO_OUT3    57 
     116#define FR_SAFFIREPRO_CMD_ID_PC4_TO_OUT4    60 
     117#define FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT3   58 
     118#define FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT4   61 
     119 
     120#define FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT5    62 
     121#define FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT6    65 
     122#define FR_SAFFIREPRO_CMD_ID_PC5_TO_OUT5    63 
     123#define FR_SAFFIREPRO_CMD_ID_PC6_TO_OUT6    66 
     124#define FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT5   64 
     125#define FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT6   67 
     126 
     127#define FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT7    68 
     128#define FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT8    71 
     129#define FR_SAFFIREPRO_CMD_ID_PC7_TO_OUT7    69 
     130#define FR_SAFFIREPRO_CMD_ID_PC8_TO_OUT8    72 
     131#define FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT7   70 
     132#define FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT8   73 
     133 
     134#define FR_SAFFIREPRO_CMD_ID_PC1_TO_OUT9    74 
     135#define FR_SAFFIREPRO_CMD_ID_PC2_TO_OUT10   77 
     136#define FR_SAFFIREPRO_CMD_ID_PC9_TO_OUT9    75 
     137#define FR_SAFFIREPRO_CMD_ID_PC10_TO_OUT10  78 
     138#define FR_SAFFIREPRO_CMD_ID_MIX1_TO_OUT9   76 
     139#define FR_SAFFIREPRO_CMD_ID_MIX2_TO_OUT10  79 
    35140 
    36141namespace BeBoB { 
  • trunk/libffado/support/mixer/mixer.py

    r645 r653  
    55from mixer_phase88 import * 
    66from mixer_phase24 import * 
     7from mixer_saffirepro import * 
    78import sys 
    89import dbus 
     
    1213    [(0x000aac, 0x00000004),'PhaseX24Control'], 
    1314    [(0x000aac, 0x00000007),'PhaseX24Control'], 
     15    [(0x00130e, 0x00000003),'SaffireProMixer'], 
     16    [(0x00130e, 0x00000006),'SaffireProMixer'], 
    1417    ] 
    1518 
     
    4245        dev = self.bus.get_object(self.servername, path) 
    4346        dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Discrete') 
    44         return dev_cont.getValue()         
     47        return dev_cont.getValue() 
     48 
     49    def setMatrixMixerValue(self, subpath, row, col, v): 
     50        path = self.basepath + subpath 
     51        dev = self.bus.get_object(self.servername, path) 
     52        dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.MatrixMixer') 
     53        dev_cont.setValue(row, col, v) 
     54 
     55    def getMatrixMixerValue(self, subpath, row, col): 
     56        path = self.basepath + subpath 
     57        dev = self.bus.get_object(self.servername, path) 
     58        dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.MatrixMixer') 
     59        return dev_cont.getValue(row, col) 
    4560 
    4661class DeviceManagerInterface: 
  • trunk/libffado/support/mixer/SConscript

    r591 r653  
    44 
    55if env.has_key('PYUIC'): 
    6         for app in ["mixer_phase24.ui","mixer_phase88.ui"]: 
     6        for app in ["mixer_phase24.ui","mixer_phase88.ui","mixer_saffirepro.ui"]: 
    77                env.Command( target=app.replace(".","")+".py", source=app, action="$PYUIC $SOURCE > $TARGET" )