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

Revision 332, 3.4 kB (checked in by jwoithe, 17 years ago)

Add the src/rme directory which was inadvertantly omitted from previous commit.

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( Ieee1394Service& ieee1394Service,
46                   int nodeId,
47                   int verboseLevel );
48     virtual ~RmeDevice();
49
50     virtual bool discover();
51     virtual ConfigRom& getConfigRom() const;
52
53     // obsolete, will be removed soon, unused
54     virtual bool addXmlDescription( xmlNodePtr deviceNode ) {return true;};
55
56     virtual void showDevice() const;
57
58     virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
59     virtual int getSamplingFrequency( );
60
61     virtual bool setId(unsigned int id);
62
63     virtual int getStreamCount();
64     virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i);
65
66     virtual bool prepare();
67
68     virtual int startStreamByIndex(int i);
69     virtual int stopStreamByIndex(int i);
70
71     signed int getIsoRecvChannel(void);
72     signed int getIsoSendChannel(void);
73
74     signed int getEventSize(unsigned int dir);
75  
76 protected:
77     Ieee1394Service* m_1394Service;
78     ConfigRom*       m_configRom;
79     signed int       m_rme_model;
80     int              m_nodeId;
81     int              m_verboseLevel;
82     signed int m_id;
83     signed int m_iso_recv_channel, m_iso_send_channel;
84     signed int m_bandwidth;
85    
86 //      FreebobStreaming::RmeReceiveStreamProcessor *m_receiveProcessor;
87 //      FreebobStreaming::RmeTransmitStreamProcessor *m_transmitProcessor;
88
89 private:
90 //      bool addPort(FreebobStreaming::StreamProcessor *s_processor,
91 //              char *name,
92 //              enum FreebobStreaming::Port::E_Direction direction,
93 //              int position, int size);
94 //      bool addDirPorts(
95 //              enum FreebobStreaming::Port::E_Direction direction,
96 //              unsigned int sample_rate, unsigned int optical_mode);
97        
98         unsigned int ReadRegister(unsigned int reg);
99         signed int WriteRegister(unsigned int reg, quadlet_t data);
100
101         // IEEE1394 Vendor IDs.  One would expect only RME, but you never
102         // know if a clone might appear some day.
103         enum EVendorId {
104                 RME_VENDOR_RME = 0x00000a35,
105         };
106        
107         // IEEE1394 Model IDs for different RME hardware
108         enum EUnitVersionId {
109                 RME_MODELID_FIREFACE800 = 0x00101800,
110         };
111
112     // debug support
113     DECLARE_DEBUG_MODULE;
114 };
115
116 }
117
118 #endif
Note: See TracBrowser for help on using the browser.