root/branches/libfreebob-2.0/src/rme/rme_avdevice.h

Revision 336, 3.5 kB (checked in by pieterpalmers, 17 years ago)

- Merged the developments on trunk since branch-off:

branch occurred at rev 194
svn merge -r 194:HEAD https://svn.sourceforge.net/svnroot/freebob/trunk/libfreebob

- Modified libfreebobavc to use the messagebuffer for debug info.
- This should compile and run

Line 
1 /* rme_avdevice.h
2  * Copyright (C) 2006 Jonathan Woithe
3  * Copyright (C) 2006 by Pieter Palmers
4  *
5  * This file is part of FreeBob.
6  *
7  * FreeBob is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  * FreeBob is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with FreeBob; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19  * MA 02111-1307 USA.
20  */
21
22 #ifndef RMEDEVICE_H
23 #define RMEDEVICE_H
24
25 #include "iavdevice.h"
26
27 #include "debugmodule/debugmodule.h"
28 #include "libfreebobavc/avc_definitions.h"
29 #include "libfreebob/xmlparser.h"
30
31 // #include "libstreaming/RmeStreamProcessor.h"
32
33 class ConfigRom;
34 class Ieee1394Service;
35
36 namespace Rme {
37
38 class RmeDevice : public IAvDevice {
39 public:
40     enum ERmeModel {
41       RME_MODEL_NONE        = 0x0000,
42       RME_MODEL_FIREFACE800 = 0x0001,
43     };
44
45     RmeDevice( std::auto_ptr<ConfigRom>( configRom ),
46               Ieee1394Service& ieee1394Service,
47                   int nodeId,
48                   int verboseLevel );
49     virtual ~RmeDevice();
50
51     static bool probe( ConfigRom& configRom );
52     virtual bool discover();
53     virtual ConfigRom& getConfigRom() const;
54
55     // obsolete, will be removed soon, unused
56     virtual bool addXmlDescription( xmlNodePtr deviceNode ) {return true;};
57
58     virtual void showDevice() const;
59
60     virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
61     virtual int getSamplingFrequency( );
62
63     virtual bool setId(unsigned int id);
64
65     virtual int getStreamCount();
66     virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i);
67
68     virtual bool prepare();
69
70     virtual int startStreamByIndex(int i);
71     virtual int stopStreamByIndex(int i);
72
73     signed int getIsoRecvChannel(void);
74     signed int getIsoSendChannel(void);
75
76     signed int getEventSize(unsigned int dir);
77  
78 protected:
79     std::auto_ptr<ConfigRom>( m_configRom );
80     Ieee1394Service* m_1394Service;
81    
82     signed int       m_rme_model;
83     int              m_nodeId;
84     int              m_verboseLevel;
85     signed int m_id;
86     signed int m_iso_recv_channel, m_iso_send_channel;
87     signed int m_bandwidth;
88    
89 //      FreebobStreaming::RmeReceiveStreamProcessor *m_receiveProcessor;
90 //      FreebobStreaming::RmeTransmitStreamProcessor *m_transmitProcessor;
91
92 private:
93 //      bool addPort(FreebobStreaming::StreamProcessor *s_processor,
94 //              char *name,
95 //              enum FreebobStreaming::Port::E_Direction direction,
96 //              int position, int size);
97 //      bool addDirPorts(
98 //              enum FreebobStreaming::Port::E_Direction direction,
99 //              unsigned int sample_rate, unsigned int optical_mode);
100        
101         unsigned int ReadRegister(unsigned int reg);
102         signed int WriteRegister(unsigned int reg, quadlet_t data);
103
104         // IEEE1394 Vendor IDs.  One would expect only RME, but you never
105         // know if a clone might appear some day.
106         enum EVendorId {
107                 RME_VENDOR_RME = 0x00000a35,
108         };
109        
110         // IEEE1394 Model IDs for different RME hardware
111         enum EUnitVersionId {
112                 RME_MODELID_FIREFACE800 = 0x00101800,
113         };
114
115     // debug support
116     DECLARE_DEBUG_MODULE;
117 };
118
119 }
120
121 #endif
Note: See TracBrowser for help on using the browser.