Changeset 2032

Show
Ignore:
Timestamp:
02/03/12 02:35:02 (9 years ago)
Author:
jwoithe
Message:

rme: implement SPDIF input mode selection via ffado-mixer. Whether this has the desired effect on the device remains to be seen - I do not have anything to test the mode of the optical port right now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/rme/fireface_settings_ctrls.cpp

    r2016 r2032  
    115115            } 
    116116            break; 
     117        case RME_CTRL_SPDIF_INPUT_MODE: 
     118            if (m_parent.setSpdifInputMode(v==0?FF_SWPARAM_SPDIF_INPUT_COAX:FF_SWPARAM_SPDIF_INPUT_OPTICAL)) { 
     119                m_value = v; 
     120            } 
     121            break; 
    117122        case RME_CTRL_PHONES_LEVEL: 
    118123            if (m_parent.setPhonesLevel(v)) { 
     
    164169        case RME_CTRL_FF400_INSTR_SW: 
    165170            return m_parent.getInputInstrOpt(m_info); 
     171            break; 
     172        case RME_CTRL_SPDIF_INPUT_MODE: 
     173            i = m_parent.getSpdifInputMode(); 
     174            return i==FF_SWPARAM_SPDIF_INPUT_COAX?0:1; 
    166175            break; 
    167176        case RME_CTRL_PHONES_LEVEL: 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r2021 r2032  
    161161            "Output_level", "Output level", "")); 
    162162    result &= m_ControlContainer->addElement( 
     163        new RmeSettingsCtrl(*this, RME_CTRL_SPDIF_INPUT_MODE, 0, 
     164            "SPDIF_input_mode", "SPDIF input mode", "")); 
     165    result &= m_ControlContainer->addElement( 
    163166        new RmeSettingsCtrl(*this, RME_CTRL_PHONES_LEVEL, 0, 
    164167            "Phones_level", "Phones level", "")); 
  • trunk/libffado/src/rme/rme_avdevice.h

    r2016 r2032  
    116116    signed int getInputInstrOpt(unsigned int channel); 
    117117    signed int setInputInstrOpt(unsigned int channel, unsigned int status); 
     118    signed int getSpdifInputMode(void); 
     119    signed int setSpdifInputMode(signed int mode); 
    118120    signed int getAmpGain(unsigned int index); 
    119121    signed int setAmpGain(unsigned int index, signed int val); 
  • trunk/libffado/src/rme/rme_avdevice_settings.cpp

    r2028 r2032  
    143143    } 
    144144    settings->ff400_instr_input[channel-3] = (status != 0); 
     145    set_hardware_params(); 
     146    return 0; 
     147} 
     148 
     149signed int  
     150Device::getSpdifInputMode(void) { 
     151    return settings->spdif_input_mode; 
     152} 
     153 
     154signed int  
     155Device::setSpdifInputMode(signed int mode) { 
     156    settings->spdif_input_mode = mode; 
    145157    set_hardware_params(); 
    146158    return 0; 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/rme.py

    r2027 r2032  
    6868            self.level_out_p4dBu:   ['/Control/Output_level', 2], 
    6969            self.level_out_m10dBV:  ['/Control/Output_level', 3], 
     70 
     71            self.spdif_input_coax:    ['/Control/SPDIF_input_mode', 0], 
     72            self.spdif_input_optical: ['/Control/SPDIF_input_mode', 1], 
    7073 
    7174            self.phones_hi_gain: ['/Control/Phones_level', 1], 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/rme.ui

    r2011 r2032  
    474474            <layout class="QVBoxLayout" name="verticalLayout_2"> 
    475475             <item> 
    476               <widget class="QRadioButton" name="radioButton"> 
     476              <widget class="QRadioButton" name="spdif_input_coax"> 
     477               <property name="text"> 
     478                <string>Coax</string> 
     479               </property> 
     480              </widget> 
     481             </item> 
     482             <item> 
     483              <widget class="QRadioButton" name="spdif_input_optical"> 
    477484               <property name="text"> 
    478485                <string>Optical</string> 
    479                </property> 
    480               </widget> 
    481              </item> 
    482              <item> 
    483               <widget class="QRadioButton" name="radioButton_2"> 
    484                <property name="text"> 
    485                 <string>Coax</string> 
    486486               </property> 
    487487              </widget>