Changeset 1794

Show
Ignore:
Timestamp:
01/18/10 13:38:33 (14 years ago)
Author:
arnonym
Message:

This might (or might not) fix #256 by actually implementing EAP-support for the Pro40.

Please someone test this and report back.

Everything should work except:

  • The volume knob doesn't seem to have an effect on the Pro24, don't know about the Pro40. It writes to the right registers but somehow the hardware doesn't recognise it.
  • The "Use ADAT-Out as S/PDIF" and "Pad Output" are not implemented yet.
  • I don't know whether changing to nickname works with the Pro40. It doesn't with the Pro24 altough the correct registers are written to. Probably sending an OP-code is missing...
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/focusrite/saffire_pro24.cpp

    r1779 r1794  
    4545 
    4646void SaffirePro24::SaffirePro24EAP::setupSources() { 
    47     addSource("SPDIF",  6, 2, eRS_AES); 
    48     addSource("ADAT",   0, 8, eRS_ADAT); 
    49     addSource("Analog", 0, 4, eRS_InS0); 
     47    addSource("SPDIF",  6, 2, eRS_AES); 
     48    addSource("ADAT",   0, 8, eRS_ADAT); 
     49    addSource("Analog", 0, 4, eRS_InS0); 
    5050    addSource("Mixer",  0, 16, eRS_Mixer); 
    51     addSource("1394",   0, 8, eRS_ARX0); 
    52     addSource("Mute",   0, 1, eRS_Muted); 
     51    addSource("1394",   0, 8, eRS_ARX0); 
     52    addSource("Mute",   0, 1, eRS_Muted); 
    5353} 
    5454void SaffirePro24::SaffirePro24EAP::setupDestinations() { 
    55     addDestination("SPDIF",  6, 2, eRD_AES); 
    56     addDestination("Analog", 0, 6, eRD_InS0); 
     55    addDestination("SPDIF",  6, 2, eRD_AES); 
     56    addDestination("Analog", 0, 6, eRD_InS0); 
    5757    addDestination("Mixer",  0, 16, eRD_Mixer0); 
    58     addDestination("Mixer",  0, 2, eRD_Mixer1, 16); 
     58    addDestination("Mixer",  0, 2, eRD_Mixer1, 16); 
    5959    addDestination("1394",   0, 16, eRD_ATX0); 
    60     addDestination("Mute",   0, 1, eRD_Muted); 
     60    addDestination("Mute",   0, 1, eRD_Muted); 
    6161} 
    6262 
  • trunk/libffado/src/dice/focusrite/saffire_pro40.cpp

    r1766 r1794  
    2929namespace Focusrite { 
    3030 
     31int SaffirePro40::SaffirePro40EAP::commandToFix(unsigned offset) { 
     32    if (offset<0x14) return 2; 
     33    if (offset<0x3C && offset>=0x14) return 1; 
     34    if (offset<0x5C && offset>=0x54) return 1; 
     35    if (offset<0x44 && offset>=0x3C) return 3; 
     36    if (offset == 0x5C) return 4; 
     37    return 0; 
     38} 
     39FocusriteEAP::Poti* SaffirePro40::SaffirePro40EAP::getMonitorPoti(std::string name) { 
     40    return new FocusriteEAP::Poti(this, name, 0x54); 
     41} 
     42FocusriteEAP::Poti* SaffirePro40::SaffirePro40EAP::getDimPoti(std::string name) { 
     43    return new FocusriteEAP::Poti(this, name, 0x58); 
     44} 
     45 
     46void SaffirePro40::SaffirePro40EAP::setupSources() { 
     47    addSource("SPDIF",  6,  2, eRS_AES); 
     48    addSource("ADAT",   0,  8, eRS_ADAT); 
     49    addSource("Analog", 0,  8, eRS_InS0); 
     50    addSource("Mixer",  0, 16, eRS_Mixer); 
     51    addSource("1394",   0, 16, eRS_ARX0); 
     52    addSource("Mute",   0,  1, eRS_Muted); 
     53} 
     54void SaffirePro40::SaffirePro40EAP::setupDestinations() { 
     55    addDestination("SPDIF",  6,  2, eRD_AES); 
     56    addDestination("ADAT",   0,  8, eRD_ADAT); 
     57    addDestination("Analog", 0,  8, eRD_InS0); 
     58    addDestination("Mixer",  0, 16, eRD_Mixer0); 
     59    addDestination("Mixer",  0,  2, eRD_Mixer1, 16); 
     60    addDestination("1394",   0, 16, eRD_ATX0); 
     61    addDestination("Mute",   0,  1, eRD_Muted); 
     62} 
     63 
    3164SaffirePro40::SaffirePro40( DeviceManager& d, 
    3265                                        std::auto_ptr<ConfigRom>( configRom )) 
     
    3972SaffirePro40::~SaffirePro40() 
    4073{ 
     74    getEAP()->storeFlashConfig(); 
     75} 
     76 
     77bool SaffirePro40::discover() { 
     78    if (Dice::Device::discover()) { 
     79        m_monitor = new FocusriteEAP::MonitorSection(dynamic_cast<FocusriteEAP*>(getEAP()), "Monitoring"); 
     80        getEAP()->addElement(m_monitor); 
     81        return true; 
     82    } 
     83    return false; 
    4184} 
    4285 
     
    4689    debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro40\n"); 
    4790    Dice::Device::showDevice(); 
     91} 
     92 
     93Dice::EAP* SaffirePro40::createEAP() { 
     94    return new SaffirePro40EAP(*this); 
    4895} 
    4996 
  • trunk/libffado/src/dice/focusrite/saffire_pro40.h

    r1729 r1794  
    2929#include "libieee1394/configrom.h" 
    3030 
     31#include "focusrite_eap.h" 
     32 
    3133namespace Dice { 
    3234namespace Focusrite { 
     
    3840    virtual ~SaffirePro40(); 
    3941 
     42    bool discover(); 
     43 
    4044    virtual void showDevice(); 
    4145 
     
    4549 
    4650private: 
     51 
     52    class SaffirePro40EAP : public FocusriteEAP 
     53    { 
     54    public: 
     55        SaffirePro40EAP(Dice::Device& dev) : FocusriteEAP(dev) { 
     56        } 
     57 
     58        int commandToFix(unsigned offset); 
     59 
     60        Poti* getMonitorPoti(std::string); 
     61        Poti* getDimPoti(std::string); 
     62 
     63        void setupSources(); 
     64        void setupDestinations(); 
     65    }; 
     66    Dice::EAP* createEAP(); 
     67 
     68    Dice::Focusrite::FocusriteEAP::MonitorSection *m_monitor; 
    4769}; 
    4870 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py

    r1736 r1794  
    255255            widget.chkLevel4.setChecked(self.ch4level.selected()) 
    256256            self.connect(widget.chkLevel4, QtCore.SIGNAL("toggled(bool)"), self.ch4level.select) 
     257            widget.chkSpdif.deleteLater() 
     258            widget.btnPad.deleteLater() 
    257259        else: 
    258260            widget.chkInst1.deleteLater() 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui

    r1736 r1794  
    3030     <widget class="QWidget" name="layoutWidget"> 
    3131      <layout class="QGridLayout" name="gridLayout"> 
    32        <item row="2" column="0"> 
     32       <item row="3" column="0"> 
    3333        <widget class="QLabel" name="label"> 
    3434         <property name="text"> 
     
    4343        </widget> 
    4444       </item> 
    45        <item row="2" column="1"> 
     45       <item row="3" column="1"> 
    4646        <widget class="QSpinBox" name="dimLevel"> 
    4747         <property name="sizePolicy"> 
     
    6565        </widget> 
    6666       </item> 
    67        <item row="0" column="2" rowspan="5"> 
     67       <item row="0" column="2" rowspan="6"> 
    6868        <widget class="QGroupBox" name="groupBox"> 
    6969         <property name="sizePolicy"> 
     
    118118        </widget> 
    119119       </item> 
    120        <item row="3" column="0" colspan="2"> 
     120       <item row="4" column="0" colspan="2"> 
    121121        <widget class="QPushButton" name="btnDim"> 
    122122         <property name="sizePolicy"> 
    123123          <sizepolicy hsizetype="Minimum" vsizetype="Expanding"> 
    124124           <horstretch>0</horstretch> 
    125            <verstretch>4</verstretch> 
     125           <verstretch>10</verstretch> 
    126126          </sizepolicy> 
    127127         </property> 
     
    140140        </widget> 
    141141       </item> 
    142        <item row="4" column="0" colspan="2"> 
     142       <item row="5" column="0" colspan="2"> 
    143143        <widget class="QPushButton" name="btnMute"> 
    144144         <property name="sizePolicy"> 
    145145          <sizepolicy hsizetype="Minimum" vsizetype="Expanding"> 
    146146           <horstretch>0</horstretch> 
    147            <verstretch>4</verstretch> 
     147           <verstretch>10</verstretch> 
    148148          </sizepolicy> 
    149149         </property> 
     
    164164       <item row="0" column="0"> 
    165165        <widget class="QCheckBox" name="chkInst1"> 
     166         <property name="sizePolicy"> 
     167          <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 
     168           <horstretch>0</horstretch> 
     169           <verstretch>0</verstretch> 
     170          </sizepolicy> 
     171         </property> 
    166172         <property name="text"> 
    167173          <string>Ch 1 Instrument</string> 
     
    171177       <item row="0" column="1"> 
    172178        <widget class="QCheckBox" name="chkLevel3"> 
     179         <property name="sizePolicy"> 
     180          <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 
     181           <horstretch>0</horstretch> 
     182           <verstretch>0</verstretch> 
     183          </sizepolicy> 
     184         </property> 
    173185         <property name="text"> 
    174186          <string>Ch 3 High Level</string> 
     
    178190       <item row="1" column="0"> 
    179191        <widget class="QCheckBox" name="chkInst2"> 
     192         <property name="sizePolicy"> 
     193          <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 
     194           <horstretch>0</horstretch> 
     195           <verstretch>0</verstretch> 
     196          </sizepolicy> 
     197         </property> 
    180198         <property name="text"> 
    181199          <string>Ch 2 Instrument</string> 
     
    185203       <item row="1" column="1"> 
    186204        <widget class="QCheckBox" name="chkLevel4"> 
     205         <property name="sizePolicy"> 
     206          <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 
     207           <horstretch>0</horstretch> 
     208           <verstretch>0</verstretch> 
     209          </sizepolicy> 
     210         </property> 
    187211         <property name="text"> 
    188212          <string>Ch 4 High Level</string> 
     213         </property> 
     214        </widget> 
     215       </item> 
     216       <item row="2" column="0"> 
     217        <widget class="QCheckBox" name="chkSpdif"> 
     218         <property name="sizePolicy"> 
     219          <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 
     220           <horstretch>0</horstretch> 
     221           <verstretch>0</verstretch> 
     222          </sizepolicy> 
     223         </property> 
     224         <property name="text"> 
     225          <string>Use ADAT-Out as S/PDIF</string> 
     226         </property> 
     227        </widget> 
     228       </item> 
     229       <item row="2" column="1"> 
     230        <widget class="QPushButton" name="btnPad"> 
     231         <property name="sizePolicy"> 
     232          <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> 
     233           <horstretch>0</horstretch> 
     234           <verstretch>0</verstretch> 
     235          </sizepolicy> 
     236         </property> 
     237         <property name="text"> 
     238          <string>Pad Output</string> 
    189239         </property> 
    190240        </widget>