Changeset 1610
- Timestamp:
- 08/02/09 07:26:58 (14 years ago)
- Files:
-
- trunk/libffado/src/rme/fireface_settings_ctrls.cpp (modified) (3 diffs)
- trunk/libffado/src/rme/fireface_settings_ctrls.h (modified) (1 diff)
- trunk/libffado/src/rme/rme_avdevice.cpp (modified) (2 diffs)
- trunk/libffado/src/rme/rme_avdevice.h (modified) (1 diff)
- trunk/libffado/src/rme/rme_avdevice_settings.cpp (modified) (1 diff)
- trunk/libffado/support/mixer-qt4/mixer_rme.py (modified) (4 diffs)
- trunk/libffado/support/mixer-qt4/mixer_rme.ui (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/rme/fireface_settings_ctrls.cpp
r1606 r1610 64 64 case RME_CTRL_PHANTOM_SW: 65 65 // Lowest 16 bits are phantom status bits (max 16 channels). 66 // High 16 bits are "write enable" bits for the correspo ding66 // High 16 bits are "write enable" bits for the corresponding 67 67 // channel represented in the low 16 bits. This way changes can 68 68 // be made to one channel without needing to first read the … … 89 89 } 90 90 } 91 } 92 break; 93 case RME_CTRL_FF400_PAD_SW: 94 // Object's "m_info" field is the channel 95 if (m_parent.setInputPadOpt(m_info, v)) { 96 m_value = (v != 0); 97 } 98 break; 99 case RME_CTRL_FF400_INSTR_SW: 100 // Object's "m_info" field is the channel 101 if (m_parent.setInputInstrOpt(m_info, v)) { 102 m_value = (v != 0); 91 103 } 92 104 break; … … 124 136 return val; 125 137 break; 138 case RME_CTRL_FF400_PAD_SW: 139 return m_parent.getInputPadOpt(m_info); 140 break; 141 case RME_CTRL_FF400_INSTR_SW: 142 return m_parent.getInputInstrOpt(m_info); 143 break; 126 144 127 145 case RME_CTRL_INFO_MODEL: trunk/libffado/src/rme/fireface_settings_ctrls.h
r1606 r1610 45 45 #define RME_CTRL_INPUT1_OPTIONS 0x000e 46 46 #define RME_CTRL_INPUT2_OPTIONS 0x000f 47 #define RME_CTRL_FF400_PAD_SW 0x0010 48 #define RME_CTRL_FF400_INSTR_SW 0x0011 47 49 48 50 #define RME_CTRL_INFO_MODEL 0x0100 trunk/libffado/src/rme/rme_avdevice.cpp
r1606 r1610 105 105 bool 106 106 Device::buildMixer() { 107 signed int i; 107 108 bool result = true; 108 109 … … 129 130 new RmeSettingsCtrl(*this, RME_CTRL_PHANTOM_SW, 0, 130 131 "Phantom", "Phantom switches", "")); 132 if (m_rme_model == RME_MODEL_FIREFACE400) { 133 for (i=3; i<=4; i++) { 134 char path[32], desc[64]; 135 snprintf(path, sizeof(path), "Chan%d_opt_instr", i); 136 snprintf(desc, sizeof(desc), "Chan%d instrument option", i); 137 result &= m_ControlContainer->addElement( 138 new RmeSettingsCtrl(*this, RME_CTRL_FF400_INSTR_SW, i, 139 path, desc, "")); 140 snprintf(path, sizeof(path), "Chan%d_opt_pad", i); 141 snprintf(desc, sizeof(desc), "Chan%d pad option", i); 142 result &= m_ControlContainer->addElement( 143 new RmeSettingsCtrl(*this, RME_CTRL_FF400_PAD_SW, i, 144 path, desc, "")); 145 } 146 } 131 147 132 148 if (!result) { trunk/libffado/src/rme/rme_avdevice.h
r1606 r1610 95 95 signed int getPhantom(unsigned int channel); 96 96 signed int setPhantom(unsigned int channel, unsigned int status); 97 signed int getInputPadOpt(unsigned int channel); 98 signed int setInputPadOpt(unsigned int channel, unsigned int status); 99 signed int getInputInstrOpt(unsigned int channel); 100 signed int setInputInstrOpt(unsigned int channel, unsigned int status); 97 101 98 102 /* General information functions */ trunk/libffado/src/rme/rme_avdevice_settings.cpp
r1606 r1610 53 53 } 54 54 55 signed int 56 Device::getInputPadOpt(unsigned int channel) { 57 if (m_rme_model!=RME_MODEL_FIREFACE400 || channel<3 || channel>4) { 58 debugOutput(DEBUG_LEVEL_WARNING, "Channel %d input pad option not supported for model %d\n", channel, m_rme_model); 59 return -1; 60 } 61 return settings.ff400_input_pad[channel-3] != 0; 62 } 63 64 signed int 65 Device::setInputPadOpt(unsigned int channel, unsigned int status) { 66 if (m_rme_model!=RME_MODEL_FIREFACE400 || channel<3 || channel>4) { 67 debugOutput(DEBUG_LEVEL_WARNING, "Channel %d input pad option not supported for model %d\n", channel, m_rme_model); 68 return -1; 69 } 70 settings.ff400_input_pad[channel-3] = (status != 0); 71 set_hardware_params(); 72 return 0; 73 } 74 75 signed int 76 Device::getInputInstrOpt(unsigned int channel) { 77 if (m_rme_model!=RME_MODEL_FIREFACE400 || channel<3 || channel>4) { 78 debugOutput(DEBUG_LEVEL_WARNING, "Channel %d input instrument option not supported for model %d\n", channel, m_rme_model); 79 return -1; 80 } 81 return settings.ff400_instr_input[channel-3] != 0; 82 } 83 84 signed int 85 Device::setInputInstrOpt(unsigned int channel, unsigned int status) { 86 if (m_rme_model!=RME_MODEL_FIREFACE400 || channel<3 || channel>4) { 87 debugOutput(DEBUG_LEVEL_WARNING, "Channel %d input instrument option not supported for model %d\n", channel, m_rme_model); 88 return -1; 89 } 90 settings.ff400_instr_input[channel-3] = (status != 0); 91 set_hardware_params(); 92 return 0; 93 } 94 55 95 56 96 } trunk/libffado/support/mixer-qt4/mixer_rme.py
r1608 r1610 49 49 } 50 50 51 self.Switches={ 52 self.ff400_chan3_opt_instr: ['/Control/Chan3_opt_instr'], 53 self.ff400_chan3_opt_pad: ['/Control/Chan3_opt_pad'], 54 self.ff400_chan4_opt_instr: ['/Control/Chan4_opt_instr'], 55 self.ff400_chan4_opt_pad: ['/Control/Chan4_opt_pad'], 56 } 57 51 58 # Other mixer variables 52 59 self.is_streaming = 0 … … 55 62 self.tco_present = 0 56 63 57 # Public slot: update phantom power hardware switch s64 # Public slot: update phantom power hardware switches 58 65 def updatePhantomSwitch(self, a0): 59 66 sender = self.sender() … … 63 70 log.debug("phantom switch %d set to %d" % (self.PhantomSwitches[sender][1], a0)) 64 71 self.hw.setDiscrete(self.PhantomSwitches[sender][0], val) 72 73 # Public slot: update generic switches 74 def updateSwitch(self, a0): 75 sender = self.sender() 76 log.debug("switch %s set to %d" % (self.Switches[sender][0], a0)) 77 self.hw.setDiscrete(self.Switches[sender][0], a0) 65 78 66 79 # Hide and disable a control … … 118 131 ctrl.setChecked(False) 119 132 QObject.connect(ctrl, SIGNAL('toggled(bool)'), self.updatePhantomSwitch) 133 134 for ctrl, info in self.Switches.iteritems(): 135 if (not(ctrl.isEnabled())): 136 continue 137 val = self.hw.getDiscrete(info[0]) 138 log.debug("switch %s is %d" % (info[0], val)) 139 if val: 140 ctrl.setChecked(True) 141 else: 142 ctrl.setChecked(False) 143 QObject.connect(ctrl, SIGNAL('toggled(bool)'), self.updateSwitch) trunk/libffado/support/mixer-qt4/mixer_rme.ui
r1608 r1610 489 489 </layout> 490 490 </widget> 491 <widget class="QGroupBox" name=" groupBox_13" >491 <widget class="QGroupBox" name="phones_level_group" > 492 492 <property name="geometry" > 493 493 <rect> … … 582 582 </item> 583 583 <item row="0" column="2" > 584 <widget class="QCheckBox" name=" checkBox_9" >584 <widget class="QCheckBox" name="ff400_chan3_opt_instr" > 585 585 <property name="text" > 586 586 <string>Instr</string> … … 589 589 </item> 590 590 <item row="0" column="3" > 591 <widget class="QCheckBox" name=" checkBox_11" >591 <widget class="QCheckBox" name="ff400_chan3_opt_pad" > 592 592 <property name="text" > 593 593 <string>Pad</string> … … 603 603 </item> 604 604 <item row="2" column="3" > 605 <widget class="QCheckBox" name=" checkBox_12" >605 <widget class="QCheckBox" name="ff400_chan4_opt_pad" > 606 606 <property name="text" > 607 607 <string>Pad</string> … … 610 610 </item> 611 611 <item row="2" column="2" > 612 <widget class="QCheckBox" name=" checkBox_10" >612 <widget class="QCheckBox" name="ff400_chan4_opt_instr" > 613 613 <property name="text" > 614 614 <string>Instr</string>