root/trunk/libffado/src/metrichalo/mh_avdevice.h

Revision 1239, 2.3 kB (checked in by ppalmers, 16 years ago)
Line 
1 /*
2  * Copyright (C) 2005-2008 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB.
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 2 of the License, or
12  * (at your option) version 3 of the License.
13  *
14  * This program 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
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #ifndef MHDEVICE_H
25 #define MHDEVICE_H
26
27 #include "ffadodevice.h"
28
29 #include "debugmodule/debugmodule.h"
30 #include "libavc/avc_definitions.h"
31
32 // #include "libstreaming/mh/MHStreamProcessor.h"
33
34 class ConfigRom;
35 class Ieee1394Service;
36
37 namespace MetricHalo {
38
39 // struct to define the supported devices
40 struct VendorModelEntry {
41     unsigned int vendor_id;
42     unsigned int model_id;
43     char *vendor_name;
44     char *model_name;
45 };
46
47 class MHAvDevice : public FFADODevice {
48 public:
49     MHAvDevice( DeviceManager& d,
50                 std::auto_ptr<ConfigRom>( configRom ));
51     virtual ~MHAvDevice();
52
53     static bool probe( ConfigRom& configRom, bool generic = false );
54     static FFADODevice * createDevice( DeviceManager& d,
55                                        std::auto_ptr<ConfigRom>( configRom ));
56     static int getConfigurationId();
57     virtual bool discover();
58
59     virtual void showDevice();
60
61     virtual bool setSamplingFrequency( int );
62     virtual int getSamplingFrequency( );
63
64     virtual ClockSourceVector getSupportedClockSources();
65     virtual bool setActiveClockSource(ClockSource);
66     virtual ClockSource getActiveClockSource();
67
68     virtual int getStreamCount();
69     virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i);
70
71     virtual bool prepare();
72     virtual bool lock();
73     virtual bool unlock();
74
75     virtual bool startStreamByIndex(int i);
76     virtual bool stopStreamByIndex(int i);
77
78     signed int getIsoRecvChannel(void);
79     signed int getIsoSendChannel(void);
80
81 protected:
82     struct VendorModelEntry *m_model;
83
84 };
85
86 }
87
88 #endif
Note: See TracBrowser for help on using the browser.