Changeset 1323

Show
Ignore:
Timestamp:
09/19/08 14:47:23 (12 years ago)
Author:
jwoithe
Message:

MOTU: first cut at mixer controls for the Ultralite.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/motu/motu_avdevice.cpp

    r1322 r1323  
    302302}; 
    303303 
    304 const MixerCtrl MixerCtrls_896HD[] = { 
    305     {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, }, 
    306     {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, }, 
    307     {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, }, 
    308     {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, }, 
    309  
    310     /* For phones source control, "register" is currently unused */ 
    311     {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0}, 
    312  
    313     /* For optical mode controls, the "register" is used to indicate direction */ 
    314     {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_DIR_IN}, 
    315     {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_DIR_OUT}, 
    316  
    317     /* For meter controls the "register" indicates which meter controls are available */ 
    318     {"Control/Meter_", "Meter ", "", MOTU_CTRL_METER, 
    319       MOTU_CTRL_METER_PEAKHOLD | MOTU_CTRL_METER_CLIPHOLD | MOTU_CTRL_METER_AESEBU_SRC |  
    320       MOTU_CTRL_METER_PROG_SRC}, 
     304const MatrixMixBus MixerBuses_Ultralite[] = { 
     305    {"Mix 1", 0x4000, }, 
     306    {"Mix 2", 0x4100, }, 
     307    {"Mix 3", 0x4200, }, 
     308    {"Mix 4", 0x4300, }, 
    321309}; 
    322310 
    323 const MixerCtrl MixerCtrls_828Mk2[] = { 
     311const MatrixMixChannel MixerChannels_Ultralite[] = { 
     312    {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, }, 
     313    {"Analog 2", MOTU_CTRL_STD_CHANNEL, 0x0004, }, 
     314    {"Analog 3", MOTU_CTRL_STD_CHANNEL, 0x0008, }, 
     315    {"Analog 4", MOTU_CTRL_STD_CHANNEL, 0x000c, }, 
     316    {"Analog 5", MOTU_CTRL_STD_CHANNEL, 0x0010, }, 
     317    {"Analog 6", MOTU_CTRL_STD_CHANNEL, 0x0014, }, 
     318    {"Analog 7", MOTU_CTRL_STD_CHANNEL, 0x0018, }, 
     319    {"Analog 8", MOTU_CTRL_STD_CHANNEL, 0x001c, }, 
     320    {"SPDIF 1", MOTU_CTRL_STD_CHANNEL, 0x0020, }, 
     321    {"SPDIF 2", MOTU_CTRL_STD_CHANNEL, 0x0024, }, 
     322}; 
     323 
     324const MixerCtrl MixerCtrls_Ultralite[] = { 
    324325    {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, }, 
    325326    {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, }, 
     
    345346}; 
    346347 
     348const MixerCtrl MixerCtrls_896HD[] = { 
     349    {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, }, 
     350    {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, }, 
     351    {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, }, 
     352    {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, }, 
     353 
     354    /* For phones source control, "register" is currently unused */ 
     355    {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0}, 
     356 
     357    /* For optical mode controls, the "register" is used to indicate direction */ 
     358    {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_DIR_IN}, 
     359    {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_DIR_OUT}, 
     360 
     361    /* For meter controls the "register" indicates which meter controls are available */ 
     362    {"Control/Meter_", "Meter ", "", MOTU_CTRL_METER, 
     363      MOTU_CTRL_METER_PEAKHOLD | MOTU_CTRL_METER_CLIPHOLD | MOTU_CTRL_METER_AESEBU_SRC |  
     364      MOTU_CTRL_METER_PROG_SRC}, 
     365}; 
     366 
     367const MixerCtrl MixerCtrls_828Mk2[] = { 
     368    {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, }, 
     369    {"Mix2/Mix_", "Mix 2 ", "", MOTU_CTRL_STD_MIX, 0x0c24, }, 
     370    {"Mix3/Mix_", "Mix 3 ", "", MOTU_CTRL_STD_MIX, 0x0c28, }, 
     371    {"Mix4/Mix_", "Mix 4 ", "", MOTU_CTRL_STD_MIX, 0x0c2c, }, 
     372 
     373    /* For mic/line input controls, the "register" is the zero-based channel number */ 
     374    {"Control/Ana1_", "Analog 1 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 0}, 
     375    {"Control/Ana2_", "Analog 2 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 1}, 
     376    {"Control/Ana3_", "Analog 3 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 2}, 
     377    {"Control/Ana4_", "Analog 4 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 3}, 
     378    {"Control/Ana5_", "Analog 5 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 4}, 
     379    {"Control/Ana6_", "Analog 6 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 5}, 
     380    {"Control/Ana7_", "Analog 7 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 6}, 
     381    {"Control/Ana8_", "Analog 8 input ", "", MOTU_CTRL_TRAVELER_LINE_INPUT_CTRLS, 7}, 
     382 
     383    /* For phones source control, "register" is currently unused */ 
     384    {"Control/Phones_", "Phones source", "", MOTU_CTRL_PHONES_SRC, 0}, 
     385 
     386    /* For optical mode controls, the "register" is used to indicate direction */ 
     387    {"Control/OpticalIn_mode", "Optical input mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_DIR_IN}, 
     388    {"Control/OpticalOut_mode", "Optical output mode ", "", MOTU_CTRL_OPTICAL_MODE, MOTU_DIR_OUT}, 
     389}; 
     390 
    347391const MotuMixer Mixer_Traveler = MOTUMIXER( 
    348392    MixerCtrls_Traveler, MixerBuses_Traveler, MixerChannels_Traveler); 
     393 
     394const MotuMixer Mixer_Ultralite = MOTUMIXER( 
     395    MixerCtrls_Ultralite, MixerBuses_Ultralite, MixerChannels_Ultralite); 
    349396 
    350397const MotuMixer Mixer_828Mk2 = MOTUMIXER( 
     
    361408    { Ports_828MKII,   N_ELEMENTS( Ports_828MKII ),    96000, &Mixer_828Mk2, }, 
    362409    { Ports_TRAVELER,  N_ELEMENTS( Ports_TRAVELER ),  192000, &Mixer_Traveler, }, 
    363     { Ports_ULTRALITE, N_ELEMENTS( Ports_ULTRALITE ),  96000 }, 
     410    { Ports_ULTRALITE, N_ELEMENTS( Ports_ULTRALITE ),  96000, &Mixer_Ultralite, }, 
    364411    { Ports_8PRE,      N_ELEMENTS( Ports_8PRE ),       96000 }, 
    365412    { Ports_828MKI,    N_ELEMENTS( Ports_828MKI ),     48000 },