Changeset 1073

Show
Ignore:
Timestamp:
04/30/08 08:03:33 (16 years ago)
Author:
ppalmers
Message:

workaround MOTU not setting a vendor/model name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/configrom.cpp

    r943 r1073  
    2727#include "ieee1394service.h" 
    2828 
     29#include "vendor_model_ids.h" 
     30 
    2931#include <stdio.h> 
    3032#include <string.h> 
     
    411413ConfigRom::getModelName() const 
    412414{ 
    413     return m_modelName; 
     415    // HACK: 
     416    // workarounds for devices that don't fill a correct model name 
     417    switch(m_vendorId) { 
     418        case FW_VENDORID_MOTU: 
     419            switch(m_unit_specifier_id) { 
     420                case 0x00000003: 
     421                    return "828MkII"; 
     422                case 0x00000009: 
     423                    return "Traveler"; 
     424                case 0x0000000d: 
     425                    return "UltraLite"; 
     426                case 0x0000000f: 
     427                    return "8pre"; 
     428                case 0x00000001: 
     429                    return "828MkI"; 
     430                case 0x00000005: 
     431                    return "896HD"; 
     432                default: 
     433                    return "unknown"; 
     434            } 
     435            break; 
     436        default: 
     437            return m_modelName; 
     438    } 
    414439} 
    415440 
     
    417442ConfigRom::getVendorName() const 
    418443{ 
    419     return m_vendorName; 
     444    // HACK: 
     445    // workarounds for devices that don't fill a correct vendor name 
     446    switch(m_vendorId) { 
     447        case FW_VENDORID_MOTU: 
     448            return "MOTU"; 
     449        default: 
     450            return m_vendorName; 
     451    } 
    420452} 
    421453