Logo Search packages:      
Sourcecode: libffado version File versions  Download package

FFADODevice Class Reference

#include <ffadodevice.h>

Inheritance diagram for FFADODevice:

Control::Container Control::Element

List of all members.

Detailed Description

Base class for device support.

This class should be subclassed to implement ffado support for a specific device.

Definition at line 57 of file ffadodevice.h.

Public Types

typedef std::vector< ClockSourceClockSourceVector
typedef std::vector
< ClockSource >::iterator 
enum  eClockSourceType {
  eCT_Invalid, eCT_Auto, eCT_Internal, eCT_1394Bus,
  eCT_SytMatch, eCT_SytStream, eCT_WordClock, eCT_SPDIF,
 clock source types More...
enum  eSignals { eS_Updated }
enum  eStreamingState { eSS_Idle = 0, eSS_Sending = 1, eSS_Receiving = 2, eSS_Both = 3 }
 stream states More...
enum  eSyncState { eSS_Unknown = 0, eSS_Locked = 1, eSS_Unlocked = 2 }
 sync state enum
typedef std::vector< Option >

Public Member Functions

virtual bool addElement (Element *e)
bool addSignalHandler (SignalFunctor *functor)
iterator begin ()
virtual bool canChangeNickname ()
 return whether the nick name of this device can be changed
virtual bool canChangeValue ()
virtual bool clearElements (bool delete_pointers)
virtual bool clearElements ()
unsigned int countElements ()
int countOptions ()
virtual bool deleteElement (Element *e)
virtual bool disableStreaming ()
 Disable streaming on all streams.
virtual bool discover ()=0
 This is called by the DeviceManager to discover & configure the device.
virtual bool enableStreaming ()
 Enable streaming on all 'started' streams.
iterator end ()
 FFADODevice (DeviceManager &, std::auto_ptr< ConfigRom >(configRom))
virtual Ieee1394Service & get1394Service ()
 Returns the 1394 service of the FFADO device.
virtual ClockSource getActiveClockSource ()=0
 Returns the active clock source of this device.
virtual ConfigRom & getConfigRom () const
 Returns the ConfigRom object of the device node.
virtual std::string getDescription ()
DeviceManager & getDeviceManager ()
const ElementVector & getElementVector ()
uint64_t getId ()
virtual std::string getLabel ()
virtual std::string getName ()
virtual std::string getNickname ()
 return the nick name of this device
int getNodeId ()
 return the node id of this device
bool getOption (std::string name, uint8_t &v)
bool getOption (std::string name, int8_t &v)
bool getOption (std::string name, uint16_t &v)
bool getOption (std::string name, int16_t &v)
bool getOption (std::string name, uint32_t &v)
bool getOption (std::string name, int32_t &v)
bool getOption (std::string name, uint64_t &v)
bool getOption (std::string name, int64_t &v)
bool getOption (std::string name, float &v)
bool getOption (std::string name, double &v)
bool getOption (std::string name, bool &v)
bool getOption (std::string name, std::string &v)
Option::EType getOptionType (std::string name)
virtual int getSamplingFrequency ()=0
 get the samplingfrequency as an integer
virtual int getStreamCount ()=0
 Returns the number of ISO streams implemented/used by this device.
virtual enum eStreamingState getStreamingState ()
 gets the devices current synchronization state
getStreamProcessorByIndex (int i)=0
 Returns the StreamProcessor object for the stream with index i.
virtual ClockSourceVector getSupportedClockSources ()=0
 Get the clocksources supported by this device.
virtual std::vector< int > getSupportedSamplingFrequencies ()=0
 get the supported sampling frequencies
virtual enum eSyncState getSyncState ()
 gets the devices current synchronization state
virtual int getVerboseLevel ()
void handleBusReset ()
 handle a bus reset
bool hasOption (std::string name)
virtual bool isControlLocked ()
virtual bool loadFromCache ()
 Called by DeviceManager to load device model from cache.
virtual bool lock ()=0
 Lock the device.
virtual void lockControl ()
virtual bool needsRediscovery ()
 Called by DeviceManager to check whether a device requires rediscovery.
virtual bool prepare ()=0
 Prepare the device.
bool remSignalHandler (SignalFunctor *functor)
virtual bool saveCache ()
 Called by DeviceManager to allow device driver to save a cache version of the current configuration.
virtual bool setActiveClockSource (ClockSource)=0
 Sets the active clock source of this device.
virtual bool setDescription (std::string n)
bool setId (unsigned int id)
 This is called by the device manager to give the device a unique ID.
virtual bool setLabel (std::string n)
virtual bool setName (std::string n)
virtual bool setNickname (std::string name)
 set the nick name of this device
bool setOption (std::string name, uint8_t v)
bool setOption (std::string name, int8_t v)
bool setOption (std::string name, uint16_t v)
bool setOption (std::string name, int16_t v)
bool setOption (std::string name, uint32_t v)
bool setOption (std::string name, int32_t v)
bool setOption (std::string name, uint64_t v)
bool setOption (std::string name, int64_t v)
bool setOption (std::string name, double v)
bool setOption (std::string name, bool v)
bool setOption (std::string name, std::string v)
virtual bool setSamplingFrequency (int samplingFrequency)=0
 Set the samping frequency.
virtual void setVerboseLevel (int l)
virtual void show ()
virtual void showDevice ()
 Outputs the device configuration to stderr/stdout [debug helper].
virtual bool startStreamByIndex (int i)=0
 starts the stream with index i
virtual bool stopStreamByIndex (int i)=0
 stops the stream with index i
virtual bool unlock ()=0
 Unlock the device.
virtual void unlockControl ()

Static Public Member Functions

static const char * ClockSourceTypeToString (enum eClockSourceType)
 convert the clock source type to a C string
static bool compareGUID (FFADODevice *a, FFADODevice *b)
 Compares the GUID of two FFADODevices.
static FFADODevicecreateDevice (std::auto_ptr< ConfigRom >(x))
 This is called by the DeviceManager to create an instance of the device.

Protected Member Functions

bool addOption (Option o)
void clearOptions ()
bool emitSignal (int id)
bool emitSignal (int id, int value)
Util::MutexgetLock ()
Option getOption (std::string name)
bool hasOption (Option o)
bool removeOption (std::string name)
bool removeOption (Option o)
bool serializeOptions (std::string basePath, Util::IOSerialize &ser) const
bool setOption (Option o)

Static Protected Member Functions

static bool deserializeOptions (std::string basePath, Util::IODeserialize &deser, OptionContainer &container)

Protected Attributes

ElementVector m_Children
Util::PosixMutex m_DeviceMutex

Private Member Functions

 std::auto_ptr (m_pConfigRom)

Private Attributes

DeviceManager & m_pDeviceManager


class  ClockSource
 Clock source identification struct. More...

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index