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

Revision 557, 3.0 kB (checked in by wagi, 17 years ago)

moved&renamed configparser from bebob to genericavc

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 library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License version 2.1, as published by the Free Software Foundation;
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22  * MA 02110-1301 USA
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/AmdtpStreamProcessor.h"
37 #include "libstreaming/AmdtpPort.h"
38 #include "libstreaming/AmdtpPortInfo.h"
39
40 #include "debugmodule/debugmodule.h"
41
42 class ConfigRom;
43 class Ieee1394Service;
44
45 namespace GenericAVC {
46
47 class AvDevice : public FFADODevice, public AVC::Unit {
48 public:
49     AvDevice( std::auto_ptr<ConfigRom>( configRom ),
50           Ieee1394Service& ieee1394Service,
51           int nodeId );
52     virtual ~AvDevice();
53
54     static bool probe( ConfigRom& configRom );
55     virtual bool discover();
56    
57     virtual void setVerboseLevel(int l);
58     virtual void showDevice();
59
60     virtual bool setSamplingFrequency( int );
61     virtual int getSamplingFrequency( );
62
63     virtual int getStreamCount();
64     virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i);
65
66     virtual bool prepare();
67     virtual bool lock();
68     virtual bool unlock();
69
70     virtual bool startStreamByIndex(int i);
71     virtual bool stopStreamByIndex(int i);
72    
73     // redefinition to resolve ambiguity
74     virtual Ieee1394Service& get1394Service()
75         { return FFADODevice::get1394Service(); };
76     virtual ConfigRom& getConfigRom() const
77         { return FFADODevice::getConfigRom(); };
78        
79 protected:
80     virtual bool addPlugToProcessor( AVC::Plug& plug, Streaming::StreamProcessor *processor,
81                              Streaming::AmdtpAudioPort::E_Direction direction);
82 /*    bool setSamplingFrequencyPlug( AVC::Plug& plug,
83                                    AVC::Plug::EPlugDirection direction,
84                                    AVC::ESamplingFrequency samplingFrequency );*/
85    
86     struct VendorModelEntry *m_model;
87    
88     // streaming stuff
89     typedef std::vector< Streaming::StreamProcessor * > StreamProcessorVector;
90     StreamProcessorVector m_receiveProcessors;
91     StreamProcessorVector m_transmitProcessors;
92    
93     DECLARE_DEBUG_MODULE;
94 };
95
96 }
97
98 #endif //GENERICAVC_AVDEVICE_H
Note: See TracBrowser for help on using the browser.