Changeset 2035

Show
Ignore:
Timestamp:
02/03/12 04:03:09 (12 years ago)
Author:
jwoithe
Message:

rme: clock source selection and management on the RME devices is a bit trickier than a simple list implies. Down the track it might be possible to use the standard clock source list functionality in some way, but for now fake it out with a dummy clock source to prevent warnings about no clock sources being active (and so on).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r2033 r2035  
    519519} 
    520520 
     521// The RME clock source selection logic is a little more complex than a 
     522// simple list can cater for.  Therefore we just put in a placeholder and 
     523// rely on the extended controls in ffado-mixer to deal with the details. 
     524// 
     525FFADODevice::ClockSource 
     526Device::dummyClockSource(void) { 
     527    ClockSource s; 
     528    s.id = 0; 
     529    s.type = eCT_Internal; 
     530    s.description = "Selected via device controls"; 
     531    s.valid = s.active = s.locked = true; 
     532    s.slipping = false; 
     533    return s; 
     534} 
    521535FFADODevice::ClockSourceVector 
    522536Device::getSupportedClockSources() { 
    523537    FFADODevice::ClockSourceVector r; 
     538    ClockSource s; 
     539    s = dummyClockSource(); 
     540    r.push_back(s); 
    524541    return r; 
    525542} 
    526  
    527543bool 
    528544Device::setActiveClockSource(ClockSource s) { 
    529     return false; 
    530 
    531  
     545    return true; 
     546
    532547FFADODevice::ClockSource 
    533548Device::getActiveClockSource() { 
    534     ClockSource s; 
    535     return s; 
     549    return dummyClockSource(); 
    536550} 
    537551 
  • trunk/libffado/src/rme/rme_avdevice.h

    r2033 r2035  
    7676    virtual std::vector<int> getSupportedSamplingFrequencies(); 
    7777 
     78    ClockSource dummyClockSource(void); 
    7879    virtual ClockSourceVector getSupportedClockSources(); 
    7980    virtual bool setActiveClockSource(ClockSource);