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

Revision 734, 2.4 kB (checked in by ppalmers, 15 years ago)

merge ppalmers-streaming branch

Line 
1 /*
2  * Copyright (C) 2005-2007 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 library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
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( Ieee1394Service& ieee1394Service,
50                 std::auto_ptr<ConfigRom>( configRom ));
51     virtual ~MHAvDevice();
52
53     static bool probe( ConfigRom& configRom );
54     static FFADODevice * createDevice( Ieee1394Service& ieee1394Service,
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.