Changeset 929

Show
Ignore:
Timestamp:
03/10/08 16:15:09 (16 years ago)
Author:
jwoithe
Message:

Add model enumeration for RME devices.
Rename model ID field of supported device structure to unit_version since that's what it's being set to.
Add details of Fireface-400 device.
All this is yet to be compile-tested.

Files:

Legend:

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

    r908 r929  
    4747static VendorModelEntry supportedDeviceList[] = 
    4848{ 
    49     {FW_VENDORID_RME, 0x0001, "RME", "Fireface-800"},  // RME Fireface-800 
     49    {FW_VENDORID_RME, 0x0001, RME_MODEL_FIREFACE800, "RME", "Fireface-800"}, 
     50    {FW_VENDORID_RME, 0x0002, RME_MODEL_FIREFACE400, "RME", "Fireface-400"}, 
    5051}; 
    5152 
     
    5455    : FFADODevice( d, configRom ) 
    5556    , m_model( NULL ) 
     57    , m_rme_model( RME_MODEL_NONE ) 
    5658{ 
    5759    debugOutput( DEBUG_LEVEL_VERBOSE, "Created Rme::RmeDevice (NodeID %d)\n", 
     
    6870{ 
    6971    unsigned int vendorId = configRom.getNodeVendorId(); 
    70     unsigned int modelId = configRom.getModelId(); 
     72    unsigned int unitVersion = configRom.getUnitVersion(); 
    7173 
    7274    for ( unsigned int i = 0; 
     
    7577    { 
    7678        if ( ( supportedDeviceList[i].vendor_id == vendorId ) 
    77              && ( supportedDeviceList[i].model_id == modelId
     79             && ( supportedDeviceList[i].unit_version == unitVersion
    7880           ) 
    7981        { 
     
    9597{ 
    9698    unsigned int vendorId = getConfigRom().getNodeVendorId(); 
    97     unsigned int modelId = getConfigRom().getModelId(); 
     99    unsigned int unitVersion = getConfigRom().getUnitVersion(); 
    98100 
    99101    for ( unsigned int i = 0; 
     
    102104    { 
    103105        if ( ( supportedDeviceList[i].vendor_id == vendorId ) 
    104              && ( supportedDeviceList[i].model_id == modelId
     106             && ( supportedDeviceList[i].unit_version == unitVersion
    105107           ) 
    106108        { 
    107109            m_model = &(supportedDeviceList[i]); 
     110            m_rme_model = supportedDeviceList[i].model; 
    108111        } 
    109112    } 
  • trunk/libffado/src/rme/rme_avdevice.h

    r908 r929  
    3838namespace Rme { 
    3939 
     40// Note: the values in this enum do not have to correspond to the unit 
     41// version reported by the respective devices.  It just so happens that they 
     42// currently do for the Fireface-800 and Fireface-400. 
     43enum ERmeModel { 
     44    RME_MODEL_NONE          = 0x0000, 
     45    RME_MODEL_FIREFACE800   = 0x0001, 
     46    RME_MODEL_FIREFACE400   = 0x0002, 
     47}; 
     48 
    4049// struct to define the supported devices 
    4150struct VendorModelEntry { 
    4251    unsigned int vendor_id; 
    43     unsigned int model_id; 
     52    unsigned int unit_version; 
     53    enum ERmeModel model; 
    4454    char *vendor_name; 
    4555    char *model_name; 
     
    8090protected: 
    8191    struct VendorModelEntry *m_model; 
     92    enum ERmeModel m_rme_model; 
    8293}; 
    8394