root/trunk/libffado/src/genericavc/avc_avdevice.h

Revision 742, 3.4 kB (checked in by ppalmers, 16 years ago)

- Remove some obsolete support files and dirs

- Clean up the license statements in the source files. Everything is

GPL version 3 now.

- Add license and copyright notices to scons scripts

- Clean up some other text files

Line 
1 /*
2  * Copyright (C) 2005-2007 by Pieter Palmers
3  * Copyright (C) 2005-2007 by Daniel Wagner
4  *
5  * This file is part of FFADO
6  * FFADO = Free Firewire (pro-)audio drivers for linux
7  *
8  * FFADO is based upon FreeBoB.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24
25 #ifndef GENERICAVC_AVDEVICE_H
26 #define GENERICAVC_AVDEVICE_H
27
28 #include "ffadodevice.h"
29 #include "genericavc/avc_vendormodel.h"
30
31 #include "libavc/avc_definitions.h"
32 #include "libavc/general/avc_unit.h"
33 #include "libavc/general/avc_subunit.h"
34 #include "libavc/general/avc_plug.h"
35
36 #include "libstreaming/amdtp/AmdtpReceiveStreamProcessor.h"
37 #include "libstreaming/amdtp/AmdtpTransmitStreamProcessor.h"
38 #include "libstreaming/amdtp/AmdtpPort.h"
39 #include "libstreaming/amdtp/AmdtpPortInfo.h"
40
41 #include "debugmodule/debugmodule.h"
42
43 class ConfigRom;
44 class Ieee1394Service;
45
46 namespace GenericAVC {
47
48 class AvDevice : public FFADODevice, public AVC::Unit {
49 public:
50     AvDevice( std::auto_ptr<ConfigRom>( configRom ));
51     virtual ~AvDevice() {};
52
53     static bool probe( ConfigRom& configRom );
54     virtual bool discover();
55     static FFADODevice * createDevice( std::auto_ptr<ConfigRom>( configRom ));
56
57     virtual bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const;
58     virtual bool deserialize( Glib::ustring basePath, Util::IODeserialize& deser );
59
60     virtual void setVerboseLevel(int l);
61     virtual void showDevice();
62
63     virtual bool setSamplingFrequency( int );
64     virtual int getSamplingFrequency( );
65
66     virtual ClockSourceVector getSupportedClockSources();
67     virtual bool setActiveClockSource(ClockSource);
68     virtual ClockSource getActiveClockSource();
69
70     virtual int getStreamCount();
71     virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i);
72
73     virtual bool prepare();
74     virtual bool lock();
75     virtual bool unlock();
76
77     virtual bool startStreamByIndex(int i);
78     virtual bool stopStreamByIndex(int i);
79
80     // redefinition to resolve ambiguity
81     virtual Ieee1394Service& get1394Service()
82         { return FFADODevice::get1394Service(); };
83     virtual ConfigRom& getConfigRom() const
84         { return FFADODevice::getConfigRom(); };
85
86 protected:
87     virtual bool addPlugToProcessor( AVC::Plug& plug, Streaming::StreamProcessor *processor,
88                              Streaming::AmdtpAudioPort::E_Direction direction);
89 /*    bool setSamplingFrequencyPlug( AVC::Plug& plug,
90                                    AVC::Plug::EPlugDirection direction,
91                                    AVC::ESamplingFrequency samplingFrequency );*/
92
93     struct VendorModelEntry m_model;
94
95     // streaming stuff
96     typedef std::vector< Streaming::StreamProcessor * > StreamProcessorVector;
97     StreamProcessorVector m_receiveProcessors;
98     StreamProcessorVector m_transmitProcessors;
99
100     DECLARE_DEBUG_MODULE;
101
102 private:
103     ClockSource syncInfoToClockSource(const SyncInfo& si);
104 };
105
106 }
107
108 #endif //GENERICAVC_AVDEVICE_H
Note: See TracBrowser for help on using the browser.