Changeset 629

Show
Ignore:
Timestamp:
09/07/07 16:09:19 (13 years ago)
Author:
ppalmers
Message:

- Base infrastructure for the Echo EFC commands
- Some first command implementations

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/fireworks/fireworks_device.cpp

    r607 r629  
    2323 
    2424#include "fireworks_device.h" 
     25#include "efc/efc_avc_cmd.h" 
     26#include "efc/efc_cmd.h" 
     27#include "efc/efc_cmds_hardware.h" 
    2528 
    2629#include "audiofire/audiofire_device.h" 
     
    5053{ 
    5154    debugOutput(DEBUG_LEVEL_VERBOSE, "This is a FireWorks::Device\n"); 
    52     GenericAVC::AvDevice::showDevice(); 
     55//     GenericAVC::AvDevice::showDevice(); 
     56 
     57    EfcOverAVCCmd cmd( get1394Service() ); 
     58    cmd.setCommandType( AVC::AVCCommand::eCT_Control ); 
     59    cmd.setNodeId( getConfigRom().getNodeId() ); 
     60    cmd.setSubunitType( AVC::eST_Unit  ); 
     61    cmd.setSubunitId( 0xff ); 
     62     
     63    cmd.setVerbose( getDebugLevel() ); 
     64    cmd.setVerbose( DEBUG_LEVEL_VERY_VERBOSE ); 
     65 
     66    EfcHardwareInfoCmd *efccmd=new EfcHardwareInfoCmd(); 
     67    if (!efccmd) { 
     68        debugError("could not allocate efc cmd\n"); 
     69        return; 
     70    } 
     71    cmd.m_cmd = efccmd; 
     72 
     73    if ( !cmd.fire() ) { 
     74        debugError( "EfcOverAVCCmd command failed\n" ); 
     75    } 
     76 
     77    efccmd->showEfcCmd(); 
     78    delete efccmd; 
     79     
     80    // test the next command 
     81    cmd.setCommandType( AVC::AVCCommand::eCT_Control ); 
     82     
     83    EfcPolledValuesCmd *efccmd2=new EfcPolledValuesCmd(); 
     84    if (!efccmd2) { 
     85        debugError("could not allocate efc cmd 2\n"); 
     86        return; 
     87    } 
     88    cmd.m_cmd = efccmd2; 
     89 
     90    if ( !cmd.fire() ) { 
     91        debugError( "EfcOverAVCCmd command failed\n" ); 
     92    } 
     93 
     94    efccmd2->showEfcCmd(); 
     95    delete efccmd2; 
     96     
    5397} 
    5498 
     
    99143{ 
    100144    unsigned int vendorId = configRom->getNodeVendorId(); 
     145 
     146//     return NULL; 
     147 
    101148    unsigned int modelId = configRom->getModelId(); 
    102149 
  • trunk/libffado/src/SConscript

    r618 r629  
    105105fireworks_source =  env.Split( '\ 
    106106        fireworks/fireworks_device.cpp \ 
     107        fireworks/efc/efc_avc_cmd.cpp \ 
     108        fireworks/efc/efc_cmd.cpp \ 
     109        fireworks/efc/efc_cmds_hardware.cpp \ 
    107110        fireworks/audiofire/audiofire_device.cpp \ 
    108111' )