Changeset 2040 for trunk

Show
Ignore:
Timestamp:
02/13/12 03:58:09 (12 years ago)
Author:
jwoithe
Message:

rme: added TCO option to the preferred sync ref control set (it's disabled for the ff400 since the TCO can't be fitted to this interface - it's ff800 only). The preferred sync ref control in ffado-mixer is now active. As for the other sync controls it is yet to be tested with real sync sources connected to the ff400. This completes the first pass of the device controls for the ff400 within ffado-mixer.

Files:

Legend:

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

    r2039 r2040  
    151151            } 
    152152            break; 
     153        case RME_CTRL_SYNC_REF: { 
     154            signed int val; 
     155            switch (v) { 
     156              case 0: val = FF_SWPARAM_SYNCREF_WORDCLOCK; break; 
     157              case 1: val = FF_SWPARAM_SYNCREF_ADAT1; break; 
     158              case 2: val = FF_SWPARAM_SYNCREF_ADAT2; break; 
     159              case 3: val = FF_SWPARAM_SYNCREF_SPDIF; break; 
     160              case 4: val = FF_SWPARAM_SYNCREC_TCO; break; 
     161              default: 
     162                val = FF_SWPARAM_SYNCREF_WORDCLOCK; 
     163            } 
     164            if (m_parent.setSyncRef(val) == 0) { 
     165              m_value = v; 
     166            } 
     167            break; 
     168        } 
    153169 
    154170        // All RME_CTRL_INFO_* controls are read-only.  Warn on attempts to 
     
    225241            return m_parent.getClockMode()==FF_SWPARAM_CLOCK_MODE_AUTOSYNC?1:0; 
    226242            break; 
    227  
     243        case RME_CTRL_SYNC_REF: { 
     244            signed int val = m_parent.getSyncRef(); 
     245            switch (val) { 
     246              case FF_SWPARAM_SYNCREF_WORDCLOCK: return 0; 
     247              case FF_SWPARAM_SYNCREF_ADAT1: return 1; 
     248              case FF_SWPARAM_SYNCREF_ADAT2: return 2; 
     249              case FF_SWPARAM_SYNCREF_SPDIF: return 3; 
     250              case FF_SWPARAM_SYNCREC_TCO: return 4; 
     251              default: 
     252                return 0; 
     253            } 
     254            break; 
     255        } 
    228256        case RME_CTRL_INFO_MODEL: 
    229257            return m_parent.getRmeModel(); 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r2038 r2040  
    200200        new RmeSettingsCtrl(*this, RME_CTRL_CLOCK_MODE, 0, 
    201201            "Clock_mode", "Clock mode", "")); 
     202    result &= m_ControlContainer->addElement( 
     203        new RmeSettingsCtrl(*this, RME_CTRL_SYNC_REF, 0, 
     204            "Sync_ref", "Preferred sync ref", "")); 
    202205 
    203206    if (m_rme_model == RME_MODEL_FIREFACE400) { 
  • trunk/libffado/src/rme/rme_avdevice.h

    r2038 r2040  
    139139    signed int getClockMode(void); 
    140140    signed int setClockMode(signed int mode); 
     141    signed int getSyncRef(void); 
     142    signed int setSyncRef(signed int ref); 
    141143 
    142144    /* General information functions */ 
  • trunk/libffado/src/rme/rme_avdevice_settings.cpp

    r2037 r2040  
    365365} 
    366366 
    367 
     367signed int 
     368Device::getSyncRef(void) { 
     369  return settings->sync_ref; 
     370
     371signed int 
     372Device::setSyncRef(signed int ref) { 
     373  settings->sync_ref = ref; 
     374  set_hardware_params(); 
     375  return 0; 
     376
     377 
     378
  • trunk/libffado/support/mixer-qt4/ffado/mixer/rme.py

    r2038 r2040  
    8383            self.clock_mode_autosync: ['/Control/Clock_mode', 1], 
    8484            self.clock_mode_master: ['/Control/Clock_mode', 0], 
     85 
     86            self.sync_ref_wordclk: ['/Control/Sync_ref', 0], 
     87            self.sync_ref_adat1: ['/Control/Sync_ref', 1], 
     88            self.sync_ref_adat2: ['/Control/Sync_ref', 2], 
     89            self.sync_ref_spdif: ['/Control/Sync_ref', 3], 
     90            self.sync_ref_tco: ['/Control/Sync_ref', 4], 
    8591        } 
    8692 
     
    219225            self.sync_check_tco_label.setEnabled(False) 
    220226            self.sync_check_tco_status.setEnabled(False) 
     227            self.sync_ref_tco.setEnabled(False) 
    221228 
    222229        # Only the FF400 has specific channel 3/4 options, input gain 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/rme.ui

    r2038 r2040  
    734734             </item> 
    735735             <item> 
     736              <widget class="QRadioButton" name="sync_ref_tco"> 
     737               <property name="text"> 
     738                <string>TCO</string> 
     739               </property> 
     740              </widget> 
     741             </item> 
     742             <item> 
    736743              <spacer name="verticalSpacer_15"> 
    737744               <property name="orientation">