[SCM] ffado/master: Imported Upstream version 2.0.99+svn2019

adiknoth-guest at users.alioth.debian.org adiknoth-guest at users.alioth.debian.org
Tue Apr 17 17:19:00 UTC 2012


The following commit has been merged in the master branch:
commit c578056c9dd229f868edb2535e826543bfa35b25
Author: Adrian Knoth <adi at drcomp.erfurt.thur.de>
Date:   Thu Jan 19 19:05:17 2012 +0100

    Imported Upstream version 2.0.99+svn2019

diff --git a/configuration b/configuration
index b438c86..24fff4c 100644
--- a/configuration
+++ b/configuration
@@ -67,6 +67,13 @@ device_definitions = (
     mixer       = "Presonus_Experimental";
     xmit_max_cycles_early_transmit = 4;
 },
+{ # Entry for Firestudio mobile provided by "Pule" via the forums.
+    vendorid    = 0x000a92;
+    modelid     = 0x00000011;
+    vendorname  = "PreSonus";
+    modelname   = "Firestudio Mobile";
+    driver      = 20;
+},
 {
     vendorid    = 0x000aac;
     modelid     = 0x00000003;
diff --git a/src/SConscript b/src/SConscript
index d9f101f..41a6342 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -288,6 +288,7 @@ if not env.GetOption( "clean" ):
 		libenv.MergeFlags( env['LIBXML26_FLAGS'] )
 	else:
 		libenv.PrependUnique( LIBS=["expat"] )
+		libenv.MergeFlags( "-DSERIALIZE_USE_EXPAT" )
 	if env['REQUIRE_LIBAVC']:
 		libenv.MergeFlags( env['LIBAVC1394_FLAGS'] )
 
diff --git a/src/bebob/bebob_avplug.cpp b/src/bebob/bebob_avplug.cpp
index eea58f8..09ef32d 100644
--- a/src/bebob/bebob_avplug.cpp
+++ b/src/bebob/bebob_avplug.cpp
@@ -540,7 +540,7 @@ Plug::discoverConnectionsInput()
                                                    plugAddress,
                                                    m_inputConnections ) )
         {
-            debugWarning( "Could not discover connnections for plug '%s'\n",
+            debugWarning( "Could not discover connections for plug '%s'\n",
                           getName() );
         }
     } else {
@@ -603,7 +603,7 @@ Plug::discoverConnectionsOutput()
                                                        plugAddress,
                                                        m_outputConnections ) )
             {
-                debugWarning( "Could not discover connnections for "
+                debugWarning( "Could not discover connections for "
                               "plug '%s'\n", getName() );
             }
         }
diff --git a/src/bebob/bebob_dl_mgr.cpp b/src/bebob/bebob_dl_mgr.cpp
index 92e4ccb..df95c84 100644
--- a/src/bebob/bebob_dl_mgr.cpp
+++ b/src/bebob/bebob_dl_mgr.cpp
@@ -35,6 +35,7 @@
 
 #include <cstdio>
 #include <cstring>
+#include <unistd.h>
 
 namespace BeBoB {
     enum {
diff --git a/src/debugmodule/debugmodule.cpp b/src/debugmodule/debugmodule.cpp
index a3e3ade..dba11aa 100644
--- a/src/debugmodule/debugmodule.cpp
+++ b/src/debugmodule/debugmodule.cpp
@@ -83,7 +83,8 @@ DebugModule::~DebugModule()
 //              << " at DebugModuleManager"
 //              << endl;
 //     }
-    if ( !DebugModuleManager::instance()->unregisterModule( *this ) ) {
+
+    if (m_manager && !m_manager->unregisterModule( *this ) ) {
         cerr << "Could not unregister DebugModule at DebugModuleManager"
              << endl;
     }
@@ -262,14 +263,11 @@ DebugModuleManager::DebugModuleManager()
 
 DebugModuleManager::~DebugModuleManager()
 {
-    // cleanin up leftover modules
-    for ( DebugModuleVectorIterator it = m_debugModules.begin();
-          it != m_debugModules.end();
-          ++it )
+    // cleaning up leftover modules
+    while (!m_debugModules.empty())
     {
-        fprintf(stderr,"Cleaning up leftover debug module: %s\n",(*it)->getName().c_str());
-        m_debugModules.erase( it );
-        delete *it;
+        DebugModule *mod = m_debugModules.back();
+        unregisterModule(*mod);
     }
 
     if (!mb_initialized)
@@ -454,6 +452,8 @@ DebugModuleManager::registerModule( DebugModule& debugModule )
             << "DebugModule (" << debugModule.getName() << ")" << endl;
     } else {
         m_debugModules.push_back( &debugModule );
+        if (debugModule.m_manager == NULL)
+                debugModule.m_manager = this;
     }
     return true;
 }
@@ -468,6 +468,8 @@ DebugModuleManager::unregisterModule( DebugModule& debugModule )
     {
         if ( *it == &debugModule ) {
             m_debugModules.erase( it );
+            if (debugModule.m_manager == this)
+                debugModule.m_manager = NULL;
             return true;
         }
     }
diff --git a/src/debugmodule/debugmodule.h b/src/debugmodule/debugmodule.h
index c1338de..e00b9e6 100644
--- a/src/debugmodule/debugmodule.h
+++ b/src/debugmodule/debugmodule.h
@@ -282,8 +282,12 @@ void quadlet2char( fb_quadlet_t quadlet, unsigned char* buff );
 void hexDump( unsigned char *data_start, unsigned int length );
 void hexDumpQuadlets( quadlet_t *data_start, unsigned int length );
 
+class DebugModuleManager;
+
 class DebugModule {
 public:
+    friend class DebugModuleManager;
+
     enum {
         eDL_Message      = DEBUG_LEVEL_MESSAGE,
         eDL_Fatal        = DEBUG_LEVEL_FATAL,
@@ -332,6 +336,7 @@ protected:
 private:
     std::string   m_name;
     debug_level_t m_level;
+    DebugModuleManager* m_manager;
 };
 
 
diff --git a/src/ffadodevice.cpp b/src/ffadodevice.cpp
index 36d6625..5e5efd7 100644
--- a/src/ffadodevice.cpp
+++ b/src/ffadodevice.cpp
@@ -34,6 +34,7 @@
 
 #include <iostream>
 #include <sstream>
+#include <unistd.h>
 
 #include <assert.h>
 
diff --git a/src/fireworks/fireworks_device.cpp b/src/fireworks/fireworks_device.cpp
index 6ab7eda..02ad47f 100644
--- a/src/fireworks/fireworks_device.cpp
+++ b/src/fireworks/fireworks_device.cpp
@@ -45,6 +45,7 @@
 #define FIREWORKS_MIN_FIRMWARE_VERSION 0x04080000
 
 #include <sstream>
+#include <unistd.h>
 using namespace std;
 
 // FireWorks is the platform used and developed by ECHO AUDIO
diff --git a/src/libavc/general/avc_unit.cpp b/src/libavc/general/avc_unit.cpp
index 3353ef9..87b6ecc 100644
--- a/src/libavc/general/avc_unit.cpp
+++ b/src/libavc/general/avc_unit.cpp
@@ -220,12 +220,12 @@ Unit::rediscoverConnections() {
     }
 
     if ( !discoverSubUnitsPlugConnections() ) {
-        debugError( "Detecting subunit plug connnections failed\n" );
+        debugError( "Detecting subunit plug connections failed\n" );
         return false;
     }
 
     if ( !m_pPlugManager->tidyPlugConnections(m_plugConnections) ) {
-        debugError( "Tidying of plug connnections failed\n" );
+        debugError( "Tidying of plug connections failed\n" );
         return false;
     }
     return true;
diff --git a/src/libieee1394/IsoHandlerManager.cpp b/src/libieee1394/IsoHandlerManager.cpp
index de4a90d..f538828 100644
--- a/src/libieee1394/IsoHandlerManager.cpp
+++ b/src/libieee1394/IsoHandlerManager.cpp
@@ -35,6 +35,7 @@
 #include "libutil/Configuration.h"
 
 #include <cstring>
+#include <unistd.h>
 #include <assert.h>
 
 IMPL_DEBUG_MODULE( IsoHandlerManager, IsoHandlerManager, DEBUG_LEVEL_NORMAL );
diff --git a/src/libstreaming/StreamProcessorManager.cpp b/src/libstreaming/StreamProcessorManager.cpp
index bfd819d..ca55da8 100644
--- a/src/libstreaming/StreamProcessorManager.cpp
+++ b/src/libstreaming/StreamProcessorManager.cpp
@@ -378,7 +378,7 @@ bool StreamProcessorManager::prepare() {
     // if there are no stream processors registered,
     // fail
     if (m_ReceiveProcessors.size() + m_TransmitProcessors.size() == 0) {
-        debugFatal("No stream processors registered, can't do anything usefull\n");
+        debugFatal("No stream processors registered, can't do anything useful\n");
         return false;
     }
 
diff --git a/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp b/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp
index 4c52990..a827ac9 100644
--- a/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp
+++ b/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp
@@ -449,7 +449,7 @@ AmdtpReceiveStreamProcessor::decodeMidiPorts(quadlet_t *data,
                     midibuffer[mb_head++] = sample_int;
                     mb_head &= RX_MIDIBUFFER_SIZE-1;
                     if (unlikely(mb_head == mb_tail)) {
-                        debugWarning("MOTU rx MIDI buffer overflow\n");
+                        debugWarning("AMDTP rx MIDI buffer overflow\n");
                         /* Dump oldest byte.  This overflow can only happen if the
                          * rate coming in from the hardware MIDI port grossly
                          * exceeds the official MIDI baud rate of 31250 bps, so it
diff --git a/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp b/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp
index de847b3..3da2214 100644
--- a/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp
+++ b/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp
@@ -136,6 +136,7 @@ MotuReceiveStreamProcessor::processPacketHeader(unsigned char *data, unsigned in
 {
     static int len_shown = 0;
     static int ts_print_cx = 0;
+static int pktcx = 0;
 
     if (length > 8) {
         // The iso data blocks from the MOTUs comprise a CIP-like
@@ -173,7 +174,7 @@ MotuReceiveStreamProcessor::processPacketHeader(unsigned char *data, unsigned in
 
         // For debugging only - to be removed once Ultralite mk3 issues have been 
         // resolved.  JMW, 31 May 2010.
-        if (!len_shown && getDebugLevel()>0 ) {
+        if ((!len_shown || pktcx==0) && getDebugLevel()>0 ) {
             unsigned int i;
             debugOutput(DEBUG_LEVEL_VERBOSE,"Packet from MOTU: length=%d, eventsize=%d, n_events=%d\n", length, m_event_size, n_events);
             for (i=0; i<length; i++) {
@@ -187,6 +188,10 @@ MotuReceiveStreamProcessor::processPacketHeader(unsigned char *data, unsigned in
             }
             fprintf(stderr, "\n");
         }
+// For testing 828mk1, dump incoming packet roughly once a second
+if (++pktcx == 8000)
+  pktcx=0;
+
         len_shown = 1;
         if (ts_print_cx<20 && getDebugLevel()>0 ) {
           debugOutput(DEBUG_LEVEL_VERBOSE,"last ts=0x%08x\n", last_sph);
diff --git a/src/libutil/PosixSharedMemory.cpp b/src/libutil/PosixSharedMemory.cpp
index 760a52f..0cd30ac 100644
--- a/src/libutil/PosixSharedMemory.cpp
+++ b/src/libutil/PosixSharedMemory.cpp
@@ -26,6 +26,7 @@
 #include <sys/mman.h>
 #include <errno.h>
 #include <string.h>
+#include <unistd.h>
 #include <fcntl.h>
 
 namespace Util {
diff --git a/src/motu/motu_avdevice.cpp b/src/motu/motu_avdevice.cpp
index d3afb23..56ac14f 100644
--- a/src/motu/motu_avdevice.cpp
+++ b/src/motu/motu_avdevice.cpp
@@ -1463,12 +1463,12 @@ MotuDevice::prepare() {
     m_tx_bandwidth = 25 + (n_events_per_packet*event_size_out);
 
     // Assign iso channels if not already done
-    if (m_iso_recv_channel < 0)
-        m_iso_recv_channel = get1394Service().allocateIsoChannelGeneric(m_rx_bandwidth);
-
     if (m_iso_send_channel < 0)
         m_iso_send_channel = get1394Service().allocateIsoChannelGeneric(m_tx_bandwidth);
 
+    if (m_iso_recv_channel < 0)
+        m_iso_recv_channel = get1394Service().allocateIsoChannelGeneric(m_rx_bandwidth);
+
     debugOutput(DEBUG_LEVEL_VERBOSE, "recv channel = %d, send channel = %d\n",
         m_iso_recv_channel, m_iso_send_channel);
 
@@ -1676,19 +1676,26 @@ quadlet_t isoctrl = ReadRegister(MOTU_REG_ISOCTRL);
          * purpose.  We'll do the same, at least until we know whether
          * it's important that this be done.
          */
+#if 1
         WriteRegister(MOTU_G1_REG_UNKNOWN_1, 0xffc10001);
         WriteRegister(MOTU_G1_REG_UNKNOWN_2, 0x00000000);
 
         /* First send the iso channels to the control register.  Note that
          * as for other MOTU devices bit 24 enables changes to the MOTU's
          * iso tx settings while bit 31 enables iso rx changes.
+         *
+         * At this point also make sure that two additional bits, which
+         * appear to be I/O enable bits, are set.
          */
+debugOutput(DEBUG_LEVEL_VERBOSE, "MOTU g1: read isoctl: %x\n", isoctrl);
         isoctrl &= ~MOTU_G1_C1_ISO_INFO_MASK;
         isoctrl |= (MOTU_G1_C1_ISO_TX_ACTIVE | MOTU_G1_C1_ISO_TX_WREN |
                     MOTU_G1_C1_ISO_RX_ACTIVE | MOTU_G1_C1_ISO_RX_WREN);
         isoctrl |= (m_iso_recv_channel << MOTU_G1_C1_ISO_TX_CH_BIT0);
         isoctrl |= (m_iso_send_channel << MOTU_G1_C1_ISO_RX_CH_BIT0);
+        isoctrl |= (MOTU_G1_IO_ENABLE_0 | MOTU_G1_IO_ENABLE_1);
         WriteRegister(MOTU_REG_ISOCTRL, isoctrl);
+debugOutput(DEBUG_LEVEL_VERBOSE, "MOTU g1: first isoctrl: %x\n", isoctrl);
 
         /* With the channel details configured streaming is started.  This
          * could conceivably be done in a single write along with the channel
@@ -1698,6 +1705,19 @@ quadlet_t isoctrl = ReadRegister(MOTU_REG_ISOCTRL);
         isoctrl |= MOTU_G1_C1_ISO_ENABLE;
         WriteRegister(MOTU_REG_ISOCTRL, isoctrl);
 
+debugOutput(DEBUG_LEVEL_VERBOSE, "MOTU g1: final isoctrl: %x\n", isoctrl);
+debugOutput(DEBUG_LEVEL_VERBOSE, "MOTU g1: 0b10 reg: %x\n",
+  ReadRegister(MOTU_G1_REG_CONFIG_2));
+
+#else
+  WriteRegister(0xb04, 0xffc10001);
+  WriteRegister(0xb08, 0x00000000);
+  WriteRegister(0xb00, 0x80810828);
+  WriteRegister(0xb10, 0x000000c2);
+  WriteRegister(0xb00, 0xc0c10828);
+  WriteRegister(0xb00, 0x000008a8);
+#endif
+
         return true;
     }
 
diff --git a/src/motu/motu_avdevice.h b/src/motu/motu_avdevice.h
index a232ab0..9d0f28e 100644
--- a/src/motu/motu_avdevice.h
+++ b/src/motu/motu_avdevice.h
@@ -128,33 +128,45 @@
 #define MOTU_G1_C2_OPT_nADAT_OUT   0x00000040
 #define MOTU_G1_C2_OPT_nADAT_WREN  0x00000002 // Purpose to be confirmed
 
+// Rate control bits in MOTU_G1_REG_CONFIG
 #define MOTU_G1_RATE_MASK          0x0004
 #define MOTU_G1_RATE_44100         0x0000
 #define MOTU_G1_RATE_48000         0x0004
 
+// Clock source control bits in MOTU_G1_REG_CONFIG
 #define MOTU_G1_CLKSRC_MASK        0x0003
 #define MOTU_G1_CLKSRC_INTERNAL    0x0000
 #define MOTU_G1_CLKSRC_ADAT_9PIN   0x0001
 #define MOTU_G1_CLKSRC_SPDIF       0x0002
 #define MOTU_G1_CLKSRC_UNCHANGED   MOTU_CLKSRC_UNCHANGED
 
+// Monitor control bits in MOTU_G1_REG_CONFIG
+#define MOTU_G1_MONIN_MUTE         0x0040  // To be confirmed
 #define MOTU_G1_MONIN_MASK         0x3f00
-#define MOTU_G1_MONIN_L_SRC_MASK   0x0600
-#define MOTU_G1_MONIN_R_SRC_MASK   0x3000
-#define MOTU_G1_MONIN_L_MUTE_MASK  0x0100  // Yes, the sense of these 2 bits
-#define MOTU_G1_MONIN_R_EN_MASK    0x0800  //   really are reversed
-#define MOTU_G1_MONIN_L_MUTE       0x0100
-#define MOTU_G1_MONIN_L_ENABLE     0x0000
-#define MOTU_G1_MONIN_R_MUTE       0x0000
-#define MOTU_G1_MONIN_R_ENABLE     0x0800
+#define MOTU_G1_MONIN_L_SRC_MASK   0x0700
+#define MOTU_G1_MONIN_R_SRC_MASK   0x3800
+#define MOTU_G1_MONIN_L_CH_BIT0    8
+#define MOTU_G1_MONIN_R_CH_BIT0    11
 #define MOTU_G1_MONIN_L_CH1        0x0000
-#define MOTU_G1_MONIN_L_CH3        0x0020
-#define MOTU_G1_MONIN_L_CH5        0x0040
-#define MOTU_G1_MONIN_L_CH7        0x0060
-#define MOTU_G1_MONIN_R_CH2        0x0000
-#define MOTU_G1_MONIN_R_CH4        0x1000
-#define MOTU_G1_MONIN_R_CH6        0x2000
-#define MOTU_G1_MONIN_R_CH8        0x3000
+#define MOTU_G1_MONIN_L_CH2        0x0100
+#define MOTU_G1_MONIN_L_CH3        0x0200
+#define MOTU_G1_MONIN_L_CH4        0x0300
+#define MOTU_G1_MONIN_L_CH5        0x0400
+#define MOTU_G1_MONIN_L_CH6        0x0500
+#define MOTU_G1_MONIN_L_CH7        0x0600
+#define MOTU_G1_MONIN_L_CH8        0x0700
+#define MOTU_G1_MONIN_R_CH1        0x0000
+#define MOTU_G1_MONIN_R_CH2        0x0800
+#define MOTU_G1_MONIN_R_CH3        0x1000
+#define MOTU_G1_MONIN_R_CH4        0x1800
+#define MOTU_G1_MONIN_R_CH5        0x2000
+#define MOTU_G1_MONIN_R_CH6        0x2800
+#define MOTU_G1_MONIN_R_CH7        0x3000
+#define MOTU_G1_MONIN_R_CH8        0x3800
+
+// Other control bits in MOTU_G1_REG_CONFIG
+#define MOTU_G1_IO_ENABLE_0        0x0008  // To be confirmed
+#define MOTU_G1_IO_ENABLE_1        0x0020  // To be confirmed
 
 /* Mark3 device registers - these don't always have MOTU_BASE_ADDR as the
  * base address so for now we'll define them as absolute addresses.  The
diff --git a/src/rme/fireface_def.h b/src/rme/fireface_def.h
index 473d439..7d160f3 100644
--- a/src/rme/fireface_def.h
+++ b/src/rme/fireface_def.h
@@ -429,6 +429,8 @@ typedef struct {
 #define FF_DEV_FLASH_PLUG_SELECT_FRONT         0x00000001  // To be confirmed
 #define FF_DEV_FLASH_PLUG_SELECT_REAR          0x00000000  // To be confirmed
 
+#define FF_MATRIXMIXER_SIZE (RME_FF800_MAX_CHANNELS*RME_FF800_MAX_CHANNELS)
+
 // Structure used by FFADO to keep track of the device status.  This is
 // decoupled from any structures used directly by the device, so it can be
 // added to and ordered freely.  When making changes to the device the
@@ -460,6 +462,12 @@ typedef struct {
 
     // Other "settings" fields which are not necessarily stored in device flash
     int32_t amp_gains[22];             // FF400: gains of input/output amps
+    int32_t input_faders[FF_MATRIXMIXER_SIZE];
+    int32_t playback_faders[FF_MATRIXMIXER_SIZE];
+    int32_t output_faders[RME_FF800_MAX_CHANNELS];
+    unsigned char input_mixerflags[FF_MATRIXMIXER_SIZE];
+    unsigned char playback_mixerflags[FF_MATRIXMIXER_SIZE];
+    unsigned char output_mixerflags[FF_MATRIXMIXER_SIZE];
 } FF_software_settings_t;
 
 // Defines used to interpret the software settings structure.  For now we
@@ -507,6 +515,12 @@ typedef struct {
 
 #define FF_SWPARAM_FF800_INPUT_OPT_FRONT       FF_SWPARAM_INPUT_OPT_A
 #define FF_SWPARAM_FF800_INPUT_OPT_REAR        FF_SWPARAM_INPUT_OPT_B
+//
+// Flags for the *_mixerflags fields
+#define FF_SWPARAM_MF_NORMAL    0x00
+#define FF_SWPARAM_MF_MUTED     0x01
+#define FF_SWPARAM_MF_INVERTED  0x02    // Inputs/playbacks only
+#define FF_SWPARAM_MF_REC       0x04    // Outputs only
 
 // Indices into the amp_gains array
 #define FF400_AMPGAIN_MIC1      0
diff --git a/src/rme/fireface_hw.cpp b/src/rme/fireface_hw.cpp
index 1552c38..1152e7f 100644
--- a/src/rme/fireface_hw.cpp
+++ b/src/rme/fireface_hw.cpp
@@ -129,14 +129,18 @@ Device::init_hardware(void)
         // Matrix mixer settings
         for (dest=0; dest<n_channels; dest++) {
             for (src=0; src<n_channels; src++) {
+                settings->input_faders[getMixerGainIndex(src, dest)] = 0;
                 set_hardware_mixergain(RME_FF_MM_INPUT, src, dest, 0);
             }
             for (src=0; src<n_channels; src++) {
+                settings->playback_faders[getMixerGainIndex(src, dest)] =
+                  src==dest?0x8000:0;
                 set_hardware_mixergain(RME_FF_MM_PLAYBACK, src, dest, 
                   src==dest?0x8000:0);
             }
         }
         for (src=0; src<n_channels; src++) {
+            settings->output_faders[src] = 0x8000;
             set_hardware_mixergain(RME_FF_MM_OUTPUT, src, 0, 0x8000);
         }
 
@@ -755,7 +759,7 @@ debugOutput(DEBUG_LEVEL_VERBOSE, "  ret=%d\n", ret);
             dev_config->is_streaming = 1;
         }
 
-        set_hardware_channel_mute(0);
+        set_hardware_channel_mute(-1, 0);
 
     } else
         ret = 0;
@@ -786,7 +790,7 @@ Device::hardware_stop_streaming(void)
             dev_config->is_streaming = 0;
         }
 
-        set_hardware_channel_mute(1);
+        set_hardware_channel_mute(-1, 1);
 
     } else
         ret = 0;
@@ -875,6 +879,7 @@ Device::set_hardware_mixergain(unsigned int ctype, unsigned int src_channel,
             ram_addr += 0x0f80 + 4*src_channel;
             break;
     }
+
     writeRegister(ram_addr, val);
 
     // If setting the output volume and the device is the FF400, keep
@@ -892,22 +897,31 @@ Device::set_hardware_mixergain(unsigned int ctype, unsigned int src_channel,
 }
 
 signed int
-Device::set_hardware_channel_mute(signed int mute) {
-// Explicitly mute (mute!=0) or unmute (mute=0) all channels.
-// TODO: fill the details in to allow individual channels to be muted as 
-// required.
+Device::set_hardware_channel_mute(signed int chan, signed int mute) {
+
+// Mute hardware channels as instructed.  This mute probably relates to the
+// sampled input channels as delivered to the PC.  If "chan" is -1 the
+// supplied "mute" status is applied to all channels.  This is the only
+// supported "chan" value for now.  Down the track, if there's a need,
+// this could be extended to allow individual channel control.
     quadlet_t buf[28];
     signed int i;
     signed int n_channels = (m_rme_model==RME_MODEL_FIREFACE400)?
         RME_FF400_MAX_CHANNELS:RME_FF800_MAX_CHANNELS;
 
     i = 0;
-    while (i<n_channels && i<28) {
-        buf[i++] = (mute!=0);
+    if (chan < 0) {
+        while (i<n_channels && i<28) {
+            buf[i++] = (mute!=0);
+        }
+    } else {
+      return 0;
     }
+
     while (i < 28) {
         buf[i++] = 0x00000001;
     }
+
     // Write 28 quadlets even for FF400
     return writeBlock(RME_FF_CHANNEL_MUTE_MASK, buf, 28);
 }
diff --git a/src/rme/fireface_settings_ctrls.cpp b/src/rme/fireface_settings_ctrls.cpp
index 857b428..5737a2a 100644
--- a/src/rme/fireface_settings_ctrls.cpp
+++ b/src/rme/fireface_settings_ctrls.cpp
@@ -21,6 +21,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
+#include <math.h>
+
 #include "rme/rme_avdevice.h"
 #include "rme/fireface_settings_ctrls.h"
 
@@ -181,6 +183,49 @@ signed int val = 0;
 }
 
 
+static std::string getOutputName(const signed int model, const int idx)
+{
+    char buf[64];
+    if (model == RME_MODEL_FIREFACE400) {
+        if (idx >= 10)
+            snprintf(buf, sizeof(buf), "ADAT out %d", idx-9);
+        else
+        if (idx >= 8)
+            snprintf(buf, sizeof(buf), "SPDIF out %d", idx-7);
+        else
+        if (idx >= 6)
+            snprintf(buf, sizeof(buf), "Mon out %d", idx+1);
+        else
+            snprintf(buf, sizeof(buf), "Line out %d", idx+1);
+    } else {
+        snprintf(buf, sizeof(buf), "out %d", idx);
+    }
+    return buf;
+}
+
+static std::string getInputName(const signed int model, const int idx)
+{
+    char buf[64];
+    if (model == RME_MODEL_FIREFACE400) {
+        if (idx >= 10)
+            snprintf(buf, sizeof(buf), "ADAT in %d", idx-9);
+        else
+        if (idx >= 8)
+            snprintf(buf, sizeof(buf), "SPDIF in %d", idx-7);
+        else
+        if (idx >= 4)
+            snprintf(buf, sizeof(buf), "Line in %d", idx+1);
+        else
+        if (idx >= 2)
+            snprintf(buf, sizeof(buf), "Inst/line %d", idx+1);
+        else
+            snprintf(buf, sizeof(buf), "Mic/line %d", idx+1);
+    } else {
+        snprintf(buf, sizeof(buf), "in %d", idx);
+    }
+    return buf;
+}
+
 RmeSettingsMatrixCtrl::RmeSettingsMatrixCtrl(Device &parent, unsigned int type)
 : Control::MatrixMixer(&parent)
 , m_parent(parent)
@@ -204,16 +249,19 @@ void RmeSettingsMatrixCtrl::show()
 
 std::string RmeSettingsMatrixCtrl::getRowName(const int row)
 {
-    char buf[64];
-    snprintf(buf, sizeof(buf), "RmeSettingsMatrixCtrl type %d, row %d", m_type, row);
-    return buf;
+    if (m_type == RME_MATRIXCTRL_OUTPUT_FADER)
+        return "";
+    return getOutputName(m_parent.getRmeModel(), row);
 }
 
 std::string RmeSettingsMatrixCtrl::getColName(const int col)
 {
-    char buf[64];
-    snprintf(buf, sizeof(buf), "RmeSettingsMatrixCtrl type %d, column %d", m_type, col);
-    return buf;
+    if (m_type == RME_MATRIXCTRL_PLAYBACK_FADER)
+        return "";
+    if (m_type == RME_MATRIXCTRL_OUTPUT_FADER)
+        return getOutputName(m_parent.getRmeModel(), col);
+
+    return getInputName(m_parent.getRmeModel(), col);
 }
 
 int RmeSettingsMatrixCtrl::getRowCount() 
@@ -223,6 +271,16 @@ int RmeSettingsMatrixCtrl::getRowCount()
             if (m_parent.getRmeModel() == RME_MODEL_FIREFACE400)
                 return 1;
             break;
+        case RME_MATRIXCTRL_INPUT_FADER:
+        case RME_MATRIXCTRL_PLAYBACK_FADER:
+            if (m_parent.getRmeModel() == RME_MODEL_FIREFACE400)
+                return RME_FF400_MAX_CHANNELS;
+            else
+                return RME_FF800_MAX_CHANNELS;
+            break;
+        case RME_MATRIXCTRL_OUTPUT_FADER:
+            return 1;
+            break;
     }
 
     return 0;
@@ -235,6 +293,14 @@ int RmeSettingsMatrixCtrl::getColCount()
             if (m_parent.getRmeModel() == RME_MODEL_FIREFACE400)
                 return 22;
             break;
+        case RME_MATRIXCTRL_INPUT_FADER:
+        case RME_MATRIXCTRL_PLAYBACK_FADER:
+        case RME_MATRIXCTRL_OUTPUT_FADER:
+            if (m_parent.getRmeModel() == RME_MODEL_FIREFACE400)
+                return RME_FF400_MAX_CHANNELS;
+            else
+                return RME_FF800_MAX_CHANNELS;
+            break;
     }
 
     return 0;
@@ -253,6 +319,32 @@ double RmeSettingsMatrixCtrl::setValue(const int row, const int col, const doubl
             else
                 ret = -1;
             break;
+        case RME_MATRIXCTRL_INPUT_FADER:
+          return m_parent.setMixerGain(RME_FF_MM_INPUT, col, row, val);
+          break;
+        case RME_MATRIXCTRL_PLAYBACK_FADER:
+          return m_parent.setMixerGain(RME_FF_MM_PLAYBACK, col, row, val);
+          break;
+        case RME_MATRIXCTRL_OUTPUT_FADER:
+          return m_parent.setMixerGain(RME_FF_MM_OUTPUT, col, row, val);
+          break;
+
+        case RME_MATRIXCTRL_INPUT_MUTE:
+          return m_parent.setMixerFlags(RME_FF_MM_INPUT, col, row, FF_SWPARAM_MF_MUTED, val!=0);
+          break;
+        case RME_MATRIXCTRL_PLAYBACK_MUTE:
+          return m_parent.setMixerFlags(RME_FF_MM_PLAYBACK, col, row, FF_SWPARAM_MF_MUTED, val!=0);
+          break;
+        case RME_MATRIXCTRL_OUTPUT_MUTE:
+          return m_parent.setMixerFlags(RME_FF_MM_OUTPUT, col, row, FF_SWPARAM_MF_MUTED, val!=0);
+          break;
+        case RME_MATRIXCTRL_INPUT_INVERT:
+          return m_parent.setMixerFlags(RME_FF_MM_INPUT, col, row, FF_SWPARAM_MF_INVERTED, val!=0);
+          break;
+        case RME_MATRIXCTRL_PLAYBACK_INVERT:
+          return m_parent.setMixerFlags(RME_FF_MM_PLAYBACK, col, row, FF_SWPARAM_MF_INVERTED, val!=0);
+          break;
+
     }
 
     return ret;
@@ -265,6 +357,31 @@ double RmeSettingsMatrixCtrl::getValue(const int row, const int col)
         case RME_MATRIXCTRL_GAINS:
             val = m_parent.getAmpGain(col);
             break;
+        case RME_MATRIXCTRL_INPUT_FADER:
+            val = m_parent.getMixerGain(RME_FF_MM_INPUT, col, row);
+            break;
+        case RME_MATRIXCTRL_PLAYBACK_FADER:
+            val = m_parent.getMixerGain(RME_FF_MM_PLAYBACK, col, row);
+            break;
+        case RME_MATRIXCTRL_OUTPUT_FADER:
+            val = m_parent.getMixerGain(RME_FF_MM_OUTPUT, col, row);
+            break;
+
+        case RME_MATRIXCTRL_INPUT_MUTE:
+          return m_parent.getMixerFlags(RME_FF_MM_INPUT, col, row, FF_SWPARAM_MF_MUTED) != 0;
+          break;
+        case RME_MATRIXCTRL_PLAYBACK_MUTE:
+          return m_parent.getMixerFlags(RME_FF_MM_PLAYBACK, col, row, FF_SWPARAM_MF_MUTED) != 0;
+          break;
+        case RME_MATRIXCTRL_OUTPUT_MUTE:
+          return m_parent.getMixerFlags(RME_FF_MM_OUTPUT, col, row, FF_SWPARAM_MF_MUTED) != 0;
+          break;
+        case RME_MATRIXCTRL_INPUT_INVERT:
+          return m_parent.getMixerFlags(RME_FF_MM_INPUT, col, row, FF_SWPARAM_MF_INVERTED) != 0;
+          break;
+        case RME_MATRIXCTRL_PLAYBACK_INVERT:
+          return m_parent.getMixerFlags(RME_FF_MM_PLAYBACK, col, row, FF_SWPARAM_MF_INVERTED) != 0;
+          break;
     }
 
     return val;
diff --git a/src/rme/fireface_settings_ctrls.h b/src/rme/fireface_settings_ctrls.h
index 14cad67..d6a7981 100644
--- a/src/rme/fireface_settings_ctrls.h
+++ b/src/rme/fireface_settings_ctrls.h
@@ -54,6 +54,15 @@ namespace Rme {
 /* Control types for an RmeSettingsMatrixCtrl object */
 #define RME_MATRIXCTRL_NONE            0x0000
 #define RME_MATRIXCTRL_GAINS           0x0001
+#define RME_MATRIXCTRL_INPUT_FADER     0x0002
+#define RME_MATRIXCTRL_PLAYBACK_FADER  0x0003
+#define RME_MATRIXCTRL_OUTPUT_FADER    0x0004
+#define RME_MATRIXCTRL_INPUT_MUTE      0x0005
+#define RME_MATRIXCTRL_PLAYBACK_MUTE   0x0006
+#define RME_MATRIXCTRL_OUTPUT_MUTE     0x0007
+#define RME_MATRIXCTRL_INPUT_INVERT    0x0008
+#define RME_MATRIXCTRL_PLAYBACK_INVERT 0x0009
+
 
 class Device;
 
diff --git a/src/rme/rme_avdevice.cpp b/src/rme/rme_avdevice.cpp
index 06d758b..76e83ce 100644
--- a/src/rme/rme_avdevice.cpp
+++ b/src/rme/rme_avdevice.cpp
@@ -184,14 +184,39 @@ Device::buildMixer() {
             new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_GAINS, "Gains"));
     }
 
+    /* Mixer controls */
+    m_MixerContainer = new Control::Container(this, "Mixer");
+    if (!m_MixerContainer) {
+        debugError("Could not create mixer container\n");
+        destroyMixer();
+        return false;
+    }
+
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_INPUT_FADER, "InputFaders"));
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_PLAYBACK_FADER, "PlaybackFaders"));
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_OUTPUT_FADER, "OutputFaders"));
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_INPUT_FADER, "InputMutes"));
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_PLAYBACK_FADER, "PlaybackMutes"));
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_OUTPUT_FADER, "OutputMutes"));
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_INPUT_FADER, "InputInverts"));
+    result &= m_MixerContainer->addElement(
+        new RmeSettingsMatrixCtrl(*this, RME_MATRIXCTRL_PLAYBACK_FADER, "PlaybackInverts"));
+
     if (!result) {
-        debugWarning("One or more device control elements could not be created\n");
+        debugWarning("One or more device control/mixer elements could not be created\n");
         destroyMixer();
         return false;
     }
 
-    if (!addElement(m_ControlContainer)) {
-        debugWarning("Could not register mixer to device\n");
+    if (!addElement(m_ControlContainer) || !addElement(m_MixerContainer)) {
+        debugWarning("Could not register controls/mixer to device\n");
         // clean up
         destroyMixer();
         return false;
diff --git a/src/rme/rme_avdevice.h b/src/rme/rme_avdevice.h
index fdfa25e..47304c9 100644
--- a/src/rme/rme_avdevice.h
+++ b/src/rme/rme_avdevice.h
@@ -117,6 +117,14 @@ public:
     signed int setInputInstrOpt(unsigned int channel, unsigned int status);
     signed int getAmpGain(unsigned int index);
     signed int setAmpGain(unsigned int index, signed int val);
+    signed int getMixerGain(unsigned int ctype,
+        unsigned int src_channel, unsigned int dest_channel);
+    signed int setMixerGain(unsigned int ctype, 
+        unsigned int src_channel, unsigned int dest_channel, signed int val);
+    signed int getMixerFlags(unsigned int ctype,
+        unsigned int src_channel, unsigned int dest_channel, unsigned int flagmask);
+    signed int setMixerFlags(unsigned int ctype,
+        unsigned int src_channel, unsigned int dest_channel, unsigned int flagmask, signed int val);
 
     /* General information functions */
     signed int getRmeModel(void) { return m_rme_model; }
@@ -188,9 +196,11 @@ private:
     signed int set_hardware_mixergain(unsigned int ctype, 
         unsigned int src_channel, unsigned int dest_channel, signed int val);
 
-    signed int set_hardware_channel_mute(signed int mute);
+    signed int set_hardware_channel_mute(signed int chan, signed int mute);
     signed int set_hardware_output_rec(signed int rec);
 
+    signed int getMixerGainIndex(unsigned int src_channel, unsigned int dest_channel);
+
     Control::Container *m_MixerContainer;
     Control::Container *m_ControlContainer;
 };
diff --git a/src/rme/rme_avdevice_settings.cpp b/src/rme/rme_avdevice_settings.cpp
index 55b48e0..ed0f365 100644
--- a/src/rme/rme_avdevice_settings.cpp
+++ b/src/rme/rme_avdevice_settings.cpp
@@ -174,4 +174,122 @@ Device::setAmpGain(unsigned int index, signed int val) {
     return set_hardware_ampgain(index, val);
 }
 
+signed int
+Device::getMixerGainIndex(unsigned int src_channel, unsigned int dest_channel) {
+    return dest_channel*RME_FF800_MAX_CHANNELS + src_channel;
+}
+
+signed int
+Device::getMixerGain(unsigned int ctype,
+    unsigned int src_channel, unsigned int dest_channel) {
+
+    signed int idx = getMixerGainIndex(src_channel, dest_channel);
+    switch (ctype) {
+        case RME_FF_MM_INPUT:
+            return settings->input_faders[idx];
+            break;
+        case RME_FF_MM_PLAYBACK:
+            return settings->playback_faders[idx];
+            break;
+        case RME_FF_MM_OUTPUT:
+            return settings->output_faders[src_channel];
+            break;
+    }
+    return 0;
+}
+
+signed int
+Device::setMixerGain(unsigned int ctype, 
+    unsigned int src_channel, unsigned int dest_channel, signed int val) {
+
+    unsigned char *mixerflags = NULL;
+    signed int idx = getMixerGainIndex(src_channel, dest_channel);
+
+    switch (ctype) {
+        case RME_FF_MM_INPUT:
+            settings->input_faders[idx] = val;
+            mixerflags = settings->input_mixerflags;
+            break;
+        case RME_FF_MM_PLAYBACK:
+            settings->playback_faders[idx] = val;
+            mixerflags = settings->playback_mixerflags;
+            break;
+        case RME_FF_MM_OUTPUT:
+            settings->output_faders[src_channel] = val;
+            mixerflags = settings->output_mixerflags;
+            break;
+    }
+
+    // If the matrix channel is muted, override the fader value and 
+    // set it to zero.  Note that this is different to the hardware
+    // mute control dealt with by set_hardware_channel_mute(); the
+    // latter deals with a muting separate from the mixer.
+    if (mixerflags!=NULL && (mixerflags[idx] & FF_SWPARAM_MF_MUTED)!=0) {
+        val = 0;
+    }
+
+    // Phase inversion is effected by sending a negative volume to the
+    // hardware.  However, when transitioning from 0 (-inf dB) to -1 (-90
+    // dB), the hardware seems to first send the volume up to a much higher
+    // level before it drops down to the set point after about a tenth of a
+    // second (this also seems to be the case when switching between
+    // inversion modes).  To work around this for the moment (at least until
+    // it's understood, silently map a value of 0 to -1 when phase inversion
+    // is active.
+    if (mixerflags!=NULL && (mixerflags[idx] & FF_SWPARAM_MF_INVERTED)!=0) {
+        if (val == 0)
+            val = 1;
+        val = -val;
+    }
+
+    return set_hardware_mixergain(ctype, src_channel, dest_channel, val);
+}
+
+signed int
+Device::getMixerFlags(unsigned int ctype,
+    unsigned int src_channel, unsigned int dest_channel, unsigned int flagmask) {
+
+    unsigned char *mixerflags = NULL;
+    signed int idx = getMixerGainIndex(src_channel, dest_channel);
+    if (ctype == RME_FF_MM_OUTPUT) {
+        mixerflags = settings->output_mixerflags;
+        idx = src_channel;
+    } else
+    if (ctype == RME_FF_MM_INPUT)
+        mixerflags = settings->input_mixerflags;
+    else
+        mixerflags = settings->playback_mixerflags;
+
+    return mixerflags[idx] & flagmask;
+}
+
+signed int
+Device::setMixerFlags(unsigned int ctype,
+    unsigned int src_channel, unsigned int dest_channel, 
+    unsigned int flagmask, signed int val) {
+
+    unsigned char *mixerflags = NULL;
+    signed int idx = getMixerGainIndex(src_channel, dest_channel);
+    if (ctype == RME_FF_MM_OUTPUT) {
+        mixerflags = settings->output_mixerflags;
+        idx = src_channel;
+    } else 
+    if (ctype == RME_FF_MM_INPUT)
+        mixerflags = settings->input_mixerflags;
+    else
+        mixerflags = settings->playback_mixerflags;
+
+    if (val == 0)
+        mixerflags[idx] &= ~flagmask;
+    else
+        mixerflags[idx] |= flagmask;
+
+    if (flagmask & (FF_SWPARAM_MF_MUTED|FF_SWPARAM_MF_INVERTED)) {
+        // Mixer channel muting/inversion is handled via the gain control
+        return setMixerGain(ctype, src_channel, dest_channel, 
+            getMixerGain(ctype, src_channel, dest_channel));
+    }
+    return 0;
+}
+
 }
diff --git a/support/dbus/test-dbus.cpp b/support/dbus/test-dbus.cpp
index 3747d88..2b9067d 100644
--- a/support/dbus/test-dbus.cpp
+++ b/support/dbus/test-dbus.cpp
@@ -24,6 +24,7 @@
 #include <argp.h>
 #include <stdlib.h>
 #include <iostream>
+#include <unistd.h>
 #include <signal.h>
 
 #include "controlclient.h"
diff --git a/support/mixer-qt4/ffado/mixer/rme.py b/support/mixer-qt4/ffado/mixer/rme.py
index 93dd387..cf6a0bf 100644
--- a/support/mixer-qt4/ffado/mixer/rme.py
+++ b/support/mixer-qt4/ffado/mixer/rme.py
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009 by Jonathan Woithe
+# Copyright (C) 2009, 2011 by Jonathan Woithe
 #
 # This file is part of FFADO
 # FFADO = Free Firewire (pro-)audio drivers for linux
@@ -20,10 +20,14 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+from PyQt4 import QtGui
+
 from PyQt4.QtCore import SIGNAL, SLOT, QObject, Qt
 from PyQt4.QtGui import QWidget, QApplication
 from ffado.config import *
 
+from ffado.widgets.matrixmixer import MatrixMixer
+
 import logging
 log = logging.getLogger('rme')
 
@@ -118,6 +122,33 @@ class Rme(QWidget):
         widget.setEnabled(False)
 
     def initValues(self):
+
+        # print self.hw.servername
+        # print self.hw.basepath
+        self.inputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/InputFaders", self, 0x8000)
+        layout = QtGui.QVBoxLayout()
+        scrollarea = QtGui.QScrollArea()
+        scrollarea.setWidgetResizable(True)
+        scrollarea.setWidget(self.inputmatrix)
+        layout.addWidget(scrollarea)
+        self.mixer.setLayout(layout)
+
+        self.playbackmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/PlaybackFaders", self, 0x8000)
+        layout = QtGui.QVBoxLayout()
+        scrollarea = QtGui.QScrollArea()
+        scrollarea.setWidgetResizable(True)
+        scrollarea.setWidget(self.playbackmatrix)
+        layout.addWidget(scrollarea)
+        self.playbackmixer.setLayout(layout)
+
+        self.outputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/OutputFaders", self, 0x8000)
+        layout = QtGui.QVBoxLayout()
+        scrollarea = QtGui.QScrollArea()
+        scrollarea.setWidgetResizable(True)
+        scrollarea.setWidget(self.outputmatrix)
+        layout.addWidget(scrollarea)
+        self.outputmixer.setLayout(layout)
+
         # Is the device streaming?
         #self.is_streaming = self.hw.getDiscrete('/Mixer/Info/IsStreaming')
         self.is_streaming = 0
diff --git a/support/mixer-qt4/ffado/mixer/rme.ui b/support/mixer-qt4/ffado/mixer/rme.ui
index 7b2b5e6..667401d 100644
--- a/support/mixer-qt4/ffado/mixer/rme.ui
+++ b/support/mixer-qt4/ffado/mixer/rme.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>RmeMixerUI</class>
- <widget class="QWidget" name="RmeMixerUI" >
-  <property name="geometry" >
+ <widget class="QWidget" name="RmeMixerUI">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,138 +10,138 @@
     <height>781</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>RmeMixer</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout_13" >
+  <layout class="QVBoxLayout" name="verticalLayout_13">
    <item>
-    <widget class="QTabWidget" name="tabWidget" >
-     <property name="sizePolicy" >
-      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <property name="currentIndex" >
+     <property name="currentIndex">
       <number>0</number>
      </property>
-     <widget class="QWidget" name="control" >
-      <attribute name="title" >
+     <widget class="QWidget" name="control">
+      <attribute name="title">
        <string>Control</string>
       </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout" >
+      <layout class="QVBoxLayout" name="verticalLayout">
        <item>
-        <widget class="QFrame" name="frame_5" >
-         <property name="frameShape" >
+        <widget class="QFrame" name="frame_5">
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_5" >
+         <layout class="QHBoxLayout" name="horizontalLayout_5">
           <item>
-           <widget class="QGroupBox" name="input_gains_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="input_gains_group">
+            <property name="title">
              <string>Input gains</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout_8" >
-             <item row="0" column="0" >
-              <widget class="QLabel" name="label_9" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+            <layout class="QGridLayout" name="gridLayout_8">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_9">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                  <horstretch>0</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
-               <property name="text" >
+               <property name="text">
                 <string>Mic 1</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="1" >
-              <widget class="QSlider" name="gain_mic1" >
-               <property name="maximum" >
+             <item row="0" column="1">
+              <widget class="QSlider" name="gain_mic1">
+               <property name="maximum">
                 <number>65</number>
                </property>
-               <property name="singleStep" >
+               <property name="singleStep">
                 <number>1</number>
                </property>
-               <property name="orientation" >
+               <property name="orientation">
                 <enum>Qt::Horizontal</enum>
                </property>
               </widget>
              </item>
-             <item row="1" column="0" >
-              <widget class="QLabel" name="label_10" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_10">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                  <horstretch>0</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
-               <property name="text" >
+               <property name="text">
                 <string>Mic 2</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="1" >
-              <widget class="QSlider" name="gain_mic2" >
-               <property name="maximum" >
+             <item row="1" column="1">
+              <widget class="QSlider" name="gain_mic2">
+               <property name="maximum">
                 <number>65</number>
                </property>
-               <property name="orientation" >
+               <property name="orientation">
                 <enum>Qt::Horizontal</enum>
                </property>
               </widget>
              </item>
-             <item row="2" column="0" >
-              <widget class="QLabel" name="label_24" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_24">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                  <horstretch>0</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
-               <property name="text" >
+               <property name="text">
                 <string>Input 3</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="1" >
-              <widget class="QSlider" name="gain_input3" >
-               <property name="minimum" >
+             <item row="2" column="1">
+              <widget class="QSlider" name="gain_input3">
+               <property name="minimum">
                 <number>0</number>
                </property>
-               <property name="maximum" >
+               <property name="maximum">
                 <number>36</number>
                </property>
-               <property name="orientation" >
+               <property name="orientation">
                 <enum>Qt::Horizontal</enum>
                </property>
               </widget>
              </item>
-             <item row="3" column="0" >
-              <widget class="QLabel" name="label_23" >
-               <property name="sizePolicy" >
-                <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_23">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                  <horstretch>0</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
-               <property name="text" >
+               <property name="text">
                 <string>Input 4</string>
                </property>
               </widget>
              </item>
-             <item row="3" column="1" >
-              <widget class="QSlider" name="gain_input4" >
-               <property name="minimum" >
+             <item row="3" column="1">
+              <widget class="QSlider" name="gain_input4">
+               <property name="minimum">
                 <number>0</number>
                </property>
-               <property name="maximum" >
+               <property name="maximum">
                 <number>36</number>
                </property>
-               <property name="orientation" >
+               <property name="orientation">
                 <enum>Qt::Horizontal</enum>
                </property>
               </widget>
@@ -149,59 +150,59 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="channel_3_4_options_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="channel_3_4_options_group">
+            <property name="title">
              <string>Channel 3/4 options</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout_4" >
-             <item row="0" column="0" colspan="2" >
-              <widget class="QLabel" name="label_18" >
-               <property name="text" >
+            <layout class="QGridLayout" name="gridLayout_4">
+             <item row="0" column="0" colspan="2">
+              <widget class="QLabel" name="label_18">
+               <property name="text">
                 <string>Chan 3</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="2" >
-              <widget class="QCheckBox" name="ff400_chan3_opt_instr" >
-               <property name="text" >
+             <item row="0" column="2">
+              <widget class="QCheckBox" name="ff400_chan3_opt_instr">
+               <property name="text">
                 <string>Instr</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="3" >
-              <widget class="QCheckBox" name="ff400_chan3_opt_pad" >
-               <property name="text" >
+             <item row="0" column="3">
+              <widget class="QCheckBox" name="ff400_chan3_opt_pad">
+               <property name="text">
                 <string>Pad</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="0" >
-              <widget class="QLabel" name="label_19" >
-               <property name="text" >
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_19">
+               <property name="text">
                 <string>Chan 4</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="3" >
-              <widget class="QCheckBox" name="ff400_chan4_opt_pad" >
-               <property name="text" >
+             <item row="2" column="3">
+              <widget class="QCheckBox" name="ff400_chan4_opt_pad">
+               <property name="text">
                 <string>Pad</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="2" >
-              <widget class="QCheckBox" name="ff400_chan4_opt_instr" >
-               <property name="text" >
+             <item row="2" column="2">
+              <widget class="QCheckBox" name="ff400_chan4_opt_instr">
+               <property name="text">
                 <string>Instr</string>
                </property>
               </widget>
              </item>
-             <item row="3" column="2" >
-              <spacer name="verticalSpacer_9" >
-               <property name="orientation" >
+             <item row="3" column="2">
+              <spacer name="verticalSpacer_9">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>40</height>
@@ -216,54 +217,54 @@
         </widget>
        </item>
        <item>
-        <widget class="QFrame" name="frame_4" >
-         <property name="frameShape" >
+        <widget class="QFrame" name="frame_4">
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_4" >
+         <layout class="QHBoxLayout" name="horizontalLayout_4">
           <item>
-           <widget class="QGroupBox" name="phantom_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="phantom_group">
+            <property name="title">
              <string>Phantom</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout_7" >
-             <item rowspan="2" row="0" column="0" colspan="3" >
-              <widget class="QCheckBox" name="phantom_0" >
-               <property name="text" >
+            <layout class="QGridLayout" name="gridLayout_7">
+             <item row="0" column="0" rowspan="2" colspan="3">
+              <widget class="QCheckBox" name="phantom_0">
+               <property name="text">
                 <string>Mic 1</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="1" colspan="2" >
-              <widget class="QCheckBox" name="phantom_2" >
-               <property name="text" >
+             <item row="1" column="1" colspan="2">
+              <widget class="QCheckBox" name="phantom_2">
+               <property name="text">
                 <string>Mic 3</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="0" >
-              <widget class="QCheckBox" name="phantom_1" >
-               <property name="text" >
+             <item row="2" column="0">
+              <widget class="QCheckBox" name="phantom_1">
+               <property name="text">
                 <string>Mic 2</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="1" >
-              <widget class="QCheckBox" name="phantom_3" >
-               <property name="text" >
+             <item row="2" column="1">
+              <widget class="QCheckBox" name="phantom_3">
+               <property name="text">
                 <string>Mic 4</string>
                </property>
               </widget>
              </item>
-             <item row="3" column="0" >
-              <spacer name="verticalSpacer_12" >
-               <property name="orientation" >
+             <item row="3" column="0">
+              <spacer name="verticalSpacer_12">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -275,38 +276,38 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="level_in_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="level_in_group">
+            <property name="title">
              <string>Level in</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_8" >
+            <layout class="QVBoxLayout" name="verticalLayout_8">
              <item>
-              <widget class="QRadioButton" name="level_in_lo_gain" >
-               <property name="text" >
+              <widget class="QRadioButton" name="level_in_lo_gain">
+               <property name="text">
                 <string>Lo gain</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="level_in_p4dBu" >
-               <property name="text" >
+              <widget class="QRadioButton" name="level_in_p4dBu">
+               <property name="text">
                 <string>+4 dBu</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="level_in_m10dBV" >
-               <property name="text" >
+              <widget class="QRadioButton" name="level_in_m10dBV">
+               <property name="text">
                 <string>-10 dBV</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_10" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_10">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>40</height>
@@ -318,84 +319,84 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="input_plug_select_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="input_plug_select_group">
+            <property name="title">
              <string>Inputs</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout_5" >
-             <item row="0" column="0" >
-              <widget class="QLabel" name="label_20" >
-               <property name="text" >
+            <layout class="QGridLayout" name="gridLayout_5">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_20">
+               <property name="text">
                 <string>1</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="0" >
-              <widget class="QLabel" name="label_21" >
-               <property name="text" >
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_21">
+               <property name="text">
                 <string>7</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="1" colspan="3" >
-              <widget class="QComboBox" name="comboBox_3" >
+             <item row="2" column="1" colspan="3">
+              <widget class="QComboBox" name="comboBox_3">
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Front</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Rear</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Front+Rear</string>
                 </property>
                </item>
               </widget>
              </item>
-             <item row="3" column="0" >
-              <widget class="QLabel" name="label_22" >
-               <property name="text" >
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_22">
+               <property name="text">
                 <string>8</string>
                </property>
               </widget>
              </item>
-             <item row="3" column="1" colspan="3" >
-              <widget class="QComboBox" name="comboBox_4" >
+             <item row="3" column="1" colspan="3">
+              <widget class="QComboBox" name="comboBox_4">
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Front</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Rear</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Front+Rear</string>
                 </property>
                </item>
               </widget>
              </item>
-             <item row="0" column="1" colspan="3" >
-              <widget class="QComboBox" name="comboBox_2" >
+             <item row="0" column="1" colspan="3">
+              <widget class="QComboBox" name="comboBox_2">
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Front</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Rear</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Front+Rear</string>
                 </property>
                </item>
@@ -405,38 +406,38 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="instrument_options_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="instrument_options_group">
+            <property name="title">
              <string>Instrument options</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_11" >
+            <layout class="QVBoxLayout" name="verticalLayout_11">
              <item>
-              <widget class="QCheckBox" name="checkBox_6" >
-               <property name="text" >
+              <widget class="QCheckBox" name="checkBox_6">
+               <property name="text">
                 <string>Drive</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QCheckBox" name="checkBox_7" >
-               <property name="text" >
+              <widget class="QCheckBox" name="checkBox_7">
+               <property name="text">
                 <string>Limiter</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QCheckBox" name="checkBox_8" >
-               <property name="text" >
+              <widget class="QCheckBox" name="checkBox_8">
+               <property name="text">
                 <string>Speaker emulation</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_11" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_11">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>40</height>
@@ -451,49 +452,49 @@
         </widget>
        </item>
        <item>
-        <widget class="QFrame" name="frame" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
+        <widget class="QFrame" name="frame">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="frameShape" >
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_2" >
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
           <item>
-           <widget class="QGroupBox" name="spdif_in_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="spdif_in_group">
+            <property name="title">
              <string>SPDIF in</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_2" >
+            <layout class="QVBoxLayout" name="verticalLayout_2">
              <item>
-              <widget class="QRadioButton" name="radioButton" >
-               <property name="text" >
+              <widget class="QRadioButton" name="radioButton">
+               <property name="text">
                 <string>Optical</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="radioButton_2" >
-               <property name="text" >
+              <widget class="QRadioButton" name="radioButton_2">
+               <property name="text">
                 <string>Coax</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_7" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_7">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -505,48 +506,48 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="spdif_out_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="spdif_out_group">
+            <property name="title">
              <string>SPDIF out</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout_6" >
-             <item row="0" column="0" >
-              <widget class="QCheckBox" name="checkBox" >
-               <property name="text" >
+            <layout class="QGridLayout" name="gridLayout_6">
+             <item row="0" column="0">
+              <widget class="QCheckBox" name="checkBox">
+               <property name="text">
                 <string>Optical</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="1" >
-              <widget class="QCheckBox" name="checkBox_3" >
-               <property name="text" >
+             <item row="0" column="1">
+              <widget class="QCheckBox" name="checkBox_3">
+               <property name="text">
                 <string>Emphasis</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="0" >
-              <widget class="QCheckBox" name="checkBox_2" >
-               <property name="text" >
+             <item row="1" column="0">
+              <widget class="QCheckBox" name="checkBox_2">
+               <property name="text">
                 <string>Professional</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="1" >
-              <widget class="QCheckBox" name="checkBox_4" >
-               <property name="text" >
+             <item row="1" column="1">
+              <widget class="QCheckBox" name="checkBox_4">
+               <property name="text">
                 <string>Non-audio</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="0" >
-              <spacer name="verticalSpacer_8" >
-               <property name="orientation" >
+             <item row="2" column="0">
+              <spacer name="verticalSpacer_8">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -558,41 +559,41 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="level_out_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="level_out_group">
+            <property name="title">
              <string>Level out</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_9" >
+            <layout class="QVBoxLayout" name="verticalLayout_9">
              <item>
-              <widget class="QRadioButton" name="level_out_hi_gain" >
-               <property name="text" >
+              <widget class="QRadioButton" name="level_out_hi_gain">
+               <property name="text">
                 <string>Hi gain</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="level_out_p4dBu" >
-               <property name="text" >
+              <widget class="QRadioButton" name="level_out_p4dBu">
+               <property name="text">
                 <string>+4 dBu</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="level_out_m10dBV" >
-               <property name="text" >
+              <widget class="QRadioButton" name="level_out_m10dBV">
+               <property name="text">
                 <string>-10 dBV</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_13" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_13">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -604,41 +605,41 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="phones_level_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="phones_level_group">
+            <property name="title">
              <string>Phones level</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_10" >
+            <layout class="QVBoxLayout" name="verticalLayout_10">
              <item>
-              <widget class="QRadioButton" name="phones_hi_gain" >
-               <property name="text" >
+              <widget class="QRadioButton" name="phones_hi_gain">
+               <property name="text">
                 <string>Hi gain</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="phones_p4dBu" >
-               <property name="text" >
+              <widget class="QRadioButton" name="phones_p4dBu">
+               <property name="text">
                 <string>+4 dBU</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="phones_m10dBV" >
-               <property name="text" >
+              <widget class="QRadioButton" name="phones_m10dBV">
+               <property name="text">
                 <string>-10 dBV</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_14" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_14">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -653,40 +654,40 @@
         </widget>
        </item>
        <item>
-        <widget class="QFrame" name="frame_2" >
-         <property name="frameShape" >
+        <widget class="QFrame" name="frame_2">
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
-         <layout class="QHBoxLayout" name="horizontalLayout" >
+         <layout class="QHBoxLayout" name="horizontalLayout">
           <item>
-           <widget class="QGroupBox" name="clock_mode_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="clock_mode_group">
+            <property name="title">
              <string>Clock mode</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_3" >
+            <layout class="QVBoxLayout" name="verticalLayout_3">
              <item>
-              <widget class="QRadioButton" name="radioButton_3" >
-               <property name="text" >
+              <widget class="QRadioButton" name="radioButton_3">
+               <property name="text">
                 <string>Autosync</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="radioButton_4" >
-               <property name="text" >
+              <widget class="QRadioButton" name="radioButton_4">
+               <property name="text">
                 <string>Master</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_2" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_2">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>40</height>
@@ -698,45 +699,45 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="sync_ref_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="sync_ref_group">
+            <property name="title">
              <string>Pref sync ref</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_4" >
+            <layout class="QVBoxLayout" name="verticalLayout_4">
              <item>
-              <widget class="QRadioButton" name="sync_ref_wordclk" >
-               <property name="text" >
+              <widget class="QRadioButton" name="sync_ref_wordclk">
+               <property name="text">
                 <string>Word clock</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="sync_ref_adat1" >
-               <property name="text" >
+              <widget class="QRadioButton" name="sync_ref_adat1">
+               <property name="text">
                 <string>ADAT1 in</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="sync_ref_adat2" >
-               <property name="text" >
+              <widget class="QRadioButton" name="sync_ref_adat2">
+               <property name="text">
                 <string>ADAT2 in</string>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QRadioButton" name="sync_ref_spdif" >
-               <property name="text" >
+              <widget class="QRadioButton" name="sync_ref_spdif">
+               <property name="text">
                 <string>SPDIF in</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_15" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_15">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -748,73 +749,73 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="sync_check_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="sync_check_group">
+            <property name="title">
              <string>Sync check</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout_2" >
-             <item row="0" column="0" >
-              <widget class="QLabel" name="label_5" >
-               <property name="text" >
+            <layout class="QGridLayout" name="gridLayout_2">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_5">
+               <property name="text">
                 <string>Word</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="1" >
-              <widget class="QLabel" name="label_6" >
-               <property name="text" >
+             <item row="0" column="1">
+              <widget class="QLabel" name="label_6">
+               <property name="text">
                 <string>No lock</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="0" >
-              <widget class="QLabel" name="label_7" >
-               <property name="text" >
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_7">
+               <property name="text">
                 <string>ADAT1</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="1" >
-              <widget class="QLabel" name="label_8" >
-               <property name="text" >
+             <item row="1" column="1">
+              <widget class="QLabel" name="label_8">
+               <property name="text">
                 <string>No lock</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="0" >
-              <widget class="QLabel" name="sync_check_adat2_label" >
-               <property name="text" >
+             <item row="2" column="0">
+              <widget class="QLabel" name="sync_check_adat2_label">
+               <property name="text">
                 <string>ADAT2</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="1" >
-              <widget class="QLabel" name="sync_check_adat2_status" >
-               <property name="text" >
+             <item row="2" column="1">
+              <widget class="QLabel" name="sync_check_adat2_status">
+               <property name="text">
                 <string>No lock</string>
                </property>
               </widget>
              </item>
-             <item row="3" column="0" >
-              <widget class="QLabel" name="label_11" >
-               <property name="text" >
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_11">
+               <property name="text">
                 <string>SPDIF</string>
                </property>
               </widget>
              </item>
-             <item row="3" column="1" >
-              <widget class="QLabel" name="label_12" >
-               <property name="text" >
+             <item row="3" column="1">
+              <widget class="QLabel" name="label_12">
+               <property name="text">
                 <string>No lock</string>
                </property>
               </widget>
              </item>
-             <item row="4" column="0" >
-              <spacer name="verticalSpacer_16" >
-               <property name="orientation" >
+             <item row="4" column="0">
+              <spacer name="verticalSpacer_16">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -826,45 +827,45 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="autosync_ref_group" >
-            <property name="title" >
+           <widget class="QGroupBox" name="autosync_ref_group">
+            <property name="title">
              <string>Autosync ref</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout" >
-             <item row="0" column="0" >
-              <widget class="QLabel" name="label" >
-               <property name="text" >
+            <layout class="QGridLayout" name="gridLayout">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label">
+               <property name="text">
                 <string>Input</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="1" >
-              <widget class="QLabel" name="label_2" >
-               <property name="text" >
+             <item row="0" column="1">
+              <widget class="QLabel" name="label_2">
+               <property name="text">
                 <string>[unset]</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="0" >
-              <widget class="QLabel" name="label_3" >
-               <property name="text" >
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_3">
+               <property name="text">
                 <string>Frequency</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="1" >
-              <widget class="QLabel" name="label_4" >
-               <property name="text" >
+             <item row="1" column="1">
+              <widget class="QLabel" name="label_4">
+               <property name="text">
                 <string>[unset]</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="0" >
-              <spacer name="verticalSpacer" >
-               <property name="orientation" >
+             <item row="2" column="0">
+              <spacer name="verticalSpacer">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>40</height>
@@ -879,48 +880,48 @@
         </widget>
        </item>
        <item>
-        <widget class="QFrame" name="frame_3" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
+        <widget class="QFrame" name="frame_3">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="frameShape" >
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_3" >
+         <layout class="QHBoxLayout" name="horizontalLayout_3">
           <item>
-           <widget class="QGroupBox" name="groupBox_8" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
+           <widget class="QGroupBox" name="groupBox_8">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="title" >
+            <property name="title">
              <string>SPDIF frequency</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_7" >
+            <layout class="QVBoxLayout" name="verticalLayout_7">
              <item>
-              <widget class="QLabel" name="label_13" >
-               <property name="text" >
+              <widget class="QLabel" name="label_13">
+               <property name="text">
                 <string>48 kHz</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_3" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_3">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -932,33 +933,33 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="groupBox_9" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
+           <widget class="QGroupBox" name="groupBox_9">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="title" >
+            <property name="title">
              <string>Word clock</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_6" >
+            <layout class="QVBoxLayout" name="verticalLayout_6">
              <item>
-              <widget class="QCheckBox" name="checkBox_5" >
-               <property name="text" >
+              <widget class="QCheckBox" name="checkBox_5">
+               <property name="text">
                 <string>Single speed</string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_4" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_4">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -970,54 +971,54 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="groupBox_10" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
+           <widget class="QGroupBox" name="groupBox_10">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="title" >
+            <property name="title">
              <string>System clock</string>
             </property>
-            <layout class="QGridLayout" name="gridLayout_3" >
-             <item row="0" column="0" >
-              <widget class="QLabel" name="label_14" >
-               <property name="text" >
+            <layout class="QGridLayout" name="gridLayout_3">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_14">
+               <property name="text">
                 <string>Mode</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="1" >
-              <widget class="QLabel" name="label_15" >
-               <property name="text" >
+             <item row="0" column="1">
+              <widget class="QLabel" name="label_15">
+               <property name="text">
                 <string>Slave</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="0" >
-              <widget class="QLabel" name="label_16" >
-               <property name="text" >
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_16">
+               <property name="text">
                 <string>Frequency</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="1" >
-              <widget class="QLabel" name="label_17" >
-               <property name="text" >
+             <item row="1" column="1">
+              <widget class="QLabel" name="label_17">
+               <property name="text">
                 <string>44100 kHz</string>
                </property>
               </widget>
              </item>
-             <item row="2" column="1" >
-              <spacer name="verticalSpacer_5" >
-               <property name="orientation" >
+             <item row="2" column="1">
+              <spacer name="verticalSpacer_5">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -1029,45 +1030,45 @@
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="groupBox_16" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
+           <widget class="QGroupBox" name="groupBox_16">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="title" >
+            <property name="title">
              <string>Limit bandwidth</string>
             </property>
-            <layout class="QVBoxLayout" name="verticalLayout_12" >
+            <layout class="QVBoxLayout" name="verticalLayout_12">
              <item>
-              <widget class="QComboBox" name="comboBox" >
+              <widget class="QComboBox" name="comboBox">
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>All channels</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Analog + SPDIF</string>
                 </property>
                </item>
                <item>
-                <property name="text" >
+                <property name="text">
                  <string>Analog 1-8</string>
                 </property>
                </item>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_6" >
-               <property name="orientation" >
+              <spacer name="verticalSpacer_6">
+               <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
-               <property name="sizeType" >
+               <property name="sizeType">
                 <enum>QSizePolicy::MinimumExpanding</enum>
                </property>
-               <property name="sizeHint" stdset="0" >
+               <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>0</height>
@@ -1088,9 +1089,19 @@
       <zorder>frame_3</zorder>
       <zorder>frame_5</zorder>
      </widget>
-     <widget class="QWidget" name="mixer" >
-      <attribute name="title" >
-       <string>Mixer</string>
+     <widget class="QWidget" name="mixer">
+      <attribute name="title">
+       <string>Input mixer</string>
+      </attribute>
+     </widget>
+     <widget class="QWidget" name="playbackmixer">
+      <attribute name="title">
+       <string>Playback mixer</string>
+      </attribute>
+     </widget>
+     <widget class="QWidget" name="outputmixer">
+      <attribute name="title">
+       <string>Output levels</string>
       </attribute>
      </widget>
     </widget>
diff --git a/support/mixer-qt4/ffado/mixer/saffire.py b/support/mixer-qt4/ffado/mixer/saffire.py
index 37c21b5..50d95e3 100644
--- a/support/mixer-qt4/ffado/mixer/saffire.py
+++ b/support/mixer-qt4/ffado/mixer/saffire.py
@@ -294,7 +294,7 @@ class SaffireMixerMono(QWidget, SaffireMixerBase):
     def __init__(self,parent = None):
         self.my_parent = parent
         QWidget.__init__(self,parent)
-        uicLoad("ffado/mixer/saffire_stereo", self)
+        uicLoad("ffado/mixer/saffire_mono", self)
         SaffireMixerBase.__init__(self)
         QObject.connect(self.btnRefresh, SIGNAL('clicked()'), self.updateValues)
         QObject.connect(self.btnSwitchStereoMode, SIGNAL('clicked()'), self.switchStereoMode)
diff --git a/support/mixer-qt4/ffado/widgets/matrixmixer.py b/support/mixer-qt4/ffado/widgets/matrixmixer.py
index 1e1bf50..6e60f1b 100644
--- a/support/mixer-qt4/ffado/widgets/matrixmixer.py
+++ b/support/mixer-qt4/ffado/widgets/matrixmixer.py
@@ -54,15 +54,17 @@ class ColorForNumber:
                 (1-f)*lc.blue()  + f*hc.blue() )
 
 class MixerNode(QtGui.QAbstractSlider):
-    def __init__(self, input, output, value, parent):
+    def __init__(self, input, output, value, max, muted, parent):
         QtGui.QAbstractSlider.__init__(self, parent)
-        #log.debug("MixerNode.__init__( %i, %i, %i, %s )" % (input, output, value, str(parent)) )
+        #log.debug("MixerNode.__init__( %i, %i, %i, %i, %s )" % (input, output, value, max, str(parent)) )
 
         self.pos = QtCore.QPointF(0, 0)
         self.input = input
         self.output = output
         self.setOrientation(Qt.Qt.Vertical)
-        self.setRange(0, pow(2, 16)-1)
+        if max == -1:
+            max = pow(2, 16)-1
+        self.setRange(0, max)
         self.setValue(value)
         self.connect(self, QtCore.SIGNAL("valueChanged(int)"), self.internalValueChanged)
 
@@ -93,12 +95,28 @@ class MixerNode(QtGui.QAbstractSlider):
             self.mapper.setMapping(action, text)
             self.addAction(action)
 
+        # Only show the mute menu item if a value has been supplied
+        self.mute_action = None
+        if (muted != None):
+            action = QtGui.QAction(text, self)
+            action.setSeparator(True)
+            self.addAction(action)
+            self.mute_action = QtGui.QAction("Mute", self)
+            self.mute_action.setCheckable(True)
+            self.mute_action.setChecked(muted)
+            self.connect(self.mute_action, QtCore.SIGNAL("triggered()"), self.mapper, QtCore.SLOT("map()"))
+            self.mapper.setMapping(self.mute_action, "Mute")
+            self.addAction(self.mute_action)
+
     def directValues(self,text):
         #log.debug("MixerNode.directValues( '%s' )" % text)
-        text = text.split(" ")[0].replace(",",".")
-        n = pow(10, (float(text)/20)) * pow(2,14)
-        #log.debug("%g" % n)
-        self.setValue(n)
+        if text == "Mute":
+            log.debug("Mute %d" % self.mute_action.isChecked())
+        else:
+            text = text.split(" ")[0].replace(",",".")
+            n = pow(10, (float(text)/20)) * pow(2,14)
+            #log.debug("%g" % n)
+            self.setValue(n)
 
     def mousePressEvent(self, ev):
         if ev.buttons() & Qt.Qt.LeftButton:
@@ -191,25 +209,31 @@ class MixerChannel(QtGui.QWidget):
         if hide:
             self.lbl.setText("%i" % self.number);
         else:
-            self.lbl.setText("Ch. %i%s" % (self.number, self.name))
+            self.lbl.setText("Ch. %i%s" % (self.number+1, self.name))
         self.emit(QtCore.SIGNAL("hide"), self.number, hide)
         self.update()
 
 
 
 class MatrixMixer(QtGui.QWidget):
-    def __init__(self, servername, basepath, parent=None):
+    def __init__(self, servername, basepath, parent=None, sliderMaxValue=-1, mutespath=None):
         QtGui.QWidget.__init__(self, parent)
         self.bus = dbus.SessionBus()
         self.dev = self.bus.get_object(servername, basepath)
         self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.MatrixMixer")
 
+        self.mutes_dev = None
+        self.mutes_interface = None
+        if (mutespath != None):
+            self.mutes_dev = self.bus.get_object(servername, mutespath)
+            self.mutes_interface = dbus.Interface(self.mutes_dev, dbus_interface="org.ffado.Control.Element.MatrixMixer")
+
         #palette = self.palette()
         #palette.setColor(QtGui.QPalette.Window, palette.color(QtGui.QPalette.Window).darker());
         #self.setPalette(palette)
 
-        rows = self.interface.getColCount()
-        cols = self.interface.getRowCount()
+        cols = self.interface.getColCount()
+        rows = self.interface.getRowCount()
         log.debug("Mixer has %i rows and %i columns" % (rows, cols))
 
         layout = QtGui.QGridLayout(self)
@@ -235,7 +259,7 @@ class MatrixMixer(QtGui.QWidget):
         for i in range(rows):
             self.items.append([])
             for j in range(cols):
-                node = MixerNode(j, i, self.interface.getValue(i,j), self)
+                node = MixerNode(j, i, self.interface.getValue(i,j), sliderMaxValue, None, self)
                 self.connect(node, QtCore.SIGNAL("valueChanged"), self.valueChanged)
                 layout.addWidget(node, i+1, j+1)
                 self.items[i].append(node)
@@ -270,6 +294,5 @@ class MatrixMixer(QtGui.QWidget):
         #log.debug("MatrixNode.valueChanged( %s )" % str(n))
         self.interface.setValue(n[1], n[0], n[2])
 
-
 #
 # vim: et ts=4 sw=4 fileencoding=utf8

-- 
Free Firewire Audio Drivers (ffado.org) packaging



More information about the pkg-multimedia-commits mailing list