Changeset 1324

Show
Ignore:
Timestamp:
09/20/08 02:40:19 (13 years ago)
Author:
wagi
Message:

Merge changeset r1321 into mainline

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/bebob/bebob_avdevice.cpp

    r1245 r1324  
    301301 
    302302bool 
    303 AvDevice::setFeatureFBVolumeValue(int id, int channel, int v) { 
     303AvDevice::setFeatureFBVolumeCurrent(int id, int channel, int v) { 
    304304 
    305305    FunctionBlockCmd fbCmd( get1394Service(), 
     
    333333 
    334334int 
    335 AvDevice::getFeatureFBVolumeValue(int id, int channel) { 
     335AvDevice::getFeatureFBVolumeValue(int id, int channel, FunctionBlockCmd::EControlAttribute controlAttribute)  
     336
    336337    FunctionBlockCmd fbCmd( get1394Service(), 
    337338                            FunctionBlockCmd::eFBT_Feature, 
    338339                            id, 
    339                             FunctionBlockCmd::eCA_Current ); 
     340                            controlAttribute); 
    340341    fbCmd.setNodeId( getNodeId() ); 
    341342    fbCmd.setSubunitId( 0x00 ); 
     
    363364     
    364365    return volume; 
     366} 
     367 
     368int  
     369AvDevice::getFeatureFBVolumeMinimum(int id, int channel) 
     370{ 
     371    return getFeatureFBVolumeValue(id, channel, AVC::FunctionBlockCmd::eCA_Minimum); 
     372} 
     373 
     374int  
     375AvDevice::getFeatureFBVolumeMaximum(int id, int channel) 
     376{ 
     377    return getFeatureFBVolumeValue(id, channel, AVC::FunctionBlockCmd::eCA_Maximum); 
     378} 
     379 
     380int  
     381AvDevice::getFeatureFBVolumeCurrent(int id, int channel) 
     382{ 
     383    return getFeatureFBVolumeValue(id, channel, AVC::FunctionBlockCmd::eCA_Current);    
    365384} 
    366385 
  • trunk/libffado/src/bebob/bebob_avdevice.h

    r1245 r1324  
    3737#include "libavc/general/avc_subunit.h" 
    3838#include "libavc/general/avc_plug.h" 
     39#include "libavc/audiosubunit/avc_function_block.h" 
    3940 
    4041#include "bebob/bebob_avplug.h" 
     
    8485    virtual int getSelectorFBValue(int id); 
    8586    virtual bool setSelectorFBValue(int id, int v); 
    86     virtual int getFeatureFBVolumeValue(int id, int channel); 
    87     virtual bool setFeatureFBVolumeValue(int id, int channel, int v); 
     87    virtual int getFeatureFBVolumeMinimum(int id, int channel); 
     88    virtual int getFeatureFBVolumeMaximum(int id, int channel); 
     89    virtual int getFeatureFBVolumeCurrent(int id, int channel); 
     90    virtual bool setFeatureFBVolumeCurrent(int id, int channel, int v); 
    8891 
    8992    virtual void showDevice(); 
     
    9497    virtual bool buildMixer(); 
    9598    virtual bool destroyMixer(); 
     99 
     100    virtual int getFeatureFBVolumeValue(int id, int channel, AVC::FunctionBlockCmd::EControlAttribute controlAttribute); 
    96101 
    97102public: 
  • trunk/libffado/src/bebob/bebob_mixer.cpp

    r1158 r1324  
    227227    debugOutput(DEBUG_LEVEL_NORMAL,"Set feature volume %d to %d...\n", 
    228228        m_Slave.getId(), volume); 
    229     return m_Parent.getParent().setFeatureFBVolumeValue(m_Slave.getId(), idx, volume); 
     229    return m_Parent.getParent().setFeatureFBVolumeCurrent(m_Slave.getId(), idx, volume); 
    230230} 
    231231 
     
    242242        m_Slave.getId()); 
    243243 
    244     return m_Parent.getParent().getFeatureFBVolumeValue(m_Slave.getId(), idx); 
     244    return m_Parent.getParent().getFeatureFBVolumeCurrent(m_Slave.getId(), idx); 
     245
     246 
     247double 
     248MixerFBFeature::getMinimum() 
     249
     250    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature minimum volume %d...\n", 
     251        m_Slave.getId()); 
     252 
     253    return m_Parent.getParent().getFeatureFBVolumeMinimum(m_Slave.getId(), 0); 
     254
     255 
     256double 
     257MixerFBFeature::getMaximum() 
     258
     259    debugOutput(DEBUG_LEVEL_NORMAL,"Get feature maximum volume %d...\n", 
     260        m_Slave.getId()); 
     261 
     262    return m_Parent.getParent().getFeatureFBVolumeMaximum(m_Slave.getId(), 0); 
    245263} 
    246264 
  • trunk/libffado/src/bebob/bebob_mixer.h

    r1158 r1324  
    7979    virtual bool setValue(int idx, double v); 
    8080    virtual double getValue(int idx); 
    81     virtual double getMinimum() {return 0.0;}
    82     virtual double getMaximum() {return 0.0;}
     81    virtual double getMinimum()
     82    virtual double getMaximum()
    8383 
    8484private: 
     
    100100        {return getValue();}; 
    101101 
    102     virtual double getMinimum() {return 0.0;}; 
    103     virtual double getMaximum() {return 0.0;}; 
     102    virtual double getMinimum() {return -32768;}; 
     103    virtual double getMaximum() {return 0;}; 
    104104 
    105105private: 
  • trunk/libffado/src/fireworks/fireworks_control.h

    r1158 r1324  
    9696        {return getValue();}; 
    9797 
    98     virtual double getMinimum() {return 0.0;}; 
    99     virtual double getMaximum() {return 0.0;}; 
     98    virtual double getMinimum() {return -100.0;}; 
     99    virtual double getMaximum() {return 10.0;}; 
    100100 
    101101protected: 
  • trunk/libffado/support/dbus/controlserver.cpp

    r1211 r1324  
    459459Continuous::getMinimum() 
    460460{ 
    461     debugOutput( DEBUG_LEVEL_VERBOSE, "getMinimum() TODO: Return a real device-value...\n" ); 
    462     return -100.0; 
     461    double val = m_Slave.getMinimum(); 
     462    debugOutput( DEBUG_LEVEL_VERBOSE, "getMinimum() => %lf\n", val ); 
     463    return val; 
    463464} 
    464465 
     
    466467Continuous::getMaximum() 
    467468{ 
    468     debugOutput( DEBUG_LEVEL_VERBOSE, "getMaximum() TODO: Return a real device-value...\n" ); 
    469     return 10.0; 
     469    double val = m_Slave.getMaximum(); 
     470    debugOutput( DEBUG_LEVEL_VERBOSE, "getMaximum() => %lf\n", val ); 
     471    return val; 
    470472} 
    471473