Changeset 479

Show
Ignore:
Timestamp:
06/05/07 13:04:20 (14 years ago)
Author:
wagi
Message:

- added all missing 'virtual' to function declared in avdevice implementation
- added getConfigurationId function (used for av/c model caching)

Files:

Legend:

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

    r477 r479  
    6161 
    6262    {0x00130e, 0x00000003, "Focusrite", "Saffire Pro26IO"}, 
    63     {0x00130e, 0x00000006, "Focusrite", "Saffire Pro10IO"},  
     63    {0x00130e, 0x00000006, "Focusrite", "Saffire Pro10IO"}, 
    6464 
    6565    {0x0040ab, 0x00010048, "EDIROL", "FA-101"}, 
     
    205205        delete m_Mixer; 
    206206    } 
    207      
     207 
    208208    //  create the mixer & register it 
    209209    if(getAudioSubunit(0) == NULL) { 
     
    813813} 
    814814 
     815int 
     816AvDevice::getConfigurationId() 
     817{ 
     818    return 0; 
     819} 
    815820 
    816821bool 
  • trunk/libffado/src/bebob/bebob_avdevice.h

    r451 r479  
    7373    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    7474    virtual int getSamplingFrequency( ); 
     75    virtual int getConfigurationId( ); 
    7576 
    7677    virtual int getStreamCount(); 
     
    7879 
    7980    virtual bool prepare(); 
    80     bool lock(); 
    81     bool unlock(); 
     81    virtual bool lock(); 
     82    virtual bool unlock(); 
    8283 
    83     bool startStreamByIndex(int i); 
    84     bool stopStreamByIndex(int i); 
     84    virtual bool startStreamByIndex(int i); 
     85    virtual bool stopStreamByIndex(int i); 
    8586 
    8687    virtual void showDevice(); 
  • trunk/libffado/src/bounce/bounce_avdevice.cpp

    r445 r479  
    132132} 
    133133 
     134int BounceDevice::getConfigurationId( ) { 
     135    return 0; 
     136} 
     137 
    134138bool BounceDevice::setSamplingFrequency( ESamplingFrequency samplingFrequency ) { 
    135139    int retval=convertESamplingFrequency( samplingFrequency ); 
  • trunk/libffado/src/bounce/bounce_avdevice.h

    r445 r479  
    7575 
    7676    static bool probe( ConfigRom& configRom ); 
    77     bool discover(); 
     77    virtual bool discover(); 
    7878 
    79     bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    80     int getSamplingFrequency( ); 
     79    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
     80    virtual int getSamplingFrequency( ); 
     81    virtual int getConfigurationId( ); 
    8182 
    82     bool prepare(); 
    83     bool lock(); 
    84     bool unlock(); 
     83    virtual bool prepare(); 
     84    virtual bool lock(); 
     85    virtual bool unlock(); 
    8586 
    86     int getStreamCount(); 
     87    virtual int getStreamCount(); 
    8788 
    88     Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
     89    virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
    8990 
    90     bool startStreamByIndex(int i); 
    91     bool stopStreamByIndex(int i); 
     91    virtual bool startStreamByIndex(int i); 
     92    virtual bool stopStreamByIndex(int i); 
    9293 
    93     void showDevice(); 
     94    virtual void showDevice(); 
    9495 
    9596protected: 
  • trunk/libffado/src/dice/dice_avdevice.cpp

    r445 r479  
    169169 
    170170    return convertESamplingFrequency(samplingFrequency); 
     171} 
     172 
     173int 
     174DiceAvDevice::getConfigurationId() 
     175{ 
     176    return 0; 
    171177} 
    172178 
  • trunk/libffado/src/dice/dice_avdevice.h

    r445 r479  
    6262 
    6363    static bool probe( ConfigRom& configRom ); 
    64     bool discover(); 
     64    virtual bool discover(); 
    6565 
    66     void showDevice(); 
     66    virtual void showDevice(); 
    6767 
    68     bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    69     int getSamplingFrequency( ); 
     68    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
     69    virtual int getSamplingFrequency( ); 
     70    virtual int getConfigurationId( ); 
    7071 
    71     int getStreamCount(); 
    72     Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
     72    virtual int getStreamCount(); 
     73    virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
    7374 
    74     bool prepare(); 
     75    virtual bool prepare(); 
    7576 
    76     bool lock(); 
    77     bool unlock(); 
     77    virtual bool lock(); 
     78    virtual bool unlock(); 
    7879 
    79     bool startStreamByIndex(int i); 
    80     bool stopStreamByIndex(int i); 
     80    virtual bool startStreamByIndex(int i); 
     81    virtual bool stopStreamByIndex(int i); 
    8182 
    82     bool enableStreaming(); 
    83     bool disableStreaming(); 
     83    virtual bool enableStreaming(); 
     84    virtual bool disableStreaming(); 
    8485 
    8586protected: 
  • trunk/libffado/src/iavdevice.h

    r450 r479  
    7575     */ 
    7676    virtual int getSamplingFrequency( ) = 0; 
     77 
     78    /** 
     79     * @brief get a unique configuration identifier for current device setup 
     80     * 
     81     * Since each different setup (such as different sample frequency) 
     82     * can change the corresponding AV/C model, it is necessary to  
     83     * distinguish between those models in case where caching of  
     84     * AV/C models is enabled. 
     85     * 
     86     * @return a unique configuration identifier as integer 
     87     */ 
     88    virtual int getConfigurationId( ) = 0; 
    7789 
    7890    /** 
  • trunk/libffado/src/maudio/maudio_avdevice.cpp

    r445 r479  
    122122} 
    123123 
     124int 
     125AvDevice::getConfigurationId() 
     126{ 
     127    return 0; 
     128} 
     129 
    124130void 
    125131AvDevice::showDevice() 
  • trunk/libffado/src/maudio/maudio_avdevice.h

    r445 r479  
    5959 
    6060    static bool probe( ConfigRom& configRom ); 
    61     bool discover(); 
     61    virtual bool discover(); 
    6262 
    63     void showDevice(); 
     63    virtual void showDevice(); 
    6464 
    65     bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    66     int getSamplingFrequency( ); 
     65    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
     66    virtual int getSamplingFrequency( ); 
     67    virtual int getConfigurationId( ); 
    6768 
    68     bool prepare(); 
     69    virtual bool prepare(); 
    6970 
    7071protected: 
  • trunk/libffado/src/metrichalo/mh_avdevice.cpp

    r445 r479  
    119119} 
    120120 
     121int 
     122MHAvDevice::getConfigurationId( ) { 
     123    return 0; 
     124} 
     125 
    121126bool 
    122127MHAvDevice::setSamplingFrequency( ESamplingFrequency samplingFrequency ) 
  • trunk/libffado/src/metrichalo/mh_avdevice.h

    r445 r479  
    5353 
    5454    static bool probe( ConfigRom& configRom ); 
    55     bool discover(); 
     55    virtual bool discover(); 
    5656 
    57     void showDevice(); 
     57    virtual void showDevice(); 
    5858 
    59     bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    60     int getSamplingFrequency( ); 
     59    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
     60    virtual int getSamplingFrequency( ); 
     61    virtual int getConfigurationId(); 
    6162 
    62     int getStreamCount(); 
    63     Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
     63    virtual int getStreamCount(); 
     64    virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
    6465 
    65     bool prepare(); 
    66     bool lock(); 
    67     bool unlock(); 
     66    virtual bool prepare(); 
     67    virtual bool lock(); 
     68    virtual bool unlock(); 
    6869 
    69     bool startStreamByIndex(int i); 
    70     bool stopStreamByIndex(int i); 
     70    virtual bool startStreamByIndex(int i); 
     71    virtual bool stopStreamByIndex(int i); 
    7172 
    7273    signed int getIsoRecvChannel(void); 
  • trunk/libffado/src/motu/motu_avdevice.cpp

    r445 r479  
    168168    } 
    169169    return rate; 
     170} 
     171 
     172int 
     173MotuDevice::getConfigurationId() 
     174{ 
     175    return 0; 
    170176} 
    171177 
  • trunk/libffado/src/motu/motu_avdevice.h

    r445 r479  
    106106    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    107107    virtual int getSamplingFrequency( ); 
     108    virtual int getConfigurationId( ); 
    108109 
    109110    virtual int getStreamCount(); 
     
    111112 
    112113    virtual bool prepare(); 
    113     bool lock(); 
    114     bool unlock(); 
     114    virtual bool lock(); 
     115    virtual bool unlock(); 
    115116 
    116     bool startStreamByIndex(int i); 
    117     bool stopStreamByIndex(int i); 
     117    virtual bool startStreamByIndex(int i); 
     118    virtual bool stopStreamByIndex(int i); 
    118119 
    119120    signed int getIsoRecvChannel(void); 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r445 r479  
    7676    { 
    7777        if ( ( supportedDeviceList[i].vendor_id == vendorId ) 
    78              && ( supportedDeviceList[i].model_id == modelId )  
     78             && ( supportedDeviceList[i].model_id == modelId ) 
    7979           ) 
    8080        { 
     
    9797    { 
    9898        if ( ( supportedDeviceList[i].vendor_id == vendorId ) 
    99              && ( supportedDeviceList[i].model_id == modelId )  
     99             && ( supportedDeviceList[i].model_id == modelId ) 
    100100           ) 
    101101        { 
     
    113113} 
    114114 
    115 int  
     115int 
    116116RmeDevice::getSamplingFrequency( ) { 
    117117/* 
     
    119119 */ 
    120120        return 48000; 
     121} 
     122 
     123int 
     124RmeDevice::getConfigurationId() 
     125{ 
     126    return 0; 
    121127} 
    122128 
     
    161167} 
    162168 
    163 int  
     169int 
    164170RmeDevice::getStreamCount() { 
    165171        return 0; // one receive, one transmit 
  • trunk/libffado/src/rme/rme_avdevice.h

    r445 r479  
    5555 
    5656    static bool probe( ConfigRom& configRom ); 
    57     bool discover(); 
     57    virtual bool discover(); 
    5858 
    59     void showDevice(); 
     59    virtual void showDevice(); 
    6060 
    61     bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
    62     int getSamplingFrequency( ); 
     61    virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 
     62    virtual int getSamplingFrequency( ); 
     63    virtual int getConfigurationId( ); 
    6364 
    64     int getStreamCount(); 
    65     Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
     65    virtual int getStreamCount(); 
     66    virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i); 
    6667 
    67     bool prepare(); 
    68     bool lock(); 
    69     bool unlock(); 
     68    virtual bool prepare(); 
     69    virtual bool lock(); 
     70    virtual bool unlock(); 
    7071 
    71     bool startStreamByIndex(int i); 
    72     bool stopStreamByIndex(int i); 
     72    virtual bool startStreamByIndex(int i); 
     73    virtual bool stopStreamByIndex(int i); 
    7374 
    7475protected: