Changeset 1522

Show
Ignore:
Timestamp:
03/22/09 16:34:55 (12 years ago)
Author:
jwoithe
Message:

MOTU: keep the qt3 mixer functional now the dbus interface doesn't export the old device option flags anymore.
MOTU: add a stereo mix mode - if a fader is moved while holding down the CTRL key on the keyboard, both that fader and the fader associated with the other channel in its stereo pair will move together. This is the same method used by the CueMix? application for ganging faders.
MOTU: further minor mixer cleanups.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/support/mixer-qt4/mixer_motu.py

    r1521 r1522  
    2222# 
    2323 
    24 from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    25 from PyQt4.QtGui import QWidget 
     24from PyQt4.QtCore import SIGNAL, SLOT, QObject, Qt 
     25from PyQt4.QtGui import QWidget, QApplication 
    2626from mixer_motuui import * 
    2727 
     
    5050        # first index (the row) is the zero-based mix number while the 
    5151        # second index (the column) is the zero-based channel number.  The 
    52         # order of the channel enumeration must agree with that used when 
    53         # creating the dbus controls within motu_avdevice.cpp. 
     52        # third index gives the control of the stereo pair of the control 
     53        # used as the key.  The order of the channel enumeration must agree 
     54        # with that used when creating the dbus controls within 
     55        # motu_avdevice.cpp. 
    5456        self.ChannelFaders={ 
    55             self.mix1ana1_fader: ['/Mixer/fader', 0, 0], 
    56             self.mix1ana2_fader: ['/Mixer/fader', 0, 1], 
    57             self.mix1ana3_fader: ['/Mixer/fader', 0, 2], 
    58             self.mix1ana4_fader: ['/Mixer/fader', 0, 3], 
    59             self.mix1ana5_fader: ['/Mixer/fader', 0, 4], 
    60             self.mix1ana6_fader: ['/Mixer/fader', 0, 5], 
    61             self.mix1ana7_fader: ['/Mixer/fader', 0, 6], 
    62             self.mix1ana8_fader: ['/Mixer/fader', 0, 7], 
    63             self.mix1aes1_fader: ['/Mixer/fader', 0, 8], 
    64             self.mix1aes2_fader: ['/Mixer/fader', 0, 9], 
    65             self.mix1spdif1_fader: ['/Mixer/fader', 0, 10], 
    66             self.mix1spdif2_fader: ['/Mixer/fader', 0, 11], 
    67             self.mix1adat1_fader: ['/Mixer/fader', 0, 12], 
    68             self.mix1adat2_fader: ['/Mixer/fader', 0, 13], 
    69             self.mix1adat3_fader: ['/Mixer/fader', 0, 14], 
    70             self.mix1adat4_fader: ['/Mixer/fader', 0, 15], 
    71             self.mix1adat5_fader: ['/Mixer/fader', 0, 16], 
    72             self.mix1adat6_fader: ['/Mixer/fader', 0, 17], 
    73             self.mix1adat7_fader: ['/Mixer/fader', 0, 18], 
    74             self.mix1adat8_fader: ['/Mixer/fader', 0, 19], 
    75  
    76             self.mix2ana1_fader: ['/Mixer/fader', 1, 0], 
    77             self.mix2ana2_fader: ['/Mixer/fader', 1, 1], 
    78             self.mix2ana3_fader: ['/Mixer/fader', 1, 2], 
    79             self.mix2ana4_fader: ['/Mixer/fader', 1, 3], 
    80             self.mix2ana5_fader: ['/Mixer/fader', 1, 4], 
    81             self.mix2ana6_fader: ['/Mixer/fader', 1, 5], 
    82             self.mix2ana7_fader: ['/Mixer/fader', 1, 6], 
    83             self.mix2ana8_fader: ['/Mixer/fader', 1, 7], 
    84             self.mix2aes1_fader: ['/Mixer/fader', 1, 8], 
    85             self.mix2aes2_fader: ['/Mixer/fader', 1, 9], 
    86             self.mix2spdif1_fader: ['/Mixer/fader', 1, 10], 
    87             self.mix2spdif2_fader: ['/Mixer/fader', 1, 11], 
    88             self.mix2adat1_fader: ['/Mixer/fader', 1, 12], 
    89             self.mix2adat2_fader: ['/Mixer/fader', 1, 13], 
    90             self.mix2adat3_fader: ['/Mixer/fader', 1, 14], 
    91             self.mix2adat4_fader: ['/Mixer/fader', 1, 15], 
    92             self.mix2adat5_fader: ['/Mixer/fader', 1, 16], 
    93             self.mix2adat6_fader: ['/Mixer/fader', 1, 17], 
    94             self.mix2adat7_fader: ['/Mixer/fader', 1, 18], 
    95             self.mix2adat8_fader: ['/Mixer/fader', 1, 19], 
    96  
    97             self.mix3ana1_fader: ['/Mixer/fader', 2, 0], 
    98             self.mix3ana2_fader: ['/Mixer/fader', 2, 1], 
    99             self.mix3ana3_fader: ['/Mixer/fader', 2, 2], 
    100             self.mix3ana4_fader: ['/Mixer/fader', 2, 3], 
    101             self.mix3ana5_fader: ['/Mixer/fader', 2, 4], 
    102             self.mix3ana6_fader: ['/Mixer/fader', 2, 5], 
    103             self.mix3ana7_fader: ['/Mixer/fader', 2, 6], 
    104             self.mix3ana8_fader: ['/Mixer/fader', 2, 7], 
    105             self.mix3aes1_fader: ['/Mixer/fader', 2, 8], 
    106             self.mix3aes2_fader: ['/Mixer/fader', 2, 9], 
    107             self.mix3spdif1_fader: ['/Mixer/fader', 2, 10], 
    108             self.mix3spdif2_fader: ['/Mixer/fader', 2, 11], 
    109             self.mix3adat1_fader: ['/Mixer/fader', 2, 12], 
    110             self.mix3adat2_fader: ['/Mixer/fader', 2, 13], 
    111             self.mix3adat3_fader: ['/Mixer/fader', 2, 14], 
    112             self.mix3adat4_fader: ['/Mixer/fader', 2, 15], 
    113             self.mix3adat5_fader: ['/Mixer/fader', 2, 16], 
    114             self.mix3adat6_fader: ['/Mixer/fader', 2, 17], 
    115             self.mix3adat7_fader: ['/Mixer/fader', 2, 18], 
    116             self.mix3adat8_fader: ['/Mixer/fader', 2, 19], 
    117  
    118             self.mix4ana1_fader: ['/Mixer/fader', 3, 0], 
    119             self.mix4ana2_fader: ['/Mixer/fader', 3, 1], 
    120             self.mix4ana3_fader: ['/Mixer/fader', 3, 2], 
    121             self.mix4ana4_fader: ['/Mixer/fader', 3, 3], 
    122             self.mix4ana5_fader: ['/Mixer/fader', 3, 4], 
    123             self.mix4ana6_fader: ['/Mixer/fader', 3, 5], 
    124             self.mix4ana7_fader: ['/Mixer/fader', 3, 6], 
    125             self.mix4ana8_fader: ['/Mixer/fader', 3, 7], 
    126             self.mix4aes1_fader: ['/Mixer/fader', 3, 8], 
    127             self.mix4aes2_fader: ['/Mixer/fader', 3, 9], 
    128             self.mix4spdif1_fader: ['/Mixer/fader', 3, 10], 
    129             self.mix4spdif2_fader: ['/Mixer/fader', 3, 11], 
    130             self.mix4adat1_fader: ['/Mixer/fader', 3, 12], 
    131             self.mix4adat2_fader: ['/Mixer/fader', 3, 13], 
    132             self.mix4adat3_fader: ['/Mixer/fader', 3, 14], 
    133             self.mix4adat4_fader: ['/Mixer/fader', 3, 15], 
    134             self.mix4adat5_fader: ['/Mixer/fader', 3, 16], 
    135             self.mix4adat6_fader: ['/Mixer/fader', 3, 17], 
    136             self.mix4adat7_fader: ['/Mixer/fader', 3, 18], 
    137             self.mix4adat8_fader: ['/Mixer/fader', 3, 19], 
     57            self.mix1ana1_fader: ['/Mixer/fader', 0, 0, self.mix1ana2_fader], 
     58            self.mix1ana2_fader: ['/Mixer/fader', 0, 1, self.mix1ana1_fader], 
     59            self.mix1ana3_fader: ['/Mixer/fader', 0, 2, self.mix1ana4_fader], 
     60            self.mix1ana4_fader: ['/Mixer/fader', 0, 3, self.mix1ana3_fader], 
     61            self.mix1ana5_fader: ['/Mixer/fader', 0, 4, self.mix1ana6_fader], 
     62            self.mix1ana6_fader: ['/Mixer/fader', 0, 5, self.mix1ana5_fader], 
     63            self.mix1ana7_fader: ['/Mixer/fader', 0, 6, self.mix1ana8_fader], 
     64            self.mix1ana8_fader: ['/Mixer/fader', 0, 7, self.mix1ana7_fader], 
     65            self.mix1aes1_fader: ['/Mixer/fader', 0, 8, self.mix1aes2_fader], 
     66            self.mix1aes2_fader: ['/Mixer/fader', 0, 9, self.mix1aes1_fader], 
     67            self.mix1spdif1_fader: ['/Mixer/fader', 0, 10, self.mix1spdif2_fader], 
     68            self.mix1spdif2_fader: ['/Mixer/fader', 0, 11, self.mix1spdif1_fader], 
     69            self.mix1adat1_fader: ['/Mixer/fader', 0, 12, self.mix1adat2_fader], 
     70            self.mix1adat2_fader: ['/Mixer/fader', 0, 13, self.mix1adat1_fader], 
     71            self.mix1adat3_fader: ['/Mixer/fader', 0, 14, self.mix1adat4_fader], 
     72            self.mix1adat4_fader: ['/Mixer/fader', 0, 15, self.mix1adat3_fader], 
     73            self.mix1adat5_fader: ['/Mixer/fader', 0, 16, self.mix1adat6_fader], 
     74            self.mix1adat6_fader: ['/Mixer/fader', 0, 17, self.mix1adat5_fader], 
     75            self.mix1adat7_fader: ['/Mixer/fader', 0, 18, self.mix1adat8_fader], 
     76            self.mix1adat8_fader: ['/Mixer/fader', 0, 19, self.mix1adat7_fader], 
     77 
     78            self.mix2ana1_fader: ['/Mixer/fader', 1, 0, self.mix2ana2_fader], 
     79            self.mix2ana2_fader: ['/Mixer/fader', 1, 1, self.mix2ana1_fader], 
     80            self.mix2ana3_fader: ['/Mixer/fader', 1, 2, self.mix2ana4_fader], 
     81            self.mix2ana4_fader: ['/Mixer/fader', 1, 3, self.mix2ana3_fader], 
     82            self.mix2ana5_fader: ['/Mixer/fader', 1, 4, self.mix2ana6_fader], 
     83            self.mix2ana6_fader: ['/Mixer/fader', 1, 5, self.mix2ana5_fader], 
     84            self.mix2ana7_fader: ['/Mixer/fader', 1, 6, self.mix2ana8_fader], 
     85            self.mix2ana8_fader: ['/Mixer/fader', 1, 7, self.mix2ana7_fader], 
     86            self.mix2aes1_fader: ['/Mixer/fader', 1, 8, self.mix2aes2_fader], 
     87            self.mix2aes2_fader: ['/Mixer/fader', 1, 9, self.mix2aes1_fader], 
     88            self.mix2spdif1_fader: ['/Mixer/fader', 1, 10, self.mix2spdif2_fader], 
     89            self.mix2spdif2_fader: ['/Mixer/fader', 1, 11, self.mix2spdif1_fader], 
     90            self.mix2adat1_fader: ['/Mixer/fader', 1, 12, self.mix2adat2_fader], 
     91            self.mix2adat2_fader: ['/Mixer/fader', 1, 13, self.mix2adat1_fader], 
     92            self.mix2adat3_fader: ['/Mixer/fader', 1, 14, self.mix2adat4_fader], 
     93            self.mix2adat4_fader: ['/Mixer/fader', 1, 15, self.mix2adat3_fader], 
     94            self.mix2adat5_fader: ['/Mixer/fader', 1, 16, self.mix2adat6_fader], 
     95            self.mix2adat6_fader: ['/Mixer/fader', 1, 17, self.mix2adat5_fader], 
     96            self.mix2adat7_fader: ['/Mixer/fader', 1, 18, self.mix2adat8_fader], 
     97            self.mix2adat8_fader: ['/Mixer/fader', 1, 19, self.mix2adat7_fader], 
     98 
     99            self.mix3ana1_fader: ['/Mixer/fader', 2, 0, self.mix3ana2_fader], 
     100            self.mix3ana2_fader: ['/Mixer/fader', 2, 1, self.mix3ana1_fader], 
     101            self.mix3ana3_fader: ['/Mixer/fader', 2, 2, self.mix3ana4_fader], 
     102            self.mix3ana4_fader: ['/Mixer/fader', 2, 3, self.mix3ana3_fader], 
     103            self.mix3ana5_fader: ['/Mixer/fader', 2, 4, self.mix3ana6_fader], 
     104            self.mix3ana6_fader: ['/Mixer/fader', 2, 5, self.mix3ana5_fader], 
     105            self.mix3ana7_fader: ['/Mixer/fader', 2, 6, self.mix3ana8_fader], 
     106            self.mix3ana8_fader: ['/Mixer/fader', 2, 7, self.mix3ana7_fader], 
     107            self.mix3aes1_fader: ['/Mixer/fader', 2, 8, self.mix3aes2_fader], 
     108            self.mix3aes2_fader: ['/Mixer/fader', 2, 9, self.mix3aes1_fader], 
     109            self.mix3spdif1_fader: ['/Mixer/fader', 2, 10, self.mix3spdif2_fader], 
     110            self.mix3spdif2_fader: ['/Mixer/fader', 2, 11, self.mix3spdif1_fader], 
     111            self.mix3adat1_fader: ['/Mixer/fader', 2, 12, self.mix3adat2_fader], 
     112            self.mix3adat2_fader: ['/Mixer/fader', 2, 13, self.mix3adat1_fader], 
     113            self.mix3adat3_fader: ['/Mixer/fader', 2, 14, self.mix3adat4_fader], 
     114            self.mix3adat4_fader: ['/Mixer/fader', 2, 15, self.mix3adat3_fader], 
     115            self.mix3adat5_fader: ['/Mixer/fader', 2, 16, self.mix3adat6_fader], 
     116            self.mix3adat6_fader: ['/Mixer/fader', 2, 17, self.mix3adat5_fader], 
     117            self.mix3adat7_fader: ['/Mixer/fader', 2, 18, self.mix3adat8_fader], 
     118            self.mix3adat8_fader: ['/Mixer/fader', 2, 19, self.mix3adat7_fader], 
     119 
     120            self.mix4ana1_fader: ['/Mixer/fader', 3, 0, self.mix4ana2_fader], 
     121            self.mix4ana2_fader: ['/Mixer/fader', 3, 1, self.mix4ana1_fader], 
     122            self.mix4ana3_fader: ['/Mixer/fader', 3, 2, self.mix4ana4_fader], 
     123            self.mix4ana4_fader: ['/Mixer/fader', 3, 3, self.mix4ana3_fader], 
     124            self.mix4ana5_fader: ['/Mixer/fader', 3, 4, self.mix4ana6_fader], 
     125            self.mix4ana6_fader: ['/Mixer/fader', 3, 5, self.mix4ana5_fader], 
     126            self.mix4ana7_fader: ['/Mixer/fader', 3, 6, self.mix4ana8_fader], 
     127            self.mix4ana8_fader: ['/Mixer/fader', 3, 7, self.mix4ana7_fader], 
     128            self.mix4aes1_fader: ['/Mixer/fader', 3, 8, self.mix4aes2_fader], 
     129            self.mix4aes2_fader: ['/Mixer/fader', 3, 9, self.mix4aes1_fader], 
     130            self.mix4spdif1_fader: ['/Mixer/fader', 3, 10, self.mix4spdif2_fader], 
     131            self.mix4spdif2_fader: ['/Mixer/fader', 3, 11, self.mix4spdif1_fader], 
     132            self.mix4adat1_fader: ['/Mixer/fader', 3, 12, self.mix4adat2_fader], 
     133            self.mix4adat2_fader: ['/Mixer/fader', 3, 13, self.mix4adat1_fader], 
     134            self.mix4adat3_fader: ['/Mixer/fader', 3, 14, self.mix4adat4_fader], 
     135            self.mix4adat4_fader: ['/Mixer/fader', 3, 15, self.mix4adat3_fader], 
     136            self.mix4adat5_fader: ['/Mixer/fader', 3, 16, self.mix4adat6_fader], 
     137            self.mix4adat6_fader: ['/Mixer/fader', 3, 17, self.mix4adat5_fader], 
     138            self.mix4adat7_fader: ['/Mixer/fader', 3, 18, self.mix4adat8_fader], 
     139            self.mix4adat8_fader: ['/Mixer/fader', 3, 19, self.mix4adat7_fader], 
    138140        } 
    139141 
     
    454456        } 
    455457 
    456         # Ultimately these may be rolled into the BinarySwitches controls, 
    457         # but since they aren't implemented and therefore need to be 
    458         # disabled it's easier to keep them separate for the moment.  The 
    459         # dbus path for these is yet to be finalised too - for example we 
    460         # may end up using a matrix mixer. 
    461         self.PairSwitches={ 
    462 #            self.mix1ana1_2_pair:   ['Mixer/Mix1/Ana1_2_pair'], 
    463 #            self.mix1ana3_4_pair:   ['Mixer/Mix1/Ana3_4_pair'], 
    464 #            self.mix1ana5_6_pair:   ['Mixer/Mix1/Ana5_6_pair'], 
    465 #            self.mix1ana7_8_pair:   ['Mixer/Mix1/Ana7_8_pair'], 
    466 #            self.mix1aes1_2_pair:   ['Mixer/Mix1/Aes1_2_pair'], 
    467 #            self.mix1adat1_2_pair:  ['Mixer/Mix1/Adat1_2_pair'], 
    468 #            self.mix1adat3_4_pair:  ['Mixer/Mix1/Adat3_4_pair'], 
    469 #            self.mix1adat5_6_pair:  ['Mixer/Mix1/Adat5_6_pair'], 
    470 #            self.mix1adat7_8_pair:  ['Mixer/Mix1/Adat7_8_pair'], 
    471 #            self.mix1spdif1_2_pair: ['Mixer/Mix1/Spdif1_2_pair'], 
    472  
    473 #            self.mix2ana1_2_pair:   ['Mixer/Mix2/Ana1_2_pair'], 
    474 #            self.mix2ana3_4_pair:   ['Mixer/Mix2/Ana3_4_pair'], 
    475 #            self.mix2ana5_6_pair:   ['Mixer/Mix2/Ana5_6_pair'], 
    476 #            self.mix2ana7_8_pair:   ['Mixer/Mix2/Ana7_8_pair'], 
    477 #            self.mix2aes1_2_pair:   ['Mixer/Mix2/Aes1_2_pair'], 
    478 #            self.mix2adat1_2_pair:  ['Mixer/Mix2/Adat1_2_pair'], 
    479 #            self.mix2adat3_4_pair:  ['Mixer/Mix2/Adat3_4_pair'], 
    480 #            self.mix2adat5_6_pair:  ['Mixer/Mix2/Adat5_6_pair'], 
    481 #            self.mix2adat7_8_pair:  ['Mixer/Mix2/Adat7_8_pair'], 
    482 #            self.mix2spdif1_2_pair: ['Mixer/Mix2/Spdif1_2_pair'], 
    483  
    484 #            self.mix3ana1_2_pair:   ['Mixer/Mix3/Ana1_2_pair'], 
    485 #            self.mix3ana3_4_pair:   ['Mixer/Mix3/Ana3_4_pair'], 
    486 #            self.mix3ana5_6_pair:   ['Mixer/Mix3/Ana5_6_pair'], 
    487 #            self.mix3ana7_8_pair:   ['Mixer/Mix3/Ana7_8_pair'], 
    488 #            self.mix3aes1_2_pair:   ['Mixer/Mix3/Aes1_2_pair'], 
    489 #            self.mix3adat1_2_pair:  ['Mixer/Mix3/Adat1_2_pair'], 
    490 #            self.mix3adat3_4_pair:  ['Mixer/Mix3/Adat3_4_pair'], 
    491 #            self.mix3adat5_6_pair:  ['Mixer/Mix3/Adat5_6_pair'], 
    492 #            self.mix3adat7_8_pair:  ['Mixer/Mix3/Adat7_8_pair'], 
    493 #            self.mix3spdif1_2_pair: ['Mixer/Mix3/Spdif1_2_pair'], 
    494  
    495 #            self.mix4ana1_2_pair:   ['Mixer/Mix4/Ana1_2_pair'], 
    496 #            self.mix4ana3_4_pair:   ['Mixer/Mix4/Ana3_4_pair'], 
    497 #            self.mix4ana5_6_pair:   ['Mixer/Mix4/Ana5_6_pair'], 
    498 #            self.mix4ana7_8_pair:   ['Mixer/Mix4/Ana7_8_pair'], 
    499 #            self.mix4aes1_2_pair:   ['Mixer/Mix4/Aes1_2_pair'], 
    500 #            self.mix4adat1_2_pair:  ['Mixer/Mix4/Adat1_2_pair'], 
    501 #            self.mix4adat3_4_pair:  ['Mixer/Mix4/Adat3_4_pair'], 
    502 #            self.mix4adat5_6_pair:  ['Mixer/Mix4/Adat5_6_pair'], 
    503 #            self.mix4adat7_8_pair:  ['Mixer/Mix4/Adat7_8_pair'], 
    504 #            self.mix4spdif1_2_pair: ['Mixer/Mix4/Spdif1_2_pair'], 
    505         } 
    506  
    507458        self.Selectors={ 
    508459            self.mix1_dest:      ['/Mixer/Mix1/Mix_dest'], 
     
    536487        self.hw.setMatrixMixerValue(self.ChannelFaders[sender][0], 
    537488            self.ChannelFaders[sender][1], self.ChannelFaders[sender][2], vol) 
     489        # Using the ctrl modifier key makes stereo pairs move in unison 
     490        if (QApplication.keyboardModifiers() == Qt.ControlModifier): 
     491            pair = self.ChannelFaders[sender][3] 
     492            pair.setValue(vol) 
    538493 
    539494    # public slot: a multivalue control within a matrix mixer 
     
    673628            self.optical_out_mode.setEnabled(False) 
    674629 
    675         # Some devices don't have the option of selecting an optical SPDIF 
    676         # mode. 
    677630        # The 896HD doesn't have optical SPDIF (aka Toslink) capability 
    678631        if (self.model == MOTU_MODEL_896HD): 
     
    832785            QObject.connect(ctrl, SIGNAL('valueChanged(int)'), self.updateControl) 
    833786 
    834         # Disable the channel pair controls since they aren't yet implemented 
    835         for ctrl, info in self.PairSwitches.iteritems(): 
    836             log.debug("%s control is not implemented yet: disabling" % (info[0])) 
    837             ctrl.setEnabled(False) 
    838  
    839787        for ctrl, info in self.ChannelBinarySwitches.iteritems(): 
    840788            if (not(ctrl.isEnabled())): 
  • branches/libffado-2.0/support/mixer/mixer_motu.py

    r1443 r1522  
    499499        } 
    500500 
    501         # Ultimately these may be rolled into the BinarySwitches controls, 
    502         # but since they aren't implemented and therefore need to be 
    503         # disabled it's easier to keep them separate for the moment.  The 
    504         # dbus path for these is yet to be finalised too - for example we 
    505         # may end up using a matrix mixer. 
    506         self.PairSwitches={ 
    507 #            self.mix1ana1_2_pair:   ['Mixer/Mix1/Ana1_2_pair'], 
    508 #            self.mix1ana3_4_pair:   ['Mixer/Mix1/Ana3_4_pair'], 
    509 #            self.mix1ana5_6_pair:   ['Mixer/Mix1/Ana5_6_pair'], 
    510 #            self.mix1ana7_8_pair:   ['Mixer/Mix1/Ana7_8_pair'], 
    511 #            self.mix1aes1_2_pair:   ['Mixer/Mix1/Aes1_2_pair'], 
    512 #            self.mix1adat1_2_pair:  ['Mixer/Mix1/Adat1_2_pair'], 
    513 #            self.mix1adat3_4_pair:  ['Mixer/Mix1/Adat3_4_pair'], 
    514 #            self.mix1adat5_6_pair:  ['Mixer/Mix1/Adat5_6_pair'], 
    515 #            self.mix1adat7_8_pair:  ['Mixer/Mix1/Adat7_8_pair'], 
    516 #            self.mix1spdif1_2_pair: ['Mixer/Mix1/Spdif1_2_pair'], 
    517  
    518 #            self.mix2ana1_2_pair:   ['Mixer/Mix2/Ana1_2_pair'], 
    519 #            self.mix2ana3_4_pair:   ['Mixer/Mix2/Ana3_4_pair'], 
    520 #            self.mix2ana5_6_pair:   ['Mixer/Mix2/Ana5_6_pair'], 
    521 #            self.mix2ana7_8_pair:   ['Mixer/Mix2/Ana7_8_pair'], 
    522 #            self.mix2aes1_2_pair:   ['Mixer/Mix2/Aes1_2_pair'], 
    523 #            self.mix2adat1_2_pair:  ['Mixer/Mix2/Adat1_2_pair'], 
    524 #            self.mix2adat3_4_pair:  ['Mixer/Mix2/Adat3_4_pair'], 
    525 #            self.mix2adat5_6_pair:  ['Mixer/Mix2/Adat5_6_pair'], 
    526 #            self.mix2adat7_8_pair:  ['Mixer/Mix2/Adat7_8_pair'], 
    527 #            self.mix2spdif1_2_pair: ['Mixer/Mix2/Spdif1_2_pair'], 
    528  
    529 #            self.mix3ana1_2_pair:   ['Mixer/Mix3/Ana1_2_pair'], 
    530 #            self.mix3ana3_4_pair:   ['Mixer/Mix3/Ana3_4_pair'], 
    531 #            self.mix3ana5_6_pair:   ['Mixer/Mix3/Ana5_6_pair'], 
    532 #            self.mix3ana7_8_pair:   ['Mixer/Mix3/Ana7_8_pair'], 
    533 #            self.mix3aes1_2_pair:   ['Mixer/Mix3/Aes1_2_pair'], 
    534 #            self.mix3adat1_2_pair:  ['Mixer/Mix3/Adat1_2_pair'], 
    535 #            self.mix3adat3_4_pair:  ['Mixer/Mix3/Adat3_4_pair'], 
    536 #            self.mix3adat5_6_pair:  ['Mixer/Mix3/Adat5_6_pair'], 
    537 #            self.mix3adat7_8_pair:  ['Mixer/Mix3/Adat7_8_pair'], 
    538 #            self.mix3spdif1_2_pair: ['Mixer/Mix3/Spdif1_2_pair'], 
    539  
    540 #            self.mix4ana1_2_pair:   ['Mixer/Mix4/Ana1_2_pair'], 
    541 #            self.mix4ana3_4_pair:   ['Mixer/Mix4/Ana3_4_pair'], 
    542 #            self.mix4ana5_6_pair:   ['Mixer/Mix4/Ana5_6_pair'], 
    543 #            self.mix4ana7_8_pair:   ['Mixer/Mix4/Ana7_8_pair'], 
    544 #            self.mix4aes1_2_pair:   ['Mixer/Mix4/Aes1_2_pair'], 
    545 #            self.mix4adat1_2_pair:  ['Mixer/Mix4/Adat1_2_pair'], 
    546 #            self.mix4adat3_4_pair:  ['Mixer/Mix4/Adat3_4_pair'], 
    547 #            self.mix4adat5_6_pair:  ['Mixer/Mix4/Adat5_6_pair'], 
    548 #            self.mix4adat7_8_pair:  ['Mixer/Mix4/Adat7_8_pair'], 
    549 #            self.mix4spdif1_2_pair: ['Mixer/Mix4/Spdif1_2_pair'], 
    550         } 
    551  
    552501        self.MixDests={ 
    553502            self.mix1_dest:      ['/Mixer/Mix1/Mix_dest'], 
     
    581530        print "device streaming flag: %d" % (self.is_streaming) 
    582531 
    583         # Retrieve other device settings as needed 
     532        # Retrieve other device settings as needed and customise the UI 
     533        # based on these options. 
    584534        self.model = self.hw.getDiscrete('/Mixer/Info/Model') 
    585535        print "device model identifier: %d" % (self.model) 
    586536        self.sample_rate = self.hw.getDiscrete('/Mixer/Info/SampleRate') 
    587537        print "device sample rate: %d" % (self.sample_rate) 
    588         self.has_mic_inputs = self.hw.getDiscrete('/Mixer/Info/HasMicInputs') 
    589         print "device has mic inputs: %d" % (self.has_mic_inputs) 
    590         self.has_aesebu_inputs = self.hw.getDiscrete('/Mixer/Info/HasAESEBUInputs') 
    591         print "device has AES/EBU inputs: %d" % (self.has_aesebu_inputs) 
    592         self.has_spdif_inputs = self.hw.getDiscrete('/Mixer/Info/HasSPDIFInputs') 
    593         print "device has SPDIF inputs: %d" % (self.has_spdif_inputs) 
    594         self.has_optical_spdif = self.hw.getDiscrete('/Mixer/Info/HasOpticalSPDIF') 
    595         print "device has optical SPDIF: %d" % (self.has_optical_spdif) 
    596  
    597         # Customise the UI based on device options retrieved 
    598         if (self.has_mic_inputs): 
     538 
     539        # The 828Mk2 has separate Mic inputs but no AES/EBU, so use the 
     540        # AES/EBU mixer controls as "Mic" controls.  If a device comes along 
     541        # with both mic and AES inputs this approach will have to be 
     542        # re-thought. 
     543        # Doing this means that on the 828Mk2, the mixer matrix elements 
     544        # used for AES/EBU on other models are used for the Mic channels.  
     545        # So long as the MixerChannels_828Mk2 definition in 
     546        # motu_avdevice.cpp defines the mic channels immediately after the 8 
     547        # analog channels we'll be right.  Note that we don't need to change 
     548        # the matrix lookup tables (self.ChannelFaders etc) because the QT 
     549        # controls are still named *aesebu*. 
     550        if (self.model == MOTU_MODEL_828mkII): 
    599551            # Mic input controls displace AES/EBU since no current device 
    600552            # has both. 
     
    607559            # the control arrays (self.ChannelFaders etc). 
    608560        else: 
    609             if (not(self.has_aesebu_inputs)): 
     561            # Only the Traveler and 896HD have AES/EBU inputs, so disable the AES/EBU 
     562            # tab for all other models. 
     563            if (self.model!=MOTU_MODEL_TRAVELER and self.model!=MOTU_MODEL_896HD): 
    610564                self.mix1_tab.page(1).setEnabled(False) 
    611565                self.mix2_tab.page(1).setEnabled(False) 
    612566                self.mix3_tab.page(1).setEnabled(False) 
    613567                self.mix4_tab.page(1).setEnabled(False) 
    614         if (not(self.has_spdif_inputs)): 
     568 
     569        # All models except the 896HD and 8pre have SPDIF inputs. 
     570        if (self.model==MOTU_MODEL_8PRE or self.model==MOTU_MODEL_896HD): 
    615571            self.mix1_tab.page(2).setEnabled(False); 
    616572            self.mix2_tab.page(2).setEnabled(False); 
     
    618574            self.mix4_tab.page(2).setEnabled(False); 
    619575 
    620         # Devices without AES/EBU inputs/outputs (normally ID 6 in the 
    621         # destination lists) have dedicated "MainOut" outputs instead.  The 
    622         # 896HD is an exception: it uses ID 6 for MainOut and ID 7 
    623         # (nominally SPDIF) for AES/EBU. 
    624         if (not(self.has_aesebu_inputs) or self.model==MOTU_MODEL_896HD): 
     576        # Devices without AES/EBU inputs/outputs (currently all except the 
     577        # Traveler and 896HD) have dedicated "MainOut" outputs instead.  
     578        # AES/EBU is normally ID 6 in the destination lists and "MainOut" 
     579        # displaces it on non-AES/EBU models.  The 896HD has both AES/EBU 
     580        # and MainOut which complicates this; it uses ID 6 for MainOut and 
     581        # ID 7 (nominally SPDIF) for AES/EBU.  Therefore change ID 6 to 
     582        # "MainOut" for everything but the Traveler, and set ID 7 (nominally 
     583        # SPDIF) to AES/EBU for the 896HD. 
     584        if (self.model != MOTU_MODEL_TRAVELER): 
    625585            self.mix1_dest.changeItem("MainOut", 6) 
    626586            self.mix2_dest.changeItem("MainOut", 6) 
     
    628588            self.mix4_dest.changeItem("MainOut", 6) 
    629589            self.phones_src.changeItem("MainOut", 6) 
    630         # Change the SPDIF destination to AES/EBU for the 896HD. 
    631590        if (self.model == MOTU_MODEL_896HD): 
    632591            self.mix1_dest.changeItem("AES/EBU", 7) 
     
    646605            self.optical_out_mode.setEnabled(False) 
    647606 
    648         # Some devices don't have the option of selecting an optical SPDIF 
    649         # mode. 
    650         if (not(self.has_optical_spdif)): 
     607        # The 896HD doesn't have optical SPDIF (aka Toslink) capability 
     608        if (self.model == MOTU_MODEL_896HD): 
    651609            self.optical_in_mode.removeItem(2) 
    652610            self.optical_out_mode.removeItem(2) 
     
    781739            QObject.connect(ctrl, SIGNAL('valueChanged(int)'), self.updateControl) 
    782740 
    783         # Disable the channel pair controls since they aren't yet implemented 
    784         for ctrl, info in self.PairSwitches.iteritems(): 
    785             print "%s control is not implemented yet: disabling" % (info[0]) 
    786             ctrl.setEnabled(False) 
    787  
    788741        for ctrl, info in self.ChannelBinarySwitches.iteritems(): 
    789742            if (not(ctrl.isEnabled())):