Changeset 1560

Show
Ignore:
Timestamp:
05/17/09 07:14:11 (11 years ago)
Author:
ppalmers
Message:

implement ECHO firmware version check

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/fireworks/fireworks_device.cpp

    r1299 r1560  
    4242 
    4343#define ECHO_FLASH_ERASE_TIMEOUT_MILLISECS 2000 
     44#define FIREWORKS_MIN_FIRMWARE_VERSION 0x04080000 
    4445 
    4546#include <sstream> 
     
    136137    // get the info from the EFC 
    137138    if ( !discoverUsingEFC() ) { 
    138         debugError( "Could not discover using EFC\n" ); 
    139139        return false; 
    140140    } 
     
    161161    if (!doEfcOverAVC(m_HwInfo)) { 
    162162        debugError("Could not read hardware capabilities\n"); 
     163        return false; 
     164    } 
     165 
     166    // check the firmware version 
     167    if (m_HwInfo.m_arm_version < FIREWORKS_MIN_FIRMWARE_VERSION) { 
     168        debugError("Firmware version %u.%u (rev %u) not recent enough. FFADO requires at least version %u.%u (rev %u).\n",  
     169                    (m_HwInfo.m_arm_version >> 24) & 0xFF, 
     170                    (m_HwInfo.m_arm_version >> 16) & 0xFF, 
     171                    (m_HwInfo.m_arm_version >> 0) & 0xFFFF, 
     172                    (FIREWORKS_MIN_FIRMWARE_VERSION >> 24) & 0xFF, 
     173                    (FIREWORKS_MIN_FIRMWARE_VERSION >> 16) & 0xFF, 
     174                    (FIREWORKS_MIN_FIRMWARE_VERSION >> 0) & 0xFFFF 
     175                    ); 
    163176        return false; 
    164177    }