Changeset 2442

Show
Ignore:
Timestamp:
10/27/13 20:27:34 (3 years ago)
Author:
mocchi
Message:

[libavc] complement 'Processing function block' command

Current implement of libavc is lack of actual work for 'Processing function block' command defined in 'AV/C Audio Subunit Specification 1.0 (1394TA Document 1999008)'. I guess the reason is there are several types of the command. To implement all of the commands in the specification is too cost.

But here, a driver for BeBoB/MAudio devices needs this command to control device's internal mixer. These devices can be controlled by either 'single' or 'multiple' type of the command.

For these reasons, this commit add 'single type' of 'processing function block command'.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libavc/audiosubunit/avc_function_block.cpp

    r2102 r2442  
    143143    : IBusData() 
    144144    , m_controlSelector( FunctionBlockProcessing::eCSE_Processing_Mixer ) 
     145    , m_controlDataLength( 0x02 ) 
     146    , m_mixerSetting( 0x0000 ) 
    145147{ 
    146148} 
    147149 
    148150FunctionBlockProcessingMixer::FunctionBlockProcessingMixer( const FunctionBlockProcessingMixer& rhs ) 
    149     : m_controlSelector( rhs.m_controlSelector ) 
     151    : m_controlSelector( rhs.m_controlSelector ), 
     152      m_controlDataLength( 0x02 ), 
     153      m_mixerSetting( 0x00 ) 
    150154{ 
    151155} 
     
    159163{ 
    160164    bool bStatus; 
    161     bStatus = se.write( m_controlSelector,    "FunctionBlockProcessingMixer controlSelector" ); 
     165    bStatus  = se.write( m_controlSelector,    "FunctionBlockProcessingMixer controlSelector" ); 
     166    bStatus &= se.write( m_controlDataLength,  "FunctionBlockProcessingMixer controlDataLength" ); 
     167    bStatus &= se.write( m_mixerSetting,       "FunctionBlockProcessingMixer mixerSetting" ); 
    162168 
    163169    return bStatus; 
     
    168174{ 
    169175    bool bStatus; 
    170     bStatus = de.read( &m_controlSelector ); 
     176    byte_t padding; 
     177 
     178    bStatus  = de.read( &m_controlSelector ); 
     179    bStatus &= de.read( &m_controlDataLength ); 
     180    bStatus &= de.read( &m_mixerSetting ); 
     181    bStatus &= de.read( &padding ); 
     182    bStatus &= de.read( &padding ); 
    171183 
    172184    return bStatus; 
  • trunk/libffado/src/libavc/audiosubunit/avc_function_block.h

    r1498 r2442  
    7979    virtual FunctionBlockProcessingMixer* clone() const; 
    8080 
    81     control_selector_t m_controlSelector; 
     81    control_selector_t     m_controlSelector; 
     82    control_data_length_t  m_controlDataLength; 
     83    u_int16_t              m_mixerSetting; 
    8284}; 
    8385